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 die handler | |
function wpmu_get_custom_die_handler() { | |
return 'wpmu_custom_css_on_wp_die'; | |
} | |
// hook the function | |
add_filter('wp_die_handler', 'wpmu_get_custom_die_handler' ); | |
// custom login for theme |
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_set_default_media_settings( $blog_id, $user_id, $domain, $path, $site_id, $meta ) { | |
update_blog_option( $blog_id, $option = 'uploads_use_yearmonth_folders', $value = 0, $deprecated ); | |
} | |
add_action( 'wpmu_new_blog', 'wpmudev_set_default_media_settings',10, 6 ); |
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| |
NewerOlder