Version Description
- December 6, 2018 =
- NEW - Added initial support for nesting Ajax Load More instances. Users can now run Ajax Load More inside of another instance of Ajax Load More. For example, using Next Page add-on functionality inside of Previous Post content(Single posts).
[ajax_load_more nested="true"]
. Note: This is new functionality as should be used with caution as it has not fully been tested through every possible situation. Nested ALM Filters are not currently supported. - NEW - Added new plugin uninstall script and settings for removing all Ajax Load More data on plugin removal/deletion.
- FIX - Fixed issue where filtering would stall when zero results were returned in an Ajax query.
- FIX - Added bug fix for Shortcode Builder throwing a JS error when tags and/or categories are empty.
Download this release
Release Info
Developer | dcooney |
Plugin | ![]() |
Version | 4.1.0 |
Comparing to | |
See all releases |
Code changes from version 4.0 to 4.1.0
- README.txt +12 -4
- admin/admin.php +86 -54
- admin/shortcode-builder/js/shortcode-builder.js +11 -0
- admin/shortcode-builder/shortcode-builder.php +28 -3
- ajax-load-more.php +5 -4
- core/classes/class.alm-shortcode.php +10 -2
- core/classes/includes/preloaded.php +6 -1
- core/dist/js/ajax-load-more.js +257 -50
- core/dist/js/ajax-load-more.min.js +1 -1
- core/src/js/ajax-load-more.js +127 -72
- core/src/js/modules/masonry.js +2 -3
- core/src/js/modules/resultsText.js +157 -0
- lang/ajax-load-more.pot +215 -181
- uninstall.php +88 -0
README.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://connekthq.com/donate/
|
|
4 |
Tags: infinite scroll, infinite scrolling, scroll, infinite, lazy load, lazy loading, endless scroll, pagination, ajax pagination, ajax, ajax posts, woocommerce, ajax load more, masonry
|
5 |
Requires at least: 3.6
|
6 |
Tested up to: 5.0
|
7 |
-
Stable tag: 4.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -37,7 +37,8 @@ Check out the **[demo site](https://connekthq.com/plugins/ajax-load-more/)** for
|
|
37 |
|
38 |
|
39 |
|
40 |
-
#### What's New
|
|
|
41 |
* **[Filters](https://connekthq.com/plugins/ajax-load-more/add-ons/filters/)** - The Filters add-on provides front-end and admin functionality for building and managing Ajax filters.
|
42 |
* **[User Query](https://connekthq.com/plugins/ajax-load-more/add-ons/users/)** - Query and display a list of WordPress users by role using a `WP_User_Query` and Ajax Load More.
|
43 |
* **[Advanced Custom Fields](https://connekthq.com/plugins/ajax-load-more/examples/advanced-custom-fields/)** - Compatibility and integration added for infinite scrolling Flexible Content, Gallery, Relationship and Repeater fields for Advanced Custom Fields.
|
@@ -118,13 +119,13 @@ Ajax Load More accepts a number of parameters that are passed to the WordPress q
|
|
118 |
* **images_loaded** - Wait for all images to load before displaying ajax loaded content (true/false). Default = 'false'
|
119 |
* **destroy_after** - Remove ajax load more functionality after 'n' number of pages have been loaded. Default = null
|
120 |
* **progress_bar** - Display progress bar indicator at the top of the window while loading Ajax content. Default = 'false'
|
121 |
-
* **progress_bar_color** - Enter the hex color of the progress bar.
|
122 |
-
. Default = 'ed7070'
|
123 |
* **button_label** - The label text for Load More button. Default = 'Older Posts'
|
124 |
* **button_loading_label** - Update the text of the Load More button while content is loading. Default = null
|
125 |
* **container_type** - Override the global Container Type that was set on ALM Settings page. Default = null
|
126 |
* **css_classes** - Add custom CSS classes to the Ajax Load More container. Default = null
|
127 |
* **id** - A unique ID for the Ajax Load More instance.
|
|
|
128 |
|
129 |
[→ See All Parameters](https://connekthq.com/plugins/ajax-load-more/docs/shortcode-parameters/)
|
130 |
|
@@ -371,6 +372,13 @@ How to install Ajax Load More.
|
|
371 |
|
372 |
== Changelog ==
|
373 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
374 |
= 4.0 - November 5, 2018 =
|
375 |
* NEW - Introducing [Ajax Load More Pro](https://connekthq.com/plugins/ajax-load-more/pro/)! Access to every Ajax Load More add-on in a single installation.
|
376 |
* NEW - Adding `category__and` and `tag__and` support for querying categories and tags.
|
4 |
Tags: infinite scroll, infinite scrolling, scroll, infinite, lazy load, lazy loading, endless scroll, pagination, ajax pagination, ajax, ajax posts, woocommerce, ajax load more, masonry
|
5 |
Requires at least: 3.6
|
6 |
Tested up to: 5.0
|
7 |
+
Stable tag: 4.1.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
37 |
|
38 |
|
39 |
|
40 |
+
#### What's New 4.0
|
41 |
+
* **[Pro](https://connekthq.com/plugins/ajax-load-more/pro/)** - Access to all premium add-ons in a single installation.
|
42 |
* **[Filters](https://connekthq.com/plugins/ajax-load-more/add-ons/filters/)** - The Filters add-on provides front-end and admin functionality for building and managing Ajax filters.
|
43 |
* **[User Query](https://connekthq.com/plugins/ajax-load-more/add-ons/users/)** - Query and display a list of WordPress users by role using a `WP_User_Query` and Ajax Load More.
|
44 |
* **[Advanced Custom Fields](https://connekthq.com/plugins/ajax-load-more/examples/advanced-custom-fields/)** - Compatibility and integration added for infinite scrolling Flexible Content, Gallery, Relationship and Repeater fields for Advanced Custom Fields.
|
119 |
* **images_loaded** - Wait for all images to load before displaying ajax loaded content (true/false). Default = 'false'
|
120 |
* **destroy_after** - Remove ajax load more functionality after 'n' number of pages have been loaded. Default = null
|
121 |
* **progress_bar** - Display progress bar indicator at the top of the window while loading Ajax content. Default = 'false'
|
122 |
+
* **progress_bar_color** - Enter the hex color of the progress bar. Default = 'ed7070'
|
|
|
123 |
* **button_label** - The label text for Load More button. Default = 'Older Posts'
|
124 |
* **button_loading_label** - Update the text of the Load More button while content is loading. Default = null
|
125 |
* **container_type** - Override the global Container Type that was set on ALM Settings page. Default = null
|
126 |
* **css_classes** - Add custom CSS classes to the Ajax Load More container. Default = null
|
127 |
* **id** - A unique ID for the Ajax Load More instance.
|
128 |
+
* **nested** - Is this a nested Ajax Load More instance. Default = false
|
129 |
|
130 |
[→ See All Parameters](https://connekthq.com/plugins/ajax-load-more/docs/shortcode-parameters/)
|
131 |
|
372 |
|
373 |
== Changelog ==
|
374 |
|
375 |
+
= 4.1.0 - December 6, 2018 =
|
376 |
+
* NEW - Added initial support for nesting Ajax Load More instances. Users can now run Ajax Load More inside of another instance of Ajax Load More. For example, using Next Page add-on functionality inside of Previous Post content(Single posts). `[ajax_load_more nested="true"]`. Note: This is new functionality as should be used with caution as it has not fully been tested through every possible situation. Nested ALM Filters are not currently supported.
|
377 |
+
* NEW - Added new plugin uninstall script and settings for removing all Ajax Load More data on plugin removal/deletion.
|
378 |
+
* FIX - Fixed issue where filtering would stall when zero results were returned in an Ajax query.
|
379 |
+
* FIX - Added bug fix for Shortcode Builder throwing a JS error when tags and/or categories are empty.
|
380 |
+
|
381 |
+
|
382 |
= 4.0 - November 5, 2018 =
|
383 |
* NEW - Introducing [Ajax Load More Pro](https://connekthq.com/plugins/ajax-load-more/pro/)! Access to every Ajax Load More add-on in a single installation.
|
384 |
* NEW - Adding `category__and` and `tag__and` support for querying categories and tags.
|
admin/admin.php
CHANGED
@@ -23,10 +23,10 @@ add_filter( 'admin_footer_text', 'alm_filter_admin_footer_text'); // Admin menu
|
|
23 |
*/
|
24 |
function alm_render_transient_notification(){
|
25 |
if(!has_action('alm_pro_installed')){
|
26 |
-
|
27 |
$msg = '🔥 Introducing <strong><a href="https://connekthq.com/plugins/ajax-load-more/pro/" target="_blank">Ajax Load More Pro</a></strong> - get instant access to all 13 add-ons in a single installation! <strong><a href="https://connekthq.com/plugins/ajax-load-more/pro/" target="_blank" class="button button-primary">Upgrade Now</a></strong>';
|
28 |
-
|
29 |
-
alm_transient_notification($msg, 'alm_pro_upgrade', 'YEAR_IN_SECONDS', true);
|
30 |
}
|
31 |
}
|
32 |
|
@@ -40,12 +40,12 @@ function alm_render_transient_notification(){
|
|
40 |
*/
|
41 |
function alm_transient_notification($message = '', $transient = '', $duration = 'YEAR_IN_SECONDS', $dismissible = true, $type = 'info'){
|
42 |
if(!empty($transient)){
|
43 |
-
$transient_value = get_transient( $transient );
|
44 |
$dismissible = ($dismissible) ? ' is-dismissible' : '';
|
45 |
-
if(!isset($transient_value) || empty($transient_value) && !empty($message)){
|
46 |
?>
|
47 |
-
<div class="alm-admin-notice notice-<?php echo $type; ?> notice<?php echo $dismissible; ?> alm-transient" data-transient="<?php echo $transient; ?>" data-duration="<?php echo $duration; ?>"><p><?php echo $message; ?></p></div>
|
48 |
-
<?php
|
49 |
}
|
50 |
}
|
51 |
}
|
@@ -59,19 +59,19 @@ function alm_transient_notification($message = '', $transient = '', $duration =
|
|
59 |
* @since 4.0
|
60 |
*/
|
61 |
function alm_set_transient(){
|
62 |
-
|
63 |
if (current_user_can( 'edit_theme_options' )){
|
64 |
|
65 |
$nonce = $_POST["nonce"];
|
66 |
$transient = $_POST["transient_name"];
|
67 |
$duration = $_POST["duration"];
|
68 |
-
|
69 |
-
$duration = (!isset($duration)) ? 'YEAR_IN_SECONDS' : $duration;
|
70 |
|
71 |
// Check our nonce, if they don't match then bounce!
|
72 |
if (! wp_verify_nonce( $nonce, 'alm_repeater_nonce' ))
|
73 |
die(__('Error - unable to verify nonce, please try again.', 'ajax-load-more'));
|
74 |
-
|
75 |
if($transient){
|
76 |
set_transient( $transient, 'true', constant($duration) );
|
77 |
echo __('Transient set successfully', 'ajax-load-more');
|
@@ -90,17 +90,17 @@ function alm_set_transient(){
|
|
90 |
*
|
91 |
* @since 3.6
|
92 |
*/
|
93 |
-
function alm_repeaters_export(){
|
94 |
-
if( isset($_POST["alm_repeaters_export"]) && ( !wp_doing_ajax()) ) {
|
95 |
-
if (current_user_can( 'edit_theme_options' )) { // Confirm credentials
|
96 |
-
$file = $_POST["alm_repeaters_export"];
|
97 |
if(file_exists($file)){
|
98 |
-
header("Content-Description: File Transfer");
|
99 |
-
header("Content-Type: application/octet-stream");
|
100 |
-
header("Content-Disposition: attachment; filename='" . basename($file) . "'");
|
101 |
readfile ($file);
|
102 |
-
exit();
|
103 |
-
}
|
104 |
}
|
105 |
}
|
106 |
}
|
@@ -115,7 +115,7 @@ add_action( 'admin_init', 'alm_repeaters_export');
|
|
115 |
* @since 3.3.0
|
116 |
*/
|
117 |
function alm_admin_notice_errors() {
|
118 |
-
|
119 |
$screen = get_current_screen();
|
120 |
$alm_is_admin_screen = alm_is_admin_screen();
|
121 |
// Exit if screen is not dashboard, plugins or ALM admin.
|
@@ -125,16 +125,16 @@ function alm_admin_notice_errors() {
|
|
125 |
$class = 'notice error alm-err-notice';
|
126 |
$message = '';
|
127 |
$count = 0;
|
128 |
-
|
129 |
-
if(has_action('alm_pro_installed')){ // Pro
|
130 |
$addons = alm_get_pro_addon();
|
131 |
$message = __( 'You have an invalid or expired <a href="admin.php?page=ajax-load-more"><b>Ajax Load More Pro</b></a> license key - please visit the <a href="admin.php?page=ajax-load-more-licenses">License</a> section to input your key or <a href="https://connekthq.com/plugins/ajax-load-more/pro/" target="_blank">purchase</a> one now.', 'ajax-load-more' );
|
132 |
-
|
133 |
} else {
|
134 |
-
$addons = alm_get_addons();
|
135 |
$message = __( 'You have invalid <a href="admin.php?page=ajax-load-more"><b>Ajax Load More</b></a> license keys - please visit the <a href="admin.php?page=ajax-load-more-licenses">Licenses</a> section and input your keys.', 'ajax-load-more' );
|
136 |
}
|
137 |
-
|
138 |
// Loop each addon
|
139 |
foreach($addons as $addon){
|
140 |
$action = $addon['action']; // Get action
|
@@ -146,13 +146,13 @@ function alm_admin_notice_errors() {
|
|
146 |
$count++;
|
147 |
}
|
148 |
}
|
149 |
-
}
|
150 |
-
|
151 |
// Print result
|
152 |
-
if( $count > 0 ) {
|
153 |
printf( '<div class="%1$s"><p>%2$s</p></div>', $class, $message );
|
154 |
}
|
155 |
-
|
156 |
}
|
157 |
add_action( 'admin_notices', 'alm_admin_notice_errors' );
|
158 |
|
@@ -257,11 +257,11 @@ function alm_get_layout(){
|
|
257 |
die('Error - unable to verify nonce, please try again.');
|
258 |
|
259 |
if($type === 'default'){ // Default Layout
|
260 |
-
|
261 |
$content = file_get_contents(ALM_PATH.'admin/includes/layout/'.$type.'.php');
|
262 |
|
263 |
}else{ // Custom Layout
|
264 |
-
|
265 |
if($custom == 'true'){
|
266 |
$dir = 'alm_layouts';
|
267 |
|
@@ -426,7 +426,7 @@ function alm_update_template_files(){
|
|
426 |
$data = $wpdb->get_var("SELECT repeaterDefault FROM $table_name WHERE name = 'default'");
|
427 |
|
428 |
// Create Base Repeater Dir (alm_templates)
|
429 |
-
$base_dir = AjaxLoadMore::alm_get_repeater_path();
|
430 |
AjaxLoadMore::alm_mkdir($base_dir);
|
431 |
|
432 |
$file = $base_dir .'/default.php';
|
@@ -532,8 +532,8 @@ function alm_admin_menu() {
|
|
532 |
'edit_theme_options',
|
533 |
'ajax-load-more-help',
|
534 |
'alm_help_page'
|
535 |
-
);
|
536 |
-
|
537 |
$license_title = (has_action('alm_pro_installed')) ? __('License', 'ajax-load-more') : __('Licenses', 'ajax-load-more');
|
538 |
$alm_licenses_page = add_submenu_page(
|
539 |
'ajax-load-more',
|
@@ -617,24 +617,24 @@ function alm_admin_menu() {
|
|
617 |
add_action( 'load-' . $alm_shortcode_page, 'alm_set_admin_nonce' );
|
618 |
add_action( 'load-' . $alm_help_page, 'alm_load_admin_js' );
|
619 |
add_action( 'load-' . $alm_help_page, 'alm_set_admin_nonce' );
|
620 |
-
|
621 |
// Pro
|
622 |
-
if(has_action('alm_pro_installed')){
|
623 |
add_action( 'load-' . $alm_pro_page, 'alm_load_admin_js' );
|
624 |
add_action( 'load-' . $alm_pro_page, 'alm_load_pro_admin_js' );
|
625 |
add_action( 'load-' . $alm_pro_page, 'alm_set_admin_nonce' );
|
626 |
-
|
627 |
} else {
|
628 |
add_action( 'load-' . $alm_addons_page, 'alm_load_admin_js' );
|
629 |
add_action( 'load-' . $alm_addons_page, 'alm_set_admin_nonce' );
|
630 |
add_action( 'load-' . $alm_go_pro_page, 'alm_load_admin_js' );
|
631 |
-
add_action( 'load-' . $alm_go_pro_page, 'alm_set_admin_nonce' );
|
632 |
}
|
633 |
add_action( 'load-' . $alm_extensions_page, 'alm_load_admin_js' );
|
634 |
-
add_action( 'load-' . $alm_extensions_page, 'alm_set_admin_nonce' );
|
635 |
add_action( 'load-' . $alm_licenses_page, 'alm_load_admin_js' );
|
636 |
add_action( 'load-' . $alm_licenses_page, 'alm_set_admin_nonce' );
|
637 |
-
|
638 |
}
|
639 |
|
640 |
|
@@ -912,28 +912,28 @@ function alm_save_repeater(){
|
|
912 |
|
913 |
// Custom Repeaters v2
|
914 |
elseif($t === 'unlimited'){
|
915 |
-
|
916 |
-
// Custom Repeaters 2.5+
|
917 |
if(ALM_UNLIMITED_VERSION >= '2.5'){
|
918 |
-
|
919 |
// Get path to repeater dir (alm_templates)
|
920 |
-
$base_dir = AjaxLoadMore::alm_get_repeater_path();
|
921 |
AjaxLoadMore::alm_mkdir($base_dir);
|
922 |
$f = $base_dir .'/'. $n .'.php';
|
923 |
-
|
924 |
} else {
|
925 |
-
|
926 |
$f = ($blog_id > 1) ? ALM_UNLIMITED_PATH. 'repeaters/'. $blog_id .'/'. $n .'.php' : ALM_UNLIMITED_PATH. 'repeaters/'. $n .'.php';
|
927 |
-
|
928 |
}
|
929 |
-
|
930 |
}
|
931 |
|
932 |
// Custom Repeaters v1
|
933 |
else{
|
934 |
-
|
935 |
$f = ALM_REPEATER_PATH. 'repeaters/'.$n .'.php';
|
936 |
-
|
937 |
}
|
938 |
|
939 |
|
@@ -955,7 +955,7 @@ function alm_save_repeater(){
|
|
955 |
echo '<script>console.log("' .$e->getMessage(). '");</script>';
|
956 |
}
|
957 |
}
|
958 |
-
|
959 |
|
960 |
// Save to database
|
961 |
|
@@ -1116,7 +1116,7 @@ function alm_layouts_dismiss(){
|
|
1116 |
* @since 2.8.2.1
|
1117 |
*/
|
1118 |
function alm_dismiss_sharing(){
|
1119 |
-
|
1120 |
if (current_user_can( 'edit_theme_options' )){
|
1121 |
|
1122 |
$nonce = $_POST["nonce"];
|
@@ -1148,7 +1148,7 @@ function alm_filter_admin_footer_text( $text ) {
|
|
1148 |
}
|
1149 |
|
1150 |
echo '<strong>Ajax Load More</strong> is made with <span style="color: #e25555;">♥</span> by <a href="https://connekthq.com" target="_blank" style="font-weight: 500;">Connekt</a> | <a href="https://wordpress.org/support/plugin/ajax-load-more/reviews/" target="_blank" style="font-weight: 500;">Leave a Review</a> | <a href="https://connekthq.com/plugins/ajax-load-more/support/" target="_blank" style="font-weight: 500;">Get Support</a>';
|
1151 |
-
|
1152 |
if(!has_action('alm_pro_installed')){
|
1153 |
echo ' | <a href="https://connekthq.com/plugins/ajax-load-more/pro/" target="_blank" style="font-weight: 500;">Go Pro</a>';
|
1154 |
}
|
@@ -1242,6 +1242,14 @@ function alm_admin_init(){
|
|
1242 |
'alm_general_settings'
|
1243 |
);
|
1244 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1245 |
add_settings_field( // Load dynamic queries
|
1246 |
'_alm_disable_dynamic',
|
1247 |
__('Dynamic Content', 'ajax-load-more' ),
|
@@ -1667,6 +1675,30 @@ function _alm_scroll_top_callback(){
|
|
1667 |
|
1668 |
|
1669 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1670 |
/*
|
1671 |
* _alm_nonce_security_callback
|
1672 |
* Move window to top of screen on page load
|
23 |
*/
|
24 |
function alm_render_transient_notification(){
|
25 |
if(!has_action('alm_pro_installed')){
|
26 |
+
|
27 |
$msg = '🔥 Introducing <strong><a href="https://connekthq.com/plugins/ajax-load-more/pro/" target="_blank">Ajax Load More Pro</a></strong> - get instant access to all 13 add-ons in a single installation! <strong><a href="https://connekthq.com/plugins/ajax-load-more/pro/" target="_blank" class="button button-primary">Upgrade Now</a></strong>';
|
28 |
+
|
29 |
+
alm_transient_notification($msg, 'alm_pro_upgrade', 'YEAR_IN_SECONDS', true);
|
30 |
}
|
31 |
}
|
32 |
|
40 |
*/
|
41 |
function alm_transient_notification($message = '', $transient = '', $duration = 'YEAR_IN_SECONDS', $dismissible = true, $type = 'info'){
|
42 |
if(!empty($transient)){
|
43 |
+
$transient_value = get_transient( $transient );
|
44 |
$dismissible = ($dismissible) ? ' is-dismissible' : '';
|
45 |
+
if(!isset($transient_value) || empty($transient_value) && !empty($message)){
|
46 |
?>
|
47 |
+
<div class="alm-admin-notice notice-<?php echo $type; ?> notice<?php echo $dismissible; ?> alm-transient" data-transient="<?php echo $transient; ?>" data-duration="<?php echo $duration; ?>"><p><?php echo $message; ?></p></div>
|
48 |
+
<?php
|
49 |
}
|
50 |
}
|
51 |
}
|
59 |
* @since 4.0
|
60 |
*/
|
61 |
function alm_set_transient(){
|
62 |
+
|
63 |
if (current_user_can( 'edit_theme_options' )){
|
64 |
|
65 |
$nonce = $_POST["nonce"];
|
66 |
$transient = $_POST["transient_name"];
|
67 |
$duration = $_POST["duration"];
|
68 |
+
|
69 |
+
$duration = (!isset($duration)) ? 'YEAR_IN_SECONDS' : $duration;
|
70 |
|
71 |
// Check our nonce, if they don't match then bounce!
|
72 |
if (! wp_verify_nonce( $nonce, 'alm_repeater_nonce' ))
|
73 |
die(__('Error - unable to verify nonce, please try again.', 'ajax-load-more'));
|
74 |
+
|
75 |
if($transient){
|
76 |
set_transient( $transient, 'true', constant($duration) );
|
77 |
echo __('Transient set successfully', 'ajax-load-more');
|
90 |
*
|
91 |
* @since 3.6
|
92 |
*/
|
93 |
+
function alm_repeaters_export(){
|
94 |
+
if( isset($_POST["alm_repeaters_export"]) && ( !wp_doing_ajax()) ) {
|
95 |
+
if (current_user_can( 'edit_theme_options' )) { // Confirm credentials
|
96 |
+
$file = $_POST["alm_repeaters_export"];
|
97 |
if(file_exists($file)){
|
98 |
+
header("Content-Description: File Transfer");
|
99 |
+
header("Content-Type: application/octet-stream");
|
100 |
+
header("Content-Disposition: attachment; filename='" . basename($file) . "'");
|
101 |
readfile ($file);
|
102 |
+
exit();
|
103 |
+
}
|
104 |
}
|
105 |
}
|
106 |
}
|
115 |
* @since 3.3.0
|
116 |
*/
|
117 |
function alm_admin_notice_errors() {
|
118 |
+
|
119 |
$screen = get_current_screen();
|
120 |
$alm_is_admin_screen = alm_is_admin_screen();
|
121 |
// Exit if screen is not dashboard, plugins or ALM admin.
|
125 |
$class = 'notice error alm-err-notice';
|
126 |
$message = '';
|
127 |
$count = 0;
|
128 |
+
|
129 |
+
if(has_action('alm_pro_installed')){ // Pro
|
130 |
$addons = alm_get_pro_addon();
|
131 |
$message = __( 'You have an invalid or expired <a href="admin.php?page=ajax-load-more"><b>Ajax Load More Pro</b></a> license key - please visit the <a href="admin.php?page=ajax-load-more-licenses">License</a> section to input your key or <a href="https://connekthq.com/plugins/ajax-load-more/pro/" target="_blank">purchase</a> one now.', 'ajax-load-more' );
|
132 |
+
|
133 |
} else {
|
134 |
+
$addons = alm_get_addons();
|
135 |
$message = __( 'You have invalid <a href="admin.php?page=ajax-load-more"><b>Ajax Load More</b></a> license keys - please visit the <a href="admin.php?page=ajax-load-more-licenses">Licenses</a> section and input your keys.', 'ajax-load-more' );
|
136 |
}
|
137 |
+
|
138 |
// Loop each addon
|
139 |
foreach($addons as $addon){
|
140 |
$action = $addon['action']; // Get action
|
146 |
$count++;
|
147 |
}
|
148 |
}
|
149 |
+
}
|
150 |
+
|
151 |
// Print result
|
152 |
+
if( $count > 0 ) {
|
153 |
printf( '<div class="%1$s"><p>%2$s</p></div>', $class, $message );
|
154 |
}
|
155 |
+
|
156 |
}
|
157 |
add_action( 'admin_notices', 'alm_admin_notice_errors' );
|
158 |
|
257 |
die('Error - unable to verify nonce, please try again.');
|
258 |
|
259 |
if($type === 'default'){ // Default Layout
|
260 |
+
|
261 |
$content = file_get_contents(ALM_PATH.'admin/includes/layout/'.$type.'.php');
|
262 |
|
263 |
}else{ // Custom Layout
|
264 |
+
|
265 |
if($custom == 'true'){
|
266 |
$dir = 'alm_layouts';
|
267 |
|
426 |
$data = $wpdb->get_var("SELECT repeaterDefault FROM $table_name WHERE name = 'default'");
|
427 |
|
428 |
// Create Base Repeater Dir (alm_templates)
|
429 |
+
$base_dir = AjaxLoadMore::alm_get_repeater_path();
|
430 |
AjaxLoadMore::alm_mkdir($base_dir);
|
431 |
|
432 |
$file = $base_dir .'/default.php';
|
532 |
'edit_theme_options',
|
533 |
'ajax-load-more-help',
|
534 |
'alm_help_page'
|
535 |
+
);
|
536 |
+
|
537 |
$license_title = (has_action('alm_pro_installed')) ? __('License', 'ajax-load-more') : __('Licenses', 'ajax-load-more');
|
538 |
$alm_licenses_page = add_submenu_page(
|
539 |
'ajax-load-more',
|
617 |
add_action( 'load-' . $alm_shortcode_page, 'alm_set_admin_nonce' );
|
618 |
add_action( 'load-' . $alm_help_page, 'alm_load_admin_js' );
|
619 |
add_action( 'load-' . $alm_help_page, 'alm_set_admin_nonce' );
|
620 |
+
|
621 |
// Pro
|
622 |
+
if(has_action('alm_pro_installed')){
|
623 |
add_action( 'load-' . $alm_pro_page, 'alm_load_admin_js' );
|
624 |
add_action( 'load-' . $alm_pro_page, 'alm_load_pro_admin_js' );
|
625 |
add_action( 'load-' . $alm_pro_page, 'alm_set_admin_nonce' );
|
626 |
+
|
627 |
} else {
|
628 |
add_action( 'load-' . $alm_addons_page, 'alm_load_admin_js' );
|
629 |
add_action( 'load-' . $alm_addons_page, 'alm_set_admin_nonce' );
|
630 |
add_action( 'load-' . $alm_go_pro_page, 'alm_load_admin_js' );
|
631 |
+
add_action( 'load-' . $alm_go_pro_page, 'alm_set_admin_nonce' );
|
632 |
}
|
633 |
add_action( 'load-' . $alm_extensions_page, 'alm_load_admin_js' );
|
634 |
+
add_action( 'load-' . $alm_extensions_page, 'alm_set_admin_nonce' );
|
635 |
add_action( 'load-' . $alm_licenses_page, 'alm_load_admin_js' );
|
636 |
add_action( 'load-' . $alm_licenses_page, 'alm_set_admin_nonce' );
|
637 |
+
|
638 |
}
|
639 |
|
640 |
|
912 |
|
913 |
// Custom Repeaters v2
|
914 |
elseif($t === 'unlimited'){
|
915 |
+
|
916 |
+
// Custom Repeaters 2.5+
|
917 |
if(ALM_UNLIMITED_VERSION >= '2.5'){
|
918 |
+
|
919 |
// Get path to repeater dir (alm_templates)
|
920 |
+
$base_dir = AjaxLoadMore::alm_get_repeater_path();
|
921 |
AjaxLoadMore::alm_mkdir($base_dir);
|
922 |
$f = $base_dir .'/'. $n .'.php';
|
923 |
+
|
924 |
} else {
|
925 |
+
|
926 |
$f = ($blog_id > 1) ? ALM_UNLIMITED_PATH. 'repeaters/'. $blog_id .'/'. $n .'.php' : ALM_UNLIMITED_PATH. 'repeaters/'. $n .'.php';
|
927 |
+
|
928 |
}
|
929 |
+
|
930 |
}
|
931 |
|
932 |
// Custom Repeaters v1
|
933 |
else{
|
934 |
+
|
935 |
$f = ALM_REPEATER_PATH. 'repeaters/'.$n .'.php';
|
936 |
+
|
937 |
}
|
938 |
|
939 |
|
955 |
echo '<script>console.log("' .$e->getMessage(). '");</script>';
|
956 |
}
|
957 |
}
|
958 |
+
|
959 |
|
960 |
// Save to database
|
961 |
|
1116 |
* @since 2.8.2.1
|
1117 |
*/
|
1118 |
function alm_dismiss_sharing(){
|
1119 |
+
|
1120 |
if (current_user_can( 'edit_theme_options' )){
|
1121 |
|
1122 |
$nonce = $_POST["nonce"];
|
1148 |
}
|
1149 |
|
1150 |
echo '<strong>Ajax Load More</strong> is made with <span style="color: #e25555;">♥</span> by <a href="https://connekthq.com" target="_blank" style="font-weight: 500;">Connekt</a> | <a href="https://wordpress.org/support/plugin/ajax-load-more/reviews/" target="_blank" style="font-weight: 500;">Leave a Review</a> | <a href="https://connekthq.com/plugins/ajax-load-more/support/" target="_blank" style="font-weight: 500;">Get Support</a>';
|
1151 |
+
|
1152 |
if(!has_action('alm_pro_installed')){
|
1153 |
echo ' | <a href="https://connekthq.com/plugins/ajax-load-more/pro/" target="_blank" style="font-weight: 500;">Go Pro</a>';
|
1154 |
}
|
1242 |
'alm_general_settings'
|
1243 |
);
|
1244 |
|
1245 |
+
add_settings_field( // Uninstall
|
1246 |
+
'_alm_uninstall',
|
1247 |
+
__('Delete on Uninstall', 'ajax-load-more' ),
|
1248 |
+
'_alm_uninstall_callback',
|
1249 |
+
'ajax-load-more',
|
1250 |
+
'alm_general_settings'
|
1251 |
+
);
|
1252 |
+
|
1253 |
add_settings_field( // Load dynamic queries
|
1254 |
'_alm_disable_dynamic',
|
1255 |
__('Dynamic Content', 'ajax-load-more' ),
|
1675 |
|
1676 |
|
1677 |
|
1678 |
+
/*
|
1679 |
+
* _alm_uninstall_callback
|
1680 |
+
* Remove all ALM data on uninstall
|
1681 |
+
*
|
1682 |
+
* @since 4.1.0
|
1683 |
+
*/
|
1684 |
+
|
1685 |
+
function _alm_uninstall_callback(){
|
1686 |
+
$options = get_option( 'alm_settings' );
|
1687 |
+
|
1688 |
+
if(!isset($options['_alm_uninstall']))
|
1689 |
+
$options['_alm_uninstall'] = '0';
|
1690 |
+
|
1691 |
+
$html = '<input type="hidden" name="alm_settings[_alm_uninstall]" value="0" />';
|
1692 |
+
$html .= '<input type="checkbox" name="alm_settings[_alm_uninstall]" id="_alm_uninstall" value="1"'. (($options['_alm_uninstall']) ? ' checked="checked"' : '') .' />';
|
1693 |
+
$html .= '<label for="_alm_uninstall">'.__('Check this box if Ajax Load More should remove all of its data* when the plugin is deleted.', 'ajax-load-more');
|
1694 |
+
$html .= '<span style="display:block">'. __('* Database Tables, Options and Repeater Templates', 'ajax-load-more') .'</span>';
|
1695 |
+
$html .= '</label>';
|
1696 |
+
|
1697 |
+
echo $html;
|
1698 |
+
}
|
1699 |
+
|
1700 |
+
|
1701 |
+
|
1702 |
/*
|
1703 |
* _alm_nonce_security_callback
|
1704 |
* Move window to top of screen on page load
|
admin/shortcode-builder/js/shortcode-builder.js
CHANGED
@@ -179,6 +179,7 @@ jQuery(document).ready(function($) {
|
|
179 |
container_classes = $.trim(container_classes);
|
180 |
if(container_classes !== '' && $('.alm-instance-options input#container-classes').hasClass('changed'))
|
181 |
output += ' css_classes="'+container_classes+'"';
|
|
|
182 |
|
183 |
|
184 |
// ---------------------------
|
@@ -1182,6 +1183,16 @@ jQuery(document).ready(function($) {
|
|
1182 |
|
1183 |
if(button_loading_label !== '')
|
1184 |
output += ' button_loading_label="'+button_loading_label+'"';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1185 |
|
1186 |
|
1187 |
output += ']'; //Close shortcode
|
179 |
container_classes = $.trim(container_classes);
|
180 |
if(container_classes !== '' && $('.alm-instance-options input#container-classes').hasClass('changed'))
|
181 |
output += ' css_classes="'+container_classes+'"';
|
182 |
+
|
183 |
|
184 |
|
185 |
// ---------------------------
|
1183 |
|
1184 |
if(button_loading_label !== '')
|
1185 |
output += ' button_loading_label="'+button_loading_label+'"';
|
1186 |
+
|
1187 |
+
|
1188 |
+
// ---------------------------
|
1189 |
+
// - Nested Instances
|
1190 |
+
// ---------------------------
|
1191 |
+
|
1192 |
+
var nested = $('.alm-instance-options input[name=nested]:checked').val();
|
1193 |
+
if(nested === 't'){
|
1194 |
+
output += ' nested="true"';
|
1195 |
+
}
|
1196 |
|
1197 |
|
1198 |
output += ']'; //Close shortcode
|
admin/shortcode-builder/shortcode-builder.php
CHANGED
@@ -71,7 +71,7 @@
|
|
71 |
<!-- Container Type -->
|
72 |
<div class="section-title">
|
73 |
<h4><?php _e('Container Type', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('You can define a global container type on the Ajax Load More settings screen','ajax-load-more'); ?>."></a></h4>
|
74 |
-
<p><?php _e('Override the global Container Type
|
75 |
</div>
|
76 |
<div class="wrap">
|
77 |
<div class="inner">
|
@@ -112,6 +112,31 @@
|
|
112 |
<input class="alm_element" name="container-classes" type="text" id="container-classes" placeholder="listing large-12 columns">
|
113 |
</div>
|
114 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
</div>
|
116 |
</div>
|
117 |
<!-- End Options -->
|
@@ -204,7 +229,7 @@
|
|
204 |
<div class="inner">
|
205 |
<ul>
|
206 |
<li>
|
207 |
-
<input class="alm_element" type="radio" name="scroll" value="t" id="scroll_t" checked>
|
208 |
<label for="scroll_t"><?php _e('True', 'ajax-load-more'); ?></label>
|
209 |
</li>
|
210 |
<li>
|
@@ -346,7 +371,7 @@
|
|
346 |
<div class="inner">
|
347 |
<ul>
|
348 |
<li style="width:100%;">
|
349 |
-
<input class="alm_element" type="radio" name="masonry-animation" value="default" id="masonry-animation-default" checked>
|
350 |
<label for="masonry-animation-default">
|
351 |
<?php _e('Default (Zoom)', 'ajax-load-more'); ?>
|
352 |
<span class="description"><?php _e('Items scale up from 50% to 100% size on load','ajax-load-more'); ?>.</span>
|
71 |
<!-- Container Type -->
|
72 |
<div class="section-title">
|
73 |
<h4><?php _e('Container Type', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('You can define a global container type on the Ajax Load More settings screen','ajax-load-more'); ?>."></a></h4>
|
74 |
+
<p><?php _e('Override the global Container Type set in <a href="admin.php?page=ajax-load-more">ALM Settings</a>.', 'ajax-load-more'); ?></p>
|
75 |
</div>
|
76 |
<div class="wrap">
|
77 |
<div class="inner">
|
112 |
<input class="alm_element" name="container-classes" type="text" id="container-classes" placeholder="listing large-12 columns">
|
113 |
</div>
|
114 |
</div>
|
115 |
+
|
116 |
+
<div class="clear"></div>
|
117 |
+
<hr/>
|
118 |
+
|
119 |
+
<!-- Nested ALM -->
|
120 |
+
|
121 |
+
<div class="section-title">
|
122 |
+
<h4><?php _e('Nested Instance', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('When nesting ALM instances it\'s important to set this to true as it removes certain problematic functionality.','ajax-load-more'); ?>"></a></h4>
|
123 |
+
<p><?php _e('Is this a nested Ajax Load More instance?', 'ajax-load-more'); ?></p>
|
124 |
+
</div>
|
125 |
+
<div class="wrap">
|
126 |
+
<div class="inner">
|
127 |
+
<ul>
|
128 |
+
<li>
|
129 |
+
<input class="alm_element" type="radio" name="nested" value="t" id="nested_t">
|
130 |
+
<label for="nested_t"><?php _e('True', 'ajax-load-more'); ?></label>
|
131 |
+
</li>
|
132 |
+
<li>
|
133 |
+
<input class="alm_element" type="radio" name="nested" value="f" id="nested_f" checked="checked">
|
134 |
+
<label for="nested_f"><?php _e('False', 'ajax-load-more'); ?></label>
|
135 |
+
</li>
|
136 |
+
</ul>
|
137 |
+
</div>
|
138 |
+
</div>
|
139 |
+
|
140 |
</div>
|
141 |
</div>
|
142 |
<!-- End Options -->
|
229 |
<div class="inner">
|
230 |
<ul>
|
231 |
<li>
|
232 |
+
<input class="alm_element" type="radio" name="scroll" value="t" id="scroll_t" checked="checked">
|
233 |
<label for="scroll_t"><?php _e('True', 'ajax-load-more'); ?></label>
|
234 |
</li>
|
235 |
<li>
|
371 |
<div class="inner">
|
372 |
<ul>
|
373 |
<li style="width:100%;">
|
374 |
+
<input class="alm_element" type="radio" name="masonry-animation" value="default" id="masonry-animation-default" checked="checked">
|
375 |
<label for="masonry-animation-default">
|
376 |
<?php _e('Default (Zoom)', 'ajax-load-more'); ?>
|
377 |
<span class="description"><?php _e('Items scale up from 50% to 100% size on load','ajax-load-more'); ?>.</span>
|
ajax-load-more.php
CHANGED
@@ -6,15 +6,15 @@ Description: The ultimate solution to add infinite scroll functionality to your
|
|
6 |
Text Domain: ajax-load-more
|
7 |
Author: Darren Cooney
|
8 |
Twitter: @KaptonKaos
|
9 |
-
Author URI: https://connekthq.com
|
10 |
-
Version: 4.0
|
11 |
License: GPL
|
12 |
Copyright: Darren Cooney & Connekt Media
|
13 |
*/
|
14 |
|
15 |
|
16 |
-
define('ALM_VERSION', '4.0');
|
17 |
-
define('ALM_RELEASE', '
|
18 |
define('ALM_STORE_URL', 'https://connekthq.com');
|
19 |
|
20 |
|
@@ -376,6 +376,7 @@ if( !class_exists('AjaxLoadMore') ):
|
|
376 |
'alm_nonce' => wp_create_nonce( "ajax_load_more_nonce" ),
|
377 |
'pluginurl' => ALM_URL,
|
378 |
'scrolltop' => $scrolltop,
|
|
|
379 |
'ajax_object' => array('is_single' => true, 'is_singular' => true )
|
380 |
)
|
381 |
);
|
6 |
Text Domain: ajax-load-more
|
7 |
Author: Darren Cooney
|
8 |
Twitter: @KaptonKaos
|
9 |
+
Author URI: https://connekthq.com
|
10 |
+
Version: 4.1.0
|
11 |
License: GPL
|
12 |
Copyright: Darren Cooney & Connekt Media
|
13 |
*/
|
14 |
|
15 |
|
16 |
+
define('ALM_VERSION', '4.1.0');
|
17 |
+
define('ALM_RELEASE', 'December 6, 2018');
|
18 |
define('ALM_STORE_URL', 'https://connekthq.com');
|
19 |
|
20 |
|
376 |
'alm_nonce' => wp_create_nonce( "ajax_load_more_nonce" ),
|
377 |
'pluginurl' => ALM_URL,
|
378 |
'scrolltop' => $scrolltop,
|
379 |
+
'display_results' => apply_filters('alm_display_results', __('Showing {num} of {total} results', 'ajax-load-more')),
|
380 |
'ajax_object' => array('is_single' => true, 'is_singular' => true )
|
381 |
)
|
382 |
);
|
core/classes/class.alm-shortcode.php
CHANGED
@@ -52,6 +52,7 @@ if( !class_exists('ALM_SHORTCODE') ):
|
|
52 |
}
|
53 |
|
54 |
extract(shortcode_atts(array(
|
|
|
55 |
'filters' => false,
|
56 |
'target' => '',
|
57 |
'filters_analytics' => 'true',
|
@@ -391,9 +392,12 @@ if( !class_exists('ALM_SHORTCODE') ):
|
|
391 |
// Search atts - Used with SEO
|
392 |
$is_search = (is_search()) ? 'data-search="true"' : '';
|
393 |
|
|
|
|
|
|
|
394 |
|
395 |
// Start .alm-listing
|
396 |
-
$ajaxloadmore .= '<div id="'. $div_id .'" class="ajax-load-more-wrap'. $btn_color .''. $paging_color .''. $alm_layouts .'" '. $unique_id .' data-alm-id="" data-canonical-url="'. $canonicalURL .'" data-slug="'. $slug .'" data-post-id="'. $post_id .'" '. $is_search .'>';
|
397 |
|
398 |
|
399 |
// Masonry Hook (Before)
|
@@ -852,7 +856,7 @@ if( !class_exists('ALM_SHORTCODE') ):
|
|
852 |
|
853 |
$nextpage_is_paged = ($nextpage_start > 1) ? true : false;
|
854 |
|
855 |
-
$alm_nextpage_output = apply_filters('alm_init_nextpage', $nextpage_post_id, $nextpage_start,$nextpage_is_paged, $paging);
|
856 |
$ajaxloadmore .= $alm_nextpage_output;
|
857 |
|
858 |
}
|
@@ -926,6 +930,10 @@ if( !class_exists('ALM_SHORTCODE') ):
|
|
926 |
}
|
927 |
}
|
928 |
// End REST API Add-on
|
|
|
|
|
|
|
|
|
929 |
|
930 |
|
931 |
|
52 |
}
|
53 |
|
54 |
extract(shortcode_atts(array(
|
55 |
+
'nested' => false,
|
56 |
'filters' => false,
|
57 |
'target' => '',
|
58 |
'filters_analytics' => 'true',
|
392 |
// Search atts - Used with SEO
|
393 |
$is_search = (is_search()) ? 'data-search="true"' : '';
|
394 |
|
395 |
+
// Search atts - Used with SEO
|
396 |
+
$is_nested = ($nested === 'true') ? ' data-nested="true"' : '';
|
397 |
+
|
398 |
|
399 |
// Start .alm-listing
|
400 |
+
$ajaxloadmore .= '<div id="'. $div_id .'" class="ajax-load-more-wrap'. $btn_color .''. $paging_color .''. $alm_layouts .'" '. $unique_id .' data-alm-id="" data-canonical-url="'. $canonicalURL .'" data-slug="'. $slug .'" data-post-id="'. $post_id .'" '. $is_search . $is_nested .'>';
|
401 |
|
402 |
|
403 |
// Masonry Hook (Before)
|
856 |
|
857 |
$nextpage_is_paged = ($nextpage_start > 1) ? true : false;
|
858 |
|
859 |
+
$alm_nextpage_output = apply_filters('alm_init_nextpage', $nextpage_post_id, $nextpage_start,$nextpage_is_paged, $paging, $div_id);
|
860 |
$ajaxloadmore .= $alm_nextpage_output;
|
861 |
|
862 |
}
|
930 |
}
|
931 |
}
|
932 |
// End REST API Add-on
|
933 |
+
|
934 |
+
|
935 |
+
// Add some localized vars
|
936 |
+
ALM_LOCALIZE::add_localized_var('IP', $_SERVER['REMOTE_ADDR'], $div_id);
|
937 |
|
938 |
|
939 |
|
core/classes/includes/preloaded.php
CHANGED
@@ -282,6 +282,7 @@ else {
|
|
282 |
|
283 |
|
284 |
// Add total_posts to localized ALM JS variables
|
|
|
285 |
ALM_LOCALIZE::add_localized_var('total_posts', $alm_total_posts, $div_id);
|
286 |
|
287 |
|
@@ -296,8 +297,12 @@ else {
|
|
296 |
// Append querystring to data-url
|
297 |
$querystring = ($querystring) ? '?'.$querystring : '';
|
298 |
|
299 |
-
$alm_reveal = '<div class="alm-reveal alm-seo alm-preloaded'. $transition_container_classes .'" data-page="1" data-url="'. $canonicalURL .''. $search_slug . $querystring .'">';
|
300 |
|
|
|
|
|
|
|
|
|
301 |
}
|
302 |
|
303 |
// Open .alm-reveal
|
282 |
|
283 |
|
284 |
// Add total_posts to localized ALM JS variables
|
285 |
+
ALM_LOCALIZE::add_localized_var('viewing', $alm_preload_query->post_count, $div_id);
|
286 |
ALM_LOCALIZE::add_localized_var('total_posts', $alm_total_posts, $div_id);
|
287 |
|
288 |
|
297 |
// Append querystring to data-url
|
298 |
$querystring = ($querystring) ? '?'.$querystring : '';
|
299 |
|
300 |
+
$alm_reveal = '<div class="alm-reveal alm-seo alm-preloaded'. $transition_container_classes .'" data-page="1" data-url="'. $canonicalURL .''. $search_slug . $querystring .'" data-total-posts="'. $alm_preload_query->found_posts .'">';
|
301 |
|
302 |
+
} else {
|
303 |
+
|
304 |
+
$alm_reveal= '<div class="alm-reveal alm-preloaded'. $transition_container_classes .'" data-total-posts="'. $alm_preload_query->found_posts .'">';
|
305 |
+
|
306 |
}
|
307 |
|
308 |
// Open .alm-reveal
|
core/dist/js/ajax-load-more.js
CHANGED
@@ -500,7 +500,7 @@ var almMasonry = function almMasonry(container, items, selector, columnWidth, an
|
|
500 |
}
|
501 |
|
502 |
// Get custom Masonry options (https://masonry.desandro.com/options.html)
|
503 |
-
};var alm_masonry_vars = alm_masonry_vars;
|
504 |
if (alm_masonry_vars) {
|
505 |
Object.keys(alm_masonry_vars).forEach(function (key) {
|
506 |
// Loop object to create key:prop
|
@@ -546,6 +546,161 @@ var almMasonryFadeIn = function almMasonryFadeIn(element, speed) {
|
|
546 |
};
|
547 |
'use strict';
|
548 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
549 |
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
|
550 |
|
551 |
/*
|
@@ -587,11 +742,21 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
|
|
587 |
alm.prefix = 'alm-';
|
588 |
alm.el = el;
|
589 |
alm.master_id = alm.el.get(0).id; // the actual ALM div#id
|
|
|
|
|
|
|
|
|
|
|
|
|
590 |
alm.container = el;
|
591 |
alm.container.addClass('alm-' + e).attr('data-alm-id', e); // Add unique classname and data id
|
592 |
-
|
593 |
-
|
|
|
|
|
|
|
594 |
alm.canonical_url = alm.el.attr('data-canonical-url');
|
|
|
595 |
alm.is_search = alm.el.attr('data-search');
|
596 |
alm.slug = alm.el.attr('data-slug');
|
597 |
alm.post_id = alm.el.attr('data-post-id');
|
@@ -603,7 +768,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
|
|
603 |
alm.post_type = alm.content.attr('data-post-type');
|
604 |
alm.post_type = alm.post_type.split(",");
|
605 |
alm.sticky_posts = alm.content.attr('data-sticky-posts');
|
606 |
-
alm.btnWrap = $('.alm-btn-wrap', alm.container);
|
607 |
alm.btnWrap.get(0).style.visibility = 'visible';
|
608 |
alm.button_label = alm.content.attr('data-button-label');
|
609 |
alm.button_loading_label = alm.content.attr('data-button-loading-label');
|
@@ -772,16 +937,10 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
|
|
772 |
// Get Preloaded Amount
|
773 |
alm.preloaded_amount = alm.preloaded_amount === undefined ? alm.posts_per_page : alm.preloaded_amount;
|
774 |
|
775 |
-
// Get the preloaded localized <script> object to get total_posts
|
776 |
-
var var_master_id = alm.master_id.replace(/-/g, '_'); // Convert dashes to underscores for the var name
|
777 |
-
var_master_id = var_master_id + '_vars'; // This is the localize variable on the screen (ajax_load_more_vars)
|
778 |
-
|
779 |
-
var preloaded_vars = window[var_master_id]; // Get localize vars
|
780 |
-
|
781 |
// Disable ALM if total_posts is </= preloaded_amount
|
782 |
-
if (
|
783 |
-
if (parseInt(
|
784 |
-
alm.preloaded_total_posts =
|
785 |
alm.disable_ajax = true;
|
786 |
}
|
787 |
}
|
@@ -972,11 +1131,19 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
|
|
972 |
if (alm.paging) {
|
973 |
alm.content.parent().addClass('loading'); // add loading class to main container
|
974 |
} else {
|
975 |
-
alm.button = $('.alm-load-more-btn', alm.container); // Set button element
|
976 |
}
|
977 |
|
978 |
-
|
979 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
980 |
* The function to get posts via Ajax
|
981 |
* @since 2.0.0
|
982 |
*/
|
@@ -1251,7 +1418,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
|
|
1251 |
// Standard ALM query results
|
1252 |
html = data.html;
|
1253 |
meta = data.meta;
|
1254 |
-
alm.posts = alm.posts + meta.postcount;
|
1255 |
total = meta.postcount;
|
1256 |
alm.totalposts = meta.totalposts;
|
1257 |
|
@@ -1260,12 +1427,18 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
|
|
1260 |
}
|
1261 |
}
|
1262 |
|
1263 |
-
|
|
|
|
|
1264 |
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
|
|
|
|
|
|
|
|
1269 |
|
1270 |
// First Run
|
1271 |
if (alm.init) {
|
@@ -1508,10 +1681,13 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
|
|
1508 |
// Paging
|
1509 |
if (!alm.init) {
|
1510 |
$('.alm-paging-content', alm.el).html('').append(alm.data).almWaitForImages().done(function () {
|
1511 |
-
// Remove loading class
|
1512 |
$('.alm-paging-loading', alm.el).fadeOut(alm.speed); // Fade out loader
|
1513 |
if ($.isFunction($.fn.almOnPagingComplete)) {
|
1514 |
-
|
|
|
|
|
|
|
1515 |
}
|
1516 |
alm.container.removeClass('alm-loading');
|
1517 |
alm.AjaxLoadMore.triggerAddons(alm);
|
@@ -1536,18 +1712,6 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
|
|
1536 |
// End ALM Complete
|
1537 |
|
1538 |
|
1539 |
-
// Filters Add-on Complete
|
1540 |
-
if ($.isFunction($.fn.almFilterComplete)) {
|
1541 |
-
// Standard Filtering
|
1542 |
-
$.fn.almFilterComplete();
|
1543 |
-
}
|
1544 |
-
if (typeof almFiltersAddonComplete == "function") {
|
1545 |
-
// Filters Add-on
|
1546 |
-
almFiltersAddonComplete(el);
|
1547 |
-
}
|
1548 |
-
// End Filters Add-on Complete
|
1549 |
-
|
1550 |
-
|
1551 |
// ALM Done
|
1552 |
if (!alm.cache) {
|
1553 |
// Not Cache & Previous Post
|
@@ -1563,15 +1727,29 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
|
|
1563 |
// End ALM Done
|
1564 |
|
1565 |
} else {
|
|
|
1566 |
|
1567 |
-
// No Results!
|
1568 |
if (!alm.paging) {
|
|
|
1569 |
alm.button.delay(alm.speed).removeClass('loading').addClass('done');
|
1570 |
alm.AjaxLoadMore.resetBtnText();
|
1571 |
}
|
|
|
1572 |
alm.AjaxLoadMore.triggerDone(); // ALM Done
|
1573 |
}
|
1574 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1575 |
// Destroy After
|
1576 |
if (alm.destroy_after !== undefined && alm.destroy_after !== '') {
|
1577 |
var currentPage = alm.page + 1; // Add 1 because alm.page starts at 0
|
@@ -1586,8 +1764,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
|
|
1586 |
}
|
1587 |
// End Destroy After
|
1588 |
|
1589 |
-
alm_is_filtering = false;
|
1590 |
-
alm.init = false;
|
1591 |
};
|
1592 |
|
1593 |
/* pagingPreloadedInit()
|
@@ -1920,8 +2097,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
|
|
1920 |
}
|
1921 |
};
|
1922 |
|
1923 |
-
|
1924 |
-
*
|
1925 |
* Set variables after loading transiton completes
|
1926 |
* @since 3.5
|
1927 |
*/
|
@@ -1937,8 +2113,19 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
|
|
1937 |
}, alm.speed);
|
1938 |
};
|
1939 |
|
1940 |
-
|
1941 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1942 |
* Load posts as user scrolls the page
|
1943 |
* @since 2.0
|
1944 |
*/
|
@@ -1977,6 +2164,10 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
|
|
1977 |
$.fn.almSEO(alm, true);
|
1978 |
}
|
1979 |
}, alm.speed);
|
|
|
|
|
|
|
|
|
1980 |
}
|
1981 |
|
1982 |
// Preloaded
|
@@ -1994,20 +2185,35 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
|
|
1994 |
}
|
1995 |
}
|
1996 |
}, alm.speed);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1997 |
}
|
1998 |
|
1999 |
// Next Page Add-on
|
2000 |
if (alm.nextpage) {
|
2001 |
-
|
2002 |
-
|
2003 |
-
|
2004 |
-
|
2005 |
-
|
|
|
2006 |
|
2007 |
if (alm_nextpage_pages == alm_nextpage_total) {
|
2008 |
alm.AjaxLoadMore.triggerDone();
|
2009 |
}
|
2010 |
}
|
|
|
|
|
|
|
|
|
2011 |
}
|
2012 |
|
2013 |
// Masonry + Preloaded
|
@@ -2018,6 +2224,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
|
|
2018 |
}
|
2019 |
});
|
2020 |
};
|
|
|
2021 |
alm.AjaxLoadMore.init();
|
2022 |
|
2023 |
//flag to prevent unnecessary loading of post on init. Hold for 2/10 of a second
|
@@ -2114,8 +2321,8 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
|
|
2114 |
// End $.ajaxloadmore
|
2115 |
|
2116 |
|
2117 |
-
|
2118 |
-
*
|
2119 |
* Initiate all instances of Ajax load More
|
2120 |
* @since 2.1.2
|
2121 |
*/
|
500 |
}
|
501 |
|
502 |
// Get custom Masonry options (https://masonry.desandro.com/options.html)
|
503 |
+
};var alm_masonry_vars = window.alm_masonry_vars;
|
504 |
if (alm_masonry_vars) {
|
505 |
Object.keys(alm_masonry_vars).forEach(function (key) {
|
506 |
// Loop object to create key:prop
|
546 |
};
|
547 |
'use strict';
|
548 |
|
549 |
+
/**
|
550 |
+
* Set the results text if required.
|
551 |
+
*
|
552 |
+
* @param {Object} alm
|
553 |
+
* @since 4.1
|
554 |
+
*/
|
555 |
+
var almResultsText = function almResultsText(alm) {
|
556 |
+
if (!alm.resultsText) return false;
|
557 |
+
|
558 |
+
var resultsType = 'standard';
|
559 |
+
if (alm.nextpage && alm.resultsText) {
|
560 |
+
resultsType = 'nextpage';
|
561 |
+
} else if (alm.paging) {
|
562 |
+
resultsType = 'paging';
|
563 |
+
} else if (alm.preloaded === 'true') {
|
564 |
+
resultsType = 'preloaded';
|
565 |
+
} else {
|
566 |
+
resultsType = 'standard';
|
567 |
+
}
|
568 |
+
almGetResultsText(alm, resultsType);
|
569 |
+
};
|
570 |
+
|
571 |
+
/**
|
572 |
+
* Render `Showing {x} of {y} results` text.
|
573 |
+
*
|
574 |
+
* @param {Element} el
|
575 |
+
* @param {String} current
|
576 |
+
* @param {String} total
|
577 |
+
* @since 4.1
|
578 |
+
*/
|
579 |
+
var almRenderResultsText = function almRenderResultsText(el, current, total) {
|
580 |
+
var text = alm_localize.display_results;
|
581 |
+
text = text.replace('{num}', current);
|
582 |
+
text = text.replace('{total}', total);
|
583 |
+
el.innerHTML = text;
|
584 |
+
};
|
585 |
+
|
586 |
+
/**
|
587 |
+
* Get values for showing results text.
|
588 |
+
*
|
589 |
+
* @param {Object} alm
|
590 |
+
* @param {String} type
|
591 |
+
* @since 4.1
|
592 |
+
*/
|
593 |
+
var almGetResultsText = function almGetResultsText(alm) {
|
594 |
+
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'standard';
|
595 |
+
|
596 |
+
|
597 |
+
if (!alm.resultsText) return false;
|
598 |
+
|
599 |
+
var current = 0;
|
600 |
+
var total = 0;
|
601 |
+
|
602 |
+
switch (type) {
|
603 |
+
|
604 |
+
// Nextpage
|
605 |
+
case 'nextpage':
|
606 |
+
|
607 |
+
current = alm.page + 1 + parseInt(alm.nextpage_startpage);
|
608 |
+
total = parseInt(alm.totalposts) + parseInt(alm.nextpage_startpage);
|
609 |
+
almRenderResultsText(alm.resultsText, current, total);
|
610 |
+
|
611 |
+
break;
|
612 |
+
|
613 |
+
// Preloaded
|
614 |
+
case 'preloaded':
|
615 |
+
|
616 |
+
console.log(alm);
|
617 |
+
|
618 |
+
current = parseInt(alm.posts) + parseInt(alm.preloaded_amount);
|
619 |
+
total = parseInt(alm.totalposts) + parseInt(alm.preloaded_amount);
|
620 |
+
almRenderResultsText(alm.resultsText, current, total);
|
621 |
+
|
622 |
+
break;
|
623 |
+
|
624 |
+
// Paging
|
625 |
+
case 'paging':
|
626 |
+
|
627 |
+
var start = parseInt(alm.page) * parseInt(alm.posts_per_page) + 1;
|
628 |
+
current = start + ' - ' + (parseInt(start) - 1 + parseInt(alm.posts));
|
629 |
+
total = parseInt(alm.totalposts) + parseInt(alm.preloaded_amount);
|
630 |
+
almRenderResultsText(alm.resultsText, current, total);
|
631 |
+
|
632 |
+
break;
|
633 |
+
|
634 |
+
default:
|
635 |
+
|
636 |
+
current = alm.posts;
|
637 |
+
total = parseInt(alm.totalposts);
|
638 |
+
almRenderResultsText(alm.resultsText, current, total);
|
639 |
+
|
640 |
+
}
|
641 |
+
};
|
642 |
+
|
643 |
+
/**
|
644 |
+
* Display `Showing {x} of {y} results` text.
|
645 |
+
*
|
646 |
+
* @param {Object} alm
|
647 |
+
* @param {String} type
|
648 |
+
* @since 4.1
|
649 |
+
*/
|
650 |
+
var almInitResultsText = function almInitResultsText(alm) {
|
651 |
+
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'standard';
|
652 |
+
|
653 |
+
|
654 |
+
if (!alm.resultsText) return false;
|
655 |
+
|
656 |
+
var current = 0;
|
657 |
+
var total = 0;
|
658 |
+
var totalEl = '';
|
659 |
+
|
660 |
+
switch (type) {
|
661 |
+
|
662 |
+
// Nextpage
|
663 |
+
case 'nextpage':
|
664 |
+
|
665 |
+
current = alm.page + parseInt(alm.nextpage_startpage);
|
666 |
+
total = alm.localize.total_posts;
|
667 |
+
if (total) {
|
668 |
+
almRenderResultsText(alm.resultsText, current, total);
|
669 |
+
}
|
670 |
+
|
671 |
+
break;
|
672 |
+
|
673 |
+
// Preloaded
|
674 |
+
case 'preloaded':
|
675 |
+
|
676 |
+
current = parseInt(alm.posts) + parseInt(alm.preloaded_amount);
|
677 |
+
total = alm.localize.total_posts;
|
678 |
+
if (total) {
|
679 |
+
almRenderResultsText(alm.resultsText, current, total);
|
680 |
+
}
|
681 |
+
|
682 |
+
break;
|
683 |
+
|
684 |
+
// Paging
|
685 |
+
case 'paging':
|
686 |
+
|
687 |
+
var start = parseInt(alm.page) * parseInt(alm.posts_per_page) + 1;
|
688 |
+
current = start + ' - ' + (parseInt(start) - 1 + parseInt(alm.posts_per_page));
|
689 |
+
totalEl = alm.container.get(0).querySelector('.alm-preloaded');
|
690 |
+
if (totalEl) {
|
691 |
+
almRenderResultsText(alm.resultsText, current, totalEl.dataset.totalPosts);
|
692 |
+
}
|
693 |
+
|
694 |
+
break;
|
695 |
+
|
696 |
+
default:
|
697 |
+
|
698 |
+
console.log('nothing');
|
699 |
+
|
700 |
+
}
|
701 |
+
};
|
702 |
+
'use strict';
|
703 |
+
|
704 |
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
|
705 |
|
706 |
/*
|
742 |
alm.prefix = 'alm-';
|
743 |
alm.el = el;
|
744 |
alm.master_id = alm.el.get(0).id; // the actual ALM div#id
|
745 |
+
|
746 |
+
// Get localized <script> variables
|
747 |
+
alm.master_id = alm.master_id.replace(/-/g, '_'); // Convert dashes to underscores for the var name
|
748 |
+
alm.localize = window[alm.master_id + '_vars']; // Get localize vars
|
749 |
+
|
750 |
+
// Main ALM container
|
751 |
alm.container = el;
|
752 |
alm.container.addClass('alm-' + e).attr('data-alm-id', e); // Add unique classname and data id
|
753 |
+
|
754 |
+
var container = alm.container.get(0); // Get DOM element
|
755 |
+
alm.content = $(container.querySelector('.alm-ajax')); // Get first `.alm-ajax` element as $ obj
|
756 |
+
alm.content_preloaded = $(container.querySelector('.alm-preloaded')); // Get first `.alm-preloaded` element as $ obj
|
757 |
+
|
758 |
alm.canonical_url = alm.el.attr('data-canonical-url');
|
759 |
+
alm.nested = alm.el.attr('data-nested');
|
760 |
alm.is_search = alm.el.attr('data-search');
|
761 |
alm.slug = alm.el.attr('data-slug');
|
762 |
alm.post_id = alm.el.attr('data-post-id');
|
768 |
alm.post_type = alm.content.attr('data-post-type');
|
769 |
alm.post_type = alm.post_type.split(",");
|
770 |
alm.sticky_posts = alm.content.attr('data-sticky-posts');
|
771 |
+
alm.btnWrap = $('> .alm-btn-wrap', alm.container);
|
772 |
alm.btnWrap.get(0).style.visibility = 'visible';
|
773 |
alm.button_label = alm.content.attr('data-button-label');
|
774 |
alm.button_loading_label = alm.content.attr('data-button-loading-label');
|
937 |
// Get Preloaded Amount
|
938 |
alm.preloaded_amount = alm.preloaded_amount === undefined ? alm.posts_per_page : alm.preloaded_amount;
|
939 |
|
|
|
|
|
|
|
|
|
|
|
|
|
940 |
// Disable ALM if total_posts is </= preloaded_amount
|
941 |
+
if (alm.localize && alm.localize.total_posts) {
|
942 |
+
if (parseInt(alm.localize.total_posts) <= parseInt(alm.preloaded_amount)) {
|
943 |
+
alm.preloaded_total_posts = alm.localize.total_posts;
|
944 |
alm.disable_ajax = true;
|
945 |
}
|
946 |
}
|
1131 |
if (alm.paging) {
|
1132 |
alm.content.parent().addClass('loading'); // add loading class to main container
|
1133 |
} else {
|
1134 |
+
alm.button = $('> .alm-btn-wrap .alm-load-more-btn', alm.container); // Set button element
|
1135 |
}
|
1136 |
|
1137 |
+
// Render "Showing x of y results" text.
|
1138 |
+
alm.resultsText = document.querySelector('.alm-results-text');
|
1139 |
+
if (alm.resultsText) {
|
1140 |
+
alm.resultsText.innerHTML = alm_localize.display_results;
|
1141 |
+
} else {
|
1142 |
+
alm.resultsText = false;
|
1143 |
+
}
|
1144 |
+
|
1145 |
+
/**
|
1146 |
+
* LoadPosts()
|
1147 |
* The function to get posts via Ajax
|
1148 |
* @since 2.0.0
|
1149 |
*/
|
1418 |
// Standard ALM query results
|
1419 |
html = data.html;
|
1420 |
meta = data.meta;
|
1421 |
+
alm.posts = alm.paging ? meta.postcount : alm.posts + meta.postcount;
|
1422 |
total = meta.postcount;
|
1423 |
alm.totalposts = meta.totalposts;
|
1424 |
|
1427 |
}
|
1428 |
}
|
1429 |
|
1430 |
+
// Set localized vars for totalposts
|
1431 |
+
alm.setlocalizedVars('viewing', alm.posts);
|
1432 |
+
alm.setlocalizedVars('total_posts', alm.totalposts);
|
1433 |
|
1434 |
+
almResultsText(alm); // Set Results Text
|
1435 |
+
|
1436 |
+
|
1437 |
+
// data converted to an object
|
1438 |
+
alm.data = $(html);
|
1439 |
+
|
1440 |
+
// If cache, get the length of the data object
|
1441 |
+
total = is_cache ? alm.data.length : total;
|
1442 |
|
1443 |
// First Run
|
1444 |
if (alm.init) {
|
1681 |
// Paging
|
1682 |
if (!alm.init) {
|
1683 |
$('.alm-paging-content', alm.el).html('').append(alm.data).almWaitForImages().done(function () {
|
1684 |
+
// Remove loading class, append data
|
1685 |
$('.alm-paging-loading', alm.el).fadeOut(alm.speed); // Fade out loader
|
1686 |
if ($.isFunction($.fn.almOnPagingComplete)) {
|
1687 |
+
setTimeout(function () {
|
1688 |
+
// Delay for effect
|
1689 |
+
$.fn.almOnPagingComplete(alm);
|
1690 |
+
}, alm.speed);
|
1691 |
}
|
1692 |
alm.container.removeClass('alm-loading');
|
1693 |
alm.AjaxLoadMore.triggerAddons(alm);
|
1712 |
// End ALM Complete
|
1713 |
|
1714 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1715 |
// ALM Done
|
1716 |
if (!alm.cache) {
|
1717 |
// Not Cache & Previous Post
|
1727 |
// End ALM Done
|
1728 |
|
1729 |
} else {
|
1730 |
+
// No Results!
|
1731 |
|
|
|
1732 |
if (!alm.paging) {
|
1733 |
+
// Add .done class, reset btn text
|
1734 |
alm.button.delay(alm.speed).removeClass('loading').addClass('done');
|
1735 |
alm.AjaxLoadMore.resetBtnText();
|
1736 |
}
|
1737 |
+
|
1738 |
alm.AjaxLoadMore.triggerDone(); // ALM Done
|
1739 |
}
|
1740 |
|
1741 |
+
// Filters Complete
|
1742 |
+
if ($.isFunction($.fn.almFilterComplete)) {
|
1743 |
+
// Standard Filtering
|
1744 |
+
$.fn.almFilterComplete();
|
1745 |
+
}
|
1746 |
+
if (typeof almFiltersAddonComplete == "function") {
|
1747 |
+
// Filters Add-on
|
1748 |
+
almFiltersAddonComplete(el);
|
1749 |
+
}
|
1750 |
+
// End Filters Complete
|
1751 |
+
|
1752 |
+
|
1753 |
// Destroy After
|
1754 |
if (alm.destroy_after !== undefined && alm.destroy_after !== '') {
|
1755 |
var currentPage = alm.page + 1; // Add 1 because alm.page starts at 0
|
1764 |
}
|
1765 |
// End Destroy After
|
1766 |
|
1767 |
+
alm_is_filtering = alm.init = false;
|
|
|
1768 |
};
|
1769 |
|
1770 |
/* pagingPreloadedInit()
|
2097 |
}
|
2098 |
};
|
2099 |
|
2100 |
+
/**
|
|
|
2101 |
* Set variables after loading transiton completes
|
2102 |
* @since 3.5
|
2103 |
*/
|
2113 |
}, alm.speed);
|
2114 |
};
|
2115 |
|
2116 |
+
/**
|
2117 |
+
* Set localized variables
|
2118 |
+
* @since 4.1
|
2119 |
+
*/
|
2120 |
+
alm.setlocalizedVars = function (name, value) {
|
2121 |
+
if (alm.localize && name && value) {
|
2122 |
+
alm.localize[name] = value; // Set ALM localize var
|
2123 |
+
window[alm.master_id + '_vars'][name] = value; // Update global window obj vars
|
2124 |
+
}
|
2125 |
+
};
|
2126 |
+
|
2127 |
+
/**
|
2128 |
+
* Init Ajax load More
|
2129 |
* Load posts as user scrolls the page
|
2130 |
* @since 2.0
|
2131 |
*/
|
2164 |
$.fn.almSEO(alm, true);
|
2165 |
}
|
2166 |
}, alm.speed);
|
2167 |
+
|
2168 |
+
if (alm.resultsText) {
|
2169 |
+
almInitResultsText(alm, 'preloaded');
|
2170 |
+
}
|
2171 |
}
|
2172 |
|
2173 |
// Preloaded
|
2185 |
}
|
2186 |
}
|
2187 |
}, alm.speed);
|
2188 |
+
|
2189 |
+
if (alm.resultsText) {
|
2190 |
+
almInitResultsText(alm, 'preloaded');
|
2191 |
+
}
|
2192 |
+
}
|
2193 |
+
|
2194 |
+
if (alm.paging) {
|
2195 |
+
if (alm.resultsText) {
|
2196 |
+
almInitResultsText(alm, 'paging');
|
2197 |
+
}
|
2198 |
}
|
2199 |
|
2200 |
// Next Page Add-on
|
2201 |
if (alm.nextpage) {
|
2202 |
+
|
2203 |
+
if ($('.alm-nextpage', alm.container).length) {
|
2204 |
+
|
2205 |
+
// `.alm-nextpage` check that posts remain
|
2206 |
+
var alm_nextpage_pages = $('.alm-nextpage', alm.container).length,
|
2207 |
+
alm_nextpage_total = $('.alm-nextpage', alm.container).eq(0).data('total-posts');
|
2208 |
|
2209 |
if (alm_nextpage_pages == alm_nextpage_total) {
|
2210 |
alm.AjaxLoadMore.triggerDone();
|
2211 |
}
|
2212 |
}
|
2213 |
+
|
2214 |
+
if (alm.resultsText) {
|
2215 |
+
almInitResultsText(alm, 'nextpage');
|
2216 |
+
}
|
2217 |
}
|
2218 |
|
2219 |
// Masonry + Preloaded
|
2224 |
}
|
2225 |
});
|
2226 |
};
|
2227 |
+
|
2228 |
alm.AjaxLoadMore.init();
|
2229 |
|
2230 |
//flag to prevent unnecessary loading of post on init. Hold for 2/10 of a second
|
2321 |
// End $.ajaxloadmore
|
2322 |
|
2323 |
|
2324 |
+
/**
|
2325 |
+
* $.fn.ajaxloadmore()
|
2326 |
* Initiate all instances of Ajax load More
|
2327 |
* @since 2.1.2
|
2328 |
*/
|
core/dist/js/ajax-load-more.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
"use strict";Array.from||(Array.from=function(){var a=Object.prototype.toString,l=function(t){return"function"==typeof t||"[object Function]"===a.call(t)},o=Math.pow(2,53)-1,d=function(t){var a,e=(a=Number(t),isNaN(a)?0:0!==a&&isFinite(a)?(0<a?1:-1)*Math.floor(Math.abs(a)):a);return Math.min(Math.max(e,0),o)};return function(t){var a=Object(t);if(null==t)throw new TypeError("Array.from requires an array-like object - not null or undefined");var e,o=1<arguments.length?arguments[1]:void 0;if(void 0!==o){if(!l(o))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(e=arguments[2])}for(var n,r=d(a.length),s=l(this)?Object(new this(r)):new Array(r),i=0;i<r;)n=a[i],s[i]=o?void 0===e?o(n,i):o.call(e,n,i):n,i+=1;return s.length=r,s}}());var almGetParameterByName=function(t,a){a||(a=window.location.href),t=t.replace(/[\[\]]/g,"\\$&");var e=new RegExp("[?&]"+t+"(=([^&#]*)|&|#|$)").exec(a);return e?e[2]?decodeURIComponent(e[2].replace(/\+/g," ")):"":null},almGetAjaxParams=function(t,a,e){var o={action:a,nonce:alm_localize.alm_nonce,query_type:e,id:t.id,post_id:t.post_id,slug:t.slug,canonical_url:t.canonical_url,posts_per_page:t.posts_per_page,page:t.page,offset:t.offset,post_type:t.post_type,repeater:t.repeater,seo_start_page:t.start_page};return t.theme_repeater&&(o.theme_repeater=t.theme_repeater),t.paging&&(o.paging=t.paging),t.preloaded&&(o.preloaded=t.preloaded,o.preloaded_amount=t.preloaded_amount),"true"===t.cache&&(o.cache_id=t.cache_id,o.cache_logged_in=t.cache_logged_in),t.acf_array&&(o.acf=t.acf_array),t.cta_array&&(o.cta=t.cta_array),t.comments_array&&(o.comments=t.comments_array),t.nextpage_array&&(o.nextpage=t.nextpage_array),t.previous_post_array&&(o.previous_post=t.previous_post_array),t.users_array&&(o.users=t.users_array),t.content.attr("data-lang")&&(o.lang=t.content.attr("data-lang")),t.content.attr("data-sticky-posts")&&(o.sticky_posts=t.content.attr("data-sticky-posts")),t.content.attr("data-post-format")&&(o.post_format=t.content.attr("data-post-format")),t.content.attr("data-category")&&(o.category=t.content.attr("data-category")),t.content.attr("data-category-and")&&(o.category__and=t.content.attr("data-category-and")),t.content.attr("data-category-not-in")&&(o.category__not_in=t.content.attr("data-category-not-in")),t.content.attr("data-tag")&&(o.tag=t.content.attr("data-tag")),t.content.attr("data-tag-and")&&(o.tag__and=t.content.attr("data-tag-and")),t.content.attr("data-tag-not-in")&&(o.tag__not_in=t.content.attr("data-tag-not-in")),t.content.attr("data-taxonomy")&&(o.taxonomy=t.content.attr("data-taxonomy")),t.content.attr("data-taxonomy-terms")&&(o.taxonomy_terms=t.content.attr("data-taxonomy-terms")),t.content.attr("data-taxonomy-operator")&&(o.taxonomy_operator=t.content.attr("data-taxonomy-operator")),t.content.attr("data-taxonomy-relation")&&(o.taxonomy_relation=t.content.attr("data-taxonomy-relation")),t.content.attr("data-meta-key")&&(o.meta_key=t.content.attr("data-meta-key")),t.content.attr("data-meta-value")&&(o.meta_value=t.content.attr("data-meta-value")),t.content.attr("data-meta-compare")&&(o.meta_compare=t.content.attr("data-meta-compare")),t.content.attr("data-meta-relation")&&(o.meta_relation=t.content.attr("data-meta-relation")),t.content.attr("data-meta-type")&&(o.meta_type=t.content.attr("data-meta-type")),t.content.attr("data-author")&&(o.author=t.content.attr("data-author")),t.content.attr("data-year")&&(o.year=t.content.attr("data-year")),t.content.attr("data-month")&&(o.month=t.content.attr("data-month")),t.content.attr("data-day")&&(o.day=t.content.attr("data-day")),t.content.attr("data-order")&&(o.order=t.content.attr("data-order")),t.content.attr("data-orderby")&&(o.orderby=t.content.attr("data-orderby")),t.content.attr("data-post-status")&&(o.post_status=t.content.attr("data-post-status")),t.content.attr("data-post-in")&&(o.post__in=t.content.attr("data-post-in")),t.content.attr("data-post-not-in")&&(o.post__not_in=t.content.attr("data-post-not-in")),t.content.attr("data-exclude")&&(o.exclude=t.content.attr("data-exclude")),t.content.attr("data-search")&&(o.search=t.content.attr("data-search")),t.content.attr("data-s")&&(o.search=t.content.attr("data-s")),t.content.attr("data-custom-args")&&(o.custom_args=t.content.attr("data-custom-args")),o},almGetRestParams=function(t){return{id:t.id,post_id:t.post_id,posts_per_page:t.posts_per_page,page:t.page,offset:t.offset,slug:t.slug,canonical_url:t.canonical_url,post_type:t.post_type,post_format:t.content.attr("data-post-format"),category:t.content.attr("data-category"),category__not_in:t.content.attr("data-category-not-in"),tag:t.content.attr("data-tag"),tag__not_in:t.content.attr("data-tag-not-in"),taxonomy:t.content.attr("data-taxonomy"),taxonomy_terms:t.content.attr("data-taxonomy-terms"),taxonomy_operator:t.content.attr("data-taxonomy-operator"),taxonomy_relation:t.content.attr("data-taxonomy-relation"),meta_key:t.content.attr("data-meta-key"),meta_value:t.content.attr("data-meta-value"),meta_compare:t.content.attr("data-meta-compare"),meta_relation:t.content.attr("data-meta-relation"),meta_type:t.content.attr("data-meta-type"),author:t.content.attr("data-author"),year:t.content.attr("data-year"),month:t.content.attr("data-month"),day:t.content.attr("data-day"),post_status:t.content.attr("data-post-status"),order:t.content.attr("data-order"),orderby:t.content.attr("data-orderby"),post__in:t.content.attr("data-post-in"),post__not_in:t.content.attr("data-post-not-in"),search:t.content.attr("data-search"),custom_args:t.content.attr("data-custom-args"),lang:t.lang,preloaded:t.preloaded,preloaded_amount:t.preloaded_amount,seo_start_page:t.start_page}};function _toConsumableArray(t){if(Array.isArray(t)){for(var a=0,e=Array(t.length);a<t.length;a++)e[a]=t[a];return e}return Array.from(t)}var alm_is_filtering=!1;!function(r){r.fn.almFilter=function(e,o,n){n.target?r(".ajax-load-more-wrap[data-id='"+n.target+"']").each(function(t){var a=r(this);r.fn.almFilterTransition(e,o,n,a)}):r(".ajax-load-more-wrap").each(function(t){var a=r(this);r.fn.almFilterTransition(e,o,n,a)})},r.fn.almFilterTransition=function(t,a,e,o){"slide"===t?o.slideUp(a,function(){n(a,e,o)}):"fade"===t||"masonry"===t?o.fadeOut(a,function(){n(a,e,o)}):n(a,e,o)};var n=function(t,a,e){var o=e.get(0),n=o.querySelectorAll(".alm-listing");[].concat(_toConsumableArray(n)).forEach(function(t){t.innerHTML=""});var r=o.querySelector(".alm-load-more-btn");r&&r.classList.remove("done"),s(t,a,e)},s=function(t,a,e){r.each(a,function(t,a){t=t.replace(/\W+/g,"-").replace(/([a-z\d])([A-Z])/g,"$1-$2"),r(".alm-listing",e).attr("data-"+t,a)}),e.fadeIn(t),alm_is_filtering=!0,a.target?r(".ajax-load-more-wrap[data-id="+a.target+"]").ajaxloadmore():r(".ajax-load-more-wrap").ajaxloadmore()}}(jQuery);var almMasonry=function t(o,a,n,r,e,s,i,l,d,p){var c=(i+100)/1e3+"s",_="scale(0.5)",g="scale(1)";"zoom-out"===e&&(_="translateY(-20px) scale(1.25)",g="translateY(0) scale(1)"),"slide-up"===e&&(_="translateY(50px)",g="translateY(0)"),"slide-down"===e&&(_="translateY(-50px)",g="translateY(0)"),"none"===e&&(g=_="translateY(0)"),r?isNaN(r)||(r=parseInt(r)):r=n,s="true"===s,p?(o.masonry("destroy"),o[0].parentNode.style.opacity=0,o.append(a),t(o,a,n,r,e,s,i,!0,!0,!1)):l&&d?o.imagesLoaded(function(){var a={itemSelector:n,transitionDuration:c,columnWidth:r,horizontalOrder:s,hiddenStyle:{transform:_,opacity:0},visibleStyle:{transform:g,opacity:1}},e=e;e&&Object.keys(e).forEach(function(t){a[t]=e[t]}),o.masonry(a),almMasonryFadeIn(o[0].parentNode,i)}):a.imagesLoaded(function(){o.append(a).masonry("appended",a)})},almMasonryFadeIn=function(t,a){a/=10;var e=parseInt(t.style.opacity),o=setInterval(function(){.9<e&&(t.style.opacity=1,clearInterval(o)),t.style.opacity=e,e+=.1},a)};function _toConsumableArray(t){if(Array.isArray(t)){for(var a=0,e=Array(t.length);a<t.length;a++)e[a]=t[a];return e}return Array.from(t)}!function(b){b.ajaxloadmore=function(h,t){"true"===alm_localize.scrolltop&&b(window).scrollTop(0);var x=this;if(x.AjaxLoadMore={},x.window=b(window),x.page=0,x.posts=0,x.totalposts=0,x.proceed=!1,x.disable_ajax=!1,x.init=!0,x.loading=!0,x.finished=!1,x.prefix="alm-",x.el=h,x.master_id=x.el.get(0).id,x.container=h,x.container.addClass("alm-"+t).attr("data-alm-id",t),x.content=b(".alm-ajax",x.container),x.content_preloaded=b(".alm-preloaded",x.container),x.canonical_url=x.el.attr("data-canonical-url"),x.is_search=x.el.attr("data-search"),x.slug=x.el.attr("data-slug"),x.post_id=x.el.attr("data-post-id"),x.id=x.el.attr("data-id")?x.el.attr("data-id"):"",x.repeater=x.content.attr("data-repeater"),x.theme_repeater=x.content.attr("data-theme-repeater"),x.post_type=x.content.attr("data-post-type"),x.post_type=x.post_type.split(","),x.sticky_posts=x.content.attr("data-sticky-posts"),x.btnWrap=b(".alm-btn-wrap",x.container),x.btnWrap.get(0).style.visibility="visible",x.button_label=x.content.attr("data-button-label"),x.button_loading_label=x.content.attr("data-button-loading-label"),x.scroll_distance=x.content.attr("data-scroll-distance"),x.scroll_distance=x.scroll_distance?parseInt(x.scroll_distance):150,x.scroll_container=x.content.attr("data-scroll-container"),x.max_pages=x.content.attr("data-max-pages"),x.max_pages=x.max_pages?parseInt(x.max_pages):0,x.pause_override=x.content.attr("data-pause-override"),x.pause=x.content.attr("data-pause"),x.transition=x.content.attr("data-transition"),x.transition_container=x.content.attr("data-transition-container"),x.tcc=x.content.attr("data-transition-container-classes"),x.speed=250,x.images_loaded=x.content.attr("data-images-loaded"),x.destroy_after=x.content.attr("data-destroy-after"),x.orginal_posts_per_page=x.content.attr("data-posts-per-page"),x.posts_per_page=x.content.attr("data-posts-per-page"),x.offset=x.content.attr("data-offset"),x.cache=x.content.attr("data-cache"),x.cache_id=x.content.attr("data-cache-id"),x.cache_path=x.content.attr("data-cache-path"),x.cache_logged_in=x.content.attr("data-cache-logged-in"),x.cta=x.content.attr("data-cta"),x.cta_position=x.content.attr("data-cta-position"),x.cta_repeater=x.content.attr("data-cta-repeater"),x.cta_theme_repeater=x.content.attr("data-cta-theme-repeater"),x.acf=x.content.attr("data-acf"),x.acf_field_type=x.content.attr("data-acf-field-type"),x.acf_field_name=x.content.attr("data-acf-field-name"),x.acf_post_id=x.content.attr("data-acf-post-id"),x.nextpage=x.content.attr("data-nextpage"),x.nextpage_urls=x.content.attr("data-nextpage-urls"),x.nextpage_scroll=x.content.attr("data-nextpage-scroll"),x.nextpage_pageviews=x.content.attr("data-nextpage-pageviews"),x.nextpage_post_id=x.content.attr("data-nextpage-post-id"),x.nextpage_startpage=x.content.attr("data-nextpage-startpage"),x.previous_post=x.content.attr("data-previous-post"),x.previous_post_id=x.content.attr("data-previous-post-id"),x.previous_post_taxonomy=x.content.attr("data-previous-post-taxonomy"),x.previous_post_excluded_terms=x.content.attr("data-previous-post-excluded-terms"),x.comments=x.content.attr("data-comments"),"true"===x.comments&&(x.content=b(".alm-comments",x.container)),x.comments_post_id=x.content.attr("data-comments_post_id"),x.comments_per_page=x.content.attr("data-comments_per_page"),x.comments_type=x.content.attr("data-comments_type"),x.comments_style=x.content.attr("data-comments_style"),x.comments_template=x.content.attr("data-comments_template"),x.comments_callback=x.content.attr("data-comments_callback"),x.filters=x.content.attr("data-filters"),x.restapi=x.content.attr("data-restapi"),x.restapi_base_url=x.content.attr("data-restapi-base-url"),x.restapi_namespace=x.content.attr("data-restapi-namespace"),x.restapi_endpoint=x.content.attr("data-restapi-endpoint"),x.restapi_template_id=x.content.attr("data-restapi-template-id"),x.restapi_debug=x.content.attr("data-restapi-debug"),x.seo=x.content.attr("data-seo"),x.preloaded=x.content.attr("data-preloaded"),x.preloaded_amount=x.content.attr("data-preloaded-amount"),x.is_preloaded="true"===x.content.attr("data-is-preloaded"),x.paging=x.content.attr("data-paging"),x.users="true"===x.content.attr("data-users"),x.users&&(x.orginal_posts_per_page=x.content.attr("data-users-per-page"),x.posts_per_page=x.content.attr("data-users-per-page")),"true"===x.filters){x.filters=!0,x.filters_analtyics=x.content.attr("data-filters-analtyics"),x.filters_debug=x.content.attr("data-filters-debug"),x.filters_startpage=0;var a=almGetParameterByName("pg");null!==a&&(x.filters_startpage=parseInt(a),x.page=x.filters_startpage),x.isPaged=!1,0<x.filters_startpage&&(x.isPaged=!0,x.page=x.filters_startpage-1)}else x.filters=!1;if("true"===x.restapi?(x.restapi=!0,void 0===x.restapi_debug&&(x.restapi_debug=!1),""===x.restapi_template_id&&(x.restapi=!1)):x.restapi=!1,"true"===x.paging?(x.paging=!0,x.paging_controls=!!x.content.attr("data-paging-controls"),x.paging_show_at_most=x.content.attr("data-paging-show-at-most"),x.paging_classes=x.content.attr("data-paging-classes"),x.paging_init=!0,x.paging_show_at_most=void 0===x.paging_show_at_most?7:x.paging_show_at_most,x.pause="true"===x.preloaded||x.pause):x.paging=!1,void 0===x.cache&&(x.cache=!1),void 0===x.cache_logged_in&&(x.cache_logged_in=!1),void 0===x.comments_per_page&&(x.comments_per_page="5"),"true"===x.preloaded){x.preloaded_amount=void 0===x.preloaded_amount?x.posts_per_page:x.preloaded_amount;var e=x.master_id.replace(/-/g,"_");e+="_vars";var o=window[e];o&&o.total_posts&&parseInt(o.total_posts)<=parseInt(x.preloaded_amount)&&(x.preloaded_total_posts=o.total_posts,x.disable_ajax=!0)}else x.preloaded="false";void 0===x.seo&&(x.seo=!1),"true"===x.seo&&(x.seo=!0),void 0===x.is_search&&(x.is_search=!1),x.search_value="true"===x.is_search?x.slug:"",x.permalink=x.content.attr("data-seo-permalink"),x.pageview=x.content.attr("data-seo-pageview"),x.start_page=x.content.attr("data-seo-start-page"),x.seo_trailing_slash="false"===x.content.attr("data-seo-trailing-slash")?"":"/",x.seo_leading_slash="true"===x.content.attr("data-seo-leading-slash")?"/":"",x.start_page?(x.seo_scroll=x.content.attr("data-seo-scroll"),x.seo_scroll_speed=x.content.attr("data-seo-scroll-speed"),x.seo_scrolltop=x.content.attr("data-seo-scrolltop"),x.seo_controls=x.content.attr("data-seo-controls"),x.isPaged=!1,1<x.start_page&&(x.isPaged=!0,x.posts_per_page=x.start_page*x.posts_per_page),x.paging&&(x.posts_per_page=x.orginal_posts_per_page)):x.start_page=1,"true"===x.nextpage?(x.nextpage=!0,x.posts_per_page=1):x.nextpage=!1,void 0===x.nextpage_urls&&(x.nextpage_urls="true"),void 0===x.nextpage_scroll&&(x.nextpage_scroll="250:30"),void 0===x.nextpage_pageviews&&(x.nextpage_pageviews="true"),void 0===x.nextpage_post_id&&(x.nextpage=!1,x.nextpage_post_id=null),void 0===x.nextpage_startpage&&(x.nextpage_startpage=1),1<x.nextpage_startpage&&(x.isPaged=!0),x.acf="true"===x.acf,void 0!==x.acf_field_type&&void 0!==x.acf_field_name&&void 0!==x.acf_post_id||(x.acf=!1),"true"===x.previous_post?(x.previous_post=!0,x.previous_post_permalink="",x.previous_post_title="",x.previous_post_slug=""):x.previous_post=!1,void 0===x.previous_post_id&&(x.previous_post_id=""),void 0===x.previous_post_taxonomy&&(x.previous_post_taxonomy=""),void 0===x.previous_post_excluded_terms&&(x.previous_post_excluded_terms=""),x.previous_post_title_template=x.content.attr("data-previous-post-title-template"),x.siteTitle=x.content.attr("data-previous-post-site-title"),x.siteTagline=x.content.attr("data-previous-post-site-tagline"),x.previous_post_pageview=x.content.attr("data-previous-post-pageview"),x.previous_post_scroll=x.content.attr("data-previous-post-scroll"),x.previous_post_scroll_speed=x.content.attr("data-previous-post-scroll-speed"),x.previous_post_scroll_top=x.content.attr("data-previous-post-scrolltop"),x.previous_post_controls=x.content.attr("data-previous-post-controls"),x.offset=void 0===x.offset?0:x.offset,(void 0===x.pause||x.seo&&1<x.start_page)&&(x.pause=!1),"true"===x.preloaded&&x.seo&&0<x.start_page&&(x.pause=!1),"true"===x.preloaded&&x.paging&&(x.pause=!0),void 0===x.repeater&&(x.repeater="default"),x.theme_repeater=void 0!==x.theme_repeater&&x.theme_repeater,x.max_pages=void 0===x.max_pages||0===x.max_pages?1e4:x.max_pages,x.scroll_distance=void 0===x.scroll_distance?150:x.scroll_distance,x.scroll_container=void 0===x.scroll_container?"":x.scroll_container,x.transition=void 0===x.transition?"fade":x.transition,x.tcc=void 0===x.tcc?"":x.tcc,x.is_masonry_preloaded=!1,"masonry"===x.transition&&(x.masonry_init=!0,x.masonry_selector=x.content.attr("data-masonry-selector"),x.masonry_columnwidth=x.content.attr("data-masonry-columnwidth"),x.masonry_animation=x.content.attr("data-masonry-animation"),x.masonry_horizontalorder=x.content.attr("data-masonry-horizontalorder"),void 0===x.masonry_animation&&(x.masonry_animation="standard"),void 0===x.masonry_horizontalorder&&(x.masonry_horizontalorder="true"),x.masonry_wrap=x.content,x.transition_container=!1,"true"===x.preloaded&&(x.is_masonry_preloaded=!0)),void 0===x.content.attr("data-scroll")?x.scroll=!0:"false"===x.content.attr("data-scroll")?x.scroll=!1:x.scroll=!0,x.transition_container=void 0===x.transition_container||"true"===x.transition_container,x.images_loaded=void 0===x.images_loaded?"false":x.images_loaded,x.button_label=void 0===x.button_label?"Older Posts":x.button_label,x.button_loading_label=void 0!==x.button_loading_label&&x.button_loading_label,x.paging?x.content.parent().addClass("loading"):x.button=b(".alm-load-more-btn",x.container),x.AjaxLoadMore.loadPosts=function(){if(!x.disable_ajax)if(x.paging||(x.button.addClass("loading"),!1!==x.button_loading_label&&x.button.html(x.button_loading_label)),x.container.addClass("alm-loading"),x.loading=!0,"true"!==x.cache||x.cache_logged_in)x.AjaxLoadMore.ajax("standard");else{var t;if(x.init&&x.seo&&x.isPaged){t=x.cache_path+x.cache_id+"/page-1-"+x.start_page+".html"}else if(x.nextpage){var a;x.paging?a=parseInt(x.page)+1:(a=parseInt(x.page)+2,x.isPaged&&(a=parseInt(x.page)+parseInt(x.nextpage_startpage)+1)),t=x.cache_path+x.cache_id+"/page-"+a+".html"}else t=x.previous_post?x.cache_path+x.cache_id+"/"+x.previous_post_id+".html":x.cache_path+x.cache_id+"/page-"+(x.page+1)+".html";b.get(t,function(t){x.AjaxLoadMore.success(t,!0)}).fail(function(){x.AjaxLoadMore.ajax("standard")})}},x.AjaxLoadMore.ajax=function(a){var t="alm_query_posts";if(x.acf_array="",x.acf&&("relationship"!==x.acf_field_type&&(t="alm_acf_query"),x.acf_array={acf:"true",post_id:x.acf_post_id,field_type:x.acf_field_type,field_name:x.acf_field_name}),x.nextpage_array="",x.nextpage&&(t="alm_nextpage_query",x.nextpage_array={nextpage:"true",urls:x.nextpage_urls,scroll:x.nextpage_scroll,pageviews:x.nextpage_pageviews,post_id:x.nextpage_post_id,startpage:x.nextpage_startpage}),x.previous_post_array="",x.previous_post&&(x.previous_post_array={previous_post:"true",id:x.previous_post_id,slug:x.previous_post_slug}),x.comments_array="","true"===x.comments&&(t="alm_comments_query",x.posts_per_page=x.comments_per_page,x.comments_array={comments:"true",post_id:x.comments_post_id,per_page:x.comments_per_page,type:x.comments_type,style:x.comments_style,template:x.comments_template,callback:x.comments_callback}),x.users_array="",x.users&&(t="alm_users_query",x.users_array={users:"true",role:x.content.attr("data-users-role"),include:x.content.attr("data-users-include"),exclude:x.content.attr("data-users-exclude"),per_page:x.posts_per_page,order:x.content.attr("data-users-order"),orderby:x.content.attr("data-users-orderby")}),x.cta_array="","true"===x.cta&&(x.cta_array={cta:"true",cta_position:x.cta_position,cta_repeater:x.cta_repeater,cta_theme_repeater:x.cta_theme_repeater}),x.restapi){var i=wp.template(x.restapi_template_id),e=x.restapi_base_url+"/"+x.restapi_namespace+"/"+x.restapi_endpoint,o=almGetRestParams(x);b.ajax({type:"GET",url:e,data:o,dataType:"JSON",beforeSend:function(){1==x.page||x.paging||x.button.addClass("loading")},success:function(t){var e="",o=t.html,a=t.meta,n=a.postcount,r=a.totalposts;b.each(o,function(t){var a=o[t];"true"===x.restapi_debug&&console.log(a),e+=i(a)});var s={html:e,meta:{postcount:n,totalposts:r}};x.AjaxLoadMore.success(s,!1)}})}else{var n=almGetAjaxParams(x,t,a);b.ajax({type:"GET",url:alm_localize.ajaxurl,dataType:"JSON",data:n,beforeSend:function(){1==x.page||x.paging||x.button.addClass("loading")},success:function(t){"standard"===a?x.AjaxLoadMore.success(t,!1):"totalpages"===a&&x.paging&&x.nextpage?b.isFunction(b.fn.almBuildPagination)&&b.fn.almBuildPagination(t,x):"totalposts"===a&&x.paging&&b.isFunction(b.fn.almBuildPagination)&&b.fn.almBuildPagination(t,x)},error:function(t,a,e){x.AjaxLoadMore.error(t,a,e)}})}},x.paging&&(x.nextpage?x.AjaxLoadMore.ajax("totalpages"):x.AjaxLoadMore.ajax("totalposts")),x.AjaxLoadMore.success=function(t,a){x.previous_post&&x.AjaxLoadMore.getPreviousPost();var e,o,n,r='style="opacity: 0; height: 0;"';if(a?e=t:(e=t.html,o=t.meta,x.posts=x.posts+o.postcount,n=o.postcount,x.totalposts=o.totalposts,"true"===x.preloaded&&(x.totalposts=x.totalposts-x.preloaded_amount)),x.data=b(e),a&&(n=x.data.length),x.init&&(o&&o.totalposts&&x.el.attr("data-total-posts",o.totalposts),x.paging?0<n&&(x.el=b('<div class="alm-reveal'+x.tcc+'" '+r+"/>"),x.el.append('<div class="alm-paging-content'+x.tcc+'"></div><div class="alm-paging-loading"></div>'),b(".alm-paging-content",x.el).append(x.data),x.content.append(x.el),x.AjaxLoadMore.fadeIn(x.el.get(0),x.speed),x.content.parent().removeClass("loading"),x.AjaxLoadMore.resetBtnText(),setTimeout(function(){b(".alm-paging-content",x.el).fadeIn(x.speed,"alm_easeInOutQuad",function(){var t=parseInt(x.content.css("padding-top")),a=parseInt(x.content.css("padding-bottom"));x.content.css("height",x.el.height()+t+a+"px"),b.isFunction(b.fn.almFadePageControls)&&b.fn.almFadePageControls(x.btnWrap)})},x.speed)):x.button.html(x.button_label),0===n&&(x.paging&&b.isFunction(b.fn.almPagingEmpty)&&b.fn.almPagingEmpty(x),b.isFunction(b.fn.almEmpty)&&b.fn.almEmpty(x)),x.isPaged&&(x.posts_per_page=x.users?x.content.attr("data-users-per-page"):x.content.attr("data-posts-per-page"),x.page=x.start_page?x.start_page-1:x.page,x.filters&&x.filters_startpage&&(x.page=x.filters_startpage-1,x.posts_per_page=x.content.attr("data-posts-per-page")))),0<n){if(x.paging)x.init?(x.container.removeClass("alm-loading"),x.AjaxLoadMore.triggerAddons(x)):b(".alm-paging-content",x.el).html("").append(x.data).almWaitForImages().done(function(){b(".alm-paging-loading",x.el).fadeOut(x.speed),b.isFunction(b.fn.almOnPagingComplete)&&b.fn.almOnPagingComplete(x),x.container.removeClass("alm-loading"),x.AjaxLoadMore.triggerAddons(x)});else{if(x.previous_post)x.el=b('<div class="alm-reveal alm-previous-post post-'+x.previous_post_id+'" '+r+' data-id="'+x.previous_post_id+'" data-title="'+x.previous_post_title+'" data-url="'+x.previous_post_permalink+'" data-page="'+x.page+'"/>'),x.el.append(x.data);else if(x.transition_container){var s=void 0,i=window.location.search;if(x.init&&1<x.start_page){var l=[],d=[],p=parseInt(x.posts_per_page);Math.ceil(n/p);x.el=x.content,"true"===x.cta&&(p+=1,n=Math.ceil(n/p)+n);for(var c=0;c<n;c+=p)l.push(x.data.slice(c,p+c));for(var _=0;_<l.length;_++){var g="true"===x.preloaded?1:0,m=void 0;if(0<_||"true"===x.preloaded)s=_+1+g,m="default"===x.permalink?b('<div class="alm-reveal alm-seo'+x.tcc+'" data-url="'+x.canonical_url+x.search_value+"&paged="+s+'" data-page="'+s+'" />'):b('<div class="alm-reveal alm-seo'+x.tcc+'" data-url="'+x.canonical_url+x.seo_leading_slash+"page/"+s+x.seo_trailing_slash+x.search_value+'" data-page="'+s+'" />');else{var u=x.is_preloaded?" alm-preloaded":"";m=b('<div class="alm-reveal alm-seo'+u+x.tcc+'" data-url="'+x.canonical_url+x.search_value+'" data-page="1" />')}d.push(m.append(l[_]))}for(var f=0;f<d.length;f++)x.el.append(d[f]);x.el.get(0).style.opacity=0,x.el.get(0).style.height=0}else{if(x.seo&&0<x.page||"true"===x.preloaded){var y="true"===x.preloaded?1:0;s=x.page+1+y,x.seo?"default"===x.permalink?x.el=b('<div class="alm-reveal alm-seo'+x.tcc+'" '+r+' data-url="'+x.canonical_url+x.search_value+"&paged="+s+'" data-page="'+s+'" />'):x.el=b('<div class="alm-reveal alm-seo'+x.tcc+'" '+r+' data-url="'+x.canonical_url+x.seo_leading_slash+"page/"+s+x.seo_trailing_slash+x.search_value+'" data-page="'+s+'" />'):x.filters?x.el=b('<div class="alm-reveal alm-filters'+x.tcc+'" '+r+' data-url="'+x.canonical_url+i+'" data-page="'+s+'" />'):x.el=b('<div class="alm-reveal'+x.tcc+'" '+r+" />")}else x.filters?x.el=b('<div class="alm-reveal alm-filters'+x.tcc+'" '+r+' data-url="'+x.canonical_url+i+'" data-page="'+(x.page+1)+'" />'):x.seo?x.el=b('<div class="alm-reveal alm-seo'+x.tcc+'" '+r+' data-url="'+x.canonical_url+x.search_value+'" data-page="1" />'):x.el=b('<div class="alm-reveal'+x.tcc+'" '+r+" />");x.el.append(x.data)}}else x.el=x.data;("masonry"!==x.transition||x.init&&!x.is_masonry_preloaded)&&x.content.append(x.el),"masonry"===x.transition?(almMasonry(x.masonry_wrap,x.el,x.masonry_selector,x.masonry_columnwidth,x.masonry_animation,x.masonry_horizontalorder,x.speed,x.masonry_init,x.init,alm_is_filtering),x.masonry_init=!1,x.AjaxLoadMore.transitionEnd()):"none"===x.transition?(x.AjaxLoadMore.fadeIn(x.el.get(0),0),x.AjaxLoadMore.transitionEnd()):"true"===x.images_loaded?x.el.almWaitForImages().done(function(){x.transition_container&&x.AjaxLoadMore.fadeIn(x.el.get(0),x.speed),x.AjaxLoadMore.transitionEnd()}):(x.transition_container&&x.AjaxLoadMore.fadeIn(x.el.get(0),x.speed),x.AjaxLoadMore.transitionEnd())}b.isFunction(b.fn.almComplete)&&("true"===x.images_loaded?x.el.almWaitForImages().done(function(){b.fn.almComplete(x)}):b.fn.almComplete(x)),b.isFunction(b.fn.almFilterComplete)&&b.fn.almFilterComplete(),"function"==typeof almFiltersAddonComplete&&almFiltersAddonComplete(h),x.cache?n<x.posts_per_page&&x.AjaxLoadMore.triggerDone():x.posts>=x.totalposts&&!x.previous_post&&x.AjaxLoadMore.triggerDone()}else x.paging||(x.button.delay(x.speed).removeClass("loading").addClass("done"),x.AjaxLoadMore.resetBtnText()),x.AjaxLoadMore.triggerDone();if(void 0!==x.destroy_after&&""!==x.destroy_after){var v=x.page+1;"true"===x.preloaded&&v++,v==x.destroy_after&&x.AjaxLoadMore.destroyed()}alm_is_filtering=!1,x.init=!1},x.AjaxLoadMore.pagingPreloadedInit=function(t){t=null==t?"":t,x.el=b('<div class="alm-reveal'+x.tcc+'"/>'),x.el.append('<div class="alm-paging-content">'+t+'</div><div class="alm-paging-loading"></div>'),x.content.append(x.el),x.content.parent().removeClass("loading"),x.AjaxLoadMore.resetBtnText();var a=parseInt(x.content.css("padding-top")),e=parseInt(x.content.css("padding-bottom"));x.content.css("height",x.el.height()+a+e+"px"),""===t&&(b.isFunction(b.fn.almPagingEmpty)&&b.fn.almPagingEmpty(x),b.isFunction(b.fn.almEmpty)&&b.fn.almEmpty(x)),setTimeout(function(){b.isFunction(b.fn.almFadePageControls)&&b.fn.almFadePageControls(x.btnWrap)},x.speed)},x.AjaxLoadMore.pagingNextpageInit=function(t){x.el=b('<div class="alm-reveal alm-nextpage"/>'),x.el.append('<div class="alm-paging-content">'+t+'</div><div class="alm-paging-loading"></div>'),x.el.appendTo(x.content),x.content.parent().removeClass("loading"),x.AjaxLoadMore.resetBtnText();var a=parseInt(x.content.css("padding-top")),e=parseInt(x.content.css("padding-bottom"));x.content.css("height",x.el.height()+a+e+"px"),b.isFunction(b.fn.almSetNextPageVars)&&b.fn.almSetNextPageVars(x),setTimeout(function(){b.isFunction(b.fn.almFadePageControls)&&b.fn.almFadePageControls(x.btnWrap),b.isFunction(b.fn.almOnWindowResize)&&b.fn.almOnWindowResize(x)},x.speed)},x.fetchingPreviousPost=!1,x.AjaxLoadMore.getPreviousPost=function(){x.fetchingPreviousPost=!0;var t={action:"alm_query_previous_post",id:x.previous_post_id,taxonomy:x.previous_post_taxonomy,excluded_terms:x.previous_post_excluded_terms};b.ajax({type:"GET",dataType:"JSON",url:alm_localize.ajaxurl,data:t,success:function(t){t.has_previous_post?(x.content.attr("data-previous-post-id",t.prev_id),x.previous_post_id=t.prev_id,x.previous_post_permalink=t.prev_permalink,x.previous_post_title=t.prev_title,x.previous_post_slug=t.prev_slug):t.has_previous_post||x.AjaxLoadMore.triggerDone(),b.isFunction(b.fn.almSetPreviousPost)&&b.fn.almSetPreviousPost(x,t.current_id,t.permalink,t.title),x.fetchingPreviousPost=!1},error:function(t,a,e){x.AjaxLoadMore.error(t,a,e),x.fetchingPreviousPost=!1}})},x.AjaxLoadMore.triggerAddons=function(t){b.isFunction(b.fn.almSEO)&&t.seo&&b.fn.almSEO(t,!1),b.isFunction(b.fn.almSetNextPage)&&b.fn.almSetNextPage(t)},x.AjaxLoadMore.triggerDone=function(){x.loading=!1,x.finished=!0,x.paging||x.button.addClass("done"),b.isFunction(b.fn.almDone)&&setTimeout(function(){b.fn.almDone(x)},x.speed+10)},x.AjaxLoadMore.resetBtnText=function(){!1===x.button_loading_label||x.paging||x.button.html(x.button_label)},x.AjaxLoadMore.error=function(t,a,e){x.loading=!1,x.paging||(x.button.removeClass("loading"),x.AjaxLoadMore.resetBtnText()),console.log(e)},x.paging||x.fetchingPreviousPost||(x.button.unbind("click"),x.button.on("click",function(t){t.preventDefault(),"true"===x.pause&&(x.pause=!1,x.pause_override=!1,x.AjaxLoadMore.loadPosts()),x.loading||x.finished||b(this).hasClass("done")||(x.loading=!0,x.page++,x.AjaxLoadMore.loadPosts()),x.filters&&"function"==typeof almFiltersPaged&&almFiltersPaged(x)})),x.paging&&(x.window.unbind("resizeEnd"),x.window.bind("resizeEnd",function(){b.isFunction(b.fn.almOnWindowResize)&&b.fn.almOnWindowResize(x)}),x.window.unbind("resize"),x.window.bind("resize",function(){this.resizeTO&&clearTimeout(this.resizeTO),this.resizeTO=setTimeout(function(){b(this).trigger("resizeEnd")},x.speed)})),x.AjaxLoadMore.isVisible=function(){return x.visible=!1,x.el.is(":visible")&&(x.visible=!0),x.visible},x.scroll&&!x.paging&&(""!==x.scroll_container&&b(x.scroll_container).length&&(x.window=b(x.scroll_container)),x.window.bind("scroll touchstart",function(){if(x.AjaxLoadMore.isVisible()&&!x.fetchingPreviousPost){var t=x.button.offset().top,a=Math.round(t-(x.window.height()-x.scroll_distance)),e=x.window.scrollTop()>=a;""!==x.scroll_container&&(e=x.button.offset().top-(x.window.height()-x.scroll_distance)<x.window.offset().top),!x.loading&&!x.finished&&e&&x.page<x.max_pages-1&&x.proceed&&"true"===x.pause&&"true"===x.pause_override?x.button.trigger("click"):!x.loading&&!x.finished&&e&&x.page<x.max_pages-1&&x.proceed&&"true"!==x.pause&&x.button.trigger("click")}})),x.AjaxLoadMore.destroyed=function(){x.disable_ajax=!0,x.paging||(x.button.delay(x.speed).fadeOut(x.speed),b.isFunction(b.fn.almDestroyed)&&b.fn.almDestroyed(x))},x.AjaxLoadMore.fadeIn=function(t,a){if(0==a)t.style.opacity=1,t.style.height="auto";else{a/=10;var e=0,o=setInterval(function(){.9<e&&(t.style.opacity=1,clearInterval(o)),t.style.opacity=e,e+=.1},a);t.style.height="auto"}},x.AjaxLoadMore.transitionEnd=function(){setTimeout(function(){x.loading=!1,x.container.removeClass("alm-loading"),x.AjaxLoadMore.triggerAddons(x),x.paging||(x.button.delay(x.speed).removeClass("loading"),x.AjaxLoadMore.resetBtnText())},x.speed)},x.AjaxLoadMore.init=function(){("true"===x.preloaded&&1==x.destroy_after&&x.AjaxLoadMore.destroyed(),x.paging||x.previous_post||(x.disable_ajax?(x.finished=!0,x.button.addClass("done")):"true"===x.pause?(x.button.html(x.button_label),x.loading=!1):x.AjaxLoadMore.loadPosts()),x.previous_post&&(x.AjaxLoadMore.getPreviousPost(),x.loading=!1),"true"===x.preloaded&&x.seo&&!x.paging&&setTimeout(function(){b.isFunction(b.fn.almSEO)&&x.start_page<1&&b.fn.almSEO(x,!0)},x.speed),"true"!==x.preloaded||x.paging||setTimeout(function(){x.preloaded_total_posts<=parseInt(x.preloaded_amount)&&x.AjaxLoadMore.triggerDone(),0==x.preloaded_total_posts&&b.isFunction(b.fn.almEmpty)&&b.fn.almEmpty(x)},x.speed),x.nextpage)&&(1<b(".alm-nextpage").length&&b(".alm-nextpage").length==b(".alm-nextpage").eq(0).data("total-pages")&&x.AjaxLoadMore.triggerDone());x.window.bind("load",function(){x.is_masonry_preloaded&&(almMasonry(x.masonry_wrap,x.el,x.masonry_selector,x.masonry_columnwidth,x.masonry_animation,x.masonry_horizontalorder,x.speed,x.masonry_init,!0,!1),x.masonry_init=!1)})},x.AjaxLoadMore.init(),setTimeout(function(){x.proceed=!0},150),b.fn.almUpdateCurrentPage=function(t,a,e){e.page=t,e.nextpage&&!e.paging&&(e.page=e.page-1);var o="";e.paging_init&&"true"===e.preloaded?(o=b(".alm-reveal",e.el).html(),b(".alm-reveal",e.el).remove(),e.preloaded_amount=0,e.AjaxLoadMore.pagingPreloadedInit(o),e.paging_init=!1,e.init=!1):e.paging_init&&e.nextpage?(o=b(".alm-nextpage",e.el).html(),b(".alm-nextpage",e.el).remove(),e.AjaxLoadMore.pagingNextpageInit(o),e.paging_init=!1,e.init=!1):e.AjaxLoadMore.loadPosts()},b.fn.almGetParentContainer=function(){return x.el.closest("#ajax-load-more")},b.fn.almGetObj=function(){return x},b.fn.almTriggerClick=function(){x.button.trigger("click")},b.easing.alm_easeInOutQuad=function(t,a,e,o,n){return(a/=n/2)<1?o/2*a*a+e:-o/2*(--a*(a-2)-1)+e}},b.fn.ajaxloadmore=function(){return this.each(function(t){new b.ajaxloadmore(b(this),t)})};var t=document.querySelectorAll(".ajax-load-more-wrap");t.length&&[].concat(_toConsumableArray(t)).forEach(function(t,a){new b.ajaxloadmore(b(t),a)})}(jQuery);var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"===("undefined"==typeof exports?"undefined":_typeof(exports))?module.exports=t(require("jquery")):t(jQuery)}(function(g){var m="almWaitForImages";g.almWaitForImages={hasImageProperties:["backgroundImage","listStyleImage","borderImage","borderCornerImage","cursor"],hasImageAttributes:["srcset"]},g.expr[":"]["has-src"]=function(t){return g(t).is('img[src][src!=""]')},g.expr[":"].uncached=function(t){return!!g(t).is(":has-src")&&!t.complete},g.fn.almWaitForImages=function(){var l,d,e,p=0,c=0,_=g.Deferred();if(g.isPlainObject(arguments[0])?(e=arguments[0].waitForAll,d=arguments[0].each,l=arguments[0].finished):1===arguments.length&&"boolean"===g.type(arguments[0])?e=arguments[0]:(l=arguments[0],d=arguments[1],e=arguments[2]),l=l||g.noop,d=d||g.noop,e=!!e,!g.isFunction(l)||!g.isFunction(d))throw new TypeError("An invalid callback was supplied.");return this.each(function(){var r=g(this),s=[],t=g.almWaitForImages.hasImageProperties||[],a=g.almWaitForImages.hasImageAttributes||[],i=/url\(\s*(['"]?)(.*?)\1\s*\)/g;e?r.find("*").addBack().each(function(){var n=g(this);n.is("img:has-src")&&s.push({src:n.attr("src"),element:n[0]}),g.each(t,function(t,a){var e,o=n.css(a);if(!o)return!0;for(;e=i.exec(o);)s.push({src:e[2],element:n[0]})}),g.each(a,function(t,a){var e,o=n.attr(a);if(!o)return!0;e=o.split(","),g.each(e,function(t,a){a=g.trim(a).split(" ")[0],s.push({src:a,element:n[0]})})})}):r.find("img:has-src").each(function(){s.push({src:this.src,element:this})}),p=s.length,(c=0)===p&&(l.call(r[0]),_.resolveWith(r[0])),g.each(s,function(t,o){var a=new Image,n="load."+m+" error."+m;g(a).one(n,function t(a){var e=[c,p,"load"==a.type];if(c++,d.apply(o.element,e),_.notifyWith(o.element,e),g(this).off(n,t),c==p)return l.call(r[0]),_.resolveWith(r[0]),!1}),a.src=o.src})}),_.promise()}});
|
1 |
+
"use strict";Array.from||(Array.from=function(){var a=Object.prototype.toString,l=function(t){return"function"==typeof t||"[object Function]"===a.call(t)},o=Math.pow(2,53)-1,p=function(t){var a,e=(a=Number(t),isNaN(a)?0:0!==a&&isFinite(a)?(0<a?1:-1)*Math.floor(Math.abs(a)):a);return Math.min(Math.max(e,0),o)};return function(t){var a=Object(t);if(null==t)throw new TypeError("Array.from requires an array-like object - not null or undefined");var e,o=1<arguments.length?arguments[1]:void 0;if(void 0!==o){if(!l(o))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(e=arguments[2])}for(var n,r=p(a.length),s=l(this)?Object(new this(r)):new Array(r),i=0;i<r;)n=a[i],s[i]=o?void 0===e?o(n,i):o.call(e,n,i):n,i+=1;return s.length=r,s}}());var almGetParameterByName=function(t,a){a||(a=window.location.href),t=t.replace(/[\[\]]/g,"\\$&");var e=new RegExp("[?&]"+t+"(=([^&#]*)|&|#|$)").exec(a);return e?e[2]?decodeURIComponent(e[2].replace(/\+/g," ")):"":null},almGetAjaxParams=function(t,a,e){var o={action:a,nonce:alm_localize.alm_nonce,query_type:e,id:t.id,post_id:t.post_id,slug:t.slug,canonical_url:t.canonical_url,posts_per_page:t.posts_per_page,page:t.page,offset:t.offset,post_type:t.post_type,repeater:t.repeater,seo_start_page:t.start_page};return t.theme_repeater&&(o.theme_repeater=t.theme_repeater),t.paging&&(o.paging=t.paging),t.preloaded&&(o.preloaded=t.preloaded,o.preloaded_amount=t.preloaded_amount),"true"===t.cache&&(o.cache_id=t.cache_id,o.cache_logged_in=t.cache_logged_in),t.acf_array&&(o.acf=t.acf_array),t.cta_array&&(o.cta=t.cta_array),t.comments_array&&(o.comments=t.comments_array),t.nextpage_array&&(o.nextpage=t.nextpage_array),t.previous_post_array&&(o.previous_post=t.previous_post_array),t.users_array&&(o.users=t.users_array),t.content.attr("data-lang")&&(o.lang=t.content.attr("data-lang")),t.content.attr("data-sticky-posts")&&(o.sticky_posts=t.content.attr("data-sticky-posts")),t.content.attr("data-post-format")&&(o.post_format=t.content.attr("data-post-format")),t.content.attr("data-category")&&(o.category=t.content.attr("data-category")),t.content.attr("data-category-and")&&(o.category__and=t.content.attr("data-category-and")),t.content.attr("data-category-not-in")&&(o.category__not_in=t.content.attr("data-category-not-in")),t.content.attr("data-tag")&&(o.tag=t.content.attr("data-tag")),t.content.attr("data-tag-and")&&(o.tag__and=t.content.attr("data-tag-and")),t.content.attr("data-tag-not-in")&&(o.tag__not_in=t.content.attr("data-tag-not-in")),t.content.attr("data-taxonomy")&&(o.taxonomy=t.content.attr("data-taxonomy")),t.content.attr("data-taxonomy-terms")&&(o.taxonomy_terms=t.content.attr("data-taxonomy-terms")),t.content.attr("data-taxonomy-operator")&&(o.taxonomy_operator=t.content.attr("data-taxonomy-operator")),t.content.attr("data-taxonomy-relation")&&(o.taxonomy_relation=t.content.attr("data-taxonomy-relation")),t.content.attr("data-meta-key")&&(o.meta_key=t.content.attr("data-meta-key")),t.content.attr("data-meta-value")&&(o.meta_value=t.content.attr("data-meta-value")),t.content.attr("data-meta-compare")&&(o.meta_compare=t.content.attr("data-meta-compare")),t.content.attr("data-meta-relation")&&(o.meta_relation=t.content.attr("data-meta-relation")),t.content.attr("data-meta-type")&&(o.meta_type=t.content.attr("data-meta-type")),t.content.attr("data-author")&&(o.author=t.content.attr("data-author")),t.content.attr("data-year")&&(o.year=t.content.attr("data-year")),t.content.attr("data-month")&&(o.month=t.content.attr("data-month")),t.content.attr("data-day")&&(o.day=t.content.attr("data-day")),t.content.attr("data-order")&&(o.order=t.content.attr("data-order")),t.content.attr("data-orderby")&&(o.orderby=t.content.attr("data-orderby")),t.content.attr("data-post-status")&&(o.post_status=t.content.attr("data-post-status")),t.content.attr("data-post-in")&&(o.post__in=t.content.attr("data-post-in")),t.content.attr("data-post-not-in")&&(o.post__not_in=t.content.attr("data-post-not-in")),t.content.attr("data-exclude")&&(o.exclude=t.content.attr("data-exclude")),t.content.attr("data-search")&&(o.search=t.content.attr("data-search")),t.content.attr("data-s")&&(o.search=t.content.attr("data-s")),t.content.attr("data-custom-args")&&(o.custom_args=t.content.attr("data-custom-args")),o},almGetRestParams=function(t){return{id:t.id,post_id:t.post_id,posts_per_page:t.posts_per_page,page:t.page,offset:t.offset,slug:t.slug,canonical_url:t.canonical_url,post_type:t.post_type,post_format:t.content.attr("data-post-format"),category:t.content.attr("data-category"),category__not_in:t.content.attr("data-category-not-in"),tag:t.content.attr("data-tag"),tag__not_in:t.content.attr("data-tag-not-in"),taxonomy:t.content.attr("data-taxonomy"),taxonomy_terms:t.content.attr("data-taxonomy-terms"),taxonomy_operator:t.content.attr("data-taxonomy-operator"),taxonomy_relation:t.content.attr("data-taxonomy-relation"),meta_key:t.content.attr("data-meta-key"),meta_value:t.content.attr("data-meta-value"),meta_compare:t.content.attr("data-meta-compare"),meta_relation:t.content.attr("data-meta-relation"),meta_type:t.content.attr("data-meta-type"),author:t.content.attr("data-author"),year:t.content.attr("data-year"),month:t.content.attr("data-month"),day:t.content.attr("data-day"),post_status:t.content.attr("data-post-status"),order:t.content.attr("data-order"),orderby:t.content.attr("data-orderby"),post__in:t.content.attr("data-post-in"),post__not_in:t.content.attr("data-post-not-in"),search:t.content.attr("data-search"),custom_args:t.content.attr("data-custom-args"),lang:t.lang,preloaded:t.preloaded,preloaded_amount:t.preloaded_amount,seo_start_page:t.start_page}};function _toConsumableArray(t){if(Array.isArray(t)){for(var a=0,e=Array(t.length);a<t.length;a++)e[a]=t[a];return e}return Array.from(t)}var alm_is_filtering=!1;!function(r){r.fn.almFilter=function(e,o,n){n.target?r(".ajax-load-more-wrap[data-id='"+n.target+"']").each(function(t){var a=r(this);r.fn.almFilterTransition(e,o,n,a)}):r(".ajax-load-more-wrap").each(function(t){var a=r(this);r.fn.almFilterTransition(e,o,n,a)})},r.fn.almFilterTransition=function(t,a,e,o){"slide"===t?o.slideUp(a,function(){n(a,e,o)}):"fade"===t||"masonry"===t?o.fadeOut(a,function(){n(a,e,o)}):n(a,e,o)};var n=function(t,a,e){var o=e.get(0),n=o.querySelectorAll(".alm-listing");[].concat(_toConsumableArray(n)).forEach(function(t){t.innerHTML=""});var r=o.querySelector(".alm-load-more-btn");r&&r.classList.remove("done"),s(t,a,e)},s=function(t,a,e){r.each(a,function(t,a){t=t.replace(/\W+/g,"-").replace(/([a-z\d])([A-Z])/g,"$1-$2"),r(".alm-listing",e).attr("data-"+t,a)}),e.fadeIn(t),alm_is_filtering=!0,a.target?r(".ajax-load-more-wrap[data-id="+a.target+"]").ajaxloadmore():r(".ajax-load-more-wrap").ajaxloadmore()}}(jQuery);var almMasonry=function t(o,a,n,r,e,s,i,l,p,d){var c=(i+100)/1e3+"s",_="scale(0.5)",g="scale(1)";"zoom-out"===e&&(_="translateY(-20px) scale(1.25)",g="translateY(0) scale(1)"),"slide-up"===e&&(_="translateY(50px)",g="translateY(0)"),"slide-down"===e&&(_="translateY(-50px)",g="translateY(0)"),"none"===e&&(g=_="translateY(0)"),r?isNaN(r)||(r=parseInt(r)):r=n,s="true"===s,d?(o.masonry("destroy"),o[0].parentNode.style.opacity=0,o.append(a),t(o,a,n,r,e,s,i,!0,!0,!1)):l&&p?o.imagesLoaded(function(){var a={itemSelector:n,transitionDuration:c,columnWidth:r,horizontalOrder:s,hiddenStyle:{transform:_,opacity:0},visibleStyle:{transform:g,opacity:1}},e=window.alm_masonry_vars;e&&Object.keys(e).forEach(function(t){a[t]=e[t]}),o.masonry(a),almMasonryFadeIn(o[0].parentNode,i)}):a.imagesLoaded(function(){o.append(a).masonry("appended",a)})},almMasonryFadeIn=function(t,a){a/=10;var e=parseInt(t.style.opacity),o=setInterval(function(){.9<e&&(t.style.opacity=1,clearInterval(o)),t.style.opacity=e,e+=.1},a)},almResultsText=function(t){if(!t.resultsText)return!1;var a="standard";a=t.nextpage&&t.resultsText?"nextpage":t.paging?"paging":"true"===t.preloaded?"preloaded":"standard",almGetResultsText(t,a)},almRenderResultsText=function(t,a,e){var o=alm_localize.display_results;o=(o=o.replace("{num}",a)).replace("{total}",e),t.innerHTML=o},almGetResultsText=function(t){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"standard";if(!t.resultsText)return!1;var e=0,o=0;switch(a){case"nextpage":e=t.page+1+parseInt(t.nextpage_startpage),o=parseInt(t.totalposts)+parseInt(t.nextpage_startpage),almRenderResultsText(t.resultsText,e,o);break;case"preloaded":console.log(t),e=parseInt(t.posts)+parseInt(t.preloaded_amount),o=parseInt(t.totalposts)+parseInt(t.preloaded_amount),almRenderResultsText(t.resultsText,e,o);break;case"paging":var n=parseInt(t.page)*parseInt(t.posts_per_page)+1;e=n+" - "+(parseInt(n)-1+parseInt(t.posts)),o=parseInt(t.totalposts)+parseInt(t.preloaded_amount),almRenderResultsText(t.resultsText,e,o);break;default:e=t.posts,o=parseInt(t.totalposts),almRenderResultsText(t.resultsText,e,o)}},almInitResultsText=function(t){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"standard";if(!t.resultsText)return!1;var e=0,o=0,n="";switch(a){case"nextpage":e=t.page+parseInt(t.nextpage_startpage),(o=t.localize.total_posts)&&almRenderResultsText(t.resultsText,e,o);break;case"preloaded":e=parseInt(t.posts)+parseInt(t.preloaded_amount),(o=t.localize.total_posts)&&almRenderResultsText(t.resultsText,e,o);break;case"paging":var r=parseInt(t.page)*parseInt(t.posts_per_page)+1;e=r+" - "+(parseInt(r)-1+parseInt(t.posts_per_page)),(n=t.container.get(0).querySelector(".alm-preloaded"))&&almRenderResultsText(t.resultsText,e,n.dataset.totalPosts);break;default:console.log("nothing")}};function _toConsumableArray(t){if(Array.isArray(t)){for(var a=0,e=Array(t.length);a<t.length;a++)e[a]=t[a];return e}return Array.from(t)}!function(b){b.ajaxloadmore=function(x,t){"true"===alm_localize.scrolltop&&b(window).scrollTop(0);var h=this;h.AjaxLoadMore={},h.window=b(window),h.page=0,h.posts=0,h.totalposts=0,h.proceed=!1,h.disable_ajax=!1,h.init=!0,h.loading=!0,h.finished=!1,h.prefix="alm-",h.el=x,h.master_id=h.el.get(0).id,h.master_id=h.master_id.replace(/-/g,"_"),h.localize=window[h.master_id+"_vars"],h.container=x,h.container.addClass("alm-"+t).attr("data-alm-id",t);var a=h.container.get(0);if(h.content=b(a.querySelector(".alm-ajax")),h.content_preloaded=b(a.querySelector(".alm-preloaded")),h.canonical_url=h.el.attr("data-canonical-url"),h.nested=h.el.attr("data-nested"),h.is_search=h.el.attr("data-search"),h.slug=h.el.attr("data-slug"),h.post_id=h.el.attr("data-post-id"),h.id=h.el.attr("data-id")?h.el.attr("data-id"):"",h.repeater=h.content.attr("data-repeater"),h.theme_repeater=h.content.attr("data-theme-repeater"),h.post_type=h.content.attr("data-post-type"),h.post_type=h.post_type.split(","),h.sticky_posts=h.content.attr("data-sticky-posts"),h.btnWrap=b("> .alm-btn-wrap",h.container),h.btnWrap.get(0).style.visibility="visible",h.button_label=h.content.attr("data-button-label"),h.button_loading_label=h.content.attr("data-button-loading-label"),h.scroll_distance=h.content.attr("data-scroll-distance"),h.scroll_distance=h.scroll_distance?parseInt(h.scroll_distance):150,h.scroll_container=h.content.attr("data-scroll-container"),h.max_pages=h.content.attr("data-max-pages"),h.max_pages=h.max_pages?parseInt(h.max_pages):0,h.pause_override=h.content.attr("data-pause-override"),h.pause=h.content.attr("data-pause"),h.transition=h.content.attr("data-transition"),h.transition_container=h.content.attr("data-transition-container"),h.tcc=h.content.attr("data-transition-container-classes"),h.speed=250,h.images_loaded=h.content.attr("data-images-loaded"),h.destroy_after=h.content.attr("data-destroy-after"),h.orginal_posts_per_page=h.content.attr("data-posts-per-page"),h.posts_per_page=h.content.attr("data-posts-per-page"),h.offset=h.content.attr("data-offset"),h.cache=h.content.attr("data-cache"),h.cache_id=h.content.attr("data-cache-id"),h.cache_path=h.content.attr("data-cache-path"),h.cache_logged_in=h.content.attr("data-cache-logged-in"),h.cta=h.content.attr("data-cta"),h.cta_position=h.content.attr("data-cta-position"),h.cta_repeater=h.content.attr("data-cta-repeater"),h.cta_theme_repeater=h.content.attr("data-cta-theme-repeater"),h.acf=h.content.attr("data-acf"),h.acf_field_type=h.content.attr("data-acf-field-type"),h.acf_field_name=h.content.attr("data-acf-field-name"),h.acf_post_id=h.content.attr("data-acf-post-id"),h.nextpage=h.content.attr("data-nextpage"),h.nextpage_urls=h.content.attr("data-nextpage-urls"),h.nextpage_scroll=h.content.attr("data-nextpage-scroll"),h.nextpage_pageviews=h.content.attr("data-nextpage-pageviews"),h.nextpage_post_id=h.content.attr("data-nextpage-post-id"),h.nextpage_startpage=h.content.attr("data-nextpage-startpage"),h.previous_post=h.content.attr("data-previous-post"),h.previous_post_id=h.content.attr("data-previous-post-id"),h.previous_post_taxonomy=h.content.attr("data-previous-post-taxonomy"),h.previous_post_excluded_terms=h.content.attr("data-previous-post-excluded-terms"),h.comments=h.content.attr("data-comments"),"true"===h.comments&&(h.content=b(".alm-comments",h.container)),h.comments_post_id=h.content.attr("data-comments_post_id"),h.comments_per_page=h.content.attr("data-comments_per_page"),h.comments_type=h.content.attr("data-comments_type"),h.comments_style=h.content.attr("data-comments_style"),h.comments_template=h.content.attr("data-comments_template"),h.comments_callback=h.content.attr("data-comments_callback"),h.filters=h.content.attr("data-filters"),h.restapi=h.content.attr("data-restapi"),h.restapi_base_url=h.content.attr("data-restapi-base-url"),h.restapi_namespace=h.content.attr("data-restapi-namespace"),h.restapi_endpoint=h.content.attr("data-restapi-endpoint"),h.restapi_template_id=h.content.attr("data-restapi-template-id"),h.restapi_debug=h.content.attr("data-restapi-debug"),h.seo=h.content.attr("data-seo"),h.preloaded=h.content.attr("data-preloaded"),h.preloaded_amount=h.content.attr("data-preloaded-amount"),h.is_preloaded="true"===h.content.attr("data-is-preloaded"),h.paging=h.content.attr("data-paging"),h.users="true"===h.content.attr("data-users"),h.users&&(h.orginal_posts_per_page=h.content.attr("data-users-per-page"),h.posts_per_page=h.content.attr("data-users-per-page")),"true"===h.filters){h.filters=!0,h.filters_analtyics=h.content.attr("data-filters-analtyics"),h.filters_debug=h.content.attr("data-filters-debug"),h.filters_startpage=0;var e=almGetParameterByName("pg");null!==e&&(h.filters_startpage=parseInt(e),h.page=h.filters_startpage),h.isPaged=!1,0<h.filters_startpage&&(h.isPaged=!0,h.page=h.filters_startpage-1)}else h.filters=!1;"true"===h.restapi?(h.restapi=!0,void 0===h.restapi_debug&&(h.restapi_debug=!1),""===h.restapi_template_id&&(h.restapi=!1)):h.restapi=!1,"true"===h.paging?(h.paging=!0,h.paging_controls=!!h.content.attr("data-paging-controls"),h.paging_show_at_most=h.content.attr("data-paging-show-at-most"),h.paging_classes=h.content.attr("data-paging-classes"),h.paging_init=!0,h.paging_show_at_most=void 0===h.paging_show_at_most?7:h.paging_show_at_most,h.pause="true"===h.preloaded||h.pause):h.paging=!1,void 0===h.cache&&(h.cache=!1),void 0===h.cache_logged_in&&(h.cache_logged_in=!1),void 0===h.comments_per_page&&(h.comments_per_page="5"),"true"===h.preloaded?(h.preloaded_amount=void 0===h.preloaded_amount?h.posts_per_page:h.preloaded_amount,h.localize&&h.localize.total_posts&&parseInt(h.localize.total_posts)<=parseInt(h.preloaded_amount)&&(h.preloaded_total_posts=h.localize.total_posts,h.disable_ajax=!0)):h.preloaded="false",void 0===h.seo&&(h.seo=!1),"true"===h.seo&&(h.seo=!0),void 0===h.is_search&&(h.is_search=!1),h.search_value="true"===h.is_search?h.slug:"",h.permalink=h.content.attr("data-seo-permalink"),h.pageview=h.content.attr("data-seo-pageview"),h.start_page=h.content.attr("data-seo-start-page"),h.seo_trailing_slash="false"===h.content.attr("data-seo-trailing-slash")?"":"/",h.seo_leading_slash="true"===h.content.attr("data-seo-leading-slash")?"/":"",h.start_page?(h.seo_scroll=h.content.attr("data-seo-scroll"),h.seo_scroll_speed=h.content.attr("data-seo-scroll-speed"),h.seo_scrolltop=h.content.attr("data-seo-scrolltop"),h.seo_controls=h.content.attr("data-seo-controls"),h.isPaged=!1,1<h.start_page&&(h.isPaged=!0,h.posts_per_page=h.start_page*h.posts_per_page),h.paging&&(h.posts_per_page=h.orginal_posts_per_page)):h.start_page=1,"true"===h.nextpage?(h.nextpage=!0,h.posts_per_page=1):h.nextpage=!1,void 0===h.nextpage_urls&&(h.nextpage_urls="true"),void 0===h.nextpage_scroll&&(h.nextpage_scroll="250:30"),void 0===h.nextpage_pageviews&&(h.nextpage_pageviews="true"),void 0===h.nextpage_post_id&&(h.nextpage=!1,h.nextpage_post_id=null),void 0===h.nextpage_startpage&&(h.nextpage_startpage=1),1<h.nextpage_startpage&&(h.isPaged=!0),h.acf="true"===h.acf,void 0!==h.acf_field_type&&void 0!==h.acf_field_name&&void 0!==h.acf_post_id||(h.acf=!1),"true"===h.previous_post?(h.previous_post=!0,h.previous_post_permalink="",h.previous_post_title="",h.previous_post_slug=""):h.previous_post=!1,void 0===h.previous_post_id&&(h.previous_post_id=""),void 0===h.previous_post_taxonomy&&(h.previous_post_taxonomy=""),void 0===h.previous_post_excluded_terms&&(h.previous_post_excluded_terms=""),h.previous_post_title_template=h.content.attr("data-previous-post-title-template"),h.siteTitle=h.content.attr("data-previous-post-site-title"),h.siteTagline=h.content.attr("data-previous-post-site-tagline"),h.previous_post_pageview=h.content.attr("data-previous-post-pageview"),h.previous_post_scroll=h.content.attr("data-previous-post-scroll"),h.previous_post_scroll_speed=h.content.attr("data-previous-post-scroll-speed"),h.previous_post_scroll_top=h.content.attr("data-previous-post-scrolltop"),h.previous_post_controls=h.content.attr("data-previous-post-controls"),h.offset=void 0===h.offset?0:h.offset,(void 0===h.pause||h.seo&&1<h.start_page)&&(h.pause=!1),"true"===h.preloaded&&h.seo&&0<h.start_page&&(h.pause=!1),"true"===h.preloaded&&h.paging&&(h.pause=!0),void 0===h.repeater&&(h.repeater="default"),h.theme_repeater=void 0!==h.theme_repeater&&h.theme_repeater,h.max_pages=void 0===h.max_pages||0===h.max_pages?1e4:h.max_pages,h.scroll_distance=void 0===h.scroll_distance?150:h.scroll_distance,h.scroll_container=void 0===h.scroll_container?"":h.scroll_container,h.transition=void 0===h.transition?"fade":h.transition,h.tcc=void 0===h.tcc?"":h.tcc,h.is_masonry_preloaded=!1,"masonry"===h.transition&&(h.masonry_init=!0,h.masonry_selector=h.content.attr("data-masonry-selector"),h.masonry_columnwidth=h.content.attr("data-masonry-columnwidth"),h.masonry_animation=h.content.attr("data-masonry-animation"),h.masonry_horizontalorder=h.content.attr("data-masonry-horizontalorder"),void 0===h.masonry_animation&&(h.masonry_animation="standard"),void 0===h.masonry_horizontalorder&&(h.masonry_horizontalorder="true"),h.masonry_wrap=h.content,h.transition_container=!1,"true"===h.preloaded&&(h.is_masonry_preloaded=!0)),void 0===h.content.attr("data-scroll")?h.scroll=!0:"false"===h.content.attr("data-scroll")?h.scroll=!1:h.scroll=!0,h.transition_container=void 0===h.transition_container||"true"===h.transition_container,h.images_loaded=void 0===h.images_loaded?"false":h.images_loaded,h.button_label=void 0===h.button_label?"Older Posts":h.button_label,h.button_loading_label=void 0!==h.button_loading_label&&h.button_loading_label,h.paging?h.content.parent().addClass("loading"):h.button=b("> .alm-btn-wrap .alm-load-more-btn",h.container),h.resultsText=document.querySelector(".alm-results-text"),h.resultsText?h.resultsText.innerHTML=alm_localize.display_results:h.resultsText=!1,h.AjaxLoadMore.loadPosts=function(){if(!h.disable_ajax)if(h.paging||(h.button.addClass("loading"),!1!==h.button_loading_label&&h.button.html(h.button_loading_label)),h.container.addClass("alm-loading"),h.loading=!0,"true"!==h.cache||h.cache_logged_in)h.AjaxLoadMore.ajax("standard");else{var t;if(h.init&&h.seo&&h.isPaged){t=h.cache_path+h.cache_id+"/page-1-"+h.start_page+".html"}else if(h.nextpage){var a;h.paging?a=parseInt(h.page)+1:(a=parseInt(h.page)+2,h.isPaged&&(a=parseInt(h.page)+parseInt(h.nextpage_startpage)+1)),t=h.cache_path+h.cache_id+"/page-"+a+".html"}else t=h.previous_post?h.cache_path+h.cache_id+"/"+h.previous_post_id+".html":h.cache_path+h.cache_id+"/page-"+(h.page+1)+".html";b.get(t,function(t){h.AjaxLoadMore.success(t,!0)}).fail(function(){h.AjaxLoadMore.ajax("standard")})}},h.AjaxLoadMore.ajax=function(a){var t="alm_query_posts";if(h.acf_array="",h.acf&&("relationship"!==h.acf_field_type&&(t="alm_acf_query"),h.acf_array={acf:"true",post_id:h.acf_post_id,field_type:h.acf_field_type,field_name:h.acf_field_name}),h.nextpage_array="",h.nextpage&&(t="alm_nextpage_query",h.nextpage_array={nextpage:"true",urls:h.nextpage_urls,scroll:h.nextpage_scroll,pageviews:h.nextpage_pageviews,post_id:h.nextpage_post_id,startpage:h.nextpage_startpage}),h.previous_post_array="",h.previous_post&&(h.previous_post_array={previous_post:"true",id:h.previous_post_id,slug:h.previous_post_slug}),h.comments_array="","true"===h.comments&&(t="alm_comments_query",h.posts_per_page=h.comments_per_page,h.comments_array={comments:"true",post_id:h.comments_post_id,per_page:h.comments_per_page,type:h.comments_type,style:h.comments_style,template:h.comments_template,callback:h.comments_callback}),h.users_array="",h.users&&(t="alm_users_query",h.users_array={users:"true",role:h.content.attr("data-users-role"),include:h.content.attr("data-users-include"),exclude:h.content.attr("data-users-exclude"),per_page:h.posts_per_page,order:h.content.attr("data-users-order"),orderby:h.content.attr("data-users-orderby")}),h.cta_array="","true"===h.cta&&(h.cta_array={cta:"true",cta_position:h.cta_position,cta_repeater:h.cta_repeater,cta_theme_repeater:h.cta_theme_repeater}),h.restapi){var i=wp.template(h.restapi_template_id),e=h.restapi_base_url+"/"+h.restapi_namespace+"/"+h.restapi_endpoint,o=almGetRestParams(h);b.ajax({type:"GET",url:e,data:o,dataType:"JSON",beforeSend:function(){1==h.page||h.paging||h.button.addClass("loading")},success:function(t){var e="",o=t.html,a=t.meta,n=a.postcount,r=a.totalposts;b.each(o,function(t){var a=o[t];"true"===h.restapi_debug&&console.log(a),e+=i(a)});var s={html:e,meta:{postcount:n,totalposts:r}};h.AjaxLoadMore.success(s,!1)}})}else{var n=almGetAjaxParams(h,t,a);b.ajax({type:"GET",url:alm_localize.ajaxurl,dataType:"JSON",data:n,beforeSend:function(){1==h.page||h.paging||h.button.addClass("loading")},success:function(t){"standard"===a?h.AjaxLoadMore.success(t,!1):"totalpages"===a&&h.paging&&h.nextpage?b.isFunction(b.fn.almBuildPagination)&&b.fn.almBuildPagination(t,h):"totalposts"===a&&h.paging&&b.isFunction(b.fn.almBuildPagination)&&b.fn.almBuildPagination(t,h)},error:function(t,a,e){h.AjaxLoadMore.error(t,a,e)}})}},h.paging&&(h.nextpage?h.AjaxLoadMore.ajax("totalpages"):h.AjaxLoadMore.ajax("totalposts")),h.AjaxLoadMore.success=function(t,a){h.previous_post&&h.AjaxLoadMore.getPreviousPost();var e,o,n,r='style="opacity: 0; height: 0;"';if(a?e=t:(e=t.html,o=t.meta,h.posts=h.paging?o.postcount:h.posts+o.postcount,n=o.postcount,h.totalposts=o.totalposts,"true"===h.preloaded&&(h.totalposts=h.totalposts-h.preloaded_amount)),h.setlocalizedVars("viewing",h.posts),h.setlocalizedVars("total_posts",h.totalposts),almResultsText(h),h.data=b(e),n=a?h.data.length:n,h.init&&(o&&o.totalposts&&h.el.attr("data-total-posts",o.totalposts),h.paging?0<n&&(h.el=b('<div class="alm-reveal'+h.tcc+'" '+r+"/>"),h.el.append('<div class="alm-paging-content'+h.tcc+'"></div><div class="alm-paging-loading"></div>'),b(".alm-paging-content",h.el).append(h.data),h.content.append(h.el),h.AjaxLoadMore.fadeIn(h.el.get(0),h.speed),h.content.parent().removeClass("loading"),h.AjaxLoadMore.resetBtnText(),setTimeout(function(){b(".alm-paging-content",h.el).fadeIn(h.speed,"alm_easeInOutQuad",function(){var t=parseInt(h.content.css("padding-top")),a=parseInt(h.content.css("padding-bottom"));h.content.css("height",h.el.height()+t+a+"px"),b.isFunction(b.fn.almFadePageControls)&&b.fn.almFadePageControls(h.btnWrap)})},h.speed)):h.button.html(h.button_label),0===n&&(h.paging&&b.isFunction(b.fn.almPagingEmpty)&&b.fn.almPagingEmpty(h),b.isFunction(b.fn.almEmpty)&&b.fn.almEmpty(h)),h.isPaged&&(h.posts_per_page=h.users?h.content.attr("data-users-per-page"):h.content.attr("data-posts-per-page"),h.page=h.start_page?h.start_page-1:h.page,h.filters&&h.filters_startpage&&(h.page=h.filters_startpage-1,h.posts_per_page=h.content.attr("data-posts-per-page")))),0<n){if(h.paging)h.init?(h.container.removeClass("alm-loading"),h.AjaxLoadMore.triggerAddons(h)):b(".alm-paging-content",h.el).html("").append(h.data).almWaitForImages().done(function(){b(".alm-paging-loading",h.el).fadeOut(h.speed),b.isFunction(b.fn.almOnPagingComplete)&&setTimeout(function(){b.fn.almOnPagingComplete(h)},h.speed),h.container.removeClass("alm-loading"),h.AjaxLoadMore.triggerAddons(h)});else{if(h.previous_post)h.el=b('<div class="alm-reveal alm-previous-post post-'+h.previous_post_id+'" '+r+' data-id="'+h.previous_post_id+'" data-title="'+h.previous_post_title+'" data-url="'+h.previous_post_permalink+'" data-page="'+h.page+'"/>'),h.el.append(h.data);else if(h.transition_container){var s=void 0,i=window.location.search;if(h.init&&1<h.start_page){var l=[],p=[],d=parseInt(h.posts_per_page);Math.ceil(n/d);h.el=h.content,"true"===h.cta&&(d+=1,n=Math.ceil(n/d)+n);for(var c=0;c<n;c+=d)l.push(h.data.slice(c,d+c));for(var _=0;_<l.length;_++){var g="true"===h.preloaded?1:0,u=void 0;if(0<_||"true"===h.preloaded)s=_+1+g,u="default"===h.permalink?b('<div class="alm-reveal alm-seo'+h.tcc+'" data-url="'+h.canonical_url+h.search_value+"&paged="+s+'" data-page="'+s+'" />'):b('<div class="alm-reveal alm-seo'+h.tcc+'" data-url="'+h.canonical_url+h.seo_leading_slash+"page/"+s+h.seo_trailing_slash+h.search_value+'" data-page="'+s+'" />');else{var m=h.is_preloaded?" alm-preloaded":"";u=b('<div class="alm-reveal alm-seo'+m+h.tcc+'" data-url="'+h.canonical_url+h.search_value+'" data-page="1" />')}p.push(u.append(l[_]))}for(var f=0;f<p.length;f++)h.el.append(p[f]);h.el.get(0).style.opacity=0,h.el.get(0).style.height=0}else{if(h.seo&&0<h.page||"true"===h.preloaded){var y="true"===h.preloaded?1:0;s=h.page+1+y,h.seo?"default"===h.permalink?h.el=b('<div class="alm-reveal alm-seo'+h.tcc+'" '+r+' data-url="'+h.canonical_url+h.search_value+"&paged="+s+'" data-page="'+s+'" />'):h.el=b('<div class="alm-reveal alm-seo'+h.tcc+'" '+r+' data-url="'+h.canonical_url+h.seo_leading_slash+"page/"+s+h.seo_trailing_slash+h.search_value+'" data-page="'+s+'" />'):h.filters?h.el=b('<div class="alm-reveal alm-filters'+h.tcc+'" '+r+' data-url="'+h.canonical_url+i+'" data-page="'+s+'" />'):h.el=b('<div class="alm-reveal'+h.tcc+'" '+r+" />")}else h.filters?h.el=b('<div class="alm-reveal alm-filters'+h.tcc+'" '+r+' data-url="'+h.canonical_url+i+'" data-page="'+(h.page+1)+'" />'):h.seo?h.el=b('<div class="alm-reveal alm-seo'+h.tcc+'" '+r+' data-url="'+h.canonical_url+h.search_value+'" data-page="1" />'):h.el=b('<div class="alm-reveal'+h.tcc+'" '+r+" />");h.el.append(h.data)}}else h.el=h.data;("masonry"!==h.transition||h.init&&!h.is_masonry_preloaded)&&h.content.append(h.el),"masonry"===h.transition?(almMasonry(h.masonry_wrap,h.el,h.masonry_selector,h.masonry_columnwidth,h.masonry_animation,h.masonry_horizontalorder,h.speed,h.masonry_init,h.init,alm_is_filtering),h.masonry_init=!1,h.AjaxLoadMore.transitionEnd()):"none"===h.transition?(h.AjaxLoadMore.fadeIn(h.el.get(0),0),h.AjaxLoadMore.transitionEnd()):"true"===h.images_loaded?h.el.almWaitForImages().done(function(){h.transition_container&&h.AjaxLoadMore.fadeIn(h.el.get(0),h.speed),h.AjaxLoadMore.transitionEnd()}):(h.transition_container&&h.AjaxLoadMore.fadeIn(h.el.get(0),h.speed),h.AjaxLoadMore.transitionEnd())}b.isFunction(b.fn.almComplete)&&("true"===h.images_loaded?h.el.almWaitForImages().done(function(){b.fn.almComplete(h)}):b.fn.almComplete(h)),h.cache?n<h.posts_per_page&&h.AjaxLoadMore.triggerDone():h.posts>=h.totalposts&&!h.previous_post&&h.AjaxLoadMore.triggerDone()}else h.paging||(h.button.delay(h.speed).removeClass("loading").addClass("done"),h.AjaxLoadMore.resetBtnText()),h.AjaxLoadMore.triggerDone();if(b.isFunction(b.fn.almFilterComplete)&&b.fn.almFilterComplete(),"function"==typeof almFiltersAddonComplete&&almFiltersAddonComplete(x),void 0!==h.destroy_after&&""!==h.destroy_after){var v=h.page+1;"true"===h.preloaded&&v++,v==h.destroy_after&&h.AjaxLoadMore.destroyed()}alm_is_filtering=h.init=!1},h.AjaxLoadMore.pagingPreloadedInit=function(t){t=null==t?"":t,h.el=b('<div class="alm-reveal'+h.tcc+'"/>'),h.el.append('<div class="alm-paging-content">'+t+'</div><div class="alm-paging-loading"></div>'),h.content.append(h.el),h.content.parent().removeClass("loading"),h.AjaxLoadMore.resetBtnText();var a=parseInt(h.content.css("padding-top")),e=parseInt(h.content.css("padding-bottom"));h.content.css("height",h.el.height()+a+e+"px"),""===t&&(b.isFunction(b.fn.almPagingEmpty)&&b.fn.almPagingEmpty(h),b.isFunction(b.fn.almEmpty)&&b.fn.almEmpty(h)),setTimeout(function(){b.isFunction(b.fn.almFadePageControls)&&b.fn.almFadePageControls(h.btnWrap)},h.speed)},h.AjaxLoadMore.pagingNextpageInit=function(t){h.el=b('<div class="alm-reveal alm-nextpage"/>'),h.el.append('<div class="alm-paging-content">'+t+'</div><div class="alm-paging-loading"></div>'),h.el.appendTo(h.content),h.content.parent().removeClass("loading"),h.AjaxLoadMore.resetBtnText();var a=parseInt(h.content.css("padding-top")),e=parseInt(h.content.css("padding-bottom"));h.content.css("height",h.el.height()+a+e+"px"),b.isFunction(b.fn.almSetNextPageVars)&&b.fn.almSetNextPageVars(h),setTimeout(function(){b.isFunction(b.fn.almFadePageControls)&&b.fn.almFadePageControls(h.btnWrap),b.isFunction(b.fn.almOnWindowResize)&&b.fn.almOnWindowResize(h)},h.speed)},h.fetchingPreviousPost=!1,h.AjaxLoadMore.getPreviousPost=function(){h.fetchingPreviousPost=!0;var t={action:"alm_query_previous_post",id:h.previous_post_id,taxonomy:h.previous_post_taxonomy,excluded_terms:h.previous_post_excluded_terms};b.ajax({type:"GET",dataType:"JSON",url:alm_localize.ajaxurl,data:t,success:function(t){t.has_previous_post?(h.content.attr("data-previous-post-id",t.prev_id),h.previous_post_id=t.prev_id,h.previous_post_permalink=t.prev_permalink,h.previous_post_title=t.prev_title,h.previous_post_slug=t.prev_slug):t.has_previous_post||h.AjaxLoadMore.triggerDone(),b.isFunction(b.fn.almSetPreviousPost)&&b.fn.almSetPreviousPost(h,t.current_id,t.permalink,t.title),h.fetchingPreviousPost=!1},error:function(t,a,e){h.AjaxLoadMore.error(t,a,e),h.fetchingPreviousPost=!1}})},h.AjaxLoadMore.triggerAddons=function(t){b.isFunction(b.fn.almSEO)&&t.seo&&b.fn.almSEO(t,!1),b.isFunction(b.fn.almSetNextPage)&&b.fn.almSetNextPage(t)},h.AjaxLoadMore.triggerDone=function(){h.loading=!1,h.finished=!0,h.paging||h.button.addClass("done"),b.isFunction(b.fn.almDone)&&setTimeout(function(){b.fn.almDone(h)},h.speed+10)},h.AjaxLoadMore.resetBtnText=function(){!1===h.button_loading_label||h.paging||h.button.html(h.button_label)},h.AjaxLoadMore.error=function(t,a,e){h.loading=!1,h.paging||(h.button.removeClass("loading"),h.AjaxLoadMore.resetBtnText()),console.log(e)},h.paging||h.fetchingPreviousPost||(h.button.unbind("click"),h.button.on("click",function(t){t.preventDefault(),"true"===h.pause&&(h.pause=!1,h.pause_override=!1,h.AjaxLoadMore.loadPosts()),h.loading||h.finished||b(this).hasClass("done")||(h.loading=!0,h.page++,h.AjaxLoadMore.loadPosts()),h.filters&&"function"==typeof almFiltersPaged&&almFiltersPaged(h)})),h.paging&&(h.window.unbind("resizeEnd"),h.window.bind("resizeEnd",function(){b.isFunction(b.fn.almOnWindowResize)&&b.fn.almOnWindowResize(h)}),h.window.unbind("resize"),h.window.bind("resize",function(){this.resizeTO&&clearTimeout(this.resizeTO),this.resizeTO=setTimeout(function(){b(this).trigger("resizeEnd")},h.speed)})),h.AjaxLoadMore.isVisible=function(){return h.visible=!1,h.el.is(":visible")&&(h.visible=!0),h.visible},h.scroll&&!h.paging&&(""!==h.scroll_container&&b(h.scroll_container).length&&(h.window=b(h.scroll_container)),h.window.bind("scroll touchstart",function(){if(h.AjaxLoadMore.isVisible()&&!h.fetchingPreviousPost){var t=h.button.offset().top,a=Math.round(t-(h.window.height()-h.scroll_distance)),e=h.window.scrollTop()>=a;""!==h.scroll_container&&(e=h.button.offset().top-(h.window.height()-h.scroll_distance)<h.window.offset().top),!h.loading&&!h.finished&&e&&h.page<h.max_pages-1&&h.proceed&&"true"===h.pause&&"true"===h.pause_override?h.button.trigger("click"):!h.loading&&!h.finished&&e&&h.page<h.max_pages-1&&h.proceed&&"true"!==h.pause&&h.button.trigger("click")}})),h.AjaxLoadMore.destroyed=function(){h.disable_ajax=!0,h.paging||(h.button.delay(h.speed).fadeOut(h.speed),b.isFunction(b.fn.almDestroyed)&&b.fn.almDestroyed(h))},h.AjaxLoadMore.fadeIn=function(t,a){if(0==a)t.style.opacity=1,t.style.height="auto";else{a/=10;var e=0,o=setInterval(function(){.9<e&&(t.style.opacity=1,clearInterval(o)),t.style.opacity=e,e+=.1},a);t.style.height="auto"}},h.AjaxLoadMore.transitionEnd=function(){setTimeout(function(){h.loading=!1,h.container.removeClass("alm-loading"),h.AjaxLoadMore.triggerAddons(h),h.paging||(h.button.delay(h.speed).removeClass("loading"),h.AjaxLoadMore.resetBtnText())},h.speed)},h.setlocalizedVars=function(t,a){h.localize&&t&&a&&(h.localize[t]=a,window[h.master_id+"_vars"][t]=a)},h.AjaxLoadMore.init=function(){if("true"===h.preloaded&&1==h.destroy_after&&h.AjaxLoadMore.destroyed(),h.paging||h.previous_post||(h.disable_ajax?(h.finished=!0,h.button.addClass("done")):"true"===h.pause?(h.button.html(h.button_label),h.loading=!1):h.AjaxLoadMore.loadPosts()),h.previous_post&&(h.AjaxLoadMore.getPreviousPost(),h.loading=!1),"true"===h.preloaded&&h.seo&&!h.paging&&(setTimeout(function(){b.isFunction(b.fn.almSEO)&&h.start_page<1&&b.fn.almSEO(h,!0)},h.speed),h.resultsText&&almInitResultsText(h,"preloaded")),"true"!==h.preloaded||h.paging||(setTimeout(function(){h.preloaded_total_posts<=parseInt(h.preloaded_amount)&&h.AjaxLoadMore.triggerDone(),0==h.preloaded_total_posts&&b.isFunction(b.fn.almEmpty)&&b.fn.almEmpty(h)},h.speed),h.resultsText&&almInitResultsText(h,"preloaded")),h.paging&&h.resultsText&&almInitResultsText(h,"paging"),h.nextpage){if(b(".alm-nextpage",h.container).length)b(".alm-nextpage",h.container).length==b(".alm-nextpage",h.container).eq(0).data("total-posts")&&h.AjaxLoadMore.triggerDone();h.resultsText&&almInitResultsText(h,"nextpage")}h.window.bind("load",function(){h.is_masonry_preloaded&&(almMasonry(h.masonry_wrap,h.el,h.masonry_selector,h.masonry_columnwidth,h.masonry_animation,h.masonry_horizontalorder,h.speed,h.masonry_init,!0,!1),h.masonry_init=!1)})},h.AjaxLoadMore.init(),setTimeout(function(){h.proceed=!0},150),b.fn.almUpdateCurrentPage=function(t,a,e){e.page=t,e.nextpage&&!e.paging&&(e.page=e.page-1);var o="";e.paging_init&&"true"===e.preloaded?(o=b(".alm-reveal",e.el).html(),b(".alm-reveal",e.el).remove(),e.preloaded_amount=0,e.AjaxLoadMore.pagingPreloadedInit(o),e.paging_init=!1,e.init=!1):e.paging_init&&e.nextpage?(o=b(".alm-nextpage",e.el).html(),b(".alm-nextpage",e.el).remove(),e.AjaxLoadMore.pagingNextpageInit(o),e.paging_init=!1,e.init=!1):e.AjaxLoadMore.loadPosts()},b.fn.almGetParentContainer=function(){return h.el.closest("#ajax-load-more")},b.fn.almGetObj=function(){return h},b.fn.almTriggerClick=function(){h.button.trigger("click")},b.easing.alm_easeInOutQuad=function(t,a,e,o,n){return(a/=n/2)<1?o/2*a*a+e:-o/2*(--a*(a-2)-1)+e}},b.fn.ajaxloadmore=function(){return this.each(function(t){new b.ajaxloadmore(b(this),t)})};var t=document.querySelectorAll(".ajax-load-more-wrap");t.length&&[].concat(_toConsumableArray(t)).forEach(function(t,a){new b.ajaxloadmore(b(t),a)})}(jQuery);var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"===("undefined"==typeof exports?"undefined":_typeof(exports))?module.exports=t(require("jquery")):t(jQuery)}(function(g){var u="almWaitForImages";g.almWaitForImages={hasImageProperties:["backgroundImage","listStyleImage","borderImage","borderCornerImage","cursor"],hasImageAttributes:["srcset"]},g.expr[":"]["has-src"]=function(t){return g(t).is('img[src][src!=""]')},g.expr[":"].uncached=function(t){return!!g(t).is(":has-src")&&!t.complete},g.fn.almWaitForImages=function(){var l,p,e,d=0,c=0,_=g.Deferred();if(g.isPlainObject(arguments[0])?(e=arguments[0].waitForAll,p=arguments[0].each,l=arguments[0].finished):1===arguments.length&&"boolean"===g.type(arguments[0])?e=arguments[0]:(l=arguments[0],p=arguments[1],e=arguments[2]),l=l||g.noop,p=p||g.noop,e=!!e,!g.isFunction(l)||!g.isFunction(p))throw new TypeError("An invalid callback was supplied.");return this.each(function(){var r=g(this),s=[],t=g.almWaitForImages.hasImageProperties||[],a=g.almWaitForImages.hasImageAttributes||[],i=/url\(\s*(['"]?)(.*?)\1\s*\)/g;e?r.find("*").addBack().each(function(){var n=g(this);n.is("img:has-src")&&s.push({src:n.attr("src"),element:n[0]}),g.each(t,function(t,a){var e,o=n.css(a);if(!o)return!0;for(;e=i.exec(o);)s.push({src:e[2],element:n[0]})}),g.each(a,function(t,a){var e,o=n.attr(a);if(!o)return!0;e=o.split(","),g.each(e,function(t,a){a=g.trim(a).split(" ")[0],s.push({src:a,element:n[0]})})})}):r.find("img:has-src").each(function(){s.push({src:this.src,element:this})}),d=s.length,(c=0)===d&&(l.call(r[0]),_.resolveWith(r[0])),g.each(s,function(t,o){var a=new Image,n="load."+u+" error."+u;g(a).one(n,function t(a){var e=[c,d,"load"==a.type];if(c++,p.apply(o.element,e),_.notifyWith(o.element,e),g(this).off(n,t),c==d)return l.call(r[0]),_.resolveWith(r[0]),!1}),a.src=o.src})}),_.promise()}});
|
core/src/js/ajax-load-more.js
CHANGED
@@ -11,14 +11,16 @@
|
|
11 |
* Twitter: @KaptonKaos, @ajaxloadmore, @connekthq
|
12 |
*/
|
13 |
|
14 |
-
(function
|
15 |
-
|
16 |
"use strict";
|
17 |
|
18 |
$.ajaxloadmore = function (el, e) {
|
19 |
|
20 |
// Prevent loading of unnessasry posts - move user to top of page
|
21 |
-
if(alm_localize.scrolltop === 'true'){
|
|
|
|
|
22 |
|
23 |
//Set ALM Variables
|
24 |
let alm = this;
|
@@ -30,20 +32,30 @@
|
|
30 |
alm.proceed = false;
|
31 |
alm.disable_ajax = false;
|
32 |
alm.init = true;
|
33 |
-
alm.loading = true;
|
34 |
alm.finished = false;
|
35 |
alm.prefix = 'alm-';
|
36 |
alm.el = el;
|
37 |
alm.master_id = alm.el.get(0).id; // the actual ALM div#id
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
alm.container = el;
|
39 |
alm.container.addClass('alm-'+e).attr('data-alm-id', e); // Add unique classname and data id
|
40 |
-
|
41 |
-
|
|
|
|
|
|
|
42 |
alm.canonical_url = alm.el.attr('data-canonical-url');
|
|
|
43 |
alm.is_search = alm.el.attr('data-search');
|
44 |
alm.slug = alm.el.attr('data-slug');
|
45 |
alm.post_id = alm.el.attr('data-post-id');
|
46 |
-
alm.id = (alm.el.attr('data-id')) ? alm.el.attr('data-id') : '';
|
47 |
|
48 |
alm.repeater = alm.content.attr('data-repeater'); // Repeaters
|
49 |
alm.theme_repeater = alm.content.attr('data-theme-repeater');
|
@@ -51,7 +63,7 @@
|
|
51 |
alm.post_type = alm.content.attr('data-post-type');
|
52 |
alm.post_type = alm.post_type.split(",");
|
53 |
alm.sticky_posts = alm.content.attr('data-sticky-posts');
|
54 |
-
alm.btnWrap = $('.alm-btn-wrap', alm.container);
|
55 |
alm.btnWrap.get(0).style.visibility = 'visible';
|
56 |
alm.button_label = alm.content.attr('data-button-label');
|
57 |
alm.button_loading_label = alm.content.attr('data-button-loading-label');
|
@@ -225,17 +237,11 @@
|
|
225 |
|
226 |
// Get Preloaded Amount
|
227 |
alm.preloaded_amount = (alm.preloaded_amount === undefined) ? alm.posts_per_page : alm.preloaded_amount;
|
228 |
-
|
229 |
-
// Get the preloaded localized <script> object to get total_posts
|
230 |
-
let var_master_id = alm.master_id.replace(/-/g, '_'); // Convert dashes to underscores for the var name
|
231 |
-
var_master_id = var_master_id +'_vars'; // This is the localize variable on the screen (ajax_load_more_vars)
|
232 |
-
|
233 |
-
let preloaded_vars = window[var_master_id]; // Get localize vars
|
234 |
|
235 |
// Disable ALM if total_posts is </= preloaded_amount
|
236 |
-
if(
|
237 |
-
if (parseInt(
|
238 |
-
alm.preloaded_total_posts =
|
239 |
alm.disable_ajax = true;
|
240 |
}
|
241 |
}
|
@@ -428,13 +434,22 @@
|
|
428 |
if(alm.paging){
|
429 |
alm.content.parent().addClass('loading'); // add loading class to main container
|
430 |
}else{
|
431 |
-
alm.button = $('.alm-load-more-btn', alm.container); // Set button element
|
432 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
433 |
|
434 |
|
435 |
|
436 |
-
|
437 |
-
*
|
438 |
* The function to get posts via Ajax
|
439 |
* @since 2.0.0
|
440 |
*/
|
@@ -722,20 +737,29 @@
|
|
722 |
// Standard ALM query results
|
723 |
html = data.html;
|
724 |
meta = data.meta;
|
725 |
-
alm.posts = alm.posts + meta.postcount;
|
726 |
total = meta.postcount;
|
727 |
alm.totalposts = meta.totalposts;
|
728 |
|
729 |
if(alm.preloaded === 'true'){
|
730 |
alm.totalposts = alm.totalposts - alm.preloaded_amount;
|
731 |
}
|
732 |
-
}
|
733 |
-
|
734 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
735 |
|
736 |
-
|
737 |
-
|
738 |
-
|
|
|
|
|
739 |
|
740 |
// First Run
|
741 |
if (alm.init) {
|
@@ -821,7 +845,7 @@
|
|
821 |
if(!alm.paging){
|
822 |
|
823 |
if(alm.previous_post){ // Previous Post, create container and append data
|
824 |
-
alm.el = $('<div class="alm-reveal alm-previous-post post-'+alm.previous_post_id+'" '+ loadingStyle +' data-id="'+alm.previous_post_id+'" data-title="'+alm.previous_post_title+'" data-url="'+alm.previous_post_permalink+'" data-page="'+alm.page+'"/>');
|
825 |
alm.el.append(alm.data);
|
826 |
}
|
827 |
|
@@ -895,8 +919,7 @@
|
|
895 |
for (var x = 0; x < container_array.length; x++){
|
896 |
//alm.el.prepend(container_array[x]);
|
897 |
alm.el.append(container_array[x]);
|
898 |
-
}
|
899 |
-
|
900 |
|
901 |
|
902 |
// Set opacity and height of .alm-listing div to allow for fadein.
|
@@ -1005,10 +1028,12 @@
|
|
1005 |
|
1006 |
// Paging
|
1007 |
if(!alm.init){
|
1008 |
-
$('.alm-paging-content', alm.el).html('').append(alm.data).almWaitForImages().done(function(){
|
1009 |
$('.alm-paging-loading', alm.el).fadeOut(alm.speed); // Fade out loader
|
1010 |
if ($.isFunction($.fn.almOnPagingComplete)){
|
1011 |
-
|
|
|
|
|
1012 |
}
|
1013 |
alm.container.removeClass('alm-loading');
|
1014 |
alm.AjaxLoadMore.triggerAddons(alm);
|
@@ -1033,16 +1058,6 @@
|
|
1033 |
}
|
1034 |
}
|
1035 |
// End ALM Complete
|
1036 |
-
|
1037 |
-
|
1038 |
-
// Filters Add-on Complete
|
1039 |
-
if ($.isFunction($.fn.almFilterComplete)){ // Standard Filtering
|
1040 |
-
$.fn.almFilterComplete();
|
1041 |
-
}
|
1042 |
-
if(typeof almFiltersAddonComplete == "function"){ // Filters Add-on
|
1043 |
-
almFiltersAddonComplete(el);
|
1044 |
-
}
|
1045 |
-
// End Filters Add-on Complete
|
1046 |
|
1047 |
|
1048 |
// ALM Done
|
@@ -1059,16 +1074,26 @@
|
|
1059 |
// End ALM Done
|
1060 |
|
1061 |
|
1062 |
-
} else {
|
1063 |
-
|
1064 |
-
//
|
1065 |
-
if(!alm.paging){
|
1066 |
alm.button.delay(alm.speed).removeClass('loading').addClass('done');
|
1067 |
alm.AjaxLoadMore.resetBtnText();
|
1068 |
}
|
|
|
1069 |
alm.AjaxLoadMore.triggerDone(); // ALM Done
|
1070 |
|
1071 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1072 |
|
1073 |
|
1074 |
// Destroy After
|
@@ -1083,8 +1108,7 @@
|
|
1083 |
}
|
1084 |
// End Destroy After
|
1085 |
|
1086 |
-
alm_is_filtering = false;
|
1087 |
-
alm.init = false;
|
1088 |
|
1089 |
};
|
1090 |
|
@@ -1452,8 +1476,7 @@
|
|
1452 |
|
1453 |
|
1454 |
|
1455 |
-
|
1456 |
-
*
|
1457 |
* Set variables after loading transiton completes
|
1458 |
* @since 3.5
|
1459 |
*/
|
@@ -1467,12 +1490,25 @@
|
|
1467 |
alm.AjaxLoadMore.resetBtnText();
|
1468 |
}
|
1469 |
}, alm.speed);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1470 |
};
|
1471 |
|
1472 |
|
1473 |
|
1474 |
-
|
1475 |
-
|
1476 |
* Load posts as user scrolls the page
|
1477 |
* @since 2.0
|
1478 |
*/
|
@@ -1482,7 +1518,6 @@
|
|
1482 |
if(alm.preloaded === 'true' && alm.destroy_after == 1){
|
1483 |
alm.AjaxLoadMore.destroyed();
|
1484 |
}
|
1485 |
-
|
1486 |
|
1487 |
if(!alm.paging && !alm.previous_post){
|
1488 |
if(alm.disable_ajax){
|
@@ -1498,13 +1533,11 @@
|
|
1498 |
}
|
1499 |
}
|
1500 |
|
1501 |
-
|
1502 |
// Previous Post Add-on
|
1503 |
if(alm.previous_post){
|
1504 |
alm.AjaxLoadMore.getPreviousPost(); // Set next post on load
|
1505 |
alm.loading = false;
|
1506 |
-
}
|
1507 |
-
|
1508 |
|
1509 |
// Preloaded + SEO && !Paging
|
1510 |
if(alm.preloaded === 'true' && alm.seo && !alm.paging){
|
@@ -1514,8 +1547,13 @@
|
|
1514 |
$.fn.almSEO(alm, true);
|
1515 |
}
|
1516 |
}, alm.speed);
|
1517 |
-
|
1518 |
-
|
|
|
|
|
|
|
|
|
|
|
1519 |
|
1520 |
// Preloaded
|
1521 |
if(alm.preloaded === 'true' && !alm.paging){
|
@@ -1532,22 +1570,38 @@
|
|
1532 |
}
|
1533 |
}
|
1534 |
}, alm.speed);
|
|
|
|
|
|
|
|
|
1535 |
|
1536 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
1537 |
|
1538 |
|
1539 |
// Next Page Add-on
|
1540 |
-
if(alm.nextpage){
|
1541 |
-
|
1542 |
-
|
1543 |
-
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
|
|
1547 |
if(alm_nextpage_pages == alm_nextpage_total){
|
1548 |
alm.AjaxLoadMore.triggerDone();
|
1549 |
}
|
1550 |
}
|
|
|
|
|
|
|
|
|
|
|
1551 |
}
|
1552 |
|
1553 |
|
@@ -1560,6 +1614,7 @@
|
|
1560 |
});
|
1561 |
|
1562 |
};
|
|
|
1563 |
alm.AjaxLoadMore.init();
|
1564 |
|
1565 |
|
@@ -1674,8 +1729,8 @@
|
|
1674 |
|
1675 |
|
1676 |
|
1677 |
-
|
1678 |
-
*
|
1679 |
* Initiate all instances of Ajax load More
|
1680 |
* @since 2.1.2
|
1681 |
*/
|
@@ -1694,8 +1749,8 @@
|
|
1694 |
|
1695 |
let ajaxloadmore = document.querySelectorAll('.ajax-load-more-wrap');
|
1696 |
if(ajaxloadmore.length){
|
1697 |
-
[...ajaxloadmore].forEach((alm, e) => {
|
1698 |
-
|
1699 |
});
|
1700 |
}
|
1701 |
|
11 |
* Twitter: @KaptonKaos, @ajaxloadmore, @connekthq
|
12 |
*/
|
13 |
|
14 |
+
(function($){
|
15 |
+
|
16 |
"use strict";
|
17 |
|
18 |
$.ajaxloadmore = function (el, e) {
|
19 |
|
20 |
// Prevent loading of unnessasry posts - move user to top of page
|
21 |
+
if(alm_localize.scrolltop === 'true'){
|
22 |
+
$(window).scrollTop(0);
|
23 |
+
}
|
24 |
|
25 |
//Set ALM Variables
|
26 |
let alm = this;
|
32 |
alm.proceed = false;
|
33 |
alm.disable_ajax = false;
|
34 |
alm.init = true;
|
35 |
+
alm.loading = true;
|
36 |
alm.finished = false;
|
37 |
alm.prefix = 'alm-';
|
38 |
alm.el = el;
|
39 |
alm.master_id = alm.el.get(0).id; // the actual ALM div#id
|
40 |
+
|
41 |
+
// Get localized <script> variables
|
42 |
+
alm.master_id = alm.master_id.replace(/-/g, '_'); // Convert dashes to underscores for the var name
|
43 |
+
alm.localize = window[alm.master_id +'_vars']; // Get localize vars
|
44 |
+
|
45 |
+
// Main ALM container
|
46 |
alm.container = el;
|
47 |
alm.container.addClass('alm-'+e).attr('data-alm-id', e); // Add unique classname and data id
|
48 |
+
|
49 |
+
let container = alm.container.get(0); // Get DOM element
|
50 |
+
alm.content = $(container.querySelector('.alm-ajax')); // Get first `.alm-ajax` element as $ obj
|
51 |
+
alm.content_preloaded = $(container.querySelector('.alm-preloaded')); // Get first `.alm-preloaded` element as $ obj
|
52 |
+
|
53 |
alm.canonical_url = alm.el.attr('data-canonical-url');
|
54 |
+
alm.nested = alm.el.attr('data-nested');
|
55 |
alm.is_search = alm.el.attr('data-search');
|
56 |
alm.slug = alm.el.attr('data-slug');
|
57 |
alm.post_id = alm.el.attr('data-post-id');
|
58 |
+
alm.id = (alm.el.attr('data-id')) ? alm.el.attr('data-id') : '';
|
59 |
|
60 |
alm.repeater = alm.content.attr('data-repeater'); // Repeaters
|
61 |
alm.theme_repeater = alm.content.attr('data-theme-repeater');
|
63 |
alm.post_type = alm.content.attr('data-post-type');
|
64 |
alm.post_type = alm.post_type.split(",");
|
65 |
alm.sticky_posts = alm.content.attr('data-sticky-posts');
|
66 |
+
alm.btnWrap = $('> .alm-btn-wrap', alm.container);
|
67 |
alm.btnWrap.get(0).style.visibility = 'visible';
|
68 |
alm.button_label = alm.content.attr('data-button-label');
|
69 |
alm.button_loading_label = alm.content.attr('data-button-loading-label');
|
237 |
|
238 |
// Get Preloaded Amount
|
239 |
alm.preloaded_amount = (alm.preloaded_amount === undefined) ? alm.posts_per_page : alm.preloaded_amount;
|
|
|
|
|
|
|
|
|
|
|
|
|
240 |
|
241 |
// Disable ALM if total_posts is </= preloaded_amount
|
242 |
+
if(alm.localize && alm.localize.total_posts){
|
243 |
+
if (parseInt(alm.localize.total_posts) <= parseInt(alm.preloaded_amount)){
|
244 |
+
alm.preloaded_total_posts = alm.localize.total_posts;
|
245 |
alm.disable_ajax = true;
|
246 |
}
|
247 |
}
|
434 |
if(alm.paging){
|
435 |
alm.content.parent().addClass('loading'); // add loading class to main container
|
436 |
}else{
|
437 |
+
alm.button = $('> .alm-btn-wrap .alm-load-more-btn', alm.container); // Set button element
|
438 |
+
}
|
439 |
+
|
440 |
+
|
441 |
+
// Render "Showing x of y results" text.
|
442 |
+
alm.resultsText = document.querySelector('.alm-results-text');
|
443 |
+
if(alm.resultsText){
|
444 |
+
alm.resultsText.innerHTML = alm_localize.display_results;
|
445 |
+
} else {
|
446 |
+
alm.resultsText = false;
|
447 |
+
}
|
448 |
|
449 |
|
450 |
|
451 |
+
/**
|
452 |
+
* LoadPosts()
|
453 |
* The function to get posts via Ajax
|
454 |
* @since 2.0.0
|
455 |
*/
|
737 |
// Standard ALM query results
|
738 |
html = data.html;
|
739 |
meta = data.meta;
|
740 |
+
alm.posts = (alm.paging) ? meta.postcount : alm.posts + meta.postcount;
|
741 |
total = meta.postcount;
|
742 |
alm.totalposts = meta.totalposts;
|
743 |
|
744 |
if(alm.preloaded === 'true'){
|
745 |
alm.totalposts = alm.totalposts - alm.preloaded_amount;
|
746 |
}
|
747 |
+
}
|
748 |
+
|
749 |
+
|
750 |
+
// Set localized vars for totalposts
|
751 |
+
alm.setlocalizedVars('viewing', alm.posts);
|
752 |
+
alm.setlocalizedVars('total_posts', alm.totalposts);
|
753 |
+
|
754 |
+
|
755 |
+
almResultsText(alm); // Set Results Text
|
756 |
+
|
757 |
|
758 |
+
// data converted to an object
|
759 |
+
alm.data = $(html);
|
760 |
+
|
761 |
+
// If cache, get the length of the data object
|
762 |
+
total = (is_cache) ? alm.data.length : total;
|
763 |
|
764 |
// First Run
|
765 |
if (alm.init) {
|
845 |
if(!alm.paging){
|
846 |
|
847 |
if(alm.previous_post){ // Previous Post, create container and append data
|
848 |
+
alm.el = $('<div class="alm-reveal alm-previous-post post-'+alm.previous_post_id+'" '+ loadingStyle +' data-id="'+alm.previous_post_id+'" data-title="'+alm.previous_post_title+'" data-url="'+alm.previous_post_permalink+'" data-page="'+alm.page+'"/>');
|
849 |
alm.el.append(alm.data);
|
850 |
}
|
851 |
|
919 |
for (var x = 0; x < container_array.length; x++){
|
920 |
//alm.el.prepend(container_array[x]);
|
921 |
alm.el.append(container_array[x]);
|
922 |
+
}
|
|
|
923 |
|
924 |
|
925 |
// Set opacity and height of .alm-listing div to allow for fadein.
|
1028 |
|
1029 |
// Paging
|
1030 |
if(!alm.init){
|
1031 |
+
$('.alm-paging-content', alm.el).html('').append(alm.data).almWaitForImages().done(function(){ // Remove loading class, append data
|
1032 |
$('.alm-paging-loading', alm.el).fadeOut(alm.speed); // Fade out loader
|
1033 |
if ($.isFunction($.fn.almOnPagingComplete)){
|
1034 |
+
setTimeout(function(){ // Delay for effect
|
1035 |
+
$.fn.almOnPagingComplete(alm);
|
1036 |
+
}, alm.speed);
|
1037 |
}
|
1038 |
alm.container.removeClass('alm-loading');
|
1039 |
alm.AjaxLoadMore.triggerAddons(alm);
|
1058 |
}
|
1059 |
}
|
1060 |
// End ALM Complete
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1061 |
|
1062 |
|
1063 |
// ALM Done
|
1074 |
// End ALM Done
|
1075 |
|
1076 |
|
1077 |
+
} else { // No Results!
|
1078 |
+
|
1079 |
+
if(!alm.paging){ // Add .done class, reset btn text
|
|
|
1080 |
alm.button.delay(alm.speed).removeClass('loading').addClass('done');
|
1081 |
alm.AjaxLoadMore.resetBtnText();
|
1082 |
}
|
1083 |
+
|
1084 |
alm.AjaxLoadMore.triggerDone(); // ALM Done
|
1085 |
|
1086 |
+
}
|
1087 |
+
|
1088 |
+
|
1089 |
+
// Filters Complete
|
1090 |
+
if ($.isFunction($.fn.almFilterComplete)){ // Standard Filtering
|
1091 |
+
$.fn.almFilterComplete();
|
1092 |
+
}
|
1093 |
+
if(typeof almFiltersAddonComplete == "function"){ // Filters Add-on
|
1094 |
+
almFiltersAddonComplete(el);
|
1095 |
+
}
|
1096 |
+
// End Filters Complete
|
1097 |
|
1098 |
|
1099 |
// Destroy After
|
1108 |
}
|
1109 |
// End Destroy After
|
1110 |
|
1111 |
+
alm_is_filtering = alm.init = false;
|
|
|
1112 |
|
1113 |
};
|
1114 |
|
1476 |
|
1477 |
|
1478 |
|
1479 |
+
/**
|
|
|
1480 |
* Set variables after loading transiton completes
|
1481 |
* @since 3.5
|
1482 |
*/
|
1490 |
alm.AjaxLoadMore.resetBtnText();
|
1491 |
}
|
1492 |
}, alm.speed);
|
1493 |
+
};
|
1494 |
+
|
1495 |
+
|
1496 |
+
|
1497 |
+
/**
|
1498 |
+
* Set localized variables
|
1499 |
+
* @since 4.1
|
1500 |
+
*/
|
1501 |
+
alm.setlocalizedVars = function(name, value){
|
1502 |
+
if(alm.localize && name && value){
|
1503 |
+
alm.localize[name] = value; // Set ALM localize var
|
1504 |
+
window[alm.master_id +'_vars'][name] = value; // Update global window obj vars
|
1505 |
+
}
|
1506 |
};
|
1507 |
|
1508 |
|
1509 |
|
1510 |
+
/**
|
1511 |
+
* Init Ajax load More
|
1512 |
* Load posts as user scrolls the page
|
1513 |
* @since 2.0
|
1514 |
*/
|
1518 |
if(alm.preloaded === 'true' && alm.destroy_after == 1){
|
1519 |
alm.AjaxLoadMore.destroyed();
|
1520 |
}
|
|
|
1521 |
|
1522 |
if(!alm.paging && !alm.previous_post){
|
1523 |
if(alm.disable_ajax){
|
1533 |
}
|
1534 |
}
|
1535 |
|
|
|
1536 |
// Previous Post Add-on
|
1537 |
if(alm.previous_post){
|
1538 |
alm.AjaxLoadMore.getPreviousPost(); // Set next post on load
|
1539 |
alm.loading = false;
|
1540 |
+
}
|
|
|
1541 |
|
1542 |
// Preloaded + SEO && !Paging
|
1543 |
if(alm.preloaded === 'true' && alm.seo && !alm.paging){
|
1547 |
$.fn.almSEO(alm, true);
|
1548 |
}
|
1549 |
}, alm.speed);
|
1550 |
+
|
1551 |
+
|
1552 |
+
if(alm.resultsText){
|
1553 |
+
almInitResultsText(alm, 'preloaded');
|
1554 |
+
}
|
1555 |
+
|
1556 |
+
}
|
1557 |
|
1558 |
// Preloaded
|
1559 |
if(alm.preloaded === 'true' && !alm.paging){
|
1570 |
}
|
1571 |
}
|
1572 |
}, alm.speed);
|
1573 |
+
|
1574 |
+
if(alm.resultsText){
|
1575 |
+
almInitResultsText(alm, 'preloaded');
|
1576 |
+
}
|
1577 |
|
1578 |
+
}
|
1579 |
+
|
1580 |
+
if(alm.paging){
|
1581 |
+
if(alm.resultsText){
|
1582 |
+
almInitResultsText(alm, 'paging');
|
1583 |
+
}
|
1584 |
+
}
|
1585 |
|
1586 |
|
1587 |
// Next Page Add-on
|
1588 |
+
if(alm.nextpage){
|
1589 |
+
|
1590 |
+
if($('.alm-nextpage', alm.container).length){
|
1591 |
+
|
1592 |
+
// `.alm-nextpage` check that posts remain
|
1593 |
+
var alm_nextpage_pages = $('.alm-nextpage', alm.container).length,
|
1594 |
+
alm_nextpage_total = $('.alm-nextpage', alm.container).eq(0).data('total-posts');
|
1595 |
+
|
1596 |
if(alm_nextpage_pages == alm_nextpage_total){
|
1597 |
alm.AjaxLoadMore.triggerDone();
|
1598 |
}
|
1599 |
}
|
1600 |
+
|
1601 |
+
if(alm.resultsText){
|
1602 |
+
almInitResultsText(alm, 'nextpage');
|
1603 |
+
}
|
1604 |
+
|
1605 |
}
|
1606 |
|
1607 |
|
1614 |
});
|
1615 |
|
1616 |
};
|
1617 |
+
|
1618 |
alm.AjaxLoadMore.init();
|
1619 |
|
1620 |
|
1729 |
|
1730 |
|
1731 |
|
1732 |
+
/**
|
1733 |
+
* $.fn.ajaxloadmore()
|
1734 |
* Initiate all instances of Ajax load More
|
1735 |
* @since 2.1.2
|
1736 |
*/
|
1749 |
|
1750 |
let ajaxloadmore = document.querySelectorAll('.ajax-load-more-wrap');
|
1751 |
if(ajaxloadmore.length){
|
1752 |
+
[...ajaxloadmore].forEach((alm, e) => {
|
1753 |
+
new $.ajaxloadmore($(alm), e);
|
1754 |
});
|
1755 |
}
|
1756 |
|
core/src/js/modules/masonry.js
CHANGED
@@ -17,7 +17,6 @@
|
|
17 |
@updated 3.3.2
|
18 |
*/
|
19 |
|
20 |
-
|
21 |
let almMasonry = (container, items, selector, columnWidth, animation, horizontalOrder, speed, masonry_init, init, filtering) => {
|
22 |
|
23 |
let duration = (speed+100)/1000 +'s'; // Add 100 for some delay
|
@@ -78,8 +77,8 @@ let almMasonry = (container, items, selector, columnWidth, animation, horizontal
|
|
78 |
}
|
79 |
|
80 |
// Get custom Masonry options (https://masonry.desandro.com/options.html)
|
81 |
-
let alm_masonry_vars = alm_masonry_vars;
|
82 |
-
if(alm_masonry_vars){
|
83 |
Object.keys(alm_masonry_vars).forEach(function(key) { // Loop object to create key:prop
|
84 |
defaults[key] = alm_masonry_vars[key];
|
85 |
});
|
17 |
@updated 3.3.2
|
18 |
*/
|
19 |
|
|
|
20 |
let almMasonry = (container, items, selector, columnWidth, animation, horizontalOrder, speed, masonry_init, init, filtering) => {
|
21 |
|
22 |
let duration = (speed+100)/1000 +'s'; // Add 100 for some delay
|
77 |
}
|
78 |
|
79 |
// Get custom Masonry options (https://masonry.desandro.com/options.html)
|
80 |
+
let alm_masonry_vars = window.alm_masonry_vars;
|
81 |
+
if(alm_masonry_vars){
|
82 |
Object.keys(alm_masonry_vars).forEach(function(key) { // Loop object to create key:prop
|
83 |
defaults[key] = alm_masonry_vars[key];
|
84 |
});
|
core/src/js/modules/resultsText.js
ADDED
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|