diff --git a/projects/plugins/social/changelog/add-register-social-note-custom-type b/projects/plugins/social/changelog/add-register-social-note-custom-type new file mode 100644 index 0000000000000..841b54fb3c4c7 --- /dev/null +++ b/projects/plugins/social/changelog/add-register-social-note-custom-type @@ -0,0 +1,4 @@ +Significance: minor +Type: added + +Register CPT for Social Notes. diff --git a/projects/plugins/social/src/class-jetpack-social.php b/projects/plugins/social/src/class-jetpack-social.php index 8c12545f1b345..29f1a3ef721d4 100644 --- a/projects/plugins/social/src/class-jetpack-social.php +++ b/projects/plugins/social/src/class-jetpack-social.php @@ -104,6 +104,7 @@ function () { My_Jetpack_Initializer::init(); } ); + add_action( 'init', array( new Automattic\Jetpack\Social\Note(), 'register' ) ); $this->manager = $connection_manager ? $connection_manager : new Connection_Manager(); diff --git a/projects/plugins/social/src/class-note.php b/projects/plugins/social/src/class-note.php new file mode 100644 index 0000000000000..dd04b02e668e6 --- /dev/null +++ b/projects/plugins/social/src/class-note.php @@ -0,0 +1,53 @@ + true, + 'labels' => array( + 'name' => esc_html__( 'Social Notes', 'jetpack-social' ), + 'singular_name' => esc_html__( 'Social Note', 'jetpack-social' ), + 'menu_name' => esc_html__( 'Social Notes', 'jetpack-social' ), + 'name_admin_bar' => esc_html__( 'Social Note', 'jetpack-social' ), + 'add_new' => esc_html__( 'Add New', 'jetpack-social' ), + 'add_new_item' => esc_html__( 'Add New Note', 'jetpack-social' ), + 'new_item' => esc_html__( 'New Note', 'jetpack-social' ), + 'edit_item' => esc_html__( 'Edit Note', 'jetpack-social' ), + 'view_item' => esc_html__( 'View Note', 'jetpack-social' ), + 'all_items' => esc_html__( 'All Notes', 'jetpack-social' ), + 'search_items' => esc_html__( 'Search Notes', 'jetpack-social' ), + 'parent_item_colon' => esc_html__( 'Parent Notes:', 'jetpack-social' ), + 'not_found' => esc_html__( 'No Notes found.', 'jetpack-social' ), + 'not_found_in_trash' => esc_html__( 'No Notes found in Trash.', 'jetpack-social' ), + 'archives' => esc_html__( 'Notes archives', 'jetpack-social' ), + 'insert_into_item' => esc_html__( 'Insert into Note', 'jetpack-social' ), + 'uploaded_to_this_item' => esc_html__( 'Uploaded to this Note', 'jetpack-social' ), + 'filter_items_list' => esc_html__( 'Filter Notes list', 'jetpack-social' ), + 'items_list_navigation' => esc_html__( 'Notes list navigation', 'jetpack-social' ), + 'items_list' => esc_html__( 'Notes list', 'jetpack-social' ), + ), + 'show_in_rest' => true, + 'supports' => array( 'editor', 'thumbnail', 'publicize' ), + 'menu_icon' => 'dashicons-welcome-write-blog', + + ); + register_post_type( 'jetpack-social-note', $args ); + } +}