_migrate_achievement_content( int $post_id )

Migrate the achievement content legacy post meta to post_content.


Parameters Parameters

$post_id

(int) (Required) WP_Post ID.


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/functions/updates/llms-functions-updates-600.php

295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
function _migrate_achievement_content( $post_id ) {
    $meta_key = '_llms_achievement_content';
    $content  = get_post_meta( $post_id, $meta_key, true );
    if ( $content ) {
        wp_update_post(
            array(
                'ID'           => $post_id,
                'post_content' => $content,
            )
        );
    }
 
    delete_post_meta( $post_id, $meta_key );
 
}

Top ↑

Changelog Changelog

Changelog
Version Description
6.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.