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 | |
function replace_nbsp_in_posts() { | |
global $wpdb; | |
$query = " | |
UPDATE {$wpdb->posts} | |
SET post_content = REPLACE(post_content, CHAR(160), ' ') | |
WHERE post_content LIKE '%" . chr(160) . "%' | |
"; |
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 | |
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [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
//$sec_header is supposed to be $gistgit | |
$gistgit = wp_remote_retrieve_body( wp_remote_get('https://api.github.com/users/'. $user .'/gists', array('timeout' => 10))); | |
if( is_wp_error($gistgit)) { | |
$error_string = $sec_header->get_error_message(); | |
echo '<div id="message" class="error"><p>' . $error_string . '</p></div>'; | |
wp_die(''); | |
} |