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 listexpiremembers_func( $atts, $content ) { | |
if ( !defined( 'MS_PLUGIN' ) ) return $content; | |
$args['subscription_status'] = 'expired'; | |
$all_members = MS_Model_Member::get_members( $args ); | |
$total_items = MS_Model_Member::get_members_count( $args ); | |
if( $all_members ){ |
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 sjaved_zip_gzip_mime_types ( $mimes ) { | |
$existing_mimes['zip'] = 'application/zip'; | |
$existing_mimes['gz'] = 'application/x-gzip'; | |
return $mimes; | |
} | |
add_filter('upload_mimes', 'sjaved_zip_gzip_mime_types'); |
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 sjaved_svg_mime_type($mimes) { | |
$mimes['svg'] = 'image/svg+xml'; | |
return $mimes; | |
} | |
add_filter('upload_mimes', 'sjaved_svg_mime_type'); |
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 wpmudev_mp_sho_order_number( $post ){ | |
if( 'mp_order' != get_post_type( $post ) ) return $post; | |
echo '<h1 class="order_number"> # ' .$post->post_title . '</h1>'; | |
echo '<style> | |
h1.order_number{ | |
margin-top: -42px; |
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 add_site_id_to_body_class( $classes ) { | |
global $post; | |
$current_blog_ID = get_current_blog_id(); | |
$classes[] = 'blog-' . $current_blog_ID; |
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 | |
global $wp; | |
$current_url = home_url(add_query_arg(array(),$wp->request)); |
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('site_option_active_sitewide_plugins', 'wpmu_modify_sitewide_plugins', 99999); | |
function wpmu_modify_sitewide_plugins($value) { | |
global $current_blog; | |
$useragent=$_SERVER['HTTP_USER_AGENT']; | |
if(preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i',$useragent)||preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie| |
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 get_active_events_count(){ | |
global $wpdb; | |
$count = $wpdb->get_var( | |
$wpdb->prepare( | |
"SELECT count(*) | |
FROM $wpdb->postmeta | |
WHERE meta_key = %s | |
and meta_value = %s ", |
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 sjaved_welcome_message_cb(){ | |
$current_user = wp_get_current_user(); | |
echo 'Hello ' . $current_user->display_name ; | |
} | |
add_shortocde('welcome_message', 'sjaved_welcome_message_cb', 10); |
NewerOlder