PluginProbe
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News / 2.2.10
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News v2.2.10
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 2.3.5 2.3.6 2.4.0 2.4.1 2.4.10 2.4.11 2.4.12 2.4.13 2.4.14 2.4.15 2.4.16 2.4.17 2.4.18 2.4.19 2.4.2 2.4.20 2.4.21 All 88 releases
← All changes | includes/class-smart-post-show-post-types.php +21 -22 2.4.17 → 2.2.10 View file →
@@ -1,5 +1,8 @@
1 1 <?php
2 +if ( ! defined( 'ABSPATH' ) ) {
3 + exit; // Exit if accessed directly.
4 +}
2 5 /**
3 6 * Fired during plugin activation
4 7 *
5 8 * @link https://smartpostshow.com/
@@ -8,11 +11,8 @@
8 11 * @package Smart_Post_Show
9 12 * @subpackage Smart_Post_Show/includes
10 13 */
11 14
12 -if ( ! defined( 'ABSPATH' ) ) {
13 - exit; // Exit if accessed directly.
14 -}
15 15 /**
16 16 * Custom post class to register the carousel.
17 17 */
18 18 class Smart_Post_Show_Post_Type {
@@ -64,27 +64,25 @@
64 64 if ( post_type_exists( 'sp_post_carousel' ) ) {
65 65 return;
66 66 }
67 67 $capability = sp_pc_dashboard_capability();
68 - $show_ui = current_user_can( $capability ) ? true : false;
69 -
70 68 // Set the Smart post show post type labels.
71 69 $labels = apply_filters(
72 70 'sp_post_carousel_post_type_labels',
73 71 array(
74 - 'name' => __( 'Manage Shows', 'post-carousel' ),
75 - 'singular_name' => __( 'Show', 'post-carousel' ),
76 - 'menu_name' => __( 'Smart Post Show', 'post-carousel' ),
77 - 'all_items' => __( 'Manage Shows', 'post-carousel' ),
78 - 'add_new' => __( 'Add New', 'post-carousel' ),
79 - 'add_new_item' => __( 'Add New Show', 'post-carousel' ),
80 - 'edit' => __( 'Edit', 'post-carousel' ),
81 - 'edit_item' => __( 'Edit Show', 'post-carousel' ),
82 - 'new_item' => __( 'New Show', 'post-carousel' ),
83 - 'search_items' => __( 'Search Shows', 'post-carousel' ),
84 - 'not_found' => __( 'No Shows found', 'post-carousel' ),
85 - 'not_found_in_trash' => __( 'No Shows found in Trash', 'post-carousel' ),
86 - 'parent' => __( 'Parent Show', 'post-carousel' ),
72 + 'name' => __( 'Manage Shows', 'smart-post-show' ),
73 + 'singular_name' => __( 'Show', 'smart-post-show' ),
74 + 'menu_name' => __( 'Smart Post Show', 'smart-post-show' ),
75 + 'all_items' => __( 'Manage Shows', 'smart-post-show' ),
76 + 'add_new' => __( 'Add New', 'smart-post-show' ),
77 + 'add_new_item' => __( 'Add New Show', 'smart-post-show' ),
78 + 'edit' => __( 'Edit', 'smart-post-show' ),
79 + 'edit_item' => __( 'Edit Show', 'smart-post-show' ),
80 + 'new_item' => __( 'New Show', 'smart-post-show' ),
81 + 'search_items' => __( 'Search Shows', 'smart-post-show' ),
82 + 'not_found' => __( 'No Shows found', 'smart-post-show' ),
83 + 'not_found_in_trash' => __( 'No Shows found in Trash', 'smart-post-show' ),
84 + 'parent' => __( 'Parent Show', 'smart-post-show' ),
87 85 )
88 86 );
89 87 // Set the Smart post show post type arguments.
90 88 $menu_icon = 'data:image/svg+xml;base64,' . base64_encode(
@@ -92,13 +90,13 @@
92 90 );
93 91 $args = apply_filters(
94 92 'sp_post_carousel_post_type_args',
95 93 array(
96 - 'label' => __( 'Manage Shows', 'post-carousel' ),
97 - 'description' => __( 'Manage Shows', 'post-carousel' ),
94 + 'label' => __( 'Manage Shows', 'smart-post-show' ),
95 + 'description' => __( 'Manage Shows', 'smart-post-show' ),
98 96 'public' => false,
99 - 'show_ui' => $show_ui,
100 - 'show_in_menu' => $show_ui,
97 + 'show_ui' => true,
98 + 'show_in_menu' => true,
101 99 'menu_icon' => $menu_icon,
102 100 'hierarchical' => false,
103 101 'query_var' => false,
104 102 'menu_position' => 5,
@@ -114,8 +112,9 @@
114 112 'delete_post' => $capability,
115 113 'read_post' => $capability,
116 114 ),
117 115 'capability_type' => 'post',
116 + // 'rewrite' => true,
118 117 'labels' => $labels,
119 118 )
120 119 );
121 120