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
/** | |
* Restore Wordpress Separators | |
*/ | |
function SLUG_admin_separators() | |
{ | |
echo '<style type="text/css"> | |
#adminmenu li.wp-menu-separator {margin: 0;} | |
.admin-color-fresh #adminmenu li.wp-menu-separator {background: #444;} | |
.admin-color-midnight #adminmenu li.wp-menu-separator {background: #4a5258;} | |
.admin-color-light #adminmenu li.wp-menu-separator {background: #c2c2c2;} |
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 WP unnecessary roles **/ | |
remove_role('subscriber'); | |
remove_role('editor'); | |
remove_role('author'); | |
remove_role('contributor'); |
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
function SLUG_remove_revolution_slider_meta_boxes() { | |
remove_meta_box( 'mymetabox_revslider_0', 'page', 'normal' ); | |
remove_meta_box( 'mymetabox_revslider_0', 'post', 'normal' ); | |
remove_meta_box( 'mymetabox_revslider_0', 'post_type', 'normal' ); | |
remove_meta_box( 'mymetabox_revslider_0', 'post_type', 'normal' ); | |
} | |
add_action( 'do_meta_boxes', 'SLUG_remove_revolution_slider_meta_boxes' ); |
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
// -- Get Current User Role. | |
global $wp_roles; | |
$roles = wp_get_current_user()->roles[ 0 ]; | |
$role_display = $wp_roles->roles[ $roles ][ 'name' ]; |
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 WooCommerce SKUs Completely | |
add_filter( 'wc_product_sku_enabled', '__return_false' ); |
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
// -- Changing Image Library Processor. Fix Http Error on Media Upload. | |
add_filter( 'wp_image_editors', 'prefix_image_editor_default_to_gd' ); | |
/** | |
* Changing Image Library Processor. | |
* | |
* @param $editors | |
* | |
* @return array |
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
# Force HTTPS | |
RewriteEngine On | |
RewriteCond %{HTTPS} off | |
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] |
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
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{HTTPS} off | |
RewriteRule (.*) https://domain.com%{REQUEST_URI} [L,R=301,NC] | |
RewriteCond %{HTTP_HOST} ^www.domain.com [NC] | |
RewriteRule (.*) https://domain.com%{REQUEST_URI} [L,R=301,NC] |
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
This should be done by WP-CLI | |
wp post delete $(wp post list --name="$(wp eval 'echo sanitize_title( _x( "hello-world", "Default post slug" ) );')" --posts_per_page=1 --format=ids) | |
wp post delete $(wp post list --post_type=page --name="$(wp eval 'echo __( "sample-page" );')" --posts_per_page=1 --format=ids) | |
wp comment delete 1 | |
wp option update blogdescription "" | |
wp plugin uninstall akismet | |
wp plugin uninstall hello-dolly | |
wp theme delete twentyfifteen | |
wp theme delete twentyfourteen |
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
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
OlderNewer