PluginProbe
Content Blocks Builder – Create blocks, repeater blocks with carousel, grid, popup layouts / trunk
Content Blocks Builder – Create blocks, repeater blocks with carousel, grid, popup layouts vtrunk
2.8.14 2.8.13 2.8.12 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.10 2.8.11 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.8.9 trunk 1.0.1 1.0.2 1.1.0 1.1.1 All 147 releases
← All changes | includes/post-type.php +11 -1 2.7.5trunk View file →
@@ -24,9 +24,9 @@
24 24 */
25 25 private static $instance;
26 26
27 27 /**
28 - * A dummy constructor
28 + * The constructor
29 29 */
30 30 private function __construct() {}
31 31
32 32 /**
@@ -63,8 +63,9 @@
63 63 * @return void
64 64 */
65 65 public function register_post_type( $post_type, $args = [], $labels = [] ) {
66 66 if ( empty( $labels['name'] ) || empty( $labels['singular_name'] ) ) {
67 + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
67 68 _doing_it_wrong( __CLASS__ . '->' . __FUNCTION__, __( 'name, singular_name labels are required', 'content-blocks-builder' ) );
68 69 return;
69 70 }
70 71
@@ -78,14 +79,21 @@
78 79 'name' => $name,
79 80 'singular_name' => $singular_name,
80 81 'menu_name' => $name,
81 82 'name_admin_bar' => $singular_name,
83 + // translators: %s: Post type singular name
82 84 'add_new' => sprintf( __( 'Add New %s', 'content-blocks-builder' ), $singular_name ),
85 + // translators: %s: Post type singular name
83 86 'add_new_item' => sprintf( __( 'Add New %s', 'content-blocks-builder' ), $singular_name ),
87 + // translators: %s: Post type singular name
84 88 'new_item' => sprintf( __( 'New %s', 'content-blocks-builder' ), $singular_name ),
89 + // translators: %s: Post type singular name
85 90 'edit_item' => sprintf( __( 'Edit %s', 'content-blocks-builder' ), $singular_name ),
91 + // translators: %s: Post type singular name
86 92 'view_item' => sprintf( __( 'View %s', 'content-blocks-builder' ), $singular_name ),
93 + // translators: %s: Post type name
87 94 'all_items' => sprintf( __( 'All %s', 'content-blocks-builder' ), $name ),
95 + // translators: %s: Post type name
88 96 'search_items' => sprintf( __( 'Search %s', 'content-blocks-builder' ), $name ),
89 97 'parent_item_colon' => __( 'Parent item:', 'content-blocks-builder' ),
90 98 'not_found' => __( 'No items found.', 'content-blocks-builder' ),
91 99 'not_found_in_trash' => __( 'No items found in trash.', 'content-blocks-builder' ),
@@ -95,8 +103,9 @@
95 103 $args = wp_parse_args(
96 104 $args,
97 105 [
98 106 'labels' => $labels,
107 + // translators: %s: Post type name
99 108 'description' => sprintf( __( 'All %s', 'content-blocks-builder' ), $name ),
100 109 'public' => true,
101 110 'publicly_queryable' => false,
102 111 'exclude_from_search' => true,
@@ -131,8 +140,9 @@
131 140 * @return void
132 141 */
133 142 public function register_taxonomy( $taxonomy_name, $post_type, $args = [], $labels = [] ) {
134 143 if ( empty( $labels['name'] ) || empty( $labels['singular_name'] ) ) {
144 + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
135 145 _doing_it_wrong( __CLASS__ . '->' . __FUNCTION__, __( 'name, singular_name labels are required', 'content-blocks-builder' ) );
136 146 return;
137 147 }
138 148