diff --git a/readme.txt b/readme.txt index b10dc51602..c7e0cfe202 100644 --- a/readme.txt +++ b/readme.txt @@ -5,6 +5,9 @@ * Feature - Refactor tribe_asset to use Stellar Assets. [TCMN-172] * Tweak - Remove ini_check for deprecated safe_mode. [TBD] * Tweak - Added information about upcoming promotion. [ET-2113] +* Tweak - Added filters: `tribe_asset_enqueue_{$asset->get_slug()}` +* Tweak - Removed filters: `tribe_asset_enqueue_{$asset->slug}`, `tribe_asset_pre_register` +* Language: 7 new strings added, 5 updated, 2 fuzzied, and 0 obsoleted = [5.2.7] 2024-05-14 = diff --git a/src/Tribe/Assets.php b/src/Tribe/Assets.php index c174ccfa61..c28d42a777 100644 --- a/src/Tribe/Assets.php +++ b/src/Tribe/Assets.php @@ -25,7 +25,7 @@ public static function instance() { * Register the Methods in the correct places. * * @since 4.3 - * @since TBD Emptied of all hooks in favor of the stellarwp/assets library. + * @since 5.3.0 Emptied of all hooks in favor of the stellarwp/assets library. */ public function __construct() { } @@ -33,7 +33,7 @@ public function __construct() { /** * Hooks the filters used to register the assets. * - * @since TBD + * @since 5.3.0 * * @return void */ @@ -44,7 +44,7 @@ public function hook(): void { /** * Proxies the generic stellarwp/assets/enqueue filter to apply the TEC ones. * - * @since TBD + * @since 5.3.0 * * @param bool $enqueue If we should enqueue or not a given asset. * @param Asset $asset Which asset we are dealing with. @@ -56,7 +56,7 @@ public function proxy_enqueue_filter( $enqueue, $asset ) { * Allows developers to hook-in and prevent an asset from being loaded. * * @since 4.3 - * @since TBD Moved here from the `Tribe__Assets` class. + * @since 5.3.0 Moved here from the `Tribe__Assets` class. * * @param bool $enqueue If we should enqueue or not a given asset. * @param object $asset Which asset we are dealing with. @@ -67,7 +67,7 @@ public function proxy_enqueue_filter( $enqueue, $asset ) { * Allows developers to hook-in and prevent an asset from being loaded. * * @since 4.3 - * @since TBD Moved here from the `Tribe__Assets` class. + * @since 5.3.0 Moved here from the `Tribe__Assets` class. * * @param bool $enqueue If we should enqueue or not a given asset. * @param object $asset Which asset we are dealing with. @@ -86,10 +86,10 @@ public function proxy_enqueue_filter( $enqueue, $asset ) { * * @return string Script tag with the before and after strings attached to it. * - * @deprecated TBD + * @deprecated 5.3.0 */ public function filter_print_before_after_script( $tag, $handle ): string { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed - _deprecated_function( __METHOD__, 'TBD', '' ); + _deprecated_function( __METHOD__, '5.3.0', '' ); return ''; } @@ -104,10 +104,10 @@ public function filter_print_before_after_script( $tag, $handle ): string { // p * * @return string Script tag with the localization variable HTML attached to it. * - * @deprecated TBD + * @deprecated 5.3.0 */ public function filter_add_localization_data( $tag, $handle ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed - _deprecated_function( __METHOD__, 'TBD', '' ); + _deprecated_function( __METHOD__, '5.3.0', '' ); return ''; } @@ -121,10 +121,10 @@ public function filter_add_localization_data( $tag, $handle ) { // phpcs:ignore * * @return string Script tag with the defer and/or async attached. * - * @deprecated TBD + * @deprecated 5.3.0 */ public function filter_tag_async_defer( $tag, $handle ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed - _deprecated_function( __METHOD__, 'TBD', '' ); + _deprecated_function( __METHOD__, '5.3.0', '' ); return ''; } @@ -138,10 +138,10 @@ public function filter_tag_async_defer( $tag, $handle ) { // phpcs:ignore Generi * * @return string Script tag with the type=module * - * @deprecated TBD + * @deprecated 5.3.0 */ public function filter_modify_to_module( $tag, $handle ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed - _deprecated_function( __METHOD__, 'TBD', '' ); + _deprecated_function( __METHOD__, '5.3.0', '' ); return ''; } @@ -153,17 +153,17 @@ public function filter_modify_to_module( $tag, $handle ) { // phpcs:ignore Gener * * @return void * - * @deprecated TBD + * @deprecated 5.3.0 */ public function register_in_wp( $assets = null ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.Found - _deprecated_function( __METHOD__, 'TBD', '' ); + _deprecated_function( __METHOD__, '5.3.0', '' ); } /** * Enqueues registered assets based on their groups. * * @since 4.7 - * @since TBD Refactored to use the stellarwp/assets library. + * @since 5.3.0 Refactored to use the stellarwp/assets library. * * @uses TEC\Common\StellarWP\Assets\Assets::enqueue_group() * @@ -184,7 +184,7 @@ public function enqueue_group( $groups, $forcibly_enqueue = true ) { * registered. * * @since 4.3 - * @since TBD Refactored to use the stellarwp/assets library. + * @since 5.3.0 Refactored to use the stellarwp/assets library. * * @uses TEC\Common\StellarWP\Assets\Assets::enqueue() * @@ -367,7 +367,7 @@ public function register( $origin, $slug, $file, $deps = [], $action = null, $ar * Filter to change version number on assets. * * @since 4.3 - * @since TBD The second filter argument is now deprecated; added the slug as a third argument. + * @since 5.3.0 The second filter argument is now deprecated; added the slug as a third argument. * * @param string $version The version number. * @param null $deprecated Used to be the asset object, it will now be always null. @@ -531,10 +531,10 @@ function () use ( $conditional_callables ) { * * @return stdClass * - * @deprecated TBD + * @deprecated 5.3.0 */ public function parse_argument_localize( stdClass $asset ) { - _deprecated_function( __METHOD__, 'TBD', '' ); + _deprecated_function( __METHOD__, '5.3.0', '' ); return $asset; } @@ -542,7 +542,7 @@ public function parse_argument_localize( stdClass $asset ) { * Removes an Asset from been registered and enqueue. * * @since 4.3 - * @since TBD Refactored to use the stellarwp/assets library. + * @since 5.3.0 Refactored to use the stellarwp/assets library. * * @param string $slug Slug of the Asset. * @@ -557,7 +557,7 @@ public function remove( $slug ) { * * @since 4.3 * @since 4.11.0 Added $sort param. - * @since TBD Refactored to use the stellarwp/assets library. + * @since 5.3.0 Refactored to use the stellarwp/assets library. * * @param string|array $slug Slug of the Asset. * @param boolean $sort If we should do any sorting before returning. @@ -574,7 +574,7 @@ public function get( $slug = null, $sort = true ) { * * @param string|array $slug Slug of the Asset. * - * @since TBD Refactored to use the stellarwp/assets library. + * @since 5.3.0 Refactored to use the stellarwp/assets library. * * @return bool */ @@ -588,7 +588,7 @@ public function exists( $slug ) { * The method will force the scripts and styles to print overriding their registration and conditional. * * @since 4.12.6 - * @since TBD Refactored to use the stellarwp/assets library. + * @since 5.3.0 Refactored to use the stellarwp/assets library. * * @param string|array $group Which group(s) should be enqueued. * @param bool $echo Whether to print the group(s) tag(s) to the page or not; default to `true` to diff --git a/src/functions/template-tags/general.php b/src/functions/template-tags/general.php index 633c2f092a..ea0db524ae 100755 --- a/src/functions/template-tags/general.php +++ b/src/functions/template-tags/general.php @@ -649,7 +649,7 @@ function tribe_register_error( $indexes, $message ) { * Registers an asset. * * @since 4.3 - * @since TBD Replaced the function internals with calls to the stellarwp/assets library. + * @since 5.3.0 Replaced the function internals with calls to the stellarwp/assets library. * * @param object|string $origin The origin of the asset, either a class or a string. * @param string $slug The handle of the asset. @@ -699,7 +699,7 @@ function tribe_asset( $origin, $slug, $file, $deps = [], $action = null, $argume * conditional logic set for the asset and enqueue regardless. * * @since 4.7 - * @since TBD Refactored to use the `stellarwp/assets` library. + * @since 5.3.0 Refactored to use the `stellarwp/assets` library. * * @param string|array $slug Slug to enqueue * @param bool $force Whether to force the enqueue or not. @@ -715,7 +715,7 @@ function tribe_asset_enqueue( $slug, $force = true ) { * conditional logic set for the asset and enqueue regardless. * * @since 4.7 - * @since TBD Refactored to use the `stellarwp/assets` library. + * @since 5.3.0 Refactored to use the `stellarwp/assets` library. * * @param string|array $group Which group(s) should be enqueued. */