function import()
 {
     $count = 0;
     global $wpdb;
     $values = $wpdb->get_results("SELECT * FROM {$wpdb->postmeta} WHERE meta_key='_aioseop_keywords'");
     if ($values) {
         foreach ($values as $meta) {
             MetaData::add_tags($meta->post_id, stripslashes($meta->meta_value));
         }
         $count += count($values);
     }
     $values = $wpdb->get_results("SELECT * FROM {$wpdb->postmeta} WHERE meta_key='_aioseop_title'");
     if ($values) {
         foreach ($values as $meta) {
             MetaData::add_page_title($meta->post_id, stripslashes($meta->meta_value));
         }
         $count += count($values);
     }
     $values = $wpdb->get_results("SELECT * FROM {$wpdb->postmeta} WHERE meta_key='_aioseop_description'");
     if ($values) {
         foreach ($values as $meta) {
             MetaData::add_description($meta->post_id, stripslashes($meta->meta_value));
         }
         $count += count($values);
     }
     return $count;
 }
Example #2
0
 function import()
 {
     $count = 0;
     global $wpdb;
     $keywords = $wpdb->get_results("SELECT * FROM {$wpdb->postmeta} WHERE meta_key='title_tag'");
     if ($keywords) {
         foreach ($keywords as $keyword) {
             MetaData::add_page_title($keyword->post_id, $keyword->meta_value);
         }
         $count += count($keywords);
     }
     return $count;
 }