Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- functions.php
- /**
- * @package WordPress
- * @subpackage Kleo
- * @author SeventhQueen <themesupport@seventhqueen.com>
- * @since Kleo 1.0
- */
- /**
- * Kleo Child Theme Functions
- * Add custom code below
- */
- remove_action( 'wp_head', 'feed_links_extra', 3 );
- remove_action( 'wp_head', 'feed_links', 2 );
- remove_action( 'wp_head', 'rsd_link' );
- remove_action( 'wp_head', 'wlwmanifest_link' );
- remove_action( 'wp_head', 'index_rel_link' );
- remove_action( 'wp_head', 'parent_post_rel_link', 10, 0 );
- remove_action( 'wp_head', 'start_post_rel_link', 10, 0 );
- remove_action( 'wp_head', 'adjacent_posts_rel_link', 10, 0 );
- remove_action( 'wp_head', 'wp_generator' );
- /**
- * add_image_size( 'wysija-newsletters-max', '600', '9999', array( "1", "") );
- * add_image_size( 'rt_media_thumbnail', '150', '150', array( "1", "") );
- * add_image_size( 'rt_media_activity_image', '320', '240', array( "1", "") );
- * add_image_size( 'rt_media_single_image', '800', '0', false );
- * add_image_size( 'rt_media_featured_image', '100', '100', array( "1", "") );
- * add_image_size( 'shop_thumbnail', '180', '180', array( "1", "") );
- * add_image_size( 'shop_catalog', '300', '300', array( "1", "") );
- * add_image_size( 'shop_single', '600', '600', array( "1", "") );
- * add_image_size( 'post-thumbnail', '672', '9999', false );
- * add_image_size( 'kleo-full-width', '1038', '9999', false );
- */
- //Remove query strings from static resources
- function _remove_script_version( $src ){
- $getMyUrl = site_url();
- $check = strpos($src, $getMyUrl);
- if ($check !== false) {
- $parts = explode( '?', $src );
- return $parts[0];
- }else{
- return $src;
- }
- }
- add_filter( 'script_loader_src', '_remove_script_version', 15, 1 );
- add_filter( 'style_loader_src', '_remove_script_version', 15, 1 );
- /**
- * Disable the emoji's
- */
- function disable_emojis() {
- remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
- remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
- remove_action( 'wp_print_styles', 'print_emoji_styles' );
- remove_action( 'admin_print_styles', 'print_emoji_styles' );
- remove_filter( 'the_content_feed', 'wp_staticize_emoji' );
- remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );
- remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
- add_filter( 'tiny_mce_plugins', 'disable_emojis_tinymce' );
- }
- add_action( 'init', 'disable_emojis' );
- /**
- * Filter function used to remove the tinymce emoji plugin.
- *
- * @param array $plugins
- * @return array Difference betwen the two arrays
- */
- function disable_emojis_tinymce( $plugins ) {
- if ( is_array( $plugins ) ) {
- return array_diff( $plugins, array( 'wpemoji' ) );
- } else {
- return array();
- }
- }
- ////////////////////////////////////////////////////////////////////////
- // BuddyPress Profile URL Integration //////////////////////////////////
- ////////////////////////////////////////////////////////////////////////
- add_filter('wpdiscuz_profile_url', 'wpdiscuz_bp_profile_url', 10, 2);
- function wpdiscuz_bp_profile_url($profile_url, $user) {
- if ($user) {
- if (class_exists('BuddyPress')) {
- $profile_url = bp_core_get_user_domain($user->ID);
- }
- }
- return $profile_url;
- }
- ////////////////////////////////////////////////////////////////////////
- // Icon-vkontakte //////////////////////////////////
- ////////////////////////////////////////////////////////////////////////
- function kleo_extra_social_icons( $icons ){
- $icons .= '<li><a target="_blank" href="https://vk.com/pitstop.business_GO" rel="nofollow"><i class="icon-vkontakte"></i><div class="ts-text">Vkontakte</div></a></li>';
- return $icons;
- }
- add_filter( 'kleo_get_social_profiles', 'kleo_extra_social_icons' );
- /////////////////////////////////////////////////////
- //ADD FONT AWESOME CDN WITH HTML https://fontawesomecdn.com///////////////////////////////////
- ////////////////////////////////////////////////////////////////////////
- function enqueue_our_required_stylesheets(){
- wp_enqueue_style('font-awesome', 'https://opensource.keycdn.com/fontawesome/4.5.0/font-awesome.min.css');
- }
- add_action('wp_enqueue_scripts','enqueue_our_required_stylesheets');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement