This file contains hidden or 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_csutom_code_on_entire_network(){?> | |
| <style type="text/css"> | |
| /*Your custom CSS code will go here*/ | |
| </style> | |
| <?php } | |
| add_action('wp_footer','add_csutom_code_on_entire_network', 999); |
This file contains hidden or 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 SearchFilter( $query ) { | |
| if ( !is_admin() && $query->is_main_query() ) { | |
| if ($query->is_search) { | |
| $query->set('post_type', array( 'post', 'product' ) ); | |
| } | |
| } | |
| return $query; |
This file contains hidden or 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_redirect_user_from_wp_signup(){ | |
| global $pagenow; | |
| if( $pagenow == 'wp-signup.php'){ | |
| wp_redirect( 'Your_URL_GOES_HERE' ); | |
| exit; | |
| } | |
| } |
This file contains hidden or 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('gettext', 'sjaved_change_text_dynamically', 99, 3); | |
| if(function_exists('sjaved_change_text_dynamically')) : | |
| function sjaved_change_text_dynamically( $translated_text, $untranslated_text, $domain ){ | |
| if($domain == 'YourTextDomain' and $untranslated_text == 'YourText' ){ | |
| $translated_text = 'ReplacedText'; |
This file contains hidden or 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_action('admin_init', 'remove_admin_ads_from_other_pages'); | |
| function remove_admin_ads_from_other_pages(){ | |
| global $pagenow; | |
| if($pagenow != 'index.php') | |
| remove_action('admin_notices', 'admin_ads_output'); | |
| } |
This file contains hidden or 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_open_external_links_in_new_window(){ ?> | |
| <script type="text/javascript"> | |
| jQuery(document).ready(function($){ | |
| $('a').each(function() { | |
| var a = new RegExp('/' + window.location.host + '/'); | |
| if(!a.test(this.href)) { | |
| $(this).click(function(event) { | |
| event.preventDefault(); | |
| event.stopPropagation(); |
This file contains hidden or 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 hidden or 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 go_to_primary_blog($redirect_to, $request, $user){ | |
| $user_info = get_userdata($user->ID); | |
| return get_blogaddress_by_id($user_info->primary_blog) . 'wp-admin'; | |
| } | |
| add_filter("login_redirect", "go_to_primary_blog", 999, 3); |
This file contains hidden or 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 | |
| if( !function_exists('wpmudev_remove_query_string_from_mp_url') ) : | |
| add_filter('wp_audio_shortcode', 'wpmudev_remove_query_string_from_mp_url', 10, 5); | |
| function wpmudev_remove_query_string_from_mp_url( $html, $atts, $audio, $post_id, $library ){ | |
| $post_id = get_post() ? get_the_ID() : 0; | |
| static $instance = 0; |
This file contains hidden or 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 | |
| if( !function_exists('wpmudev_remove_set_pass_on_custom_registration_pages') ) : | |
| add_action('init', 'wpmudev_remove_set_pass_on_custom_registration_pages', 10); | |
| function wpmudev_remove_set_pass_on_custom_registration_pages( $col_headers ){ | |
| global $pagenow; | |
| if( $pagenow != 'wp-signup.php' && ( !isset( $_GET['action'] ) && $_GET['action'] != 'new_blog' ) ){ | |
| //Remove all actions of set password on multisite blog creation plugin if we are not on default signup page or on prosites add new blog page. |