PHP Class Jetpack_Custom_CSS_Data_Migration, vip-mu-plugins-public

Datei anzeigen Open project: Automattic/vip-mu-plugins-public Class Usage Examples

Public Methods

Method Description
add_hooks ( ) Set up assorted actions and filters used by this class.
do_migration ( ) : integer | null Do the bulk of the migration.
get_all_revisions ( ) : array Get all revisions of the Jetpack CSS CPT entry.
get_options ( integer $post_id = null ) : array Get the options stored for a given revision ID.
get_post ( ) : array | boolean | null | WP_Post Get the post used for legacy storage.
register_legacy_post_type ( ) Re-register the legacy CPT so we can play with the content already in the database.

Method Details

add_hooks() public static method

Set up assorted actions and filters used by this class.
public static add_hooks ( )

do_migration() public static method

Do the bulk of the migration.
public static do_migration ( ) : integer | null
return integer | null

get_all_revisions() public static method

Get all revisions of the Jetpack CSS CPT entry.
public static get_all_revisions ( ) : array
return array

get_options() public static method

Jetpack used to version the settings by storing them as meta on the revision.
public static get_options ( integer $post_id = null ) : array
$post_id integer Post ID.
return array

get_post() public static method

Jetpack used to use a single post for all themes, just blanking it on theme switch. This gets that post.
public static get_post ( ) : array | boolean | null | WP_Post
return array | boolean | null | WP_Post

register_legacy_post_type() public static method

Re-register the legacy CPT so we can play with the content already in the database.
public static register_legacy_post_type ( )