/**
 * Save a custom meta value
 *
 * @deprecated 1.5.0
 * @deprecated use YMBESEO_Meta::set_value() or just use update_post_meta()
 * @see        YMBESEO_Meta::set_value()
 *
 * @param    string $meta_key   The meta to change.
 * @param    mixed  $meta_value The value to set the meta to.
 * @param    int    $post_id    The ID of the post to change the meta for.
 *
 * @return    bool    whether the value was changed
 */
function YMBESEO_set_value($meta_key, $meta_value, $post_id)
{
    _deprecated_function(__FUNCTION__, 'WPSEO 1.5.0', 'YMBESEO_Meta::set_value()');
    return YMBESEO_Meta::set_value($meta_key, $meta_value, $post_id);
}
 /**
  * Import from Joost's old robots meta plugin
  */
 public function import_robots_meta()
 {
     global $wpdb;
     $posts = $wpdb->get_results("SELECT ID, robotsmeta FROM {$wpdb->posts}");
     if (!$posts) {
         $this->set_msg(__('Error: no Robots Meta data found to import.', 'ymbeseo'));
         return;
     }
     if (is_array($posts) && $posts !== array()) {
         foreach ($posts as $post) {
             // Sync all possible settings.
             if ($post->robotsmeta) {
                 $pieces = explode(',', $post->robotsmeta);
                 foreach ($pieces as $meta) {
                     switch ($meta) {
                         case 'noindex':
                             YMBESEO_Meta::set_value('meta-robots-noindex', '1', $post->ID);
                             break;
                         case 'index':
                             YMBESEO_Meta::set_value('meta-robots-noindex', '2', $post->ID);
                             break;
                         case 'nofollow':
                             YMBESEO_Meta::set_value('meta-robots-nofollow', '1', $post->ID);
                             break;
                     }
                 }
             }
         }
     }
     $this->set_msg(__(sprintf('Robots Meta values imported. We recommend %sdisabling the Robots-Meta plugin%s to avoid any conflicts.', '<a href="' . esc_url(admin_url('admin.php?page=YMBESEO_tools&tool=import-export&deactivate_robots_meta=1#top#import-other')) . '">', '</a>'), 'ymbeseo'));
 }