Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
a7883dc
Plugin https://github.com/audrasjb/site-health-audit-enqueued-assets/…
manuelRod Dec 8, 2021
83fd785
partial unit testing added.
manuelRod Dec 9, 2021
69d1208
Adding more unit testing.
manuelRod Dec 9, 2021
bda604d
adding missing tests.
manuelRod Dec 10, 2021
663fe3a
removing duplicated get_transient
manuelRod Dec 15, 2021
3a5cc54
Adding filter for transient, and invalidate cache on switch_theme, ac…
manuelRod Dec 15, 2021
2e555a1
Adding user action to null transient cache.
manuelRod Dec 15, 2021
c668003
redirects after cleaning cache to site-health.php without query args
manuelRod Dec 16, 2021
2baf8fe
All prefix needs to be updated to perflab_
manuelRod Dec 16, 2021
327bed3
adding functionality to get resources sizes
manuelRod Dec 16, 2021
f7c2a60
Adding filesize to the transient cache, and functionality related to it.
manuelRod Dec 17, 2021
5333d7d
Merge branch 'trunk' into add/sitehealth-enqueued-assets
manuelRod Jan 10, 2022
b0ccda4
migrating module to new module structure
manuelRod Jan 10, 2022
2757e8c
migration to new module structure
manuelRod Jan 10, 2022
07a6a70
split code refactor, creation of a new helper file with helper method…
manuelRod Jan 10, 2022
47f4f9f
prefix fix
manuelRod Jan 10, 2022
84af518
refactor adding suggestions:
manuelRod Jan 10, 2022
a528fb4
changing wording and adding information about bellow threshold limits.
manuelRod Jan 11, 2022
e42b9c2
implementing new threshold limits
manuelRod Jan 11, 2022
90c17f8
Adding filters for limits. Fixing _n translatable strings.
manuelRod Jan 26, 2022
35edbca
nit-pick fixes
manuelRod Jan 27, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
removing duplicated get_transient
  • Loading branch information
manuelRod committed Dec 15, 2021
commit 663fe3addcc33f1cffa83850bb11428766d2ed7a
16 changes: 8 additions & 8 deletions modules/audit-enqueued-assets/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ function aea_audit_enqueued_styles() {
* @return int|false Number of total scripts or false if transient hasn't been set.
*/
function aea_get_total_enqueued_scripts() {
$enqueued_scripts = false;
if ( get_transient( 'aea_enqueued_scripts' ) ) {
$list_enqueued_scripts = get_transient( 'aea_enqueued_scripts' );
$enqueued_scripts = count( $list_enqueued_scripts );
$enqueued_scripts = false;
$list_enqueued_scripts = get_transient( 'aea_enqueued_scripts' );
if ( $list_enqueued_scripts ) {
$enqueued_scripts = count( $list_enqueued_scripts );
}
return $enqueued_scripts;
}
Expand All @@ -78,10 +78,10 @@ function aea_get_total_enqueued_scripts() {
* @return int|false Number of total styles or false if transient hasn't been set.
*/
function aea_get_total_enqueued_styles() {
$enqueued_styles = false;
if ( get_transient( 'aea_enqueued_styles' ) ) {
$list_enqueued_styles = get_transient( 'aea_enqueued_styles' );
$enqueued_styles = count( $list_enqueued_styles );
$enqueued_styles = false;
$list_enqueued_styles = get_transient( 'aea_enqueued_styles' );
if ( $list_enqueued_styles ) {
$enqueued_styles = count( $list_enqueued_styles );
}
return $enqueued_styles;
}
Expand Down