Example #1
0
/**
 * Helper function to create or update a post's meta description.
 */
function wpseo_upsert_new_description($post_id, $new_metadesc, $original_metadesc)
{
    $meta_key = WPSEO_Meta::$meta_prefix . 'metadesc';
    $return_key = 'metadesc';
    return wpseo_upsert_meta($post_id, $new_metadesc, $original_metadesc, $meta_key, $return_key);
}
Example #2
0
/**
 * Insert a new value
 *
 * @param string $what
 * @param int    $post_id
 * @param string $new
 * @param string $original
 *
 * @return string
 */
function wpseo_upsert_new($what, $post_id, $new, $original)
{
    $meta_key = WPSEO_Meta::$meta_prefix . $what;
    return wpseo_upsert_meta($post_id, $new, $original, $meta_key, $what);
}