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 | |
if (!function_exists('dd')) { | |
function dd() | |
{ | |
$args = func_get_args(); | |
echo "<script>"; | |
echo "console.log(".json_encode($args).")"; | |
echo "</script>"; | |
} | |
} |
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 | |
/** | |
* Create Logo Setting and Upload Control | |
* Namespaced for Sage Usage | |
*/ | |
function add_header_logo_settings($wp_customize) { | |
// add a setting for the site logo | |
$wp_customize->add_setting('header_logo'); | |
// Add a control to upload the logo | |
$wp_customize->add_control( new \WP_Customize_Image_Control( $wp_customize, 'header_logo', |
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
<div>Old Url:</div> http://<input id="old_url" name="old_url" type="text" value="old_url" onchange="replaceMyText()" onkeypress="this.onchange();" onpaste="this.onchange();" oninput="this.onchange();"/> | |
<div>New Url:</div> http://<input id="new_url" name="new_url" type="text" value="new_url" onchange="replaceMyText()" onkeypress="this.onchange();" onpaste="this.onchange();" oninput="this.onchange();"/> | |
<div id="haystack"> | |
UPDATE wp_options SET option_value = replace(option_value, 'http://old_url', 'http://new_url') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://old_url','http://new_url'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://old_url', 'http://new_url'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://old_url','http://new_url'); | |
UPDATE wp_options SET option_value = replace(option_value, 'http://www.old_url', 'http://new_url') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = repl |
NewerOlder