This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$blog_id = 1; //set the blog id to the main site id | |
switch_to_blog( $blog_id ); | |
$user_id = get_current_user_id(); | |
$group = Groups_Group::read_by_name( 'Premium' ); | |
if ( Groups_User_Group::read( $user_id, $group->group_id ) ) { | |
echo 'Premium'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
remove_action( 'wp_head', 'feed_links_extra', 3 ); // Display the links to the extra feeds such as category feeds | |
remove_action( 'wp_head', 'feed_links', 2 ); // Display the links to the general feeds: Post and Comment Feed | |
remove_action( 'wp_head', 'rsd_link' ); // Display the link to the Really Simple Discovery service endpoint, EditURI link | |
remove_action( 'wp_head', 'wlwmanifest_link' ); // Display the link to the Windows Live Writer manifest file. | |
remove_action( 'wp_head', 'index_rel_link' ); // index link | |
remove_action( 'wp_head', 'parent_post_rel_link', 10, 0 ); // prev link | |
remove_action( 'wp_head', 'start_post_rel_link', 10, 0 ); // start link | |
remove_action( 'wp_head', 'adjacent_posts_rel_link', 10, 0 ); // Display relational links for the posts adjacent to the current post. | |
remove_action( 'wp_head', 'wp_generator' ); // Display the XHTML generator that is generated on the wp_head hook, WP version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
remove_action('wp_head', 'wp_print_scripts'); | |
remove_action('wp_head', 'wp_print_head_scripts', 9); | |
remove_action('wp_head', 'wp_enqueue_scripts', 1); | |
add_action('wp_footer', 'wp_print_scripts', 3); | |
add_action('wp_footer', 'wp_enqueue_scripts', 3); | |
add_action('wp_footer', 'wp_print_head_scripts', 3); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function remove_wp_ver_css_js( $src ) { | |
if ( strpos( $src, 'ver=' ) ) | |
$src = remove_query_arg( 'ver', $src ); | |
return $src; | |
} | |
add_filter( 'style_loader_src', 'remove_wp_ver_css_js'); | |
add_filter( 'script_loader_src', 'remove_wp_ver_css_js'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function getTwitterFollowers($screenName = 'wpbeginner') | |
{ | |
// some variables | |
$consumerKey = 'YIQPxqfqQto5yaskourlA'; | |
$consumerSecret = 'OH3xiYM4oN3mjGK3as9m37zkKeyiHgKhBIgiNhoM'; | |
$token = get_option('cfTwitterToken'); | |
// get follower count from cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function bfan() { | |
$pageID = '199776743514953'; | |
$info = json_decode(file_get_contents('http://graph.facebook.com/' . $pageID)); | |
return $info->likes; | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('woocommerce_paypal_icon', 'custom_woocommerce_paypal_icon'); | |
function custom_woocommerce_paypal_icon( $url ) { | |
$url = get_bloginfo('template_url')."/images/PayPalLogo.png"; | |
return $url; | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// :: Custom ajax loader for Contact Form 7 :: | |
add_filter('wpcf7_ajax_loader', 'my_wpcf7_ajax_loader'); | |
function my_wpcf7_ajax_loader () { | |
return network_home_url() . '/assets/themes/ips-helpdesk/images/ajax-loader.gif'; | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var supportsTouch = 'ontouchstart' in window || navigator.msMaxTouchPoints, | |
docWidth = jQuery(document).width(); | |
if ( supportsTouch && docWidth > 768 ) jQuery('#navigation .parent').on('click',function(e) { e.preventDefault(); }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<if test="$topic['posts'] == 0"> | |
.. | |
</if> |
OlderNewer