Skip to content

Commit

Permalink
Merge pull request #2100 from the-events-calendar/tweak/final-prep-fo…
Browse files Browse the repository at this point in the history
…r-asag-release

Prep for final release: asag
  • Loading branch information
codingmusician authored Jun 7, 2024
2 parents bbe68e8 + ac4d597 commit 91ac85e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 27 deletions.
3 changes: 3 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 =

Expand Down
48 changes: 24 additions & 24 deletions src/Tribe/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ 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() {
}

/**
* Hooks the filters used to register the assets.
*
* @since TBD
* @since 5.3.0
*
* @return void
*/
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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 '';
}

Expand All @@ -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 '';
}

Expand All @@ -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 '';
}

Expand All @@ -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 '';
}

Expand All @@ -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()
*
Expand All @@ -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()
*
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -531,18 +531,18 @@ 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;
}

/**
* 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.
*
Expand All @@ -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.
Expand All @@ -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
*/
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/functions/template-tags/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand All @@ -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.
*/
Expand Down

0 comments on commit 91ac85e

Please sign in to comment.