Skip to content

Commit

Permalink
Merge pull request #193 from dcooney/feature/layouts-update
Browse files Browse the repository at this point in the history
Feature/layouts update
  • Loading branch information
dcooney authored Jan 6, 2023
2 parents 20cb39c + f0b17d9 commit d30c08b
Show file tree
Hide file tree
Showing 55 changed files with 9,048 additions and 6,518 deletions.
8 changes: 7 additions & 1 deletion .phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
<exclude name="Generic.Arrays.DisallowShortArraySyntax" />
<!-- Allow short prefixes. -->
<exclude name="WordPress.NamingConventions.PrefixAllGlobals.ShortPrefixPassed"/>
<!-- Allow Yoda -->
<exclude name="WordPress.PHP.YodaConditions.NotYoda"/>
<!-- Allow large posts_per_page -->
<exclude name="WordPress.WP.PostsPerPage.posts_per_page_posts_per_page"/>
<exclude name="WordPress.Security.NonceVerification.Recommended" />
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
</rule>

<!-- Use WordPress "Docs" Coding Standards. -->
Expand All @@ -49,7 +55,7 @@
Multiple valid prefixes can be provided as a comma-delimited list. -->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array" value="alm" />
<property name="prefixes" type="array" value="alm, ajax_load_more, AjaxLoadMore" />
</properties>
</rule>

Expand Down
17 changes: 15 additions & 2 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Donate link: https://connekthq.com/donate/
Tags: infinite scroll, load more, ajax, lazy load, endless scroll, infinite scrolling, lazy loading, pagination, ajax, ajax posts, woocommerce, ajax load more, masonry
Requires at least: 4.4
Requires PHP: 5.6
Tested up to: 6.0
Stable tag: 5.5.4.1
Tested up to: 6.1
Stable tag: 5.5.5
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -263,6 +263,19 @@ How to install Ajax Load More.

== Changelog ==

= 5.5.5 - January 5, 2013 =
* UPDATE: Removed requirement of `transition_container` to be present when using Preloaded.
* UPDATE: Various updates required for the new 2.0 Layouts add-on release.
* UPDATE: Removed legacy loading style `circles` and reference from the CSS.
* NEW: Add new `getTotalPosts` and `getPostsCount` public JS functions that will return data from the localized window variables.
* NEW: Added Ajax Load More plugin navigation to the header on all admin plugin pages.
* 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"`
* 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' );`
* UPDATE: Improved security of shortcode output by sanitizing all fields before render.
* UPDATE: Code cleanup and organization.
* FIX: Fixed various issue with Filters add-on and JS `<noscript/>` fallback URLs when accessing paged results.


= 5.5.4.1 - August 24, 2022 =
* SECURITY: Patched and improved the data sanitization of some admin level operations.

Expand Down
57 changes: 28 additions & 29 deletions admin/admin-functions.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
<?php
/**
* ALM admin helpers.
*
* @package AjaxLoadMore
* @since 2.0.0
*/

/*
* alm_is_admin_screen
* Determine whether user is on an ALM admin screen
*
* @return boolean
* @since 2.12.0
*/

function alm_is_admin_screen(){
/**
* Determine whether user is on an ALM admin screen.
*
* @return boolean
* @since 2.12.0
*/
function alm_is_admin_screen() {
$return = false;
$screen = get_current_screen();
if($screen->parent_base === 'ajax-load-more'){
if ( $screen->parent_base === 'ajax-load-more' ) {
$return = true;
}
return $return;
Expand All @@ -36,7 +40,7 @@ function alm_has_addon_shortcodes() {
'alm_prev_post_installed',
'alm_seo_installed',
'alm_single_post_installed',
'alm_users_installed'
'alm_users_installed',
);

// Loop actions to determine if add-on/extension is installed.
Expand Down Expand Up @@ -64,7 +68,7 @@ function alm_has_extension_shortcodes() {
$actions = array(
'alm_acf_installed',
'alm_rest_api_installed',
'alm_terms_installed'
'alm_terms_installed',
);

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




/*
* alm_has_addon
* Does user have add-ons installed and activated
* License Page
*
* @return boolean
* @since 2.13.0
* @depreacted 3.3.0
*/

function alm_has_addon(){
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')) {
return true;
/**
* Check if any add-on installed and activated.
* Note: Used on the license screen.
*
* @return boolean
* @since 2.13.0
* @depreacted 3.3.0
*/
function alm_has_addon() {
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' ) ) {
return true;
} else {
return false;
return false;
}
}
Loading

0 comments on commit d30c08b

Please sign in to comment.