Skip to content

Commit d30c08b

Browse files
authored
Merge pull request #193 from dcooney/feature/layouts-update
Feature/layouts update
2 parents 20cb39c + f0b17d9 commit d30c08b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+9048
-6518
lines changed

.phpcs.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
<exclude name="Generic.Arrays.DisallowShortArraySyntax" />
2727
<!-- Allow short prefixes. -->
2828
<exclude name="WordPress.NamingConventions.PrefixAllGlobals.ShortPrefixPassed"/>
29+
<!-- Allow Yoda -->
30+
<exclude name="WordPress.PHP.YodaConditions.NotYoda"/>
31+
<!-- Allow large posts_per_page -->
32+
<exclude name="WordPress.WP.PostsPerPage.posts_per_page_posts_per_page"/>
33+
<exclude name="WordPress.Security.NonceVerification.Recommended" />
34+
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
2935
</rule>
3036

3137
<!-- Use WordPress "Docs" Coding Standards. -->
@@ -49,7 +55,7 @@
4955
Multiple valid prefixes can be provided as a comma-delimited list. -->
5056
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
5157
<properties>
52-
<property name="prefixes" type="array" value="alm" />
58+
<property name="prefixes" type="array" value="alm, ajax_load_more, AjaxLoadMore" />
5359
</properties>
5460
</rule>
5561

README.txt

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Donate link: https://connekthq.com/donate/
44
Tags: infinite scroll, load more, ajax, lazy load, endless scroll, infinite scrolling, lazy loading, pagination, ajax, ajax posts, woocommerce, ajax load more, masonry
55
Requires at least: 4.4
66
Requires PHP: 5.6
7-
Tested up to: 6.0
8-
Stable tag: 5.5.4.1
7+
Tested up to: 6.1
8+
Stable tag: 5.5.5
99
License: GPLv2 or later
1010
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1111

@@ -263,6 +263,19 @@ How to install Ajax Load More.
263263

264264
== Changelog ==
265265

266+
= 5.5.5 - January 5, 2013 =
267+
* UPDATE: Removed requirement of `transition_container` to be present when using Preloaded.
268+
* UPDATE: Various updates required for the new 2.0 Layouts add-on release.
269+
* UPDATE: Removed legacy loading style `circles` and reference from the CSS.
270+
* NEW: Add new `getTotalPosts` and `getPostsCount` public JS functions that will return data from the localized window variables.
271+
* NEW: Added Ajax Load More plugin navigation to the header on all admin plugin pages.
272+
* NEW: Added ability to add add-on licenses via wp-config constants. License activation will still need to be triggered from the License admin screen. `ALM_CACHE_LICENSE_KEY="xxxxxxxxxx"`
273+
* NEW: Added `alm_mask_license_keys` filter to mask the license keys rendering in the WP admin. `add_filter( 'alm_mask_license_keys', '__return_true' );`
274+
* UPDATE: Improved security of shortcode output by sanitizing all fields before render.
275+
* UPDATE: Code cleanup and organization.
276+
* FIX: Fixed various issue with Filters add-on and JS `<noscript/>` fallback URLs when accessing paged results.
277+
278+
266279
= 5.5.4.1 - August 24, 2022 =
267280
* SECURITY: Patched and improved the data sanitization of some admin level operations.
268281

admin/admin-functions.php

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
<?php
2+
/**
3+
* ALM admin helpers.
4+
*
5+
* @package AjaxLoadMore
6+
* @since 2.0.0
7+
*/
28

3-
/*
4-
* alm_is_admin_screen
5-
* Determine whether user is on an ALM admin screen
6-
*
7-
* @return boolean
8-
* @since 2.12.0
9-
*/
10-
11-
function alm_is_admin_screen(){
9+
/**
10+
* Determine whether user is on an ALM admin screen.
11+
*
12+
* @return boolean
13+
* @since 2.12.0
14+
*/
15+
function alm_is_admin_screen() {
1216
$return = false;
1317
$screen = get_current_screen();
14-
if($screen->parent_base === 'ajax-load-more'){
18+
if ( $screen->parent_base === 'ajax-load-more' ) {
1519
$return = true;
1620
}
1721
return $return;
@@ -36,7 +40,7 @@ function alm_has_addon_shortcodes() {
3640
'alm_prev_post_installed',
3741
'alm_seo_installed',
3842
'alm_single_post_installed',
39-
'alm_users_installed'
43+
'alm_users_installed',
4044
);
4145

4246
// Loop actions to determine if add-on/extension is installed.
@@ -64,7 +68,7 @@ function alm_has_extension_shortcodes() {
6468
$actions = array(
6569
'alm_acf_installed',
6670
'alm_rest_api_installed',
67-
'alm_terms_installed'
71+
'alm_terms_installed',
6872
);
6973

7074
// Loop actions to determine if add-on/extension is installed.
@@ -81,23 +85,18 @@ function alm_has_extension_shortcodes() {
8185
}
8286
}
8387

84-
85-
86-
87-
/*
88-
* alm_has_addon
89-
* Does user have add-ons installed and activated
90-
* License Page
91-
*
92-
* @return boolean
93-
* @since 2.13.0
94-
* @depreacted 3.3.0
95-
*/
96-
97-
function alm_has_addon(){
98-
if(has_action('alm_cta_installed') || has_action('alm_comments_installed') || has_action('alm_unlimited_installed') || has_action('alm_layouts_installed') || has_action('alm_nextpage_installed') || has_action('alm_preload_installed') || has_action('alm_paging_installed') || has_action('alm_prev_post_installed') || has_action('alm_single_post_installed') || has_action('alm_rest_api_installed') || has_action('alm_seo_installed') || has_action('alm_tabs_installed') || has_action('alm_theme_repeaters_installed') || has_action('alm_users_installed')) {
99-
return true;
88+
/**
89+
* Check if any add-on installed and activated.
90+
* Note: Used on the license screen.
91+
*
92+
* @return boolean
93+
* @since 2.13.0
94+
* @depreacted 3.3.0
95+
*/
96+
function alm_has_addon() {
97+
if ( has_action( 'alm_cta_installed' ) || has_action( 'alm_comments_installed' ) || has_action( 'alm_unlimited_installed' ) || has_action( 'alm_layouts_installed' ) || has_action( 'alm_nextpage_installed' ) || has_action( 'alm_preload_installed' ) || has_action( 'alm_paging_installed' ) || has_action( 'alm_prev_post_installed' ) || has_action( 'alm_single_post_installed' ) || has_action( 'alm_rest_api_installed' ) || has_action( 'alm_seo_installed' ) || has_action( 'alm_tabs_installed' ) || has_action( 'alm_theme_repeaters_installed' ) || has_action( 'alm_users_installed' ) ) {
98+
return true;
10099
} else {
101-
return false;
100+
return false;
102101
}
103102
}

0 commit comments

Comments
 (0)