From 725ec4678971a25c96cfadc47c7369df673ed931 Mon Sep 17 00:00:00 2001 From: priethor <27339341+priethor@users.noreply.github.com> Date: Mon, 12 May 2025 20:33:57 +0200 Subject: [PATCH 1/3] Add `SCF` prefix to `since` statements --- includes/admin/admin-notices.php | 2 +- includes/admin/beta-features.php | 2 +- .../class-scf-beta-feature-editor-sidebar.php | 4 ++-- .../admin/beta-features/class-scf-beta-feature.php | 4 ++-- includes/admin/views/beta-features/beta-features.php | 2 +- includes/fields/class-acf-field-nav-menu.php | 4 ++-- includes/fields/class-acf-field-output.php | 2 +- includes/rest-api.php | 2 +- includes/rest-api/class-acf-rest-types-endpoint.php | 10 +++++----- includes/validation.php | 2 +- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/includes/admin/admin-notices.php b/includes/admin/admin-notices.php index f0e30f65..4ef5165b 100644 --- a/includes/admin/admin-notices.php +++ b/includes/admin/admin-notices.php @@ -131,7 +131,7 @@ function acf_render_admin_notices() { * @param string $text The admin notice text. * @param string $type The type of notice (warning, error, success, info). * @param boolean $dismissible Is this notification dismissible (default true) (since 5.11.0). - * @param boolean $persisted Store once a notice has been dismissed per user and prevent showing it again. (since 6.1.0). + * @param boolean $persisted Store once a notice has been dismissed per user and prevent showing it again. (since SCF 6.1.0). * @return ACF_Admin_Notice */ function acf_add_admin_notice( $text = '', $type = 'info', $dismissible = true, $persisted = false ) { diff --git a/includes/admin/beta-features.php b/includes/admin/beta-features.php index 6b66cbc2..1051fd58 100644 --- a/includes/admin/beta-features.php +++ b/includes/admin/beta-features.php @@ -5,7 +5,7 @@ * This file contains the admin beta features functionality for Secure Custom Fields. * * @package Secure Custom Fields - * @since 6.5.0 + * @since SCF 6.5.0 */ if ( ! defined( 'ABSPATH' ) ) { diff --git a/includes/admin/beta-features/class-scf-beta-feature-editor-sidebar.php b/includes/admin/beta-features/class-scf-beta-feature-editor-sidebar.php index ee51b108..2d9aba9f 100644 --- a/includes/admin/beta-features/class-scf-beta-feature-editor-sidebar.php +++ b/includes/admin/beta-features/class-scf-beta-feature-editor-sidebar.php @@ -5,7 +5,7 @@ * This beta feature allows moving field group elements to the editor sidebar. * * @package Secure Custom Fields - * @since 6.5.0 + * @since SCF 6.5.0 */ if ( ! defined( 'ABSPATH' ) ) { @@ -20,7 +20,7 @@ * for a cleaner interface. * * @package Secure Custom Fields - * @since 6.5.0 + * @since SCF 6.5.0 */ class SCF_Admin_Beta_Feature_Editor_Sidebar extends SCF_Admin_Beta_Feature { diff --git a/includes/admin/beta-features/class-scf-beta-feature.php b/includes/admin/beta-features/class-scf-beta-feature.php index 0d1b10f5..75971b37 100644 --- a/includes/admin/beta-features/class-scf-beta-feature.php +++ b/includes/admin/beta-features/class-scf-beta-feature.php @@ -5,7 +5,7 @@ * This class serves as the base for all beta features in Secure Custom Fields. * * @package Secure Custom Fields - * @since 6.5.0 + * @since SCF 6.5.0 */ if ( ! defined( 'ABSPATH' ) ) { @@ -20,7 +20,7 @@ * for managing beta feature settings and UI. * * @package Secure Custom Fields - * @since 6.5.0 + * @since SCF 6.5.0 */ class SCF_Admin_Beta_Feature { diff --git a/includes/admin/views/beta-features/beta-features.php b/includes/admin/views/beta-features/beta-features.php index f668db3b..fb4203af 100644 --- a/includes/admin/views/beta-features/beta-features.php +++ b/includes/admin/views/beta-features/beta-features.php @@ -3,7 +3,7 @@ * Admin Beta Features View * * @package Secure Custom Fields - * @since 6.5.0 + * @since SCF 6.5.0 */ if ( ! defined( 'ABSPATH' ) ) { diff --git a/includes/fields/class-acf-field-nav-menu.php b/includes/fields/class-acf-field-nav-menu.php index 4e612e5b..8527428a 100644 --- a/includes/fields/class-acf-field-nav-menu.php +++ b/includes/fields/class-acf-field-nav-menu.php @@ -3,7 +3,7 @@ * This is a PHP file containing the code for the acf_field_nav_menu class. * * @package wordpress/secure-custom-fields - * @since 6.5.0 + * @since SCF 6.5.0 */ if ( ! class_exists( 'Acf_Field_Nav_Menu' ) ) : @@ -17,7 +17,7 @@ class Acf_Field_Nav_Menu extends acf_field { * * @type function * @date 5/03/2014 - * @since 6.5.0 + * @since SCF 6.5.0 */ public function initialize() { diff --git a/includes/fields/class-acf-field-output.php b/includes/fields/class-acf-field-output.php index 3d3692e0..311ed58a 100644 --- a/includes/fields/class-acf-field-output.php +++ b/includes/fields/class-acf-field-output.php @@ -33,7 +33,7 @@ public function initialize() { */ public function render_field( $field ) { - // Deprecated since 6.3.2 and will be removed in a future release. + // Deprecated since SCF 6.3.2 and will be removed in a future release. _deprecated_function( __FUNCTION__, '6.3.2' ); return false; } diff --git a/includes/rest-api.php b/includes/rest-api.php index fd5554e7..abb5153a 100644 --- a/includes/rest-api.php +++ b/includes/rest-api.php @@ -3,7 +3,7 @@ * REST API * * @package Secure Custom Fields - * @since 6.4.0 + * @since SCF 6.4.0 */ // Exit if accessed directly. diff --git a/includes/rest-api/class-acf-rest-types-endpoint.php b/includes/rest-api/class-acf-rest-types-endpoint.php index 973b89f4..d1867cbd 100644 --- a/includes/rest-api/class-acf-rest-types-endpoint.php +++ b/includes/rest-api/class-acf-rest-types-endpoint.php @@ -16,14 +16,14 @@ * * Extends the /wp/v2/types endpoint to include SCF fields. * - * @since 6.5.0 + * @since SCF 6.5.0 */ class SCF_Rest_Types_Endpoint { /** * Initialize the class. * - * @since 6.5.0 + * @since SCF 6.5.0 */ public function __construct() { add_action( 'rest_api_init', array( $this, 'register_extra_fields' ) ); @@ -32,7 +32,7 @@ public function __construct() { /** * Register extra SCF fields for the post types endpoint. * - * @since 6.5.0 + * @since SCF 6.5.0 * * @return void */ @@ -53,7 +53,7 @@ public function register_extra_fields() { /** * Get SCF fields for a post type. * - * @since 6.5.0 + * @since SCF 6.5.0 * * @param array $post_type_object The post type object. * @return array Array of field data. @@ -86,7 +86,7 @@ public function get_scf_fields( $post_type_object ) { /** * Get the schema for the SCF fields. * - * @since 6.5.0 + * @since SCF 6.5.0 * * @return array The schema for the SCF fields. */ diff --git a/includes/validation.php b/includes/validation.php index 7b9ba7ee..999f068c 100644 --- a/includes/validation.php +++ b/includes/validation.php @@ -230,7 +230,7 @@ function acf_get_validation_errors() { * @type function * @date 6/10/13 * @since ACF 5.0.0 - * @since 6.4.1 Added the $input parameter, which is required in the get_error method. + * @since SCF 6.4.1 Added the $input parameter, which is required in the get_error method. * * @param string $input name attribute of DOM element. * From 9e848edc4c1acdbcca9250eff5050a6b9f78bded Mon Sep 17 00:00:00 2001 From: priethor <27339341+priethor@users.noreply.github.com> Date: Mon, 12 May 2025 20:43:23 +0200 Subject: [PATCH 2/3] Fix more references --- includes/admin/admin-notices.php | 2 +- includes/api/api-template.php | 2 +- includes/fields/class-acf-field-clone.php | 4 ++-- includes/fields/class-acf-field-output.php | 2 +- includes/locations.php | 6 +++--- includes/rest-api.php | 2 +- secure-custom-fields.php | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/includes/admin/admin-notices.php b/includes/admin/admin-notices.php index 4ef5165b..1a3bbd49 100644 --- a/includes/admin/admin-notices.php +++ b/includes/admin/admin-notices.php @@ -131,7 +131,7 @@ function acf_render_admin_notices() { * @param string $text The admin notice text. * @param string $type The type of notice (warning, error, success, info). * @param boolean $dismissible Is this notification dismissible (default true) (since 5.11.0). - * @param boolean $persisted Store once a notice has been dismissed per user and prevent showing it again. (since SCF 6.1.0). + * @param boolean $persisted Store once a notice has been dismissed per user and prevent showing it again. (since ACF 6.1.0). * @return ACF_Admin_Notice */ function acf_add_admin_notice( $text = '', $type = 'info', $dismissible = true, $persisted = false ) { diff --git a/includes/api/api-template.php b/includes/api/api-template.php index 2eb699f7..6252c9b2 100644 --- a/includes/api/api-template.php +++ b/includes/api/api-template.php @@ -205,7 +205,7 @@ function _acf_update_escaped_html_log( $escaped = array() ) { /** * Deletes the array of instances where HTML was altered due to escaping in the_field or a shortcode. - * Since 6.2.7, also clears the legacy `acf_will_escape_html_log` option to clean up. + * Since ACF 6.2.7, also clears the legacy `acf_will_escape_html_log` option to clean up. * * @since ACF 6.2.5 * diff --git a/includes/fields/class-acf-field-clone.php b/includes/fields/class-acf-field-clone.php index c33d87fc..d740b2b6 100644 --- a/includes/fields/class-acf-field-clone.php +++ b/includes/fields/class-acf-field-clone.php @@ -5,7 +5,7 @@ * This class handles the clone field type, which allows users to select and display existing fields. * * @package wordpress/secure-custom-fields - * @since 5.0.0 + * @since ACF 5.0.0 */ // phpcs:disable PEAR.NamingConventions.ValidClassName @@ -15,7 +15,7 @@ * * Handles the functionality for the clone field type. * - * @since 5.0.0 + * @since ACF 5.0.0 */ class acf_field_clone extends acf_field { diff --git a/includes/fields/class-acf-field-output.php b/includes/fields/class-acf-field-output.php index 311ed58a..be3b2588 100644 --- a/includes/fields/class-acf-field-output.php +++ b/includes/fields/class-acf-field-output.php @@ -33,7 +33,7 @@ public function initialize() { */ public function render_field( $field ) { - // Deprecated since SCF 6.3.2 and will be removed in a future release. + // Deprecated since ACF 6.3.2 and will be removed in a future release. _deprecated_function( __FUNCTION__, '6.3.2' ); return false; } diff --git a/includes/locations.php b/includes/locations.php index f2d69cdf..45cc05ab 100644 --- a/includes/locations.php +++ b/includes/locations.php @@ -180,7 +180,7 @@ function acf_validate_location_rule( $rule = array() ) { function acf_get_location_rule_operators( $rule ) { $operators = ACF_Location::get_operators( $rule ); - // Get operators from location type since 5.9. + // Get operators from location type since ACF 5.9. $location_type = acf_get_location_type( $rule['param'] ); if ( $location_type ) { $operators = $location_type->get_operators( $rule ); @@ -213,7 +213,7 @@ function acf_get_location_rule_operators( $rule ) { function acf_get_location_rule_values( $rule ) { $values = array(); - // Get values from location type since 5.9. + // Get values from location type since ACF 5.9. $location_type = acf_get_location_type( $rule['param'] ); if ( $location_type ) { $values = $location_type->get_values( $rule ); @@ -248,7 +248,7 @@ function acf_get_location_rule_values( $rule ) { function acf_match_location_rule( $rule, $screen, $field_group ) { $result = false; - // Get result from location type since 5.9. + // Get result from location type since ACF 5.9. $location_type = acf_get_location_type( $rule['param'] ); if ( $location_type ) { $result = $location_type->match( $rule, $screen, $field_group ); diff --git a/includes/rest-api.php b/includes/rest-api.php index abb5153a..ba80099b 100644 --- a/includes/rest-api.php +++ b/includes/rest-api.php @@ -3,7 +3,7 @@ * REST API * * @package Secure Custom Fields - * @since SCF 6.4.0 + * @since ACF 6.4.0 */ // Exit if accessed directly. diff --git a/secure-custom-fields.php b/secure-custom-fields.php index b6602a0e..808415d4 100644 --- a/secure-custom-fields.php +++ b/secure-custom-fields.php @@ -408,7 +408,7 @@ public function init() { */ do_action( 'acf/include_options_pages', ACF_MAJOR_VERSION ); - // If we're on WP 6.5 or newer, load block bindings. This will move to an autoloader in SCF 6.3. + // If we're on WP 6.5 or newer, load block bindings. This will move to an autoloader in ACF 6.3. if ( version_compare( get_bloginfo( 'version' ), '6.5-beta1', '>=' ) ) { acf_include( 'includes/Blocks/Bindings.php' ); new ACF\Blocks\Bindings(); From c7646d5def31dcf21f1e654dd7fdfa710e989ae2 Mon Sep 17 00:00:00 2001 From: priethor <27339341+priethor@users.noreply.github.com> Date: Mon, 12 May 2025 20:50:43 +0200 Subject: [PATCH 3/3] Last batch of changes --- assets/src/js/_acf-validation.js | 2 +- docs/code-reference/admin/admin-notices-file.md | 4 ++-- docs/code-reference/api/api-template-file.md | 2 +- docs/code-reference/validation-file.md | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/assets/src/js/_acf-validation.js b/assets/src/js/_acf-validation.js index d8683ec6..19960409 100644 --- a/assets/src/js/_acf-validation.js +++ b/assets/src/js/_acf-validation.js @@ -168,7 +168,7 @@ * * @since ACF 5.7.5 * - * @param {string} [location=before] - The location to add the error, before or after the input. Default before. Since 6.3. + * @param {string} [location=before] - The location to add the error, before or after the input. Default before. Since ACF 6.3. * @return void */ showErrors: function ( location = 'before' ) { diff --git a/docs/code-reference/admin/admin-notices-file.md b/docs/code-reference/admin/admin-notices-file.md index abcd1cde..159b00e5 100644 --- a/docs/code-reference/admin/admin-notices-file.md +++ b/docs/code-reference/admin/admin-notices-file.md @@ -25,8 +25,8 @@ Creates and returns a new notice. * @since ACF 5.0.0 * @param string $text The admin notice text. * @param string $type The type of notice (warning, error, success, info). -* @param boolean $dismissible Is this notification dismissible (default true) (since 5.11.0). -* @param boolean $persisted Store once a notice has been dismissed per user and prevent showing it again. (since 6.1.0). +* @param boolean $dismissible Is this notification dismissible (default true) (since ACF 5.11.0). +* @param boolean $persisted Store once a notice has been dismissed per user and prevent showing it again. (since ACF 6.1.0). * @return ACF_Admin_Notice --- diff --git a/docs/code-reference/api/api-template-file.md b/docs/code-reference/api/api-template-file.md index a841c22f..9515d9bb 100644 --- a/docs/code-reference/api/api-template-file.md +++ b/docs/code-reference/api/api-template-file.md @@ -52,7 +52,7 @@ Updates the array of instances where HTML was altered due to escaping in the_fie ## `_acf_delete_escaped_html_log()` Deletes the array of instances where HTML was altered due to escaping in the_field or a shortcode. -Since 6.2.7, also clears the legacy `acf_will_escape_html_log` option to clean up. +Since ACF 6.2.7, also clears the legacy `acf_will_escape_html_log` option to clean up. * @since ACF 6.2.5 * @return boolean True on success, or false on failure. diff --git a/docs/code-reference/validation-file.md b/docs/code-reference/validation-file.md index 77d8cdc6..5b0188dd 100644 --- a/docs/code-reference/validation-file.md +++ b/docs/code-reference/validation-file.md @@ -30,7 +30,7 @@ Get the validation error. * @type function * @date 6/10/13 * @since ACF 5.0.0 -* @since 6.4.1 Added the $input parameter, which is required in the get_error method. +* @since SCF 6.4.1 Added the $input parameter, which is required in the get_error method. * @param string $input name attribute of DOM element. * @return string|bool