admin
4 years ago
core
4 years ago
class-activator.php
4 years ago
class-assets.php
4 years ago
class-builder-page.php
4 years ago
class-deactivator.php
4 years ago
class-debug-info.php
4 years ago
class-feed-deserializer.php
4 years ago
class-feed-old.php
4 years ago
class-feed-page.php
4 years ago
class-feed-serializer.php
4 years ago
class-feed-shortcode.php
4 years ago
class-feed-widget.php
4 years ago
class-plugin-settings.php
4 years ago
class-plugin-support.php
4 years ago
class-plugin.php
4 years ago
class-post-types.php
4 years ago
class-settings-save.php
4 years ago
class-view.php
4 years ago
index.php
4 years ago
page-setting-fig.php
4 years ago
page-setting-support.php
4 years ago
class-post-types.php
71 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WP_Rplg_Google_Reviews\Includes; |
| 4 | |
| 5 | class Post_Types { |
| 6 | |
| 7 | const FEED_POST_TYPE = 'grw_feed'; |
| 8 | |
| 9 | public function register() { |
| 10 | add_action('init', array($this, 'register_post_types')); |
| 11 | } |
| 12 | |
| 13 | public function register_post_types() { |
| 14 | $this->register_feed_post_type(); |
| 15 | } |
| 16 | |
| 17 | public function register_feed_post_type() { |
| 18 | $labels = array( |
| 19 | 'name' => _x('Reviews widgets', 'Post Type General Name', 'grw'), |
| 20 | 'singular_name' => _x('Reviews widget', 'Post Type Singular Name', 'grw'), |
| 21 | 'menu_name' => __('Reviews widgets', 'grw'), |
| 22 | 'name_admin_bar' => __('Reviews widget', 'grw'), |
| 23 | 'archives' => __('Reviews Feed Archives', 'grw'), |
| 24 | 'attributes' => __('Reviews Feed Attributes', 'grw'), |
| 25 | 'parent_item_colon' => __('Parent Reviews Feed:', 'grw'), |
| 26 | 'all_items' => __('Widgets', 'grw'), |
| 27 | 'add_new_item' => __('Add New Reviews Feed', 'grw'), |
| 28 | 'add_new' => __('Add Reviews Feed', 'grw'), |
| 29 | 'new_item' => __('New Reviews Feed', 'grw'), |
| 30 | 'edit_item' => __('Edit Reviews Feed', 'grw'), |
| 31 | 'update_item' => __('Update Reviews Feed', 'grw'), |
| 32 | 'view_item' => __('View Reviews Feed', 'grw'), |
| 33 | 'view_items' => __('View Reviews Feeds', 'grw'), |
| 34 | 'search_items' => __('Search Reviews Widgets', 'grw'), |
| 35 | 'not_found' => __('Not found', 'grw'), |
| 36 | 'not_found_in_trash' => __('Not found in Trash', 'grw'), |
| 37 | 'featured_image' => __('Featured Image', 'grw'), |
| 38 | 'set_featured_image' => __('Set featured image', 'grw'), |
| 39 | 'remove_featured_image' => __('Remove featured image', 'grw'), |
| 40 | 'use_featured_image' => __('Use as featured image', 'grw'), |
| 41 | 'insert_into_item' => __('Insert into item', 'grw'), |
| 42 | 'uploaded_to_this_item' => __('Uploaded to this item', 'grw'), |
| 43 | 'items_list' => __('Reviews Feeds list', 'grw'), |
| 44 | 'items_list_navigation' => __('Reviews Feeds list navigation', 'grw'), |
| 45 | 'filter_items_list' => __('Filter items list', 'grw'), |
| 46 | ); |
| 47 | |
| 48 | $args = array( |
| 49 | 'label' => __('Reviews Feed', 'grw'), |
| 50 | 'labels' => $labels, |
| 51 | 'supports' => array('title'), |
| 52 | 'taxonomies' => array(), |
| 53 | 'hierarchical' => false, |
| 54 | 'public' => false, |
| 55 | 'show_in_rest' => false, |
| 56 | 'show_ui' => true, |
| 57 | 'show_in_menu' => 'grw', |
| 58 | 'show_in_admin_bar' => false, |
| 59 | 'show_in_nav_menus' => false, |
| 60 | 'can_export' => true, |
| 61 | 'has_archive' => false, |
| 62 | 'exclude_from_search' => true, |
| 63 | 'publicly_queryable' => false, |
| 64 | 'capabilities' => array('create_posts' => 'do_not_allow'), |
| 65 | 'map_meta_cap' => true, |
| 66 | ); |
| 67 | |
| 68 | register_post_type(self::FEED_POST_TYPE, $args); |
| 69 | } |
| 70 | } |
| 71 |