diff --git a/bin/baseline.neon b/bin/baseline.neon index 43377944..b5e73342 100644 --- a/bin/baseline.neon +++ b/bin/baseline.neon @@ -1,41 +1,5 @@ parameters: ignoreErrors: - - - message: '#^Access to an undefined property ACF_Admin_Field_Groups\:\:\$not_found_label\.$#' - identifier: property.notFound - count: 1 - path: ../includes/admin/post-types/admin-field-groups.php - - - - message: '#^Action callback returns array but should not return anything\.$#' - identifier: return.void - count: 1 - path: ../includes/admin/post-types/admin-field-groups.php - - - - message: '#^Class ACF_Admin_Post_type referenced with incorrect case\: ACF_Admin_Post_Type\.$#' - identifier: class.nameCase - count: 1 - path: ../includes/admin/post-types/admin-post-type.php - - - - message: '#^Access to an undefined property ACF_Admin_Post_Types\:\:\$not_found_label\.$#' - identifier: property.notFound - count: 1 - path: ../includes/admin/post-types/admin-post-types.php - - - - message: '#^Access to an undefined property ACF_Admin_Taxonomies\:\:\$not_found_label\.$#' - identifier: property.notFound - count: 1 - path: ../includes/admin/post-types/admin-taxonomies.php - - - - message: '#^Access to an undefined property ACF_Admin_UI_Options_Pages\:\:\$not_found_label\.$#' - identifier: property.notFound - count: 1 - path: ../includes/admin/post-types/class-acf-admin-ui-options-pages.php - - message: '#^Variable \$field might not be defined\.$#' identifier: variable.undefined diff --git a/includes/admin/admin-internal-post-type-list.php b/includes/admin/admin-internal-post-type-list.php index ecfa52f2..4364bada 100644 --- a/includes/admin/admin-internal-post-type-list.php +++ b/includes/admin/admin-internal-post-type-list.php @@ -69,6 +69,13 @@ class ACF_Admin_Internal_Post_Type_List { */ public $is_pro_feature = false; + /** + * The label for the "not found" message. + * + * @var string + */ + public $not_found_label = ''; + /** * Constructs the class. */ diff --git a/includes/admin/post-types/admin-field-groups.php b/includes/admin/post-types/admin-field-groups.php index 9df4e244..e1f88174 100644 --- a/includes/admin/post-types/admin-field-groups.php +++ b/includes/admin/post-types/admin-field-groups.php @@ -40,7 +40,7 @@ class ACF_Admin_Field_Groups extends ACF_Admin_Internal_Post_Type_List { public function __construct() { add_action( 'admin_menu', array( $this, 'admin_menu' ), 7 ); add_action( 'load-edit.php', array( $this, 'handle_redirection' ) ); - add_action( 'post_class', array( $this, 'get_admin_table_post_classes' ), 10, 3 ); + add_filter( 'post_class', array( $this, 'get_admin_table_post_classes' ), 10, 3 ); parent::__construct(); } diff --git a/includes/admin/post-types/admin-post-type.php b/includes/admin/post-types/admin-post-type.php index d90031ff..04a30b52 100644 --- a/includes/admin/post-types/admin-post-type.php +++ b/includes/admin/post-types/admin-post-type.php @@ -15,7 +15,7 @@ * * All the logic for editing a post type. */ - class ACF_Admin_Post_type extends ACF_Admin_Internal_Post_Type { + class ACF_Admin_Post_Type extends ACF_Admin_Internal_Post_Type { /** * The slug for the internal post type.