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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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
| define( 'MULTISITE', true ); | |
| define( 'SUBDOMAIN_INSTALL', false ); | |
| $base = '/wordpress/'; | |
| define( 'DOMAIN_CURRENT_SITE', 'localhost' ); | |
| define( 'PATH_CURRENT_SITE', '/wordpress/' ); | |
| define( 'SITE_ID_CURRENT_SITE', 1 ); | |
| define( 'BLOG_ID_CURRENT_SITE', 1 ); |
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
| define('WP_ALLOW_MULTISITE', true); |
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
| RewriteEngine On | |
| RewriteBase /wordpress/ | |
| RewriteRule ^index.php$ - [L] | |
| # uploaded files | |
| RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L] | |
| # add a trailing slash to /wp-admin | |
| RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] |
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
| function ap_remove_jetpack_page( ) { | |
| if ( class_exists( 'Jetpack' ) && !current_user_can( 'manage_options' ) ) { | |
| remove_menu_page( 'jetpack' ); | |
| } | |
| } | |
| add_action( 'admin_menu', 'ap_remove_jetpack_page', 999 ); | |
| add_action( 'admin_init', 'restrict_page' ); | |
| function restrict_page() { | |
| if ( class_exists( 'Jetpack' ) && !current_user_can( 'manage_options' ) ) { |
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
| /* | |
| * Remove "News from Modern Tribe" widget from dashboard | |
| */ | |
| function remove_tribe_dashboard_widget() { | |
| remove_meta_box('tribe_dashboard_widget', 'dashboard', 'normal'); | |
| } | |
| add_action('wp_dashboard_setup', 'remove_tribe_dashboard_widget'); |
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
| function custom_menu_page_removing() { | |
| remove_menu_page('vc-welcome'); //vc | |
| } | |
| add_action( 'admin_menu', 'custom_menu_page_removing' ); |
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
| function goodbye_divi_shortcode () { | |
| $clean_content = get_the_content(); | |
| $clean_content = preg_replace('/\[\/?et_pb.*?\]/','', $clean_content); | |
| return $clean_content; | |
| } | |
| add_filter('the_content', 'goodbye_divi_shortcode', 99, 1); |
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 my_remove_default_et_pb_custom_search() { | |
| remove_action( 'pre_get_posts', 'et_pb_custom_search' ); | |
| add_action( 'pre_get_posts', 'my_et_pb_custom_search' ); | |
| } | |
| add_action( 'wp_loaded', 'my_remove_default_et_pb_custom_search' ); | |
| function my_et_pb_custom_search( $query = false ) { | |
| if ( is_admin() || ! is_a( $query, 'WP_Query' ) || ! $query->is_search ) { |
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
| span.mobile_menu_bar:before { | |
| color: #ffffff !important; | |
| } |
OlderNewer