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
#!/bin/sh | |
# | |
# Quick WP installation | |
# | |
# Getting last version of WP | |
wget --quiet http://wordpress.org/latest.zip; | |
#unzip quietly | |
unzip -q latest.zip; |
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 Slider Revolution Metabox | |
* for certain post types | |
*/ | |
function remove_slider_rev_metabox() { | |
if ( is_admin() ) { | |
$post_types = array('page','post','custom','acf'); | |
foreach ($post_types as $post_type) { | |
remove_meta_box( 'mymetabox_revslider_0', $post_type, 'normal' ); | |
} |
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
SET @old := 'http://oldsite.carol.local'; | |
SET @chunk_old := '%oldsite.carol%'; | |
SET @new := 'http://mynewsite.carol.local'; | |
UPDATE wp_options SET option_value = replace(option_value, @old, @new); | |
UPDATE wp_posts SET guid = replace(guid, @old, @new); | |
UPDATE wp_posts SET post_content = replace(post_content, @old, @new); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,@old, @new); |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
NewerOlder