Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate file tree #15

Merged
merged 17 commits into from
Dec 20, 2024
Merged
34 changes: 24 additions & 10 deletions .phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,37 @@
<config name="testVersion" value="7.4-"/>
<rule ref="PHPCompatibilityWP" />

<!-- Display sniff code -->
<arg value="s"/>
<!-- Display sniff code -->
<arg value="s"/>

<rule ref="WordPress">
<exclude name="WordPress.NamingConventions.ValidHookName.UseUnderscores" /> <!-- 'acf/hookname' is used throughout. -->
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar" /> <!-- This is trivial and not really useful today. -->
<exclude name="WordPress.Files.FileName.InvalidClassFileName" /> <!-- Refactoring of this scale is not in scope yet.-->
</rule>
<rule ref="WordPress.Security.EscapeOutput">
<properties>
<property name="customEscapingFunctions" type="array">
<element value="acf_esc_attrs" /> <!-- This function takes an associated array and escapes both the attr title and attr value. -->
<element value="acf_esc_html" />
</property>
</properties>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="customEscapingFunctions" type="array">
<element value="acf_esc_attrs" /> <!-- This function takes an associated array and escapes both the attr title and attr value. -->
<element value="acf_esc_html" />
</property>
</properties>
</rule>
<rule ref="WordPress.Security.ValidatedSanitizedInput">
<properties>
<property name="customSanitizingFunctions" type="array">
<element value="acf_sanitize_request_args" />
</property>
</properties>
</rule>
<rule ref="WordPress.Security.NonceVerification">
<properties>
<property name="customNonceVerificationFunctions" type="array">
<element value="acf_verify_ajax" />
</property>
</properties>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="secure-custom-fields"/>
Expand Down
38 changes: 19 additions & 19 deletions assets/inc/color-picker-alpha/wp-color-picker-alpha.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
/**
* Alpha options
*
* @since 3.0.0
* @since ACF 3.0.0
*
* @type {Object}
*/
Expand All @@ -73,7 +73,7 @@
/**
* Get the current color or the new color.
*
* @since 3.0.0
* @since ACF 3.0.0
* @access private
*
* @param {Object|*} The color instance if not defined return the cuurent color.
Expand All @@ -97,7 +97,7 @@
/**
* Create widget
*
* @since 3.0.0
* @since ACF 3.0.0
* @access private
*
* @return {void}
Expand Down Expand Up @@ -126,7 +126,7 @@
/**
* Binds event listeners to the Iris.
*
* @since 3.0.0
* @since ACF 3.0.0
* @access private
*
* @return {void}
Expand Down Expand Up @@ -182,7 +182,7 @@
/**
* Init Controls
*
* @since 3.0.0
* @since ACF 3.0.0
* @access private
*
* @return {void}
Expand Down Expand Up @@ -228,7 +228,7 @@
/**
* Create the controls sizes
*
* @since 3.0.0
* @since ACF 3.0.0
* @access private
*
* @param {bool} reset Set to True for recreate the controls sizes.
Expand Down Expand Up @@ -288,7 +288,7 @@
/**
* Callback to update the controls and the current color.
*
* @since 3.0.0
* @since ACF 3.0.0
* @access private
*
* @return {void}
Expand Down Expand Up @@ -338,7 +338,7 @@
/**
* Paint dimensions.
*
* @since 3.0.0
* @since ACF 3.0.0
* @access private
*
* @param {string} origin Origin (position).
Expand Down Expand Up @@ -367,7 +367,7 @@
/**
* To update the options, see original source to view the available options.
*
* @since 3.0.0
* @since ACF 3.0.0
*
* @param {string} key The Option name.
* @param {mixed} value The Option value to update.
Expand Down Expand Up @@ -399,7 +399,7 @@
*
* @param newColor {string|*} The new color to use. Can be undefined.
*
* @since 3.0.0
* @since ACF 3.0.0
*
* @return {string} The element's color.
*/
Expand All @@ -421,7 +421,7 @@
/**
* Alpha options
*
* @since 3.0.0
* @since ACF 3.0.0
*
* @type {Object}
*/
Expand All @@ -431,7 +431,7 @@
/**
* Get the alpha options.
*
* @since 3.0.0
* @since ACF 3.0.0
* @access private
*
* @return {object} The current alpha options.
Expand Down Expand Up @@ -489,7 +489,7 @@
/**
* Create widget
*
* @since 3.0.0
* @since ACF 3.0.0
* @access private
*
* @return {void}
Expand All @@ -509,7 +509,7 @@
/**
* Binds event listeners to the color picker and create options, etc...
*
* @since 3.0.0
* @since ACF 3.0.0
* @access private
*
* @return {void}
Expand Down Expand Up @@ -575,7 +575,7 @@
* Handles the onChange event if one has been defined in the options and additionally
* sets the background color for the toggler element.
*
* @since 3.0.0
* @since ACF 3.0.0
*
* @param {Event} event The event that's being called.
* @param {HTMLElement} ui The HTMLElement containing the color picker.
Expand All @@ -599,7 +599,7 @@
/**
* Prevent any clicks inside this widget from leaking to the top and closing it.
*
* @since 3.0.0
* @since ACF 3.0.0
*
* @param {Event} event The event that's being called.
*
Expand All @@ -612,7 +612,7 @@
/**
* Open or close the color picker depending on the class.
*
* @since 3.0.0
* @since ACF 3.0.0
*/
self.toggler.on( 'click', function () {
if ( self.toggler.hasClass( 'wp-picker-open' ) ) {
Expand All @@ -626,7 +626,7 @@
* Checks if value is empty when changing the color in the color picker.
* If so, the background color is cleared.
*
* @since 3.0.0
* @since ACF 3.0.0
*
* @param {Event} event The event that's being called.
*
Expand Down Expand Up @@ -656,7 +656,7 @@
/**
* Enables the user to either clear the color in the color picker or revert back to the default color.
*
* @since 3.0.0
* @since ACF 3.0.0
*
* @param {Event} event The event that's being called.
*
Expand Down
24 changes: 12 additions & 12 deletions assets/src/js/_acf-compatibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Inserts a new __proto__ object compatibility layer
*
* @date 15/2/18
* @since 5.6.9
* @since ACF 5.6.9
*
* @param object instance The object to modify.
* @param object compatibilty Optional. The compatibilty layer.
Expand Down Expand Up @@ -35,7 +35,7 @@
* Returns the compatibility layer for a given instance
*
* @date 13/3/18
* @since 5.6.9
* @since ACF 5.6.9
*
* @param object instance The object to look in.
* @return object|null compatibility The compatibility object or null on failure.
Expand All @@ -51,7 +51,7 @@
* Compatibility layer for the acf object
*
* @date 15/2/18
* @since 5.6.9
* @since ACF 5.6.9
*
* @param void
* @return void
Expand Down Expand Up @@ -226,7 +226,7 @@
* Using the acf.add_action() or acf.add_filter() functions will interpret new field parameters as jQuery $field
*
* @date 12/5/18
* @since 5.6.9
* @since ACF 5.6.9
*
* @param void
* @return void
Expand Down Expand Up @@ -285,7 +285,7 @@
*
* @type object
* @date 8/09/2014
* @since 5.0.0
* @since ACF 5.0.0
*
* @param (object)
* @return (object)
Expand Down Expand Up @@ -412,7 +412,7 @@
*
* @type function
* @date 21/02/2014
* @since 3.5.1
* @since ACF 3.5.1
*
* @param n/a
* @return n/a
Expand Down Expand Up @@ -505,7 +505,7 @@
* description
*
* @date 15/2/18
* @since 5.6.9
* @since ACF 5.6.9
*
* @param type $var Description. Default.
* @return type Description.
Expand Down Expand Up @@ -537,7 +537,7 @@
* description
*
* @date 15/2/18
* @since 5.6.9
* @since ACF 5.6.9
*
* @param type $var Description. Default.
* @return type Description.
Expand Down Expand Up @@ -596,7 +596,7 @@
* description
*
* @date 15/2/18
* @since 5.6.9
* @since ACF 5.6.9
*
* @param type $var Description. Default.
* @return type Description.
Expand Down Expand Up @@ -646,7 +646,7 @@
* description
*
* @date 11/6/18
* @since 5.6.9
* @since ACF 5.6.9
*
* @param type $var Description. Default.
* @return type Description.
Expand Down Expand Up @@ -680,7 +680,7 @@
* description
*
* @date 11/6/18
* @since 5.6.9
* @since ACF 5.6.9
*
* @param type $var Description. Default.
* @return type Description.
Expand All @@ -707,7 +707,7 @@
* description
*
* @date 11/6/18
* @since 5.6.9
* @since ACF 5.6.9
*
* @param type $var Description. Default.
* @return type Description.
Expand Down
Loading
Loading