function aioseop_update_settings_check() { if (isset($_POST['aioseop_migrate'])) { aioseop_mrt_fix_meta(); } if (isset($_POST['aioseop_migrate_options']) || !get_option('aiosp_post_title_format') && !get_option('aioseop_options')) { aioseop_mrt_mkarry(); } }
function aioseop_update_settings_check() { global $aioseop_options; if ( isset( $_POST['aioseop_migrate'] ) ) aioseop_mrt_fix_meta(); if ( ( isset( $_POST['aioseop_migrate_options'] ) ) || ( empty( $aioseop_options ) ) ) { aioseop_mrt_mkarry(); } // WPML has now attached to filters, read settings again so they can be translated $aioseop_options = get_option( 'aioseop_options' ); }
add_option("aiosp_home_meta_tags", '', 'All in One SEO Plugin Additional Home Meta Tags', 'yes'); add_option("aiosp_do_log", null, 'All in One SEO Plugin write log file', 'yes'); */ //$role = get_role('administrator'); //$role->add_cap('Edit AIOSEOP Options'); //$role->add_cap('Edit AIOSEOP on Posts/Pages'); ////checking to see if things need to be updated //if_post('turn-on'){ /* automattic? if(!get_option('aioseop_options')){ aioseop_mrt_fix_meta(); //move this to the if also aioseop_mrt_mkarry(); } */ if ($_POST['aioseop_migrate']) { aioseop_mrt_fix_meta(); } if ($_POST['aioseop_migrate_options']) { aioseop_mrt_mkarry(); } if (!get_option('aiosp_post_title_format') && !get_option('aioseop_options')) { aioseop_mrt_mkarry(); } //}end _post('turn_on') ////end checking to see if things need to be updated function aioseop_mrt_fix_meta() { global $wpdb; $wpdb->query("UPDATE {$wpdb->postmeta} SET meta_key = '_aioseop_keywords' WHERE meta_key = 'keywords'"); $wpdb->query("UPDATE {$wpdb->postmeta} SET meta_key = '_aioseop_title' WHERE meta_key = 'title'"); $wpdb->query("UPDATE {$wpdb->postmeta} SET meta_key = '_aioseop_description' WHERE meta_key = 'description'");