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
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl'); |
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 | |
/** | |
* Change post status to draft if post is not complete | |
* @param integer $post_id Post ID | |
* @param object $post Post Object | |
* @author Mostafa Soufi <[email protected]> | |
*/ | |
function validate_post_field($post_id, $post) { | |
// Check post status | |
if( $post->post_status != 'publish' ) |
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 | |
/** | |
* Modify wordpress mime types | |
* @param array $existing_mimes current mimes | |
*/ | |
function modify_mime_type($existing_mimes){ | |
return array_merge($existing_mimes, array( | |
'7z' => 'application/x-7z-compressed', | |
'rar' => 'package/rar', | |
'tar' => 'package/x-tar', |
NewerOlder