Skip to content

Commit 98a7c12

Browse files
authored
Merge pull request #150 from ryanwelcher/fix/pcp-errors
Small fixes to pass Plugin Check Plugin tests.
2 parents 595ca6d + dcad98f commit 98a7c12

File tree

6 files changed

+50
-36
lines changed

6 files changed

+50
-36
lines changed

_blueprints/cpt-demo.php

Lines changed: 38 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -16,35 +16,38 @@
1616
* @package AdvancedQueryLoop
1717
*/
1818

19+
// Prevent direct access.
20+
defined( 'ABSPATH' ) || exit;
21+
1922
/**
2023
* Register the post type
2124
*/
2225
function register_stream_post_type() {
2326
$labels = array(
24-
'name' => _x( 'Streams', 'Post type general name', 'twitch-theme' ),
25-
'singular_name' => _x( 'Stream', 'Post type singular name', 'twitch-theme' ),
26-
'menu_name' => _x( 'Streams', 'Admin Menu text', 'twitch-theme' ),
27-
'name_admin_bar' => _x( 'Stream', 'Add New on Toolbar', 'twitch-theme' ),
28-
'add_new' => __( 'Add New', 'twitch-theme' ),
29-
'add_new_item' => __( 'Add New Stream', 'twitch-theme' ),
30-
'new_item' => __( 'New Stream', 'twitch-theme' ),
31-
'edit_item' => __( 'Edit Stream', 'twitch-theme' ),
32-
'view_item' => __( 'View Stream', 'twitch-theme' ),
33-
'all_items' => __( 'All Stream', 'twitch-theme' ),
34-
'search_items' => __( 'Search Streams', 'twitch-theme' ),
35-
'parent_item_colon' => __( 'Parent Stream:', 'twitch-theme' ),
36-
'not_found' => __( 'No Streams found.', 'twitch-theme' ),
37-
'not_found_in_trash' => __( 'No Streams found in Trash.', 'twitch-theme' ),
38-
'featured_image' => _x( 'Stream Thumbnail', 'Overrides the “Featured Image” phrase for this post type. Added in 4.3', 'twitch-theme' ),
39-
'set_featured_image' => _x( 'Set stream thumbnail', 'Overrides the “Set featured image” phrase for this post type. Added in 4.3', 'twitch-theme' ),
40-
'remove_featured_image' => _x( 'Remove stream thumbnail', 'Overrides the “Remove featured image” phrase for this post type. Added in 4.3', 'twitch-theme' ),
41-
'use_featured_image' => _x( 'Use as stream thumbnail', 'Overrides the “Use as featured image” phrase for this post type. Added in 4.3', 'twitch-theme' ),
42-
'archives' => _x( 'Stream archives', 'The post type archive label used in nav menus. Default “Post Archives”. Added in 4.4', 'twitch-theme' ),
43-
'insert_into_item' => _x( 'Insert into Stream', 'Overrides the “Insert into post”/”Insert into page” phrase (used when inserting media into a post). Added in 4.4', 'twitch-theme' ),
44-
'uploaded_to_this_item' => _x( 'Uploaded to this Stream', 'Overrides the “Uploaded to this post”/”Uploaded to this page” phrase (used when viewing media attached to a post). Added in 4.4', 'twitch-theme' ),
45-
'filter_items_list' => _x( 'Filter Stream list', 'Screen reader text for the filter links heading on the post type listing screen. Default “Filter posts list”/”Filter pages list”. Added in 4.4', 'twitch-theme' ),
46-
'items_list_navigation' => _x( 'Streams list navigation', 'Screen reader text for the pagination heading on the post type listing screen. Default “Posts list navigation”/”Pages list navigation”. Added in 4.4', 'twitch-theme' ),
47-
'items_list' => _x( 'Streams list', 'Screen reader text for the items list heading on the post type listing screen. Default “Posts list”/”Pages list”. Added in 4.4', 'twitch-theme' ),
27+
'name' => _x( 'Streams', 'Post type general name', 'advanced-query-loop' ),
28+
'singular_name' => _x( 'Stream', 'Post type singular name', 'advanced-query-loop' ),
29+
'menu_name' => _x( 'Streams', 'Admin Menu text', 'advanced-query-loop' ),
30+
'name_admin_bar' => _x( 'Stream', 'Add New on Toolbar', 'advanced-query-loop' ),
31+
'add_new' => __( 'Add New', 'advanced-query-loop' ),
32+
'add_new_item' => __( 'Add New Stream', 'advanced-query-loop' ),
33+
'new_item' => __( 'New Stream', 'advanced-query-loop' ),
34+
'edit_item' => __( 'Edit Stream', 'advanced-query-loop' ),
35+
'view_item' => __( 'View Stream', 'advanced-query-loop' ),
36+
'all_items' => __( 'All Stream', 'advanced-query-loop' ),
37+
'search_items' => __( 'Search Streams', 'advanced-query-loop' ),
38+
'parent_item_colon' => __( 'Parent Stream:', 'advanced-query-loop' ),
39+
'not_found' => __( 'No Streams found.', 'advanced-query-loop' ),
40+
'not_found_in_trash' => __( 'No Streams found in Trash.', 'advanced-query-loop' ),
41+
'featured_image' => _x( 'Stream Thumbnail', 'Overrides the “Featured Image” phrase for this post type. Added in 4.3', 'advanced-query-loop' ),
42+
'set_featured_image' => _x( 'Set stream thumbnail', 'Overrides the “Set featured image” phrase for this post type. Added in 4.3', 'advanced-query-loop' ),
43+
'remove_featured_image' => _x( 'Remove stream thumbnail', 'Overrides the “Remove featured image” phrase for this post type. Added in 4.3', 'advanced-query-loop' ),
44+
'use_featured_image' => _x( 'Use as stream thumbnail', 'Overrides the “Use as featured image” phrase for this post type. Added in 4.3', 'advanced-query-loop' ),
45+
'archives' => _x( 'Stream archives', 'The post type archive label used in nav menus. Default “Post Archives”. Added in 4.4', 'advanced-query-loop' ),
46+
'insert_into_item' => _x( 'Insert into Stream', 'Overrides the “Insert into post”/”Insert into page” phrase (used when inserting media into a post). Added in 4.4', 'advanced-query-loop' ),
47+
'uploaded_to_this_item' => _x( 'Uploaded to this Stream', 'Overrides the “Uploaded to this post”/”Uploaded to this page” phrase (used when viewing media attached to a post). Added in 4.4', 'advanced-query-loop' ),
48+
'filter_items_list' => _x( 'Filter Stream list', 'Screen reader text for the filter links heading on the post type listing screen. Default “Filter posts list”/”Filter pages list”. Added in 4.4', 'advanced-query-loop' ),
49+
'items_list_navigation' => _x( 'Streams list navigation', 'Screen reader text for the pagination heading on the post type listing screen. Default “Posts list navigation”/”Pages list navigation”. Added in 4.4', 'advanced-query-loop' ),
50+
'items_list' => _x( 'Streams list', 'Screen reader text for the items list heading on the post type listing screen. Default “Posts list”/”Pages list”. Added in 4.4', 'advanced-query-loop' ),
4851
);
4952

5053
$args = array(
@@ -90,17 +93,17 @@ function register_stream_post_type() {
9093
);
9194

9295
$labels = array(
93-
'name' => _x( 'Genres', 'taxonomy general name', 'textdomain' ),
94-
'singular_name' => _x( 'Genre', 'taxonomy singular name', 'textdomain' ),
95-
'search_items' => __( 'Search Genres', 'textdomain' ),
96-
'all_items' => __( 'All Genres', 'textdomain' ),
97-
'parent_item' => __( 'Parent Genre', 'textdomain' ),
98-
'parent_item_colon' => __( 'Parent Genre:', 'textdomain' ),
99-
'edit_item' => __( 'Edit Genre', 'textdomain' ),
100-
'update_item' => __( 'Update Genre', 'textdomain' ),
101-
'add_new_item' => __( 'Add New Genre', 'textdomain' ),
102-
'new_item_name' => __( 'New Genre Name', 'textdomain' ),
103-
'menu_name' => __( 'Genre', 'textdomain' ),
96+
'name' => _x( 'Genres', 'taxonomy general name', 'advanced-query-loop' ),
97+
'singular_name' => _x( 'Genre', 'taxonomy singular name', 'advanced-query-loop' ),
98+
'search_items' => __( 'Search Genres', 'advanced-query-loop' ),
99+
'all_items' => __( 'All Genres', 'advanced-query-loop' ),
100+
'parent_item' => __( 'Parent Genre', 'advanced-query-loop' ),
101+
'parent_item_colon' => __( 'Parent Genre:', 'advanced-query-loop' ),
102+
'edit_item' => __( 'Edit Genre', 'advanced-query-loop' ),
103+
'update_item' => __( 'Update Genre', 'advanced-query-loop' ),
104+
'add_new_item' => __( 'Add New Genre', 'advanced-query-loop' ),
105+
'new_item_name' => __( 'New Genre Name', 'advanced-query-loop' ),
106+
'menu_name' => __( 'Genre', 'advanced-query-loop' ),
104107
);
105108

106109
$args = array(

includes/enqueues.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
use function AdvancedQueryLoop\Utils\{ is_gutenberg_plugin_version_or_higher, is_core_version_or_higher };
1111

12+
// Prevent direct access.
13+
defined( 'ABSPATH' ) || exit;
1214

1315
// Bail on unit tests.
1416
if ( ! function_exists( 'add_action' ) ) {

includes/query-loop.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
namespace AdvancedQueryLoop;
99

10+
// Prevent direct access.
11+
defined( 'ABSPATH' ) || exit;
12+
1013
// Bail on unit tests.
1114
if ( ! function_exists( 'add_filter' ) ) {
1215
return;

includes/taxonomy.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
namespace AdvancedQueryLoop\Taxonomy;
99

10+
// Prevent direct access.
11+
defined( 'ABSPATH' ) || exit;
12+
1013
function convert_names_to_ids( $names, $tax ) {
1114
$rtn = [];
1215
foreach ( $names as $name ) {

includes/utilities.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
namespace AdvancedQueryLoop\Utils;
99

10+
// Prevent direct access.
11+
defined( 'ABSPATH' ) || exit;
12+
1013
/**
1114
* Helper to determine if the Gutenberg plugin is installed and if so, if it is at or higher a given version.
1215
*

readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Contributors: welcher
33
Tags: Query Loop, Custom Queries, Advanced Queries, Post Meta, Taxonomy
44
Requires at least: 6.2
5-
Tested up to: 6.8.1
5+
Tested up to: 6.9
66
Stable tag: 4.3.0
77
Requires PHP: 7.4
88
License: GPL v2 or later

0 commit comments

Comments
 (0)