WordPress Infinite Scroll – Ajax Load More - Version 3.0.1

Version Description

  • May 22, 2017 =

  • NEW - Added support for caching single posts with the Previous Post and Cache add-ons.

  • NEW - Adding support for Advanced Custom Fields extension for Gallery and Flexible Content field types.

  • UPDATE - Updating cache-path parameter to allow for easier caching while ajax filtering.

  • FIX - Fixed PHP warning in ALM_SHORTCODE class for undefined $post->ID on taxonomy archive pages.

Download this release

Release Info

Developer dcooney
Plugin Icon 128x128 WordPress Infinite Scroll – Ajax Load More
Version 3.0.1
Comparing to
See all releases

Code changes from version 3.0 to 3.0.1

.editorconfig CHANGED
@@ -7,7 +7,7 @@
7
 
8
  root = true
9
 
10
- [*.php]
11
  charset = utf-8
12
  end_of_line = lf
13
  insert_final_newline = true
7
 
8
  root = true
9
 
10
+ [*]
11
  charset = utf-8
12
  end_of_line = lf
13
  insert_final_newline = true
README.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: dcooney, connekthq
3
  Donate link: https://connekthq.com/donate/
4
  Tags: infinite scroll, infinite scrolling, scroll, infinite, lazy load, lazy loading, pagination, ajax pagination, ajax, ajax posts, ajax load posts, search, tags, category, post types, taxonomy, meta_query, woocommerce, ajax load more
5
  Requires at least: 3.6
6
- Tested up to: 4.7.4
7
- Stable tag: 3.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -14,11 +14,11 @@ The ultimate infinite scroll and lazy load solution for your WordPress powered w
14
 
15
  Ajax Load More is a powerful solution for infinite scrolling and lazy loading WordPress posts, custom post types, single posts, pages and comments with Ajax powered queries.
16
 
17
- Build complex custom WordPress queries using the Ajax Load More shortcode builder then add the generated shortcode to your page via the content editor or directly into your template files.
18
 
19
  Ajax Load More is fully compatible for infinite scrolling with popular eCommerce plugins such as WooCommerce and Easy Digital Downloads.
20
 
21
- **[Get More Information](https://connekthq.com/plugins/ajax-load-more/)**
22
 
23
  = Features =
24
  * **Shortcode Builder** - Easily create your own Ajax Load More shortcode by adjusting the various WordPress query parameters in our easy-to-use shortcode builder (see Shortcode Parameters).
@@ -33,9 +33,7 @@ Check out the **[demo site](https://connekthq.com/plugins/ajax-load-more/)** for
33
  ***
34
 
35
  = Content Types =
36
- Ajax Load More can infinite scroll any content type WordPress offers - from blog posts to multipage content to WooCommerce products - Ajax Load More can handle it all.
37
-
38
- Check out the examples below:
39
 
40
  * [Standard Posts](https://connekthq.com/plugins/ajax-load-more/examples/default/)
41
  * [Custom Post Types](https://connekthq.com/plugins/ajax-load-more/examples/masonry/)
@@ -51,52 +49,52 @@ Check out the examples below:
51
 
52
  Ajax Load More accepts a number of parameters that are passed to the WordPress query. These parameters are transferred via shortcode - don't worry, creating your custom shortcode is simple with the intuitive [Shortcode Builder](https://connekthq.com/plugins/ajax-load-more/screenshots/#shortcode-builder)
53
 
54
- * **repeater** - Choose a repeater template (<a href="https://connekthq.com/plugins/ajax-load-more/custom-repeaters/">Add-on available</a>). Default = ‘default’
55
- * **post_type** - Comma separated list of post types. Default = ‘post’
56
- * **sticky_posts** - Preserve sticky post ordering in Ajax listing. Default = false
57
- * **post_format** - Query by post format. Default = null
58
- * **category** - A comma separated list of categories to include by slug. Default = null
59
- * **category__not_in** - A comma separated list of categories to exclude by ID. Default = null
60
- * **tag** - A comma separated list of tags to include by slug. Default = null
61
- * **tag__not_in** - A comma separated list of tags to exclude by ID. Default = null
62
- * **taxonomy** - Query by custom taxonomy name. Default = null
63
- * **taxonomy_terms** - Comma separated list of custom taxonomy terms(slug). Default = null
64
- * **taxonomy_operator** - Operator to compare Taxonomy Terms against (IN/NOT IN). Default = ‘IN’
65
- * **taxonomy_relation** - The logical relationship between each taxonomy when there is more than one. (AND/OR). Default = ‘AND’
66
- * **day** - Day of the week. Default = null
67
- * **month** - Month of the year. Default = null
68
- * **year** - Year of post. Default = null
69
- * **taxonomy_operator** - Operator to compare Taxonomy Terms against (IN/NOT IN). Default = ‘IN’
70
- * **meta_key** - Custom field key(name). Default = null
71
- * **meta_value** - Custom field value. Default = null
72
- * **meta_compare** - Operator to compare meta_key and meta_value against. Default = ‘IN’
73
- * **meta_type** - Custom field type. Default = ‘CHAR’
74
- * **meta_relation** - Used with multiple custom field entries (AND/OR). Default = ‘AND’
75
- * **author** - Comma separated list of authors by id. Default = null
76
- * **post__in** - Comma separated list of post ID’s to include in query. Default = null
77
- * **post__not_in** - Comma separated list of post ID’s to exclude from query. Default = null
78
- * **search** - Query search term (‘s’). Default = null
79
- * **custom_args** - A semicolon separated list of value:pair arguments. e.g. tag_slug__and:design,development; event_display:upcoming. Default = null
80
- * **post_status** - Select status of the post. Default = 'publish'
81
- * **order** - Display posts in ASC(ascending) or DESC(descending) order. Default = ‘DESC’
82
- * **orderby** - Order posts by date, title, name, menu order, author, post ID or comment count. Default = ‘date’
83
- * **offset** - Offset the initial query (number). Default = ’0′
84
- * **posts_per_page** - Number of posts to load with each Ajax request. Default = ’5′
85
- * **scroll** - Load more posts as the user scrolls the page (true/false). Default = ‘true’
86
- * **scroll_distance** - The distance from the bottom of the screen to trigger the loading of posts while scrolling. Default = '150'
87
- * **max_pages** - Maximum number of pages to load while user is scrolling (activated on when scroll = true). Default = '0'
88
- * **pause_override** - Allow scrolling to override the Pause parameter and trigger the loading of posts on scroll. Default = null
89
- * **pause** - Do not load posts until user clicks the Load More button (true/false). Default = 'false'
90
- * **transition** - Choose a posts reveal transition (slide/fade/none). Default = 'slide'
91
- * **transition_speed** - The speed of the loading transition in milliseconds. (slide/fade/none). Default = '250'
92
- * **transition_container** - Display the Ajax Load More (.alm-reveal) loading container. Default = 'true'
93
- * **images_loaded** - Wait for all images to load before displaying ajax loaded content (true/false). Default = 'false'
94
- * **destroy_after** - Remove ajax load more functionality after 'n' number of pages have been loaded. Default = null
95
- * **button_label** - The label text for Load More button. Default = 'Older Posts'
96
- * **button_loading_label** - Update the text of the Load More button while content is loading. Default = null
97
- * **container_type** - Override the global Container Type that was set on ALM Settings page. Default = null
98
- * **css_classes** - Add custom CSS classes to the Ajax Load More container. Default = null
99
- * **id** - A unique ID for the Ajax Load More instance.
100
  ***
101
 
102
  = Example Shortcode =
@@ -106,24 +104,26 @@ Ajax Load More accepts a number of parameters that are passed to the WordPress q
106
  ***
107
 
108
  = Demos =
109
- * **[Default](https://connekthq.com/plugins/ajax-load-more/examples/default/)** - Out of the box functionality and styling
110
- * **[Attachments](https://connekthq.com/plugins/ajax-load-more/examples/attachments/)** - Infinite scroll post attachments
111
- * **[Destroy After](https://connekthq.com/plugins/ajax-load-more/examples/destroy-after/)** - Remove Ajax Load More functionality after 'n' number of pages
112
- * **[Fade Transition](https://connekthq.com/plugins/ajax-load-more/examples/fade-transition/)** - Elements fade in as posts are loaded
113
- * **[Filtering](https://connekthq.com/plugins/ajax-load-more/examples/filtering/)** - Reset and filter an Ajax Load More instance
114
- * **[Infinite Scroll](https://connekthq.com/plugins/ajax-load-more/examples/infinite-scroll/)** - A look at the new loading functionality and style
115
- * **[Images Loaded](https://connekthq.com/plugins/ajax-load-more/examples/images-loaded/)** - Download images before displaying ajax loaded content
116
- * **[Masonry](https://connekthq.com/plugins/ajax-load-more/examples/masonry/)** - Creating a flexible grid layout with Masonry JS
117
- * **[Multiple Instances](https://connekthq.com/plugins/ajax-load-more/examples/multiple-instances/)** - Include multiple Ajax Load More' on a single page
118
- * **[Paging URLs](https://connekthq.com/plugins/ajax-load-more/examples/paging-urls/)** - Generate unique paging URLs for every Ajax Load More query with the SEO add-on
119
- * **[Pause Loading](https://connekthq.com/plugins/ajax-load-more/examples/pause-loading/)** - Posts will not load until initiated by the user
120
- * **[Preloaded Posts](https://connekthq.com/plugins/ajax-load-more/examples/pause-loading/)** - Easily preload an initial set of posts before completing any Ajax requests to the server
121
- * **[Search Results](https://connekthq.com/plugins/ajax-load-more/examples/search-results/)** - Returning results based on search terms
122
- * **[SEO & Paging](https://connekthq.com/plugins/ajax-load-more/examples/seo-paging-add-ons/)** - Combine these two add-ons to create one powerful navigation system
 
123
  * **[Slideshow Gallery](https://connekthq.com/plugins/ajax-load-more/examples/slideshow-gallery/)** - Create a gallery of posts with Ajax Load More and the Paging add-on.
124
  * **[Table Layout](https://connekthq.com/plugins/ajax-load-more/examples/table/)** - Ajax Load More will display query results in a table format.
 
125
 
126
- [View All Examples](https://connekthq.com/plugins/ajax-load-more/examples/)
127
 
128
  *The [Custom Repeater Add-On](https://connekthq.com/plugins/ajax-load-more/custom-repeaters/) has been installed for use on each of our product demos*
129
 
@@ -135,59 +135,58 @@ Ajax Load More accepts a number of parameters that are passed to the WordPress q
135
  The following [add-ons](https://connekthq.com/plugins/ajax-load-more/add-ons/) are available to increase the functionality of Ajax Load More.
136
 
137
  > #### Cache
138
- > The **[Cache](https://connekthq.com/plugins/ajax-load-more/add-ons/cache/)** add-oncreates static HTML files of Ajax Load More requests then serves those static pages to your visitors without querying the database.<br />
139
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/cache/)
140
  >
141
  > #### Call to Actions
142
- > The **[Call to Actions](https://connekthq.com/plugins/ajax-load-more/add-ons/call-to-actions/)** add-on will provide functionality to inject a custom CTA template within an Ajax Load More query.<br />
143
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/call-to-actions/)
144
  >
145
  > #### Comments
146
- > The **[Comments](https://connekthq.com/plugins/ajax-load-more/add-ons/comments/)** add-on will load and display blog comments using the core Ajax Load More infinite scroll functionality.<br />
147
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/comments/)
148
  >
149
  > #### Custom Repeaters
150
- > The **[Custom Repeaters](https://connekthq.com/plugins/ajax-load-more/add-ons/custom-repeaters/)** add-on will allow for **unlimited repeater templates** and provide the ability to create unique templates for different content types throughout your theme.<br />
151
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/custom-repeaters/)
152
  >
153
  > #### Layouts
154
- > The **[Layouts](https://connekthq.com/plugins/ajax-load-more/add-ons/layouts/)** add-on will provide a library of fully responsive layout templates ready for use on your website.<br />
155
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/layouts/)
156
  >
157
  > #### Next Page
158
- > The **[Next Page](https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/)** add-on Load and display paginated WordPress content on demand using the `<!–-nextpage–->` Quicktag.<br />
159
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/)
160
  >
161
  > #### Paging
162
- > The **[Paging](https://connekthq.com/plugins/ajax-load-more/add-ons/paging/)** add-on will transform Ajax Load More’s lazy load/infinite scroll functionality into a robust ajax powered navigation system.<br />
163
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/paging/)
164
  >
165
  > #### Preloaded
166
- > The **[Preloaded](https://connekthq.com/plugins/ajax-load-more/add-ons/preloaded/)** add-on will allow you to quickly and easily preload an initial set of posts before completing any Ajax requests to the server.<br />
167
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/preloaded/)
168
  >
169
  > #### Previous Post
170
- > The **[Previous Post](https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/)** add-on will allow you to navigate single posts with Ajax Load More.<br />
171
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/)
172
  >
173
  > #### Search Engine Optimization
174
- > The **[SEO](https://connekthq.com/plugins/ajax-load-more/add-ons/search-engine-optimization/)** add-on will optimize your ajax loaded content for search engines and site visitors by generating standard WordPress paging URLs with each Ajax Load More query.<br />
175
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/search-engine-optimization/)
176
  >
177
  > #### Theme Repeaters
178
- > The **[Theme Repeaters](https://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/)** add-on will allow you load, edit and maintain templates from your current theme directory.<br />
179
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/)
180
 
181
 
182
  ***
183
 
184
  = Extensions =
185
- The following [extensions](https://connekthq.com/plugins/ajax-load-more/extensions/) are available to provide compatibility with popular WordPress plugins and core features.
186
 
187
  > #### Advanced Custom Fields
188
- > The **[Advanced Custom Fields](https://connekthq.com/plugins/ajax-load-more/extensions/advanced-custom fields/)** extension provides additional functionality for infinite scrolling Repeater and Relationship field data with Ajax Load More.
189
  >
190
-
191
  > #### Relvanssi
192
  > The **[Relevanssi](https://connekthq.com/plugins/ajax-load-more/extensions/relevanssi/)** extension provides the functionality for returning Relevanssi query results to Ajax Load More.
193
  >
@@ -352,6 +351,14 @@ How to install Ajax Load More.
352
 
353
  == Changelog ==
354
 
 
 
 
 
 
 
 
 
355
  = 3.0 - May 4, 2017 =
356
 
357
  * NEW - Added required functionality for new [Advanced Custom Fields extension](https://connekthq.com/plugins/ajax-load-more/extensions/advanced-custom-fields/)
@@ -365,7 +372,7 @@ How to install Ajax Load More.
365
  * Updated - Updated styling (font size and family) on Load More button.
366
  * FIX - JS error when using multiple filters in Safari (Missing closing `]` bracket on data attribute).
367
  * FIX - Missing quote in shortcode builder when using call to actions and theme repater add-ons.
368
- * UPDATE - Various UI and UX enhancements.
369
 
370
  = 2.14.1 - March 24, 2017 =
371
 
3
  Donate link: https://connekthq.com/donate/
4
  Tags: infinite scroll, infinite scrolling, scroll, infinite, lazy load, lazy loading, pagination, ajax pagination, ajax, ajax posts, ajax load posts, search, tags, category, post types, taxonomy, meta_query, woocommerce, ajax load more
5
  Requires at least: 3.6
6
+ Tested up to: 4.7.5
7
+ Stable tag: 3.0.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
14
 
15
  Ajax Load More is a powerful solution for infinite scrolling and lazy loading WordPress posts, custom post types, single posts, pages and comments with Ajax powered queries.
16
 
17
+ Create custom WordPress queries using the Ajax Load More shortcode builder then add the shortcode to your page via the content editor or directly into theme templates in the location you want infinite scroll content to appear.
18
 
19
  Ajax Load More is fully compatible for infinite scrolling with popular eCommerce plugins such as WooCommerce and Easy Digital Downloads.
20
 
21
+ **[&rarr; Get More Information](https://connekthq.com/plugins/ajax-load-more/)**
22
 
23
  = Features =
24
  * **Shortcode Builder** - Easily create your own Ajax Load More shortcode by adjusting the various WordPress query parameters in our easy-to-use shortcode builder (see Shortcode Parameters).
33
  ***
34
 
35
  = Content Types =
36
+ Ajax Load More can infinite scroll any content type WordPress offers - from blog posts to multipage content to WooCommerce products - Ajax Load More can handle it.
 
 
37
 
38
  * [Standard Posts](https://connekthq.com/plugins/ajax-load-more/examples/default/)
39
  * [Custom Post Types](https://connekthq.com/plugins/ajax-load-more/examples/masonry/)
49
 
50
  Ajax Load More accepts a number of parameters that are passed to the WordPress query. These parameters are transferred via shortcode - don't worry, creating your custom shortcode is simple with the intuitive [Shortcode Builder](https://connekthq.com/plugins/ajax-load-more/screenshots/#shortcode-builder)
51
 
52
+ * `repeater` - Choose a repeater template (<a href="https://connekthq.com/plugins/ajax-load-more/custom-repeaters/">Add-on available</a>). Default = ‘default’
53
+ * `post_type` - Comma separated list of post types. Default = ‘post’
54
+ * `sticky_posts` - Preserve sticky post ordering in Ajax listing. Default = false
55
+ * `post_format` - Query by post format. Default = null
56
+ * `category` - A comma separated list of categories to include by slug. Default = null
57
+ * `category__not_in` - A comma separated list of categories to exclude by ID. Default = null
58
+ * `tag` - A comma separated list of tags to include by slug. Default = null
59
+ * `tag__not_in` - A comma separated list of tags to exclude by ID. Default = null
60
+ * `taxonomy` - Query by custom taxonomy name. Default = null
61
+ * `taxonomy_terms` - Comma separated list of custom taxonomy terms(slug). Default = null
62
+ * `taxonomy_operator` - Operator to compare Taxonomy Terms against (IN/NOT IN). Default = ‘IN’
63
+ * `taxonomy_relation` - The logical relationship between each taxonomy when there is more than one. (AND/OR). Default = ‘AND’
64
+ * `day` - Day of the week. Default = null
65
+ * `month` - Month of the year. Default = null
66
+ * `year` - Year of post. Default = null
67
+ * `taxonomy_operator` - Operator to compare Taxonomy Terms against (IN/NOT IN). Default = ‘IN’
68
+ * `meta_key` - Custom field key(name). Default = null
69
+ * `meta_value` - Custom field value. Default = null
70
+ * `meta_compare` - Operator to compare meta_key and meta_value against. Default = ‘IN’
71
+ * `meta_type` - Custom field type. Default = ‘CHAR’
72
+ * `meta_relation` - Used with multiple custom field entries (AND/OR). Default = ‘AND’
73
+ * `author` - Comma separated list of authors by id. Default = null
74
+ * `post__in` - Comma separated list of post ID’s to include in query. Default = null
75
+ * `post__not_in` - Comma separated list of post ID’s to exclude from query. Default = null
76
+ * `search` - Query search term (‘s’). Default = null
77
+ * `custom_args` - A semicolon separated list of value:pair arguments. e.g. tag_slug__and:design,development; event_display:upcoming. Default = null
78
+ * `post_status` - Select status of the post. Default = 'publish'
79
+ * `order` - Display posts in ASC(ascending) or DESC(descending) order. Default = ‘DESC’
80
+ * `orderby` - Order posts by date, title, name, menu order, author, post ID or comment count. Default = ‘date’
81
+ * `offset` - Offset the initial query (number). Default = ’0′
82
+ * `posts_per_page` - Number of posts to load with each Ajax request. Default = ’5′
83
+ * `scroll` - Load more posts as the user scrolls the page (true/false). Default = ‘true’
84
+ * `scroll_distance` - The distance from the bottom of the screen to trigger the loading of posts while scrolling. Default = '150'
85
+ * `max_pages` - Maximum number of pages to load while user is scrolling (activated on when scroll = true). Default = '0'
86
+ * `pause_override` - Allow scrolling to override the Pause parameter and trigger the loading of posts on scroll. Default = null
87
+ * `pause` - Do not load posts until user clicks the Load More button (true/false). Default = 'false'
88
+ * `transition` - Choose a posts reveal transition (slide/fade/none). Default = 'slide'
89
+ * `transition_speed` - The speed of the loading transition in milliseconds. (slide/fade/none). Default = '250'
90
+ * `transition_container` - Display the Ajax Load More (.alm-reveal) loading container. Default = 'true'
91
+ * `images_loaded` - Wait for all images to load before displaying ajax loaded content (true/false). Default = 'false'
92
+ * `destroy_after` - Remove ajax load more functionality after 'n' number of pages have been loaded. Default = null
93
+ * `button_label` - The label text for Load More button. Default = 'Older Posts'
94
+ * `button_loading_label` - Update the text of the Load More button while content is loading. Default = null
95
+ * `container_type` - Override the global Container Type that was set on ALM Settings page. Default = null
96
+ * `css_classes` - Add custom CSS classes to the Ajax Load More container. Default = null
97
+ * `id` - A unique ID for the Ajax Load More instance.
98
  ***
99
 
100
  = Example Shortcode =
104
  ***
105
 
106
  = Demos =
107
+ * **[Default](https://connekthq.com/plugins/ajax-load-more/examples/default/)** - Out of the box functionality and styling.
108
+ * **[Advanced Custom Fields](https://connekthq.com/plugins/ajax-load-more/examples/advanced-custom-fields//)** - Infinite scroll Advanced Custom Fields data.
109
+ * **[Attachments](https://connekthq.com/plugins/ajax-load-more/examples/attachments/)** - Infinite scroll post attachments.
110
+ * **[Destroy After](https://connekthq.com/plugins/ajax-load-more/examples/destroy-after/)** - Remove Ajax Load More functionality after 'n' number of pages.
111
+ * **[Fade Transition](https://connekthq.com/plugins/ajax-load-more/examples/fade-transition/)** - Elements fade in as posts are loaded.
112
+ * **[Filtering](https://connekthq.com/plugins/ajax-load-more/examples/filtering/)** - Reset and filter an Ajax Load More instance.
113
+ * **[Infinite Scroll](https://connekthq.com/plugins/ajax-load-more/examples/infinite-scroll/)** - A look at the new loading functionality and style.
114
+ * **[Images Loaded](https://connekthq.com/plugins/ajax-load-more/examples/images-loaded/)** - Download images before displaying ajax loaded content.
115
+ * **[Masonry](https://connekthq.com/plugins/ajax-load-more/examples/masonry/)** - Creating a flexible grid layout with Masonry JS.
116
+ * **[Multiple Instances](https://connekthq.com/plugins/ajax-load-more/examples/multiple-instances/)** - Include multiple Ajax Load More' on a single page.
117
+ * **[Paging URLs](https://connekthq.com/plugins/ajax-load-more/examples/paging-urls/)** - Generate unique paging URLs for every Ajax Load More query with the SEO add-on.
118
+ * **[Pause Loading](https://connekthq.com/plugins/ajax-load-more/examples/pause-loading/)** - Posts will not load until initiated by the user.
119
+ * **[Preloaded Posts](https://connekthq.com/plugins/ajax-load-more/examples/pause-loading/)** - Easily preload an initial set of posts before completing any Ajax requests to the server.
120
+ * **[Search Results](https://connekthq.com/plugins/ajax-load-more/examples/search-results/)** - Returning results based on search terms.
121
+ * **[SEO & Paging](https://connekthq.com/plugins/ajax-load-more/examples/seo-paging-add-ons/)** - Combine these two add-ons to create one powerful navigation system.
122
  * **[Slideshow Gallery](https://connekthq.com/plugins/ajax-load-more/examples/slideshow-gallery/)** - Create a gallery of posts with Ajax Load More and the Paging add-on.
123
  * **[Table Layout](https://connekthq.com/plugins/ajax-load-more/examples/table/)** - Ajax Load More will display query results in a table format.
124
+ * **[Woocommerce](https://connekthq.com/plugins/ajax-load-more/examples/woocommerce/)** - Infinite scrolling WooCommerce products with Ajax Load More
125
 
126
+ [&rarr; View All Examples](https://connekthq.com/plugins/ajax-load-more/examples/)
127
 
128
  *The [Custom Repeater Add-On](https://connekthq.com/plugins/ajax-load-more/custom-repeaters/) has been installed for use on each of our product demos*
129
 
135
  The following [add-ons](https://connekthq.com/plugins/ajax-load-more/add-ons/) are available to increase the functionality of Ajax Load More.
136
 
137
  > #### Cache
138
+ > The **[Cache](https://connekthq.com/plugins/ajax-load-more/add-ons/cache/)** add-on creates static HTML files of Ajax Load More requests then serves those static pages to your visitors without querying the database.
139
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/cache/)
140
  >
141
  > #### Call to Actions
142
+ > The **[Call to Actions](https://connekthq.com/plugins/ajax-load-more/add-ons/call-to-actions/)** add-on will provide functionality to inject a custom CTA template within an Ajax Load More query.
143
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/call-to-actions/)
144
  >
145
  > #### Comments
146
+ > The **[Comments](https://connekthq.com/plugins/ajax-load-more/add-ons/comments/)** add-on will load and display blog comments using the core Ajax Load More infinite scroll functionality.
147
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/comments/)
148
  >
149
  > #### Custom Repeaters
150
+ > The **[Custom Repeaters](https://connekthq.com/plugins/ajax-load-more/add-ons/custom-repeaters/)** add-on will allow for **unlimited repeater templates** and provide the ability to create unique templates for different content types throughout your theme.
151
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/custom-repeaters/)
152
  >
153
  > #### Layouts
154
+ > The **[Layouts](https://connekthq.com/plugins/ajax-load-more/add-ons/layouts/)** add-on will provide a library of fully responsive layout templates ready for use on your website.
155
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/layouts/)
156
  >
157
  > #### Next Page
158
+ > The **[Next Page](https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/)** add-on Load and display paginated WordPress content on demand using the `<!–-nextpage–->` Quicktag.
159
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/)
160
  >
161
  > #### Paging
162
+ > The **[Paging](https://connekthq.com/plugins/ajax-load-more/add-ons/paging/)** add-on will transform Ajax Load More’s lazy load/infinite scroll functionality into a robust ajax powered navigation system.
163
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/paging/)
164
  >
165
  > #### Preloaded
166
+ > The **[Preloaded](https://connekthq.com/plugins/ajax-load-more/add-ons/preloaded/)** add-on will allow you to quickly and easily preload an initial set of posts before completing any Ajax requests to the server.
167
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/preloaded/)
168
  >
169
  > #### Previous Post
170
+ > The **[Previous Post](https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/)** add-on will allow you to navigate single posts with Ajax Load More.
171
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/)
172
  >
173
  > #### Search Engine Optimization
174
+ > The **[SEO](https://connekthq.com/plugins/ajax-load-more/add-ons/search-engine-optimization/)** add-on will optimize your ajax loaded content for search engines and site visitors by generating standard WordPress paging URLs with each Ajax Load More query.
175
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/search-engine-optimization/)
176
  >
177
  > #### Theme Repeaters
178
+ > The **[Theme Repeaters](https://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/)** add-on will allow you load, edit and maintain templates from your current theme directory.
179
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/)
180
 
181
 
182
  ***
183
 
184
  = Extensions =
185
+ The following free [extensions](https://connekthq.com/plugins/ajax-load-more/extensions/) are available to provide compatibility with popular WordPress plugins and core features.
186
 
187
  > #### Advanced Custom Fields
188
+ > The [Advanced Custom Fields](https://connekthq.com/plugins/ajax-load-more/extensions/advanced-custom-fields/) extension provides additional functionality for infinite scrolling Repeater and Relationship field data with Ajax Load More.
189
  >
 
190
  > #### Relvanssi
191
  > The **[Relevanssi](https://connekthq.com/plugins/ajax-load-more/extensions/relevanssi/)** extension provides the functionality for returning Relevanssi query results to Ajax Load More.
192
  >
351
 
352
  == Changelog ==
353
 
354
+ = 3.0.1 - May 22, 2017 =
355
+
356
+ * NEW - Added support for caching single posts with the Previous Post and Cache add-ons.
357
+ * NEW - Adding support for Advanced Custom Fields extension for Gallery and Flexible Content field types.
358
+ * UPDATE - Updating cache-path parameter to allow for easier caching while ajax filtering.
359
+ * FIX - Fixed PHP warning in ALM_SHORTCODE class for undefined $post->ID on taxonomy archive pages.
360
+
361
+
362
  = 3.0 - May 4, 2017 =
363
 
364
  * NEW - Added required functionality for new [Advanced Custom Fields extension](https://connekthq.com/plugins/ajax-load-more/extensions/advanced-custom-fields/)
372
  * Updated - Updated styling (font size and family) on Load More button.
373
  * FIX - JS error when using multiple filters in Safari (Missing closing `]` bracket on data attribute).
374
  * FIX - Missing quote in shortcode builder when using call to actions and theme repater add-ons.
375
+ * UPDATE - Various UI and UX enhancements.
376
 
377
  = 2.14.1 - March 24, 2017 =
378
 
admin/css/admin.css CHANGED
@@ -1802,7 +1802,6 @@ table.highlight{
1802
  }
1803
  .license-wrap label{
1804
  font-weight: 600;
1805
- /* position: relative; */
1806
  top:-3px;
1807
  }
1808
  .license-wrap input[type=text]{
1802
  }
1803
  .license-wrap label{
1804
  font-weight: 600;
 
1805
  top:-3px;
1806
  }
1807
  .license-wrap input[type=text]{
admin/css/select2.css CHANGED
@@ -345,4 +345,5 @@ disabled look for disabled choices in the results dropdown
345
  padding: 0;
346
  position: absolute;
347
  width: 1px;
 
348
  }
345
  padding: 0;
346
  position: absolute;
347
  width: 1px;
348
+ left: 0;
349
  }
admin/shortcode-builder/shortcode-builder.php CHANGED
@@ -66,6 +66,8 @@
66
  <label class="offscreen" for="acf_field_type"><?php _e('Field Type', 'ajax-load-more'); ?>:</label>
67
  <select class="alm_element" name="acf_field_type" id="acf_field_type">
68
  <option value="" selected="selected">-- <?php _e('Select Field Type', 'ajax-load-more'); ?> --</option>
 
 
69
  <option value="relationship"><?php _e('Relationship', 'ajax-load-more'); ?></option>
70
  <option value="repeater"><?php _e('Repeater', 'ajax-load-more'); ?></option>
71
  </select>
66
  <label class="offscreen" for="acf_field_type"><?php _e('Field Type', 'ajax-load-more'); ?>:</label>
67
  <select class="alm_element" name="acf_field_type" id="acf_field_type">
68
  <option value="" selected="selected">-- <?php _e('Select Field Type', 'ajax-load-more'); ?> --</option>
69
+ <option value="flexible"><?php _e('Flexible Content', 'ajax-load-more'); ?></option>
70
+ <option value="gallery"><?php _e('Gallery', 'ajax-load-more'); ?></option>
71
  <option value="relationship"><?php _e('Relationship', 'ajax-load-more'); ?></option>
72
  <option value="repeater"><?php _e('Repeater', 'ajax-load-more'); ?></option>
73
  </select>
admin/views/settings.php CHANGED
@@ -25,7 +25,7 @@
25
 
26
  <ul class="share">
27
  <li class="twitter">
28
- <a target="blank" title="Share on Twitter" href="//twitter.com/home?status=I'm infinite scrolling with Ajax Load More for #WordPress - https://connekthq.com/plugins/ajax-load-more/" class="share-twitter"><i class="fa fa-twitter"></i> Twitter</a>
29
  </li>
30
  <li class="facebook">
31
  <a target="blank" title="Share on Facebook" href="//facebook.com/share.php?u=https://connekthq.com/plugins/ajax-load-more/" class="share-facebook"><i class="fa fa-facebook"></i> Facebook</a>
25
 
26
  <ul class="share">
27
  <li class="twitter">
28
+ <a target="blank" title="Share on Twitter" href="//twitter.com/home?status=I'm infinite scrolling with Ajax Load More for %23WordPress - https://connekthq.com/plugins/ajax-load-more/" class="share-twitter"><i class="fa fa-twitter"></i> Twitter</a>
29
  </li>
30
  <li class="facebook">
31
  <a target="blank" title="Share on Facebook" href="//facebook.com/share.php?u=https://connekthq.com/plugins/ajax-load-more/" class="share-facebook"><i class="fa fa-facebook"></i> Facebook</a>
ajax-load-more.php CHANGED
@@ -7,13 +7,13 @@ Text Domain: ajax-load-more
7
  Author: Darren Cooney
8
  Twitter: @KaptonKaos
9
  Author URI: http://connekthq.com
10
- Version: 3.0
11
  License: GPL
12
  Copyright: Darren Cooney & Connekt Media
13
  */
14
 
15
- define('ALM_VERSION', '3.0');
16
- define('ALM_RELEASE', 'May 4, 2017');
17
  define('ALM_STORE_URL', 'https://connekthq.com');
18
 
19
 
@@ -425,7 +425,7 @@ if( !class_exists('AjaxLoadMore') ):
425
 
426
  // CTA Add-on
427
  $cta = false;
428
- $ctaData = (isset($_GET['cta'])) ? $_GET['cta'] : '';
429
  if($ctaData){
430
  $cta = true;
431
  $cta_position = (isset($ctaData['cta_position'])) ? $ctaData['cta_position'] : 'before:1';
@@ -441,8 +441,13 @@ if( !class_exists('AjaxLoadMore') ):
441
 
442
 
443
  // Previous Post Add-on
444
- $is_previous_post = (isset($_GET['previous_post'])) ? $_GET['previous_post'] : false;
445
- $previous_post_id = (isset($_GET['previous_post_id'])) ? $_GET['previous_post_id'] : '';
 
 
 
 
 
446
 
447
 
448
  // Paging Add-on
@@ -666,7 +671,7 @@ if( !class_exists('AjaxLoadMore') ):
666
  *
667
  * @return $args;
668
  */
669
- if($is_previous_post == 'true' && has_action('alm_prev_post_installed')){
670
  $args = apply_filters('alm_prev_post_args', $previous_post_id, $postType);
671
  }
672
 
@@ -729,7 +734,6 @@ if( !class_exists('AjaxLoadMore') ):
729
  */
730
  if(!empty($cache_id) && has_action('alm_cache_create_dir')){
731
  apply_filters('alm_cache_create_dir', $cache_id, $canonical_url);
732
- $page_cache = ''; // set our page cache variable
733
  }
734
 
735
 
@@ -800,7 +804,13 @@ if( !class_exists('AjaxLoadMore') ):
800
  * @return null
801
  */
802
  if(!empty($cache_id) && has_action('alm_cache_installed')){
803
- apply_filters('alm_cache_file', $cache_id, $page, $seo_start_page, $data, $preloaded);
 
 
 
 
 
 
804
  }
805
 
806
 
7
  Author: Darren Cooney
8
  Twitter: @KaptonKaos
9
  Author URI: http://connekthq.com
10
+ Version: 3.0.1
11
  License: GPL
12
  Copyright: Darren Cooney & Connekt Media
13
  */
14
 
15
+ define('ALM_VERSION', '3.0.1');
16
+ define('ALM_RELEASE', 'May 22, 2017');
17
  define('ALM_STORE_URL', 'https://connekthq.com');
18
 
19
 
425
 
426
  // CTA Add-on
427
  $cta = false;
428
+ $ctaData = (isset($_GET['cta'])) ? $_GET['cta'] : false;
429
  if($ctaData){
430
  $cta = true;
431
  $cta_position = (isset($ctaData['cta_position'])) ? $ctaData['cta_position'] : 'before:1';
441
 
442
 
443
  // Previous Post Add-on
444
+ $previous_post = false;
445
+ $pp_data = (isset($_GET['previous_post'])) ? $_GET['previous_post'] : false;
446
+ if($pp_data){
447
+ $previous_post = true;
448
+ $previous_post_id = (isset($pp_data['id'])) ? $pp_data['id'] : '';
449
+ $previous_post_slug = (isset($pp_data['slug'])) ? $pp_data['slug'] : '';
450
+ }
451
 
452
 
453
  // Paging Add-on
671
  *
672
  * @return $args;
673
  */
674
+ if($previous_post && has_action('alm_prev_post_installed')){
675
  $args = apply_filters('alm_prev_post_args', $previous_post_id, $postType);
676
  }
677
 
734
  */
735
  if(!empty($cache_id) && has_action('alm_cache_create_dir')){
736
  apply_filters('alm_cache_create_dir', $cache_id, $canonical_url);
 
737
  }
738
 
739
 
804
  * @return null
805
  */
806
  if(!empty($cache_id) && has_action('alm_cache_installed')){
807
+ if($previous_post){
808
+ // Previous Post Cache
809
+ apply_filters('alm_previous_post_cache_file', $cache_id, $previous_post_slug, $data);
810
+ }else{
811
+ // Standard Cache
812
+ apply_filters('alm_cache_file', $cache_id, $page, $seo_start_page, $data, $preloaded);
813
+ }
814
  }
815
 
816
 
core/classes/class.alm-shortcode.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * Ajax Load More shortcode
4
  *
5
- * Returns the [ajax_load_more] shortcode.
6
  *
7
  * @author Darren Cooney
8
  * @since 2.10.1
@@ -18,10 +18,10 @@ if( !class_exists('ALM_SHORTCODE') ):
18
 
19
  static $counter = 0;
20
 
 
21
  /**
22
  * alm_render_shortcode
23
- *
24
- * Parse & Render ALM Shortcode.
25
  *
26
  * @since 2.10.1
27
  * @param $atts Shortcode attributes
@@ -39,8 +39,7 @@ if( !class_exists('ALM_SHORTCODE') ):
39
  $slug = alm_get_page_slug($post);
40
 
41
  // Define Post ID
42
- $post_id = $post->ID;
43
-
44
 
45
  // Custom CSS for Layouts - Only run this once.
46
  if(has_action('alm_layouts_custom_css')){
@@ -297,7 +296,6 @@ if( !class_exists('ALM_SHORTCODE') ):
297
  $preloaded = false;
298
  $seo = false;
299
  $paging = false;
300
- $cache = false;
301
  $comments = false;
302
  $acf = false;
303
  }
@@ -435,8 +433,8 @@ if( !class_exists('ALM_SHORTCODE') ):
435
 
436
  }
437
 
438
- elseif($acf && $acf_field_type === 'repeater'){ // Advanced Custom Fields
439
-
440
  if(has_action('alm_acf_installed') && $acf){
441
 
442
  /* alm_acf_preloaded
@@ -783,7 +781,7 @@ if( !class_exists('ALM_SHORTCODE') ):
783
  $previous_post_permanlink = ($_SERVER["QUERY_STRING"]) ? get_permalink($previous_post_id) .'?'. $_SERVER["QUERY_STRING"] : get_permalink($previous_post_id);
784
 
785
  // Get previous post include, build output from the next post filter
786
- $previous_post_output = '<div class="alm-reveal alm-previous-post post-'. $previous_post_id .'" data-url="'. $previous_post_permanlink .'" data-title="'. get_the_title($previous_post_id) .'" data-id="'. $previous_post_id .'">'; // Set the post id .alm-reveal div
787
 
788
 
789
  /*
1
  <?php
2
  /**
3
+ * Ajax Load More Shortcode
4
  *
5
+ * Returns [ajax_load_more {params}] shortcode.
6
  *
7
  * @author Darren Cooney
8
  * @since 2.10.1
18
 
19
  static $counter = 0;
20
 
21
+
22
  /**
23
  * alm_render_shortcode
24
+ * Parse & render ALM shortcode.
 
25
  *
26
  * @since 2.10.1
27
  * @param $atts Shortcode attributes
39
  $slug = alm_get_page_slug($post);
40
 
41
  // Define Post ID
42
+ $post_id = alm_get_page_id($post);
 
43
 
44
  // Custom CSS for Layouts - Only run this once.
45
  if(has_action('alm_layouts_custom_css')){
296
  $preloaded = false;
297
  $seo = false;
298
  $paging = false;
 
299
  $comments = false;
300
  $acf = false;
301
  }
433
 
434
  }
435
 
436
+ elseif($acf && ($acf_field_type !== 'relationship')){ // Advanced Custom Fields
437
+
438
  if(has_action('alm_acf_installed') && $acf){
439
 
440
  /* alm_acf_preloaded
781
  $previous_post_permanlink = ($_SERVER["QUERY_STRING"]) ? get_permalink($previous_post_id) .'?'. $_SERVER["QUERY_STRING"] : get_permalink($previous_post_id);
782
 
783
  // Get previous post include, build output from the next post filter
784
+ $previous_post_output = '<div class="alm-reveal alm-previous-post post-'. $previous_post_id .'" data-url="'. $previous_post_permanlink .'" data-title="'. get_the_title($previous_post_id) .'" data-id="'. $previous_post_id .'" data-page="0">'; // Set the post id .alm-reveal div
785
 
786
 
787
  /*
core/functions.php CHANGED
@@ -488,7 +488,7 @@ function alm_get_page_slug($post){
488
  elseif(is_author()){
489
  $slug = get_the_author_meta('ID');
490
  }
491
- // Post Tupe Archive
492
  elseif(is_post_type_archive()){
493
  $slug = get_post_type();
494
  }
@@ -516,6 +516,67 @@ function alm_get_page_slug($post){
516
  }
517
 
518
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
519
 
520
  /*
521
  * alm_get_startpage
488
  elseif(is_author()){
489
  $slug = get_the_author_meta('ID');
490
  }
491
+ // Post Type Archive
492
  elseif(is_post_type_archive()){
493
  $slug = get_post_type();
494
  }
516
  }
517
 
518
 
519
+ /*
520
+ * alm_get_page_id
521
+ * Get current page ID
522
+ *
523
+ * @return $post_id;
524
+ * @since 3.0.1
525
+ */
526
+ function alm_get_page_id($post){
527
+
528
+ $post_id = '';
529
+
530
+ if(!is_archive()){
531
+ // If not an archive page, set the post slug
532
+ if(is_front_page() || is_home()){
533
+ $post_id = '0';
534
+ }else{
535
+ // Search
536
+ if(is_search()){
537
+ $search_query = get_search_query();
538
+ if($search_query){
539
+ $post_id = "$search_query";
540
+ }
541
+ }else{
542
+ $post_id = $post->ID;
543
+ }
544
+ }
545
+ }else{
546
+ // Tax
547
+ if(is_tax() || is_tag() || is_category()){
548
+ $queried_object = get_queried_object();
549
+ $post_id = $queried_object->term_id;
550
+ }
551
+ // Author
552
+ elseif(is_author()){
553
+ $post_id = get_the_author_meta('ID');
554
+ }
555
+ // Post Type Archive
556
+ elseif(is_post_type_archive()){
557
+ $post_id = get_post_type();
558
+ }
559
+ elseif(is_date()){
560
+ // Is archive page
561
+ $archive_year = get_the_date('Y');
562
+ $archive_month = get_the_date('m');
563
+ $archive_day = get_the_date('d');
564
+ if(is_year()){
565
+ $post_id = $archive_year;
566
+ }
567
+ if(is_month()){
568
+ $post_id = $archive_year.'-'.$archive_month;
569
+ }
570
+ if(is_day()){
571
+ $post_id = $archive_year.'-'.$archive_month.'-'.$archive_day;
572
+ }
573
+ }
574
+ }
575
+
576
+ return $post_id;
577
+ }
578
+
579
+
580
 
581
  /*
582
  * alm_get_startpage
core/js/ajax-load-more.js CHANGED
@@ -10,17 +10,17 @@
10
  * Author: Darren Cooney
11
  * Twitter: @KaptonKaos
12
  */
13
-
14
- (function ($) {
15
- "use strict";
16
-
17
  $.ajaxloadmore = function (el, e) {
18
-
19
  //Prevent loading of unnessasry posts - move user to top of page
20
  if(alm_localize.scrolltop === 'true'){
21
- $(window).scrollTop(0);
22
  }
23
-
24
  //Set variables
25
  var alm = this;
26
  alm.AjaxLoadMore = {};
@@ -34,7 +34,6 @@
34
  alm.finished = false;
35
  alm.window = $(window);
36
  alm.button_label = '';
37
- alm.data;
38
  alm.el = el;
39
  alm.container = el;
40
  alm.container.addClass('alm-'+e).attr('data-alm-id', e); // Add unique classname and data id
@@ -45,106 +44,106 @@
45
  alm.slug = alm.el.attr('data-slug');
46
  alm.post_id = alm.el.attr('data-post-id');
47
  alm.prefix = 'alm-';
48
-
49
- alm.cache = alm.content.attr('data-cache'); // Cache add-on
50
- alm.cache_id = alm.content.attr('data-cache-id'); // cache value
51
- alm.cache_path = alm.content.attr('data-cache-path'); // cache path
52
- alm.cache_logged_in = alm.content.attr('data-cache-logged-in'); // cache logged in (settings)
53
-
54
- alm.repeater = alm.content.attr('data-repeater'); // Repeaters
55
  alm.theme_repeater = alm.content.attr('data-theme-repeater');
56
-
57
  alm.scroll_distance = parseInt(alm.content.attr('data-scroll-distance'));
58
  alm.max_pages = parseInt(alm.content.attr('data-max-pages'));
59
- alm.pause_override = alm.content.attr('data-pause-override'); // true | false
60
- alm.pause = alm.content.attr('data-pause'); // true | false
61
- alm.transition = alm.content.attr('data-transition');
62
  alm.transition_container = alm.content.attr('data-transition-container');
63
  alm.speed = alm.content.attr('data-transition-speed');
64
  alm.images_loaded = alm.content.attr('data-images-loaded');
65
  alm.destroy_after = alm.content.attr('data-destroy-after');
66
  alm.lang = alm.content.attr('data-lang');
67
  alm.orginal_posts_per_page = alm.content.attr('data-posts-per-page'); // Used for paging add-on
68
- alm.posts_per_page = alm.content.attr('data-posts-per-page');
69
-
70
  alm.cta_array = '';
71
- alm.cta = alm.content.attr('data-cta'); // CTA add-on
72
  alm.cta_position = alm.content.attr('data-cta-position');
73
  alm.cta_repeater = alm.content.attr('data-cta-repeater');
74
  alm.cta_theme_repeater = alm.content.attr('data-cta-theme-repeater');
75
-
76
  alm.acf_array = '';
77
- alm.acf = alm.content.attr('data-acf'); // ACF add-on
78
- alm.acf_field_type = alm.content.attr('data-acf-field-type'); // Field Type
79
- alm.acf_field_name = alm.content.attr('data-acf-field-name'); // Field Name
80
- alm.acf_post_id = alm.content.attr('data-acf-post-id'); // Get the Post ID
81
-
82
  alm.nextpage_array = '';
83
- alm.nextpage = alm.content.attr('data-nextpage'); // Nextpage add-on
84
  alm.nextpage_urls = alm.content.attr('data-nextpage-urls'); // Update url
85
- alm.nextpage_scroll = alm.content.attr('data-nextpage-scroll'); // Scroll
86
- alm.nextpage_pageviews = alm.content.attr('data-nextpage-pageviews'); // pageviews
87
- alm.nextpage_post_id = alm.content.attr('data-nextpage-post-id'); // Get the nextpage id
88
- alm.nextpage_startpage = alm.content.attr('data-nextpage-startpage'); // nextpage startpage
89
-
90
- alm.previous_post = alm.content.attr('data-previous-post'); // Previous Post add-on
91
- alm.previous_post_id = alm.content.attr('data-previous-post-id'); // Get the post id
92
- alm.previous_post_taxonomy = alm.content.attr('data-previous-post-taxonomy'); // Get the post taxonomy
93
-
94
- alm.comments = alm.content.attr('data-comments'); // true | false
95
  if(alm.comments === 'true'){ // if comments, then set alm.content to comments wrap
96
  alm.content = $('.alm-comments', alm.container);
97
  }
98
  alm.comments_array = '';
99
- alm.comments_post_id = alm.content.attr('data-comments_post_id'); // current post id
100
- alm.comments_per_page = alm.content.attr('data-comments_per_page');
101
- alm.comments_type = alm.content.attr('data-comments_type');
102
- alm.comments_style = alm.content.attr('data-comments_style');
103
- alm.comments_template = alm.content.attr('data-comments_template');
104
- alm.comments_callback = alm.content.attr('data-comments_callback');
105
-
106
  alm.restapi = alm.content.attr('data-restapi');
107
  alm.restapi_base_url = alm.content.attr('data-restapi-base-url');
108
  alm.restapi_namespace = alm.content.attr('data-restapi-namespace');
109
  alm.restapi_endpoint = alm.content.attr('data-restapi-endpoint');
110
  alm.restapi_template_id = alm.content.attr('data-restapi-template-id');
111
  alm.restapi_debug = alm.content.attr('data-restapi-debug');
112
-
113
- alm.seo = alm.content.attr('data-seo'); // true | false
114
-
115
- alm.preloaded = alm.content.attr('data-preloaded'); // true | false
116
- alm.preloaded_amount = alm.content.attr('data-preloaded-amount'); // 0
117
-
118
- alm.paging = alm.content.attr('data-paging'); // is paging enabled
119
  alm.paging_controls = alm.content.attr('data-paging-controls');
120
  alm.paging_show_at_most = alm.content.attr('data-paging-show-at-most');
121
- alm.paging_classes = alm.content.attr('data-paging-classes');
122
- alm.paging_init = true;
123
-
124
-
125
  /* REST API */
126
  if(alm.restapi === 'true'){
127
- alm.restapi = true;
128
-
129
  if(alm.restapi_debug === undefined){
130
  alm.restapi_debug = false;
131
- }
132
  if(alm.restapi_template_id === ''){
133
  alm.restapi = false;
134
  }
135
-
136
  }else{
137
  alm.restapi = false;
138
  }
139
  /* End REST API */
140
-
141
-
142
  /* Paging */
143
  if(alm.paging === 'true'){
144
- alm.paging = true;
145
  if(alm.paging_show_at_most === undefined){
146
  alm.paging_show_at_most = 7;
147
- }
148
  // if paging and preload then pause.
149
  if(alm.preloaded === 'true'){
150
  alm.pause = true;
@@ -152,34 +151,34 @@
152
  }else{
153
  alm.paging = false;
154
  }
155
-
156
-
157
  if(alm.paging_controls === 'true'){
158
- alm.paging_controls = true;
159
  }else{
160
  alm.paging_controls = false;
161
- }
162
  /* End Paging */
163
-
164
-
165
  /* Cache */
166
  if (alm.cache === undefined){
167
  alm.cache = false;
168
  }
169
-
170
  if (alm.cache_logged_in === undefined){
171
- alm.cache_logged_in = false;
172
  }
173
  /* End Cache */
174
-
175
-
176
  /* Comments */
177
  if (alm.comments_per_page === undefined){
178
  alm.comments_per_page = '5';
179
  }
180
  /* End Comments */
181
-
182
-
183
  /* Preloaded */
184
  /* If posts_per_page <= preloaded_total_posts disable ajax load more */
185
  if (alm.preloaded === 'true'){
@@ -195,132 +194,133 @@
195
  alm.preloaded = 'false';
196
  }
197
  /* End Preloaded */
198
-
199
-
200
- /* SEO */
201
  if (alm.seo === undefined){
202
- alm.seo = false;
203
  }
204
  if (alm.seo === 'true'){
205
- alm.seo = true; // Convert string to boolean
206
- }
207
  if (alm.is_search === undefined){
208
- alm.is_search = false;
209
  }
210
  alm.search_value = (alm.is_search === 'true') ? alm.slug : ''; // Convert to value of slug for appending to seo url
211
-
212
  alm.permalink = alm.content.attr('data-seo-permalink');
213
  alm.pageview = alm.content.attr('data-seo-pageview');
214
  alm.start_page = alm.content.attr('data-seo-start-page');
215
-
216
- if(alm.start_page){
217
-
218
  alm.seo_scroll = alm.content.attr('data-seo-scroll');
219
  alm.seo_scroll_speed = alm.content.attr('data-seo-scroll-speed');
220
  alm.seo_scrolltop = alm.content.attr('data-seo-scrolltop');
221
-
222
- alm.isPaged = false;
223
-
224
  if (alm.start_page > 1) {
225
- alm.isPaged = true; // Is this a $paged page > 1 ?
226
- alm.posts_per_page = alm.start_page * alm.posts_per_page;
227
  }
228
  // If paging is enabled, reset our posts_per_page
229
  if(alm.paging){
230
- alm.posts_per_page = alm.orginal_posts_per_page;
231
- }
232
-
233
  }else{
234
- alm.start_page = 1;
235
  }
236
- /* End SEO */
237
-
238
-
239
- /* Nextpage */
240
-
241
  if (alm.nextpage === 'true'){
242
- alm.nextpage = true;
243
- alm.posts_per_page = 1;
244
  }else{
245
  alm.nextpage = false;
246
- }
247
  if (alm.nextpage_urls === undefined){
248
- alm.nextpage = 'true';
249
- }
250
  if (alm.nextpage_scroll === undefined){
251
- alm.nextpage_scroll = '250:30';
252
- }
253
  if (alm.nextpage_pageviews === undefined){
254
- alm.nextpage_pageviews = 'true';
255
- }
256
  if (alm.nextpage_post_id === undefined){
257
  alm.nextpage = false;
258
- alm.nextpage_post_id = null;
259
- }
260
  if (alm.nextpage_startpage === undefined){
261
- alm.nextpage_startpage = 1;
262
- }
263
  if (alm.nextpage_startpage > 1) {
264
  alm.isPaged = true;
265
  }
266
-
267
- /* End Nextpage */
268
-
269
-
270
- /* Advanced Custom Fields */
271
-
272
  if (alm.acf === 'true'){
273
- alm.acf = true;
274
  }else{
275
  alm.acf = false;
276
  }
277
  if (alm.acf_field_type === undefined || alm.acf_field_name === undefined || alm.acf_post_id === undefined){
278
- alm.acf = false;
279
- }
280
-
281
- /* End Advanced Custom Fields */
282
-
283
-
284
- /* Previous Post */
285
  if (alm.previous_post === 'true'){
286
- alm.previous_post = true;
287
  alm.previous_post_permalink = '';
288
- alm.previous_post_title = '';
 
289
  }else{
290
  alm.previous_post = false;
291
- }
292
  if (alm.previous_post_id === undefined){
293
- alm.previous_post_id = '';
294
- }
295
  if (alm.previous_post_taxonomy === undefined){
296
- alm.previous_post_taxonomy = '';
297
- }
298
  alm.previous_post_title_template = alm.content.attr('data-previous-post-title-template');
299
  alm.siteTitle = alm.content.attr('data-previous-post-site-title');
300
  alm.siteTagline = alm.content.attr('data-previous-post-site-tagline');
301
  alm.previous_post_pageview = alm.content.attr('data-previous-post-pageview');
302
  alm.previous_post_scroll = alm.content.attr('data-previous-post-scroll');
303
  alm.previous_post_scroll_speed = alm.content.attr('data-previous-post-scroll-speed');
304
- alm.previous_post_scroll_top = alm.content.attr('data-previous-post-scrolltop');
305
  /* End Previous Post */
306
-
307
 
308
  /* Define offset */
309
  if (alm.content.attr('data-offset') === undefined){
310
  alm.offset = 0;
311
  }else{
312
  alm.offset = alm.content.attr('data-offset');
313
- }
314
-
315
  /* Check for pause on init
316
  * Pause could be used to hold the loading of posts for a button click.
317
  */
318
  if (alm.pause === undefined || (alm.seo && alm.start_page > 1)){// SEO only
319
- alm.pause = false;
320
- }
321
  if (alm.preloaded === 'true' && alm.seo && alm.start_page > 0){ // SEO + Preloaded
322
  alm.pause = false;
323
- }
324
  if(alm.preloaded === 'true' && alm.paging){
325
  alm.pause = true;
326
  }
@@ -333,78 +333,74 @@
333
  if (alm.theme_repeater === undefined){
334
  alm.theme_repeater = 'null';
335
  }
336
-
337
 
338
  /* Max number of pages to load while scrolling */
339
  if (alm.max_pages === undefined){
340
  alm.max_pages = 0;
341
- }
342
  if (alm.max_pages === 0){
343
  alm.max_pages = 10000;
344
  }
345
-
346
-
347
  /* Scroll Distance */
348
  if (alm.scroll_distance === undefined){
349
  alm.scroll_distance = 150;
350
  }
351
-
352
 
353
- /* Transition Params */
 
354
  if (alm.transition === undefined){
355
  alm.transition = 'slide';
356
- }else if (alm.transition === "fade"){
357
- alm.transition = 'fade';
358
- }else if (alm.transition === "none"){
359
- alm.transition = 'none';
360
- }else {
361
- alm.transition = 'slide';
362
- }
363
-
364
  if (alm.speed === undefined){
365
  alm.speed = 250;
366
  } else{
367
  alm.speed = parseInt(alm.speed);
368
  }
369
-
 
370
  if (alm.transition_container === undefined || alm.transition_container === 'true'){
371
  alm.transition_container = true;
372
  }else {
373
  alm.transition_container = false;
374
  }
375
-
376
 
377
- /* Images Loaded */
 
378
  if (alm.images_loaded === undefined){
379
  alm.images_loaded = 'false';
380
  }
381
-
382
 
383
- /* Destroy After */
 
384
  if (alm.destroy_after !== undefined) {}
385
-
386
 
387
  /* Button Labels */
388
  if (alm.content.attr('data-button-label') === undefined){
389
  alm.button_label = 'Older Posts';
390
  }else{
391
  alm.button_label = alm.content.attr('data-button-label');
392
- }
393
-
394
-
395
  alm.button_loading_label = alm.content.attr('data-button-loading-label');
396
  if (alm.button_loading_label === undefined){
397
  alm.button_loading_label = false;
398
  }
399
-
400
-
401
- /* Button Class */
402
  if (alm.content.attr('data-button-class') === undefined){
403
  alm.button_class = '';
404
  }else{
405
  alm.button_class = ' ' + alm.content.attr('data-button-class');
406
  }
407
-
408
 
409
  /* Define scroll event */
410
  if (alm.content.attr('data-scroll') === undefined){
@@ -414,29 +410,29 @@
414
  }else{
415
  alm.scroll = true;
416
  }
417
-
418
 
419
- /* Parse multiple Post Types */
 
420
  alm.post_type = alm.content.attr('data-post-type');
421
  alm.post_type = alm.post_type.split(",");
422
-
423
-
424
  /* Sticky Posts */
425
  alm.sticky_posts = alm.content.attr('data-sticky-posts');
426
-
427
 
428
  /* Append 'load More' button to .ajax-load-more-wrap */
429
  alm.container.append('<div class="' + alm.prefix + 'btn-wrap"/>');
430
  alm.btnWrap = $('.' + alm.prefix + 'btn-wrap', alm.container);
431
-
432
- if(alm.paging){
433
-
434
- // Paging add-on
435
  alm.content.parent().addClass('loading'); // add loading class to main container
436
-
437
- }else{
438
-
439
- // If paging is false
440
  $('.'+ alm.prefix + 'btn-wrap', alm.container).append('<button id="load-more" class="' + alm.prefix + 'load-more-btn more'+ alm.button_class +'">' + alm.button_label + '</button>');
441
  alm.button = $('.alm-load-more-btn', alm.container);
442
  }
@@ -444,92 +440,97 @@
444
 
445
 
446
  /* loadPosts()
447
- *
448
  * The function to get posts via Ajax
449
  * @since 2.0.0
450
  */
451
-
452
- alm.AjaxLoadMore.loadPosts = function () {
453
  if(!alm.disable_ajax){ // Check for ajax blocker
454
  if(!alm.paging){
455
  alm.button.addClass('loading');
456
- alm.container.addClass('alm-loading');
457
  if(alm.button_loading_label !== false){
458
  alm.button.text(alm.button_loading_label);
459
  }
460
  }
461
- alm.loading = true;
462
-
463
  // If cache = true && cache_logged_in setting is false
464
  if(alm.cache === 'true' && !alm.cache_logged_in){
465
-
466
  var cache_page;
467
-
468
- if(alm.init && alm.seo && alm.isPaged){
469
  // SEO Add-on
470
  // If the request a paged URL (/page/3/)
471
- var firstpage = '1';
472
- cache_page = alm.cache_path + '/page-' + firstpage +'-'+ alm.start_page +'.html';
473
- }
474
-
475
  else if(alm.nextpage){
476
  // Nextpage add-on
477
  var nextpage_cache_page;
478
- if(alm.paging){
479
  nextpage_cache_page = parseInt(alm.page) + 1;
480
  }else{
481
  nextpage_cache_page = parseInt(alm.page) + 2;
482
  if(alm.isPaged){
483
- // If the request a paged URL (/page/3/)
484
  nextpage_cache_page = parseInt(alm.page) + parseInt(alm.nextpage_startpage) + 1;
485
  }
486
  }
487
- cache_page = alm.cache_path + '/page' +'-'+ nextpage_cache_page +'.html';
 
 
 
 
 
488
  }
489
-
490
- else {
491
- // Standard ALM URL request
492
- cache_page = alm.cache_path + '/page-' + (alm.page + 1) +'.html';
493
  }
494
-
495
- $.get(cache_page, function( data ) {
496
- alm.AjaxLoadMore.success(data, true); // data contains whatever the request has returned
497
- }).fail(function() {
498
- alm.AjaxLoadMore.ajax('standard');
499
  });
500
-
501
  } else { // Standard ALM query
502
-
503
  alm.AjaxLoadMore.ajax('standard');
504
-
505
  }
506
  }
507
-
508
  };
509
-
510
-
511
-
512
  /* ajax()
513
- *
514
  * Ajax Load Moe Ajax function
515
  *
516
  * @param queryType The type of Ajax request (standard/totalposts)
517
  * @since 2.6.0
518
  */
519
-
520
  alm.AjaxLoadMore.ajax = function (queryType) {
521
-
522
  // Default action
523
  var action = 'alm_query_posts';
524
-
525
-
526
  // ACF Params
527
- if(alm.acf){
528
-
529
- // Custom query for the repeater field
530
- if(alm.acf_field_type === 'repeater'){
531
  action = 'alm_acf_query';
532
- }
533
  alm.acf_array = {
534
  'acf' : 'true',
535
  'post_id' : alm.acf_post_id,
@@ -537,10 +538,10 @@
537
  'field_name' : alm.acf_field_name
538
  };
539
  }
540
-
541
-
542
  // Nextpage Params
543
- if(alm.nextpage){
544
  action = 'alm_nextpage_query';
545
  alm.nextpage_array = {
546
  'nextpage' : 'true',
@@ -551,19 +552,22 @@
551
  'startpage' : alm.nextpage_startpage
552
  };
553
  }
554
-
555
-
556
  // Previous Post Params
557
  if(alm.previous_post){
558
- alm.previous_post_id = alm.content.attr('data-previous-post-id');
559
- alm.previous_post_taxonomy = alm.content.attr('data-previous-post-taxonomy');
 
 
 
560
  }
561
-
562
-
563
- // Comment query
564
  if(alm.comments === 'true'){
565
  action = 'alm_comments_query';
566
- alm.posts_per_page = alm.comments_per_page;
567
  alm.comments_array = {
568
  'comments': 'true',
569
  'post_id': alm.comments_post_id,
@@ -572,21 +576,21 @@
572
  'style': alm.comments_style,
573
  'template': alm.comments_template,
574
  'callback': alm.comments_callback,
575
- };
576
  }
577
-
578
-
579
- // CTA Add-on Query params
580
- if(alm.cta === 'true'){
581
- alm.cta_array = {
582
  'cta': 'true',
583
  'cta_position': alm.cta_position,
584
  'cta_repeater': alm.cta_repeater,
585
  'cta_theme_repeater': alm.cta_theme_repeater,
586
- };
587
  }
588
-
589
-
590
  // REST API
591
  if(alm.restapi){
592
  var alm_template = wp.template(alm.restapi_template_id),
@@ -597,7 +601,7 @@
597
  offset : alm.offset,
598
  slug : alm.slug,
599
  canonical_url : alm.canonical_url,
600
- post_type : alm.post_type,
601
  post_format : alm.content.attr('data-post-format'),
602
  category : alm.content.attr('data-category'),
603
  category__not_in : alm.content.attr('data-category-not-in'),
@@ -610,7 +614,7 @@
610
  meta_key : alm.content.attr('data-meta-key'),
611
  meta_value : alm.content.attr('data-meta-value'),
612
  meta_compare : alm.content.attr('data-meta-compare'),
613
- meta_relation : alm.content.attr('data-meta-relation'),
614
  meta_type : alm.content.attr('data-meta-type'),
615
  author : alm.content.attr('data-author'),
616
  year : alm.content.attr('data-year'),
@@ -628,54 +632,54 @@
628
  preloaded_amount : alm.preloaded_amount,
629
  seo_start_page : alm.start_page,
630
  id : el.attr('data-id')
631
- };
632
-
633
- $.ajax({
634
  type : "GET",
635
  url : rest_url,
636
- data: rest_data,
637
- dataType: "JSON",
638
  beforeSend: function () {
639
  if (alm.page != 1 && !alm.paging) {
640
  alm.button.addClass('loading');
641
  }
642
- },
643
- success: function (results) {
644
  var data,
645
  html = results.html,
646
  meta = results.meta,
647
  postcount = meta.postcount,
648
  totalposts = meta.totalposts;
649
-
650
  // loop results to get data from each
651
- $.each(html, function(e){
652
- var result = html[e];
653
  if(alm.restapi_debug === 'true'){ // If debug
654
  console.log(result);
655
- }
656
- data += alm_template(result);
657
- });
658
-
659
  // Create object to pass to success()
660
  var obj = {
661
- 'html' : data,
662
  'meta' : {
663
  'postcount' : postcount,
664
  'totalposts' : totalposts
665
  },
666
- }
667
- alm.AjaxLoadMore.success(obj, false); // Send data
668
- }
669
- });
670
  }
671
-
672
  // Standard ALM
673
  else {
674
  $.ajax({
675
  type: "GET",
676
  url: alm_localize.ajaxurl,
677
  dataType: "JSON",
678
- data: {
679
  action : action,
680
  query_type : queryType,
681
  nonce : alm_localize.alm_nonce,
@@ -687,7 +691,7 @@
687
  cta : alm.cta_array,
688
  comments : alm.comments_array,
689
  post_type : alm.post_type,
690
- sticky_posts : alm.sticky_posts,
691
  post_format : alm.content.attr('data-post-format'),
692
  category : alm.content.attr('data-category'),
693
  category__not_in : alm.content.attr('data-category-not-in'),
@@ -700,7 +704,7 @@
700
  meta_key : alm.content.attr('data-meta-key'),
701
  meta_value : alm.content.attr('data-meta-value'),
702
  meta_compare : alm.content.attr('data-meta-compare'),
703
- meta_relation : alm.content.attr('data-meta-relation'),
704
  meta_type : alm.content.attr('data-meta-type'),
705
  author : alm.content.attr('data-author'),
706
  year : alm.content.attr('data-year'),
@@ -721,21 +725,19 @@
721
  preloaded_amount : alm.preloaded_amount,
722
  seo_start_page : alm.start_page,
723
  paging : alm.paging,
724
- previous_post : alm.previous_post,
725
- previous_post_id : alm.previous_post_id,
726
- previous_post_taxonomy: alm.previous_post_taxonomy,
727
  lang : alm.lang,
728
  slug : alm.slug,
729
  canonical_url : alm.canonical_url,
730
  id : el.attr('data-id')
731
  },
732
-
733
  beforeSend: function () {
734
  if (alm.page != 1 && !alm.paging) {
735
  alm.button.addClass('loading');
736
  }
737
  },
738
-
739
  success: function (data) {
740
  //console.log(data);
741
  if(queryType === 'standard'){
@@ -743,188 +745,188 @@
743
  }
744
  else if(queryType === 'totalpages' && alm.paging && alm.nextpage){
745
  // Next Page and Paging
746
- if($.isFunction($.fn.almBuildPagination)){
747
  $.fn.almBuildPagination(data, alm);
748
- }
749
  }
750
- else if(queryType === 'totalposts' && alm.paging){
751
- // Paging
752
- if($.isFunction($.fn.almBuildPagination)){
753
  $.fn.almBuildPagination(data, alm);
754
  }
755
- }
756
-
757
  },
758
-
759
  error: function (jqXHR, textStatus, errorThrown) {
760
  alm.AjaxLoadMore.error(jqXHR, textStatus, errorThrown);
761
  }
762
-
763
  });
764
- }
765
- };
766
-
767
-
768
-
769
  // If pagination enabled, run totalposts query
770
- if(alm.paging){
771
- if(alm.nextpage){
772
- alm.AjaxLoadMore.ajax('totalpages'); // Create paging menu and query for total pages
773
- } else {
774
- alm.AjaxLoadMore.ajax('totalposts'); // Create paging menu and query for total posts
775
- }
776
  }
777
-
778
-
779
-
780
  /* success()
781
- *
782
  * Success function after loading data
783
  *
784
  * @param data The results of the Ajax request
785
  * @param is_cache Are results of the Ajax request coming from cache
786
  * @since 2.6.0
787
  */
788
-
789
- alm.AjaxLoadMore.success = function (data, is_cache) {
790
-
791
- if(alm.previous_post){ // Get previous page data
792
- alm.AjaxLoadMore.getPreviousPost();
793
- }
794
-
795
- var html, meta, total;
796
-
797
- if(is_cache){
798
  // If content is cached don't look for json data - we won't be querying the DB.
799
- html = data;
800
- }else{
801
- // Standard ALM query results
802
  html = data.html;
803
  meta = data.meta;
804
- alm.posts = alm.posts + meta.postcount;
805
- total = meta.postcount;
806
  alm.totalposts = meta.totalposts;
807
  if(alm.preloaded === 'true'){
808
  alm.totalposts = alm.totalposts - alm.preloaded_amount;
809
- }
810
  }
811
-
812
- alm.data = $(html); // data converted to an object
813
-
814
  if(is_cache){ // If cache, get the length of the data object
815
- total = alm.data.length;
816
  }
817
-
818
  // First Run
819
- if (alm.init) {
820
-
821
- if(!alm.paging){
822
- alm.button.text(alm.button_label);
823
- } else {
824
  // Is pagination
825
- if (total > 0) {
826
  alm.el = $('<div class="alm-reveal"/>');
827
  alm.el.append('<div class="alm-paging-content"></div><div class="alm-paging-loading"></div>');
828
  $('.alm-paging-content', alm.el).append(alm.data).hide();
829
- alm.content.append(alm.el);
830
- alm.content.parent().removeClass('loading'); // Remove loading class from main container
831
  alm.AjaxLoadMore.resetBtnText();
832
-
833
- $('.alm-paging-content', alm.el).fadeIn( alm.speed, 'alm_easeInOutQuad', function(){
834
  var paddingT = parseInt(alm.content.css('padding-top')),
835
- paddingB = parseInt(alm.content.css('padding-bottom'));
836
  alm.content.css('height', alm.el.height() + paddingT + paddingB + 'px');
837
  if ($.isFunction($.fn.almFadePageControls)){
838
- $.fn.almFadePageControls(alm.btnWrap);
839
  }
840
  });
841
- }
842
  }
843
-
844
  // ALM Empty
845
  if(total === 0){
846
  if ($.isFunction($.fn.almEmpty)) {
847
  $.fn.almEmpty(alm);
848
  }
849
  }
850
-
851
  // isPaged
852
- if(alm.isPaged){
853
  alm.posts_per_page = alm.content.attr('data-posts-per-page'); // Reset our posts per page variable
854
  alm.page = alm.start_page - 1; // Set our new page #
855
- }
856
-
857
- }
858
-
859
-
860
  if (total > 0) {
861
-
862
  // Results!
863
  if(!alm.paging){
864
-
865
- if(alm.previous_post){ // If Previous Post, create container and append data
866
-
867
- alm.el = $('<div class="alm-reveal alm-previous-post post-'+alm.previous_post_id+'" data-id="'+alm.previous_post_id+'" data-title="'+alm.previous_post_title+'" data-url="'+alm.previous_post_permalink+'"/>');
868
- alm.el.append(alm.data).hide();
869
-
870
  } else {
871
-
872
- if(!alm.transition_container){
873
  // No transiton container
874
-
875
  alm.data.hide();
876
  alm.el = alm.data;
877
-
878
- } else {
879
  // Standard container
880
-
881
  // SEO
882
  if (alm.init && alm.start_page > 1){
883
  // loop through items and break into separate alm-reveal divs for paging
884
-
885
  var data = [],
886
  posts_per_page = parseInt(alm.posts_per_page);
887
-
888
  if(alm.cta === 'true'){
889
  // If CTA, +1 to posts_per_page to offset the CTA template and correct the display
890
- posts_per_page = posts_per_page + 1;
891
- }
892
-
893
  var pages = Math.ceil(total/posts_per_page); // slice data array into pages
894
  for (var i = 0; i < total; i += posts_per_page) {
895
  data.push(alm.data.slice(i, posts_per_page + i));
896
- }
897
-
898
  alm.el = alm.content; // Set alm.el to be alm-listing div
899
  for (var k = 0; k < data.length; k++){
900
-
901
  var p = 0; // Add 1 page if items are preloaded.
902
  if(alm.preloaded === 'true'){
903
  p = 1;
904
  }
905
-
906
  var div;
907
- if(k > 0 || alm.preloaded === 'true'){ // > Paged
908
  var pagenum = (k + 1 + p);
909
  if(alm.permalink === 'default'){
910
- div = $('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+''+ alm.search_value +'&paged='+ pagenum+'" data-page="'+ pagenum +'" />');
911
  }else{
912
  div = $('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+'page/'+ pagenum +'/'+ alm.search_value +'" data-page="'+ pagenum +'" />');
913
- }
914
  }else{ // First Page
915
  div = $('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+''+ alm.search_value +'" data-page="1" />');
916
  }
917
  div.append(data[k]);
918
  div = $(div); // convert to object
919
  alm.el.append(div).hide(); // Add data to .alm-listing wrapper
920
- }
921
  }
922
  // End SEO -- /
923
-
924
  else {
925
  // If is SEO and paged, or preloaded.
926
  if(alm.seo && alm.page > 0 || alm.preloaded === 'true'){
927
-
928
  var p = 0; // Add 1 page if items are preloaded.
929
  if(alm.preloaded === 'true'){
930
  p = 1;
@@ -933,33 +935,33 @@
933
  var pagenum = (alm.page + 1 + p);
934
  if(alm.seo){
935
  if(alm.permalink === 'default'){
936
- alm.el = $('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+''+ alm.search_value +'&paged='+ pagenum+'" data-page="'+ pagenum +'" />');
937
  }else{
938
  alm.el = $('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+'page/'+ pagenum +'/'+ alm.search_value +'" data-page="'+ pagenum +'" />');
939
- }
940
  }else{
941
  // Basic ALM
942
- alm.el = $('<div class="alm-reveal" />');
943
- }
944
-
945
- }else{
946
  if(alm.seo){
947
  // SEO [Page 1]
948
- alm.el = $('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+''+ alm.search_value +'" data-page="1" />');
949
  }else{
950
  // Basic ALM
951
- alm.el = $('<div class="alm-reveal" />');
952
  }
953
- }
954
-
955
- alm.el.append(alm.data).hide();
956
  }
957
- }
958
  }
959
-
960
- // Append alm.el to ALM container
961
  alm.content.append(alm.el);
962
-
963
  // Transition
964
  if (alm.transition === 'fade') { // Fade
965
  if(alm.images_loaded === 'true'){
@@ -968,7 +970,7 @@
968
  alm.loading = false;
969
  if(!alm.paging){
970
  alm.button.delay(alm.speed).removeClass('loading');
971
- alm.container.delay(alm.speed).removeClass('alm-loading');
972
  alm.AjaxLoadMore.resetBtnText();
973
  }
974
  alm.AjaxLoadMore.triggerAddons(alm);
@@ -981,19 +983,19 @@
981
  alm.button.delay(alm.speed).removeClass('loading');
982
  alm.container.delay(alm.speed).removeClass('loading');
983
  alm.AjaxLoadMore.resetBtnText();
984
- }
985
  alm.AjaxLoadMore.triggerAddons(alm);
986
  });
987
  }
988
-
989
  }else if(alm.transition === 'none') { // None
990
  if(alm.images_loaded === 'true'){
991
  alm.el.almWaitForImages().done(function(){
992
- alm.el.show();
993
  alm.AjaxLoadMore.triggerAddons(alm);
994
  });
995
  }else{
996
- alm.el.show();
997
  alm.AjaxLoadMore.triggerAddons(alm);
998
  }
999
  alm.loading = false;
@@ -1001,8 +1003,8 @@
1001
  alm.button.delay(alm.speed).removeClass('loading');
1002
  alm.container.delay(alm.speed).removeClass('loading');
1003
  alm.AjaxLoadMore.resetBtnText();
1004
- }
1005
-
1006
  }else { // Slide
1007
  if(alm.images_loaded === 'true'){
1008
  alm.el.almWaitForImages().done(function(){
@@ -1012,7 +1014,7 @@
1012
  alm.button.delay(alm.speed).removeClass('loading');
1013
  alm.container.delay(alm.speed).removeClass('loading');
1014
  alm.AjaxLoadMore.resetBtnText();
1015
- }
1016
  alm.AjaxLoadMore.triggerAddons(alm);
1017
  });
1018
  });
@@ -1023,32 +1025,32 @@
1023
  alm.button.delay(alm.speed).removeClass('loading');
1024
  alm.container.delay(alm.speed).removeClass('loading');
1025
  alm.AjaxLoadMore.resetBtnText();
1026
- }
1027
  alm.AjaxLoadMore.triggerAddons(alm);
1028
  });
1029
  }
1030
  }
1031
  // End Transition
1032
-
1033
- } else {
1034
-
1035
- // Paging
1036
- if(!alm.init){
1037
  $('.alm-paging-content', alm.el).html('').append(alm.data).almWaitForImages().done(function(){ // Remove loading class and append data
1038
  $('.alm-paging-loading', alm.el).fadeOut(alm.speed); // Fade out loader
1039
  if ($.isFunction($.fn.almOnPagingComplete)){
1040
- $.fn.almOnPagingComplete(alm);
1041
- }
1042
  alm.AjaxLoadMore.triggerAddons(alm);
1043
  });
1044
  } else {
1045
  alm.AjaxLoadMore.triggerAddons(alm);
1046
- }
1047
  // End Paging
1048
-
1049
- }
1050
-
1051
-
1052
  // ALM Complete
1053
  if ($.isFunction($.fn.almComplete)) {
1054
  if(alm.images_loaded === 'true'){
@@ -1057,43 +1059,43 @@
1057
  });
1058
  }else{
1059
  $.fn.almComplete(alm);
1060
- }
1061
- }
1062
  // End ALM Complete
1063
-
1064
-
1065
  // ALM Done
1066
- if(!alm.cache){
1067
- // Not Cache & Previous Post
1068
- if(alm.posts >= alm.totalposts && !alm.previous_post){
1069
  alm.AjaxLoadMore.triggerDone();
1070
- }
1071
- }else{ // Cache
1072
  if(total < alm.posts_per_page){
1073
  alm.AjaxLoadMore.triggerDone();
1074
- }
1075
- }
1076
- // End ALM Done
1077
-
1078
-
1079
- } else {
1080
-
1081
- // No Results!
1082
  if(!alm.paging){
1083
  alm.button.delay(alm.speed).removeClass('loading').addClass('done');
1084
  alm.AjaxLoadMore.resetBtnText();
1085
- }
1086
  alm.AjaxLoadMore.triggerDone(); // ALM Done
1087
-
1088
  }
1089
-
1090
-
1091
  // Destroy After
1092
  if (alm.destroy_after !== undefined && alm.destroy_after !== '') {
1093
- var currentPage = alm.page + 1; // Add 1 because alm.page starts at 0
1094
  if(alm.preload){
1095
  currentPage++;
1096
- }
1097
  if(currentPage == alm.destroy_after){ // - Disable ALM is page = alm.destroy_after value
1098
  alm.disable_ajax = true;
1099
  if(!alm.paging){
@@ -1102,85 +1104,85 @@
1102
  }
1103
  }
1104
  // End Destroy After
1105
-
1106
- alm.init = false;
1107
-
1108
  };
1109
-
1110
-
1111
-
1112
  /* pagingPreloadedInit()
1113
- *
1114
  * First run for Paging + Preloaded add-ons
1115
  * Moves preloaded content into ajax container
1116
  *
1117
  * @param data The results of the Ajax request
1118
  * @since 2.11.3
1119
- */
1120
  alm.AjaxLoadMore.pagingPreloadedInit = function(data){
1121
-
1122
  alm.el = $('<div class="alm-reveal"/>');
1123
  alm.el.append('<div class="alm-paging-content">'+data+'</div><div class="alm-paging-loading"></div>');
1124
- alm.content.append(alm.el);
1125
- alm.content.parent().removeClass('loading'); // Remove loading class from main container
1126
  alm.AjaxLoadMore.resetBtnText();
1127
-
1128
  var paddingT = parseInt(alm.content.css('padding-top')),
1129
- paddingB = parseInt(alm.content.css('padding-bottom'));
1130
  alm.content.css('height', alm.el.height() + paddingT + paddingB + 'px');
1131
-
1132
  if ($.isFunction($.fn.almFadePageControls)){
1133
- $.fn.almFadePageControls(alm.btnWrap);
1134
  }
1135
  }
1136
-
1137
-
1138
-
1139
  /* pagingNextpageInit()
1140
- *
1141
  * First run for Paging + Next Page add-ons
1142
  * Moves .alm-nextpage content into ajax container
1143
  *
1144
  * @param data The results of the Ajax request
1145
  * @since 2.14.0
1146
- */
1147
  alm.AjaxLoadMore.pagingNextpageInit = function(data){
1148
  alm.el = $('<div class="alm-reveal alm-nextpage"/>');
1149
  alm.el.append('<div class="alm-paging-content">'+data+'</div><div class="alm-paging-loading"></div>');
1150
- alm.el.appendTo(alm.content);
1151
- alm.content.parent().removeClass('loading'); // Remove loading class from main container
1152
  alm.AjaxLoadMore.resetBtnText();
1153
-
1154
  var paddingT = parseInt(alm.content.css('padding-top')),
1155
- paddingB = parseInt(alm.content.css('padding-bottom'));
1156
  alm.content.css('height', alm.el.height() + paddingT + paddingB + 'px');
1157
-
1158
  if ($.isFunction($.fn.almSetNextPageVars)){
1159
  $.fn.almSetNextPageVars(alm); // Next Page Add-on
1160
  }
1161
-
1162
  // Delay the following to avoid positioning
1163
- setTimeout(function(){
1164
  if ($.isFunction($.fn.almFadePageControls)){
1165
- $.fn.almFadePageControls(alm.btnWrap); // Paging Add-on
1166
- }
1167
-
1168
- if ($.isFunction($.fn.almOnWindowResize)){
1169
  $.fn.almOnWindowResize(alm); // Paging Add-on
1170
- }
1171
  }, 200);
1172
  }
1173
-
1174
-
1175
-
1176
-
1177
  /* getPreviousPost()
1178
- *
1179
  * Get the previous post ID via ajax
1180
  * @since 2.7.4
1181
  */
1182
  alm.fetchingPreviousPost = false;
1183
-
1184
  alm.AjaxLoadMore.getPreviousPost = function () {
1185
  alm.fetchingPreviousPost = true;
1186
  $.ajax({
@@ -1193,48 +1195,51 @@
1193
  taxonomy: alm.previous_post_taxonomy
1194
  },
1195
  success: function (data) {
1196
- if(data.has_previous_post){
1197
  alm.content.attr('data-previous-post-id', data.prev_id); // update previous-post-id on ALM element
1198
- alm.previous_post_permalink = data.prev_permalink;
1199
- alm.previous_post_title = data.prev_title;
 
 
 
1200
  }else{
1201
  if(!data.has_previous_post){
1202
  alm.AjaxLoadMore.triggerDone();
1203
  }
1204
- }
1205
- if($.isFunction($.fn.almSetPreviousPost)){
1206
  $.fn.almSetPreviousPost(alm, data.current_id, data.permalink, data.title);
1207
- }
1208
  alm.fetchingPreviousPost = false;
1209
  },
1210
  error: function (jqXHR, textStatus, errorThrown) {
1211
  alm.AjaxLoadMore.error(jqXHR, textStatus, errorThrown);
1212
  alm.fetchingPreviousPost = false;
1213
  }
1214
-
1215
  });
1216
  };
1217
-
1218
-
1219
-
1220
  /* loadComplete()
1221
- *
1222
  * Fires various add-on functions (if available) after load complete.
1223
  * @since 2.14.0
1224
  */
1225
  alm.AjaxLoadMore.triggerAddons = function(alm){
1226
  if ($.isFunction($.fn.almSEO) && alm.seo) {
1227
  $.fn.almSEO(alm);
1228
- }
1229
  if($.isFunction($.fn.almSetNextPage)){
1230
  $.fn.almSetNextPage(alm);
1231
  }
1232
  };
1233
-
1234
-
1235
-
1236
  /* triggerDone()
1237
- *
1238
  * Fires the almDone() function (if available).
1239
  * @since 2.11.3
1240
  */
@@ -1246,37 +1251,37 @@
1246
  }
1247
  if ($.isFunction($.fn.almDone)) {
1248
  // Delay done until after animation
1249
- setTimeout(function(){
1250
- $.fn.almDone(alm)
1251
- }, alm.speed + 10);
1252
- }
1253
  };
1254
-
1255
-
1256
-
1257
  /* resetBtnText()
1258
- *
1259
  * Resets the loading button text after loading has completed
1260
  * @since 2.8.4
1261
  */
1262
  alm.AjaxLoadMore.resetBtnText = function(){
1263
-
1264
- if(alm.button_loading_label !== false){ // Reset button text
1265
  if(!alm.paging){
1266
- alm.button.text(alm.button_label);
1267
  }
1268
- }
1269
-
1270
  };
1271
-
1272
-
1273
-
1274
  /* error()
1275
- *
1276
  * Error function after failed data
1277
  * @since 2.6.0
1278
  */
1279
-
1280
  alm.AjaxLoadMore.error = function (jqXHR, textStatus, errorThrown) {
1281
  alm.loading = false;
1282
  if(!alm.paging){
@@ -1285,15 +1290,15 @@
1285
  }
1286
  console.log(errorThrown);
1287
  };
1288
-
1289
-
1290
 
1291
  /* Button onClick()
1292
- *
1293
  * Load more button click event
1294
  * @since 1.0.0
1295
  */
1296
-
1297
  if(!alm.paging && !alm.fetchingPreviousPost){
1298
  alm.button.on('click', function () {
1299
  if (alm.pause === 'true') {
@@ -1308,22 +1313,22 @@
1308
  }
1309
  });
1310
  }
1311
-
1312
-
1313
-
1314
  /* Window Resize
1315
- *
1316
  * Add resize function for Paging add-on only.
1317
  * @since 2.1.2
1318
  */
1319
  if(alm.paging){
1320
-
1321
  alm.window.bind('resizeEnd', function() {
1322
  if ($.isFunction($.fn.almOnWindowResize)){
1323
- $.fn.almOnWindowResize(alm);
1324
- }
1325
- });
1326
-
1327
  alm.window.resize(function() {
1328
  if(this.resizeTO){
1329
  clearTimeout(this.resizeTO);
@@ -1331,18 +1336,18 @@
1331
  this.resizeTO = setTimeout(function() {
1332
  $(this).trigger('resizeEnd');
1333
  }, 250);
1334
- });
1335
-
1336
  }
1337
 
1338
 
1339
 
1340
  /* alm.AjaxLoadMore.isVisible()
1341
- *
1342
  * Check to see if element is visible before loading posts
1343
  * @since 2.1.2
1344
  */
1345
-
1346
  alm.AjaxLoadMore.isVisible = function () {
1347
  alm.visible = false;
1348
  if (alm.el.is(":visible")) {
@@ -1350,40 +1355,40 @@
1350
  }
1351
  return alm.visible;
1352
  };
1353
-
1354
-
1355
 
1356
  /* Window scroll and touchmove events
1357
- *
1358
  * Load posts as user scrolls the page
1359
  * @since 1.0
1360
  */
1361
  if (alm.scroll && !alm.paging) {
1362
  alm.window.bind("scroll touchstart", function () {
1363
- if (alm.AjaxLoadMore.isVisible() && !alm.fetchingPreviousPost) {
1364
  var content_offset = alm.button.offset(),
1365
- top = Math.round(content_offset.top - (alm.window.height() - alm.scroll_distance));
1366
-
1367
- // If Pause && Pause Override
1368
- if(!alm.loading && !alm.finished && (alm.window.scrollTop() >= top) && alm.page < (alm.max_pages - 1) && alm.proceed && alm.pause === 'true' && alm.pause_override === 'true'){
1369
- alm.button.trigger('click');
1370
  }
1371
-
1372
- // Standard Scroll event
1373
- else{
1374
- if (!alm.loading && !alm.finished && (alm.window.scrollTop() >= top) && alm.page < (alm.max_pages - 1) && alm.proceed && alm.pause !== 'true') {
1375
  alm.page++;
1376
- alm.AjaxLoadMore.loadPosts();
1377
  }
1378
- }
1379
  }
1380
  });
1381
  }
1382
-
1383
-
1384
 
1385
  /* Init Ajax load More
1386
- *
1387
  * Load posts as user scrolls the page
1388
  * @since 2.0
1389
  */
@@ -1392,10 +1397,10 @@
1392
  if(alm.disable_ajax){
1393
  alm.finished = true;
1394
  alm.button.addClass('done');
1395
-
1396
  }else{
1397
  if (alm.pause === 'true') {
1398
- alm.button.text(alm.button_label);
1399
  alm.loading = false;
1400
  } else {
1401
  alm.AjaxLoadMore.loadPosts();
@@ -1412,7 +1417,7 @@
1412
  // triggerDone is total equals total-pages
1413
  var alm_nextpage_pages = $('.alm-nextpage').length,
1414
  alm_nextpage_total = $('.alm-nextpage').eq(0).data('total-pages');
1415
-
1416
  if(alm_nextpage_pages == alm_nextpage_total){
1417
  alm.AjaxLoadMore.triggerDone();
1418
  }
@@ -1420,84 +1425,84 @@
1420
  }
1421
  }
1422
  alm.AjaxLoadMore.init();
1423
-
1424
 
1425
 
1426
  //flag to prevent unnecessary loading of post on init. Hold for 3/10 of a second
1427
  setTimeout(function () {
1428
  alm.proceed = true;
1429
  }, 300);
1430
-
1431
-
1432
-
1433
  /* $.fn.almUpdateCurrentPage()
1434
- *
1435
  * Update current page - triggered from paging add-on
1436
  * @since 2.7.0
1437
  */
1438
-
1439
  $.fn.almUpdateCurrentPage = function(current, obj, alm){
1440
  alm.page = current;
1441
-
1442
  // Next Page add-on
1443
- if(alm.nextpage && !alm.paging){
1444
- alm.page = alm.page - 1; // Remove 1 from next page since it starts at 0
1445
  }
1446
-
1447
  var data = '';
1448
-
1449
  /*
1450
  Paging + Preloaded & Paging + Next Page
1451
  If is paging init and preloaded, grab preloaded data, and append it .alm-reveal
1452
  */
1453
-
1454
- if(alm.paging_init && alm.preloaded === 'true'){
1455
-
1456
- // Paging + Preloaded Firstrun
1457
  data = $('.alm-preloaded .alm-reveal', alm.el).html(); // Content of preloaded page
1458
  $('.alm-preloaded', alm.el).remove();
1459
- alm.preloaded_amount = 0; // Reset
1460
  //alm.AjaxLoadMore.success(data, true); // Skip post loading and go right to success() for display
1461
  alm.AjaxLoadMore.pagingPreloadedInit(data);
1462
  alm.paging_init = false;
1463
- alm.init = false;
1464
-
1465
  }
1466
- else if(alm.paging_init && alm.nextpage){
1467
-
1468
  // Paging + Next Page Firstrun
1469
  data = $('.alm-nextpage', alm.el).html();
1470
  $('.alm-nextpage', alm.el).remove();
1471
  alm.AjaxLoadMore.pagingNextpageInit(data);
1472
  alm.paging_init = false;
1473
  alm.init = false;
1474
-
1475
- }
1476
- else{
1477
-
1478
  // Standard Paging
1479
- alm.AjaxLoadMore.loadPosts();
1480
-
1481
  }
1482
- };
1483
-
1484
-
1485
-
1486
- /* $.fn.almGetParentContainer()
1487
- *
1488
  * return the parent ALM container
1489
  *
1490
  * @since 2.7.0
1491
  * @return element
1492
  */
1493
  $.fn.almGetParentContainer = function(){
1494
- return alm.el.closest('#ajax-load-more'); // Return the parent #ajax-load-more div
1495
  };
1496
-
1497
-
1498
-
1499
  /* $.fn.almGetObj()
1500
- *
1501
  * return the current ALM obj
1502
  *
1503
  * @since 2.7.0
@@ -1506,11 +1511,11 @@
1506
  $.fn.almGetObj = function(){
1507
  return alm; // Return the entire alm object
1508
  };
1509
-
1510
-
1511
-
1512
  /* $.fn.almTriggerClick()
1513
- *
1514
  * Trigger ajaxloadmore from any element on page
1515
  *
1516
  * @since 2.12.0
@@ -1519,7 +1524,7 @@
1519
  $.fn.almTriggerClick = function(){
1520
  alm.button.trigger('click');
1521
  };
1522
-
1523
 
1524
 
1525
  //Custom easing function
@@ -1527,28 +1532,29 @@
1527
  if ((t /= d / 2) < 1) { return c / 2 * t * t + b; }
1528
  return -c / 2 * ((--t) * (t - 2) - 1) + b;
1529
  };
1530
-
1531
  };
1532
 
1533
  // End $.ajaxloadmore
1534
-
1535
-
1536
-
 
1537
  /* $.fn.almFilter(type, speed, data)
1538
- *
1539
  * Filter Ajax Load More
1540
  * @type ('slide', 'fade', null);
1541
  * @speed '300';
1542
- * @data obj;
1543
  *
1544
  * @since 2.6.1
1545
  */
1546
  $.fn.almFilter = function (transition, speed, data) {
1547
-
1548
  if(data.target){
1549
  // if a target has been specified
1550
- $(".ajax-load-more-wrap[data-id='" + data.target + "']").each(function (e) {
1551
- var el = $(this);
1552
  $.fn.almFilterTransition(transition, speed, data, el);
1553
  });
1554
  } else {
@@ -1559,10 +1565,10 @@
1559
  });
1560
  }
1561
  };
1562
-
1563
-
1564
  /* $.fn.almFilterTransition(transition, speed, data, el)
1565
- *
1566
  * Transition Ajax Load More
1567
  *
1568
  * @since 2.13.1
@@ -1571,34 +1577,34 @@
1571
  if(transition === 'slide'){ // Slide transition
1572
  el.slideUp(speed, function(){
1573
  $('.alm-listing', el).html(''); // Clear listings
1574
- $('.alm-btn-wrap', el).remove(); // remove buttons
1575
- el.fadeIn(speed);
1576
-
1577
  $.fn.almSetFilters(el, data);
1578
-
1579
  });
1580
  }else if(transition === 'fade'){ // Fade transition
1581
  el.fadeOut(speed, function(){
1582
- $('.alm-listing', el).html(''); // Clear listings
1583
- $('.alm-btn-wrap', el).remove(); // remove buttons
1584
- el.fadeIn(speed);
1585
-
1586
  $.fn.almSetFilters(el, data);
1587
-
1588
  });
1589
  }else{
1590
  $('.alm-listing', el).html(''); // Clear listings
1591
- $('.alm-btn-wrap', el).remove(); // remove buttons
1592
- el.fadeIn(speed);
1593
-
1594
  $.fn.almSetFilters(el, data);
1595
-
1596
  }
1597
  };
1598
-
1599
-
1600
  /* $.fn.almSetFilters(el, data)
1601
- *
1602
  * Set filter parameters on .alm-listing element
1603
  *
1604
  * @since 2.6.1
@@ -1608,24 +1614,24 @@
1608
  key = key.replace(/\W+/g, '-').replace(/([a-z\d])([A-Z])/g, '$1-$2'); // Convert camelCase data() object back to dash (-)
1609
  $('.alm-listing', el).attr('data-'+key, value);
1610
  });
1611
-
1612
  if ($.isFunction($.fn.almFilterComplete)){
1613
  $.fn.almFilterComplete();
1614
  }
1615
-
1616
  if(data.target){
1617
  // if a target has been specified
1618
- $(".ajax-load-more-wrap[data-id="+data.target+"]").ajaxloadmore(); // re-initiate Ajax Load More
1619
  } else {
1620
  // Target not specified
1621
- $(".ajax-load-more-wrap").ajaxloadmore(); // re-initiate Ajax Load More
1622
  }
1623
  };
1624
-
1625
-
1626
 
1627
  /* $.fn.ajaxloadmore()
1628
- *
1629
  * Initiate all instances of Ajax load More
1630
  * @since 2.1.2
1631
  */
@@ -1634,24 +1640,24 @@
1634
  $(this).data('alm', new $.ajaxloadmore($(this), e));
1635
  });
1636
  };
1637
-
1638
-
1639
 
1640
- /*
 
 
1641
  * Initiate Ajax load More if div is present on screen
1642
  * @since 2.1.2
1643
  */
1644
  if ($(".ajax-load-more-wrap").length){
1645
  $(".ajax-load-more-wrap").ajaxloadmore();
1646
  }
1647
-
1648
 
1649
  })(jQuery);
1650
 
1651
 
1652
 
1653
 
1654
- /*! almWaitForImages
1655
  jQuery Plugin
1656
  v2.0.2
1657
  Based on https://github.com/alexanderdickson/almWaitForImages
10
  * Author: Darren Cooney
11
  * Twitter: @KaptonKaos
12
  */
13
+
14
+ (function ($) {
15
+ "use strict";
16
+
17
  $.ajaxloadmore = function (el, e) {
18
+
19
  //Prevent loading of unnessasry posts - move user to top of page
20
  if(alm_localize.scrolltop === 'true'){
21
+ $(window).scrollTop(0);
22
  }
23
+
24
  //Set variables
25
  var alm = this;
26
  alm.AjaxLoadMore = {};
34
  alm.finished = false;
35
  alm.window = $(window);
36
  alm.button_label = '';
 
37
  alm.el = el;
38
  alm.container = el;
39
  alm.container.addClass('alm-'+e).attr('data-alm-id', e); // Add unique classname and data id
44
  alm.slug = alm.el.attr('data-slug');
45
  alm.post_id = alm.el.attr('data-post-id');
46
  alm.prefix = 'alm-';
47
+
48
+ alm.cache = alm.content.attr('data-cache'); // Cache add-on
49
+ alm.cache_id = alm.content.attr('data-cache-id'); // cache value
50
+ alm.cache_path = alm.content.attr('data-cache-path'); // cache path
51
+ alm.cache_logged_in = alm.content.attr('data-cache-logged-in'); // cache logged in (settings)
52
+
53
+ alm.repeater = alm.content.attr('data-repeater'); // Repeaters
54
  alm.theme_repeater = alm.content.attr('data-theme-repeater');
55
+
56
  alm.scroll_distance = parseInt(alm.content.attr('data-scroll-distance'));
57
  alm.max_pages = parseInt(alm.content.attr('data-max-pages'));
58
+ alm.pause_override = alm.content.attr('data-pause-override'); // true | false
59
+ alm.pause = alm.content.attr('data-pause'); // true | false
60
+ alm.transition = alm.content.attr('data-transition');
61
  alm.transition_container = alm.content.attr('data-transition-container');
62
  alm.speed = alm.content.attr('data-transition-speed');
63
  alm.images_loaded = alm.content.attr('data-images-loaded');
64
  alm.destroy_after = alm.content.attr('data-destroy-after');
65
  alm.lang = alm.content.attr('data-lang');
66
  alm.orginal_posts_per_page = alm.content.attr('data-posts-per-page'); // Used for paging add-on
67
+ alm.posts_per_page = alm.content.attr('data-posts-per-page');
68
+
69
  alm.cta_array = '';
70
+ alm.cta = alm.content.attr('data-cta'); // CTA add-on
71
  alm.cta_position = alm.content.attr('data-cta-position');
72
  alm.cta_repeater = alm.content.attr('data-cta-repeater');
73
  alm.cta_theme_repeater = alm.content.attr('data-cta-theme-repeater');
74
+
75
  alm.acf_array = '';
76
+ alm.acf = alm.content.attr('data-acf'); // ACF add-on
77
+ alm.acf_field_type = alm.content.attr('data-acf-field-type'); // Field Type
78
+ alm.acf_field_name = alm.content.attr('data-acf-field-name'); // Field Name
79
+ alm.acf_post_id = alm.content.attr('data-acf-post-id'); // Get the Post ID
80
+
81
  alm.nextpage_array = '';
82
+ alm.nextpage = alm.content.attr('data-nextpage'); // Nextpage add-on
83
  alm.nextpage_urls = alm.content.attr('data-nextpage-urls'); // Update url
84
+ alm.nextpage_scroll = alm.content.attr('data-nextpage-scroll'); // Scroll
85
+ alm.nextpage_pageviews = alm.content.attr('data-nextpage-pageviews'); // pageviews
86
+ alm.nextpage_post_id = alm.content.attr('data-nextpage-post-id'); // Get the nextpage id
87
+ alm.nextpage_startpage = alm.content.attr('data-nextpage-startpage'); // nextpage startpage
88
+
89
+ alm.previous_post = alm.content.attr('data-previous-post'); // Previous Post add-on
90
+ alm.previous_post_id = alm.content.attr('data-previous-post-id'); // Get the post id
91
+ alm.previous_post_taxonomy = alm.content.attr('data-previous-post-taxonomy'); // Get the post taxonomy
92
+
93
+ alm.comments = alm.content.attr('data-comments'); // true | false
94
  if(alm.comments === 'true'){ // if comments, then set alm.content to comments wrap
95
  alm.content = $('.alm-comments', alm.container);
96
  }
97
  alm.comments_array = '';
98
+ alm.comments_post_id = alm.content.attr('data-comments_post_id'); // current post id
99
+ alm.comments_per_page = alm.content.attr('data-comments_per_page');
100
+ alm.comments_type = alm.content.attr('data-comments_type');
101
+ alm.comments_style = alm.content.attr('data-comments_style');
102
+ alm.comments_template = alm.content.attr('data-comments_template');
103
+ alm.comments_callback = alm.content.attr('data-comments_callback');
104
+
105
  alm.restapi = alm.content.attr('data-restapi');
106
  alm.restapi_base_url = alm.content.attr('data-restapi-base-url');
107
  alm.restapi_namespace = alm.content.attr('data-restapi-namespace');
108
  alm.restapi_endpoint = alm.content.attr('data-restapi-endpoint');
109
  alm.restapi_template_id = alm.content.attr('data-restapi-template-id');
110
  alm.restapi_debug = alm.content.attr('data-restapi-debug');
111
+
112
+ alm.seo = alm.content.attr('data-seo'); // true | false
113
+
114
+ alm.preloaded = alm.content.attr('data-preloaded'); // true | false
115
+ alm.preloaded_amount = alm.content.attr('data-preloaded-amount'); // 0
116
+
117
+ alm.paging = alm.content.attr('data-paging'); // is paging enabled
118
  alm.paging_controls = alm.content.attr('data-paging-controls');
119
  alm.paging_show_at_most = alm.content.attr('data-paging-show-at-most');
120
+ alm.paging_classes = alm.content.attr('data-paging-classes');
121
+ alm.paging_init = true;
122
+
123
+
124
  /* REST API */
125
  if(alm.restapi === 'true'){
126
+ alm.restapi = true;
127
+
128
  if(alm.restapi_debug === undefined){
129
  alm.restapi_debug = false;
130
+ }
131
  if(alm.restapi_template_id === ''){
132
  alm.restapi = false;
133
  }
134
+
135
  }else{
136
  alm.restapi = false;
137
  }
138
  /* End REST API */
139
+
140
+
141
  /* Paging */
142
  if(alm.paging === 'true'){
143
+ alm.paging = true;
144
  if(alm.paging_show_at_most === undefined){
145
  alm.paging_show_at_most = 7;
146
+ }
147
  // if paging and preload then pause.
148
  if(alm.preloaded === 'true'){
149
  alm.pause = true;
151
  }else{
152
  alm.paging = false;
153
  }
154
+
155
+
156
  if(alm.paging_controls === 'true'){
157
+ alm.paging_controls = true;
158
  }else{
159
  alm.paging_controls = false;
160
+ }
161
  /* End Paging */
162
+
163
+
164
  /* Cache */
165
  if (alm.cache === undefined){
166
  alm.cache = false;
167
  }
168
+
169
  if (alm.cache_logged_in === undefined){
170
+ alm.cache_logged_in = false;
171
  }
172
  /* End Cache */
173
+
174
+
175
  /* Comments */
176
  if (alm.comments_per_page === undefined){
177
  alm.comments_per_page = '5';
178
  }
179
  /* End Comments */
180
+
181
+
182
  /* Preloaded */
183
  /* If posts_per_page <= preloaded_total_posts disable ajax load more */
184
  if (alm.preloaded === 'true'){
194
  alm.preloaded = 'false';
195
  }
196
  /* End Preloaded */
197
+
198
+
199
+ /* SEO */
200
  if (alm.seo === undefined){
201
+ alm.seo = false;
202
  }
203
  if (alm.seo === 'true'){
204
+ alm.seo = true; // Convert string to boolean
205
+ }
206
  if (alm.is_search === undefined){
207
+ alm.is_search = false;
208
  }
209
  alm.search_value = (alm.is_search === 'true') ? alm.slug : ''; // Convert to value of slug for appending to seo url
210
+
211
  alm.permalink = alm.content.attr('data-seo-permalink');
212
  alm.pageview = alm.content.attr('data-seo-pageview');
213
  alm.start_page = alm.content.attr('data-seo-start-page');
214
+
215
+ if(alm.start_page){
216
+
217
  alm.seo_scroll = alm.content.attr('data-seo-scroll');
218
  alm.seo_scroll_speed = alm.content.attr('data-seo-scroll-speed');
219
  alm.seo_scrolltop = alm.content.attr('data-seo-scrolltop');
220
+
221
+ alm.isPaged = false;
222
+
223
  if (alm.start_page > 1) {
224
+ alm.isPaged = true; // Is this a $paged page > 1 ?
225
+ alm.posts_per_page = alm.start_page * alm.posts_per_page;
226
  }
227
  // If paging is enabled, reset our posts_per_page
228
  if(alm.paging){
229
+ alm.posts_per_page = alm.orginal_posts_per_page;
230
+ }
231
+
232
  }else{
233
+ alm.start_page = 1;
234
  }
235
+ /* End SEO */
236
+
237
+
238
+ /* Nextpage */
239
+
240
  if (alm.nextpage === 'true'){
241
+ alm.nextpage = true;
242
+ alm.posts_per_page = 1;
243
  }else{
244
  alm.nextpage = false;
245
+ }
246
  if (alm.nextpage_urls === undefined){
247
+ alm.nextpage = 'true';
248
+ }
249
  if (alm.nextpage_scroll === undefined){
250
+ alm.nextpage_scroll = '250:30';
251
+ }
252
  if (alm.nextpage_pageviews === undefined){
253
+ alm.nextpage_pageviews = 'true';
254
+ }
255
  if (alm.nextpage_post_id === undefined){
256
  alm.nextpage = false;
257
+ alm.nextpage_post_id = null;
258
+ }
259
  if (alm.nextpage_startpage === undefined){
260
+ alm.nextpage_startpage = 1;
261
+ }
262
  if (alm.nextpage_startpage > 1) {
263
  alm.isPaged = true;
264
  }
265
+
266
+ /* End Nextpage */
267
+
268
+
269
+ /* Advanced Custom Fields */
270
+
271
  if (alm.acf === 'true'){
272
+ alm.acf = true;
273
  }else{
274
  alm.acf = false;
275
  }
276
  if (alm.acf_field_type === undefined || alm.acf_field_name === undefined || alm.acf_post_id === undefined){
277
+ alm.acf = false;
278
+ }
279
+
280
+ /* End Advanced Custom Fields */
281
+
282
+
283
+ /* Previous Post */
284
  if (alm.previous_post === 'true'){
285
+ alm.previous_post = true;
286
  alm.previous_post_permalink = '';
287
+ alm.previous_post_title = '';
288
+ alm.previous_post_slug = '';
289
  }else{
290
  alm.previous_post = false;
291
+ }
292
  if (alm.previous_post_id === undefined){
293
+ alm.previous_post_id = '';
294
+ }
295
  if (alm.previous_post_taxonomy === undefined){
296
+ alm.previous_post_taxonomy = '';
297
+ }
298
  alm.previous_post_title_template = alm.content.attr('data-previous-post-title-template');
299
  alm.siteTitle = alm.content.attr('data-previous-post-site-title');
300
  alm.siteTagline = alm.content.attr('data-previous-post-site-tagline');
301
  alm.previous_post_pageview = alm.content.attr('data-previous-post-pageview');
302
  alm.previous_post_scroll = alm.content.attr('data-previous-post-scroll');
303
  alm.previous_post_scroll_speed = alm.content.attr('data-previous-post-scroll-speed');
304
+ alm.previous_post_scroll_top = alm.content.attr('data-previous-post-scrolltop');
305
  /* End Previous Post */
306
+
307
 
308
  /* Define offset */
309
  if (alm.content.attr('data-offset') === undefined){
310
  alm.offset = 0;
311
  }else{
312
  alm.offset = alm.content.attr('data-offset');
313
+ }
314
+
315
  /* Check for pause on init
316
  * Pause could be used to hold the loading of posts for a button click.
317
  */
318
  if (alm.pause === undefined || (alm.seo && alm.start_page > 1)){// SEO only
319
+ alm.pause = false;
320
+ }
321
  if (alm.preloaded === 'true' && alm.seo && alm.start_page > 0){ // SEO + Preloaded
322
  alm.pause = false;
323
+ }
324
  if(alm.preloaded === 'true' && alm.paging){
325
  alm.pause = true;
326
  }
333
  if (alm.theme_repeater === undefined){
334
  alm.theme_repeater = 'null';
335
  }
336
+
337
 
338
  /* Max number of pages to load while scrolling */
339
  if (alm.max_pages === undefined){
340
  alm.max_pages = 0;
341
+ }
342
  if (alm.max_pages === 0){
343
  alm.max_pages = 10000;
344
  }
345
+
346
+
347
  /* Scroll Distance */
348
  if (alm.scroll_distance === undefined){
349
  alm.scroll_distance = 150;
350
  }
 
351
 
352
+
353
+ /* Transition Params */
354
  if (alm.transition === undefined){
355
  alm.transition = 'slide';
356
+ }
357
+
358
+ /* Speed */
 
 
 
 
 
359
  if (alm.speed === undefined){
360
  alm.speed = 250;
361
  } else{
362
  alm.speed = parseInt(alm.speed);
363
  }
364
+
365
+ /* Transition Container */
366
  if (alm.transition_container === undefined || alm.transition_container === 'true'){
367
  alm.transition_container = true;
368
  }else {
369
  alm.transition_container = false;
370
  }
 
371
 
372
+
373
+ /* Images Loaded */
374
  if (alm.images_loaded === undefined){
375
  alm.images_loaded = 'false';
376
  }
 
377
 
378
+
379
+ /* Destroy After */
380
  if (alm.destroy_after !== undefined) {}
381
+
382
 
383
  /* Button Labels */
384
  if (alm.content.attr('data-button-label') === undefined){
385
  alm.button_label = 'Older Posts';
386
  }else{
387
  alm.button_label = alm.content.attr('data-button-label');
388
+ }
389
+
390
+
391
  alm.button_loading_label = alm.content.attr('data-button-loading-label');
392
  if (alm.button_loading_label === undefined){
393
  alm.button_loading_label = false;
394
  }
395
+
396
+
397
+ /* Button Class */
398
  if (alm.content.attr('data-button-class') === undefined){
399
  alm.button_class = '';
400
  }else{
401
  alm.button_class = ' ' + alm.content.attr('data-button-class');
402
  }
403
+
404
 
405
  /* Define scroll event */
406
  if (alm.content.attr('data-scroll') === undefined){
410
  }else{
411
  alm.scroll = true;
412
  }
 
413
 
414
+
415
+ /* Parse multiple Post Types */
416
  alm.post_type = alm.content.attr('data-post-type');
417
  alm.post_type = alm.post_type.split(",");
418
+
419
+
420
  /* Sticky Posts */
421
  alm.sticky_posts = alm.content.attr('data-sticky-posts');
422
+
423
 
424
  /* Append 'load More' button to .ajax-load-more-wrap */
425
  alm.container.append('<div class="' + alm.prefix + 'btn-wrap"/>');
426
  alm.btnWrap = $('.' + alm.prefix + 'btn-wrap', alm.container);
427
+
428
+ if(alm.paging){
429
+
430
+ // Paging add-on
431
  alm.content.parent().addClass('loading'); // add loading class to main container
432
+
433
+ }else{
434
+
435
+ // If paging is false
436
  $('.'+ alm.prefix + 'btn-wrap', alm.container).append('<button id="load-more" class="' + alm.prefix + 'load-more-btn more'+ alm.button_class +'">' + alm.button_label + '</button>');
437
  alm.button = $('.alm-load-more-btn', alm.container);
438
  }
440
 
441
 
442
  /* loadPosts()
443
+ *
444
  * The function to get posts via Ajax
445
  * @since 2.0.0
446
  */
447
+
448
+ alm.AjaxLoadMore.loadPosts = function () {
449
  if(!alm.disable_ajax){ // Check for ajax blocker
450
  if(!alm.paging){
451
  alm.button.addClass('loading');
452
+ alm.container.addClass('alm-loading');
453
  if(alm.button_loading_label !== false){
454
  alm.button.text(alm.button_loading_label);
455
  }
456
  }
457
+ alm.loading = true;
458
+
459
  // If cache = true && cache_logged_in setting is false
460
  if(alm.cache === 'true' && !alm.cache_logged_in){
461
+
462
  var cache_page;
463
+
464
+ if(alm.init && alm.seo && alm.isPaged){
465
  // SEO Add-on
466
  // If the request a paged URL (/page/3/)
467
+ var firstpage = '1';
468
+ cache_page = alm.cache_path + alm.cache_id + '/page-' + firstpage +'-'+ alm.start_page +'.html';
469
+ }
470
+
471
  else if(alm.nextpage){
472
  // Nextpage add-on
473
  var nextpage_cache_page;
474
+ if(alm.paging){
475
  nextpage_cache_page = parseInt(alm.page) + 1;
476
  }else{
477
  nextpage_cache_page = parseInt(alm.page) + 2;
478
  if(alm.isPaged){
479
+ // If the request a paged URL (/page/3/)
480
  nextpage_cache_page = parseInt(alm.page) + parseInt(alm.nextpage_startpage) + 1;
481
  }
482
  }
483
+ cache_page = alm.cache_path + alm.cache_id + '/page' +'-'+ nextpage_cache_page +'.html';
484
+ }
485
+
486
+ else if(alm.previous_post){
487
+ // Previous Post
488
+ cache_page = alm.cache_path + alm.cache_id + '/' + alm.previous_post_slug +'.html';
489
  }
490
+
491
+ else {
492
+ // Standard ALM URL request
493
+ cache_page = alm.cache_path + alm.cache_id + '/page-' + (alm.page + 1) +'.html';
494
  }
495
+
496
+ $.get(cache_page, function( data ) {
497
+ alm.AjaxLoadMore.success(data, true); // data contains whatever the request has returned
498
+ }).fail(function() {
499
+ alm.AjaxLoadMore.ajax('standard');
500
  });
501
+
502
  } else { // Standard ALM query
503
+
504
  alm.AjaxLoadMore.ajax('standard');
505
+
506
  }
507
  }
508
+
509
  };
510
+
511
+
512
+
513
  /* ajax()
514
+ *
515
  * Ajax Load Moe Ajax function
516
  *
517
  * @param queryType The type of Ajax request (standard/totalposts)
518
  * @since 2.6.0
519
  */
520
+
521
  alm.AjaxLoadMore.ajax = function (queryType) {
522
+
523
  // Default action
524
  var action = 'alm_query_posts';
525
+
526
+
527
  // ACF Params
528
+ if(alm.acf){
529
+
530
+ // Custom query for the Repeater / Gallery / Flexible Content field types
531
+ if(alm.acf_field_type !== 'relationship'){
532
  action = 'alm_acf_query';
533
+ }
534
  alm.acf_array = {
535
  'acf' : 'true',
536
  'post_id' : alm.acf_post_id,
538
  'field_name' : alm.acf_field_name
539
  };
540
  }
541
+
542
+
543
  // Nextpage Params
544
+ if(alm.nextpage){
545
  action = 'alm_nextpage_query';
546
  alm.nextpage_array = {
547
  'nextpage' : 'true',
552
  'startpage' : alm.nextpage_startpage
553
  };
554
  }
555
+
556
+
557
  // Previous Post Params
558
  if(alm.previous_post){
559
+ alm.previous_post_array = {
560
+ 'previous_post' : 'true',
561
+ 'id' : alm.previous_post_id,
562
+ 'slug' : alm.previous_post_slug,
563
+ };
564
  }
565
+
566
+
567
+ // Comment query
568
  if(alm.comments === 'true'){
569
  action = 'alm_comments_query';
570
+ alm.posts_per_page = alm.comments_per_page;
571
  alm.comments_array = {
572
  'comments': 'true',
573
  'post_id': alm.comments_post_id,
576
  'style': alm.comments_style,
577
  'template': alm.comments_template,
578
  'callback': alm.comments_callback,
579
+ };
580
  }
581
+
582
+
583
+ // CTA Add-on Query params
584
+ if(alm.cta === 'true'){
585
+ alm.cta_array = {
586
  'cta': 'true',
587
  'cta_position': alm.cta_position,
588
  'cta_repeater': alm.cta_repeater,
589
  'cta_theme_repeater': alm.cta_theme_repeater,
590
+ };
591
  }
592
+
593
+
594
  // REST API
595
  if(alm.restapi){
596
  var alm_template = wp.template(alm.restapi_template_id),
601
  offset : alm.offset,
602
  slug : alm.slug,
603
  canonical_url : alm.canonical_url,
604
+ post_type : alm.post_type,
605
  post_format : alm.content.attr('data-post-format'),
606
  category : alm.content.attr('data-category'),
607
  category__not_in : alm.content.attr('data-category-not-in'),
614
  meta_key : alm.content.attr('data-meta-key'),
615
  meta_value : alm.content.attr('data-meta-value'),
616
  meta_compare : alm.content.attr('data-meta-compare'),
617
+ meta_relation : alm.content.attr('data-meta-relation'),
618
  meta_type : alm.content.attr('data-meta-type'),
619
  author : alm.content.attr('data-author'),
620
  year : alm.content.attr('data-year'),
632
  preloaded_amount : alm.preloaded_amount,
633
  seo_start_page : alm.start_page,
634
  id : el.attr('data-id')
635
+ };
636
+
637
+ $.ajax({
638
  type : "GET",
639
  url : rest_url,
640
+ data: rest_data,
641
+ dataType: "JSON",
642
  beforeSend: function () {
643
  if (alm.page != 1 && !alm.paging) {
644
  alm.button.addClass('loading');
645
  }
646
+ },
647
+ success: function (results) {
648
  var data,
649
  html = results.html,
650
  meta = results.meta,
651
  postcount = meta.postcount,
652
  totalposts = meta.totalposts;
653
+
654
  // loop results to get data from each
655
+ $.each(html, function(e){
656
+ var result = html[e];
657
  if(alm.restapi_debug === 'true'){ // If debug
658
  console.log(result);
659
+ }
660
+ data += alm_template(result);
661
+ });
662
+
663
  // Create object to pass to success()
664
  var obj = {
665
+ 'html' : data,
666
  'meta' : {
667
  'postcount' : postcount,
668
  'totalposts' : totalposts
669
  },
670
+ }
671
+ alm.AjaxLoadMore.success(obj, false); // Send data
672
+ }
673
+ });
674
  }
675
+
676
  // Standard ALM
677
  else {
678
  $.ajax({
679
  type: "GET",
680
  url: alm_localize.ajaxurl,
681
  dataType: "JSON",
682
+ data: {
683
  action : action,
684
  query_type : queryType,
685
  nonce : alm_localize.alm_nonce,
691
  cta : alm.cta_array,
692
  comments : alm.comments_array,
693
  post_type : alm.post_type,
694
+ sticky_posts : alm.sticky_posts,
695
  post_format : alm.content.attr('data-post-format'),
696
  category : alm.content.attr('data-category'),
697
  category__not_in : alm.content.attr('data-category-not-in'),
704
  meta_key : alm.content.attr('data-meta-key'),
705
  meta_value : alm.content.attr('data-meta-value'),
706
  meta_compare : alm.content.attr('data-meta-compare'),
707
+ meta_relation : alm.content.attr('data-meta-relation'),
708
  meta_type : alm.content.attr('data-meta-type'),
709
  author : alm.content.attr('data-author'),
710
  year : alm.content.attr('data-year'),
725
  preloaded_amount : alm.preloaded_amount,
726
  seo_start_page : alm.start_page,
727
  paging : alm.paging,
728
+ previous_post : alm.previous_post_array,
 
 
729
  lang : alm.lang,
730
  slug : alm.slug,
731
  canonical_url : alm.canonical_url,
732
  id : el.attr('data-id')
733
  },
734
+
735
  beforeSend: function () {
736
  if (alm.page != 1 && !alm.paging) {
737
  alm.button.addClass('loading');
738
  }
739
  },
740
+
741
  success: function (data) {
742
  //console.log(data);
743
  if(queryType === 'standard'){
745
  }
746
  else if(queryType === 'totalpages' && alm.paging && alm.nextpage){
747
  // Next Page and Paging
748
+ if($.isFunction($.fn.almBuildPagination)){
749
  $.fn.almBuildPagination(data, alm);
750
+ }
751
  }
752
+ else if(queryType === 'totalposts' && alm.paging){
753
+ // Paging
754
+ if($.isFunction($.fn.almBuildPagination)){
755
  $.fn.almBuildPagination(data, alm);
756
  }
757
+ }
758
+
759
  },
760
+
761
  error: function (jqXHR, textStatus, errorThrown) {
762
  alm.AjaxLoadMore.error(jqXHR, textStatus, errorThrown);
763
  }
764
+
765
  });
766
+ }
767
+ };
768
+
769
+
770
+
771
  // If pagination enabled, run totalposts query
772
+ if(alm.paging){
773
+ if(alm.nextpage){
774
+ alm.AjaxLoadMore.ajax('totalpages'); // Create paging menu and query for total pages
775
+ } else {
776
+ alm.AjaxLoadMore.ajax('totalposts'); // Create paging menu and query for total posts
777
+ }
778
  }
779
+
780
+
781
+
782
  /* success()
783
+ *
784
  * Success function after loading data
785
  *
786
  * @param data The results of the Ajax request
787
  * @param is_cache Are results of the Ajax request coming from cache
788
  * @since 2.6.0
789
  */
790
+
791
+ alm.AjaxLoadMore.success = function (data, is_cache) {
792
+
793
+ if(alm.previous_post){ // Get previous page data
794
+ alm.AjaxLoadMore.getPreviousPost();
795
+ }
796
+
797
+ var html, meta, total;
798
+
799
+ if(is_cache){
800
  // If content is cached don't look for json data - we won't be querying the DB.
801
+ html = data;
802
+ }else{
803
+ // Standard ALM query results
804
  html = data.html;
805
  meta = data.meta;
806
+ alm.posts = alm.posts + meta.postcount;
807
+ total = meta.postcount;
808
  alm.totalposts = meta.totalposts;
809
  if(alm.preloaded === 'true'){
810
  alm.totalposts = alm.totalposts - alm.preloaded_amount;
811
+ }
812
  }
813
+
814
+ alm.data = $(html); // data converted to an object
815
+
816
  if(is_cache){ // If cache, get the length of the data object
817
+ total = alm.data.length;
818
  }
819
+
820
  // First Run
821
+ if (alm.init) {
822
+
823
+ if(!alm.paging){
824
+ alm.button.text(alm.button_label);
825
+ } else {
826
  // Is pagination
827
+ if (total > 0) {
828
  alm.el = $('<div class="alm-reveal"/>');
829
  alm.el.append('<div class="alm-paging-content"></div><div class="alm-paging-loading"></div>');
830
  $('.alm-paging-content', alm.el).append(alm.data).hide();
831
+ alm.content.append(alm.el);
832
+ alm.content.parent().removeClass('loading'); // Remove loading class from main container
833
  alm.AjaxLoadMore.resetBtnText();
834
+
835
+ $('.alm-paging-content', alm.el).fadeIn( alm.speed, 'alm_easeInOutQuad', function(){
836
  var paddingT = parseInt(alm.content.css('padding-top')),
837
+ paddingB = parseInt(alm.content.css('padding-bottom'));
838
  alm.content.css('height', alm.el.height() + paddingT + paddingB + 'px');
839
  if ($.isFunction($.fn.almFadePageControls)){
840
+ $.fn.almFadePageControls(alm.btnWrap);
841
  }
842
  });
843
+ }
844
  }
845
+
846
  // ALM Empty
847
  if(total === 0){
848
  if ($.isFunction($.fn.almEmpty)) {
849
  $.fn.almEmpty(alm);
850
  }
851
  }
852
+
853
  // isPaged
854
+ if(alm.isPaged){
855
  alm.posts_per_page = alm.content.attr('data-posts-per-page'); // Reset our posts per page variable
856
  alm.page = alm.start_page - 1; // Set our new page #
857
+ }
858
+
859
+ }
860
+
861
+
862
  if (total > 0) {
863
+
864
  // Results!
865
  if(!alm.paging){
866
+
867
+ if(alm.previous_post){ // If Previous Post, create container and append data
868
+
869
+ alm.el = $('<div class="alm-reveal alm-previous-post post-'+alm.previous_post_id+'" data-id="'+alm.previous_post_id+'" data-title="'+alm.previous_post_title+'" data-url="'+alm.previous_post_permalink+'" data-page="'+alm.page+'"/>');
870
+ alm.el.append(alm.data).hide();
871
+
872
  } else {
873
+
874
+ if(!alm.transition_container){
875
  // No transiton container
876
+
877
  alm.data.hide();
878
  alm.el = alm.data;
879
+
880
+ } else {
881
  // Standard container
882
+
883
  // SEO
884
  if (alm.init && alm.start_page > 1){
885
  // loop through items and break into separate alm-reveal divs for paging
886
+
887
  var data = [],
888
  posts_per_page = parseInt(alm.posts_per_page);
889
+
890
  if(alm.cta === 'true'){
891
  // If CTA, +1 to posts_per_page to offset the CTA template and correct the display
892
+ posts_per_page = posts_per_page + 1;
893
+ }
894
+
895
  var pages = Math.ceil(total/posts_per_page); // slice data array into pages
896
  for (var i = 0; i < total; i += posts_per_page) {
897
  data.push(alm.data.slice(i, posts_per_page + i));
898
+ }
899
+
900
  alm.el = alm.content; // Set alm.el to be alm-listing div
901
  for (var k = 0; k < data.length; k++){
902
+
903
  var p = 0; // Add 1 page if items are preloaded.
904
  if(alm.preloaded === 'true'){
905
  p = 1;
906
  }
907
+
908
  var div;
909
+ if(k > 0 || alm.preloaded === 'true'){ // > Paged
910
  var pagenum = (k + 1 + p);
911
  if(alm.permalink === 'default'){
912
+ div = $('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+''+ alm.search_value +'&paged='+ pagenum+'" data-page="'+ pagenum +'" />');
913
  }else{
914
  div = $('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+'page/'+ pagenum +'/'+ alm.search_value +'" data-page="'+ pagenum +'" />');
915
+ }
916
  }else{ // First Page
917
  div = $('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+''+ alm.search_value +'" data-page="1" />');
918
  }
919
  div.append(data[k]);
920
  div = $(div); // convert to object
921
  alm.el.append(div).hide(); // Add data to .alm-listing wrapper
922
+ }
923
  }
924
  // End SEO -- /
925
+
926
  else {
927
  // If is SEO and paged, or preloaded.
928
  if(alm.seo && alm.page > 0 || alm.preloaded === 'true'){
929
+
930
  var p = 0; // Add 1 page if items are preloaded.
931
  if(alm.preloaded === 'true'){
932
  p = 1;
935
  var pagenum = (alm.page + 1 + p);
936
  if(alm.seo){
937
  if(alm.permalink === 'default'){
938
+ alm.el = $('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+''+ alm.search_value +'&paged='+ pagenum+'" data-page="'+ pagenum +'" />');
939
  }else{
940
  alm.el = $('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+'page/'+ pagenum +'/'+ alm.search_value +'" data-page="'+ pagenum +'" />');
941
+ }
942
  }else{
943
  // Basic ALM
944
+ alm.el = $('<div class="alm-reveal" />');
945
+ }
946
+
947
+ }else{
948
  if(alm.seo){
949
  // SEO [Page 1]
950
+ alm.el = $('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+''+ alm.search_value +'" data-page="1" />');
951
  }else{
952
  // Basic ALM
953
+ alm.el = $('<div class="alm-reveal" />');
954
  }
955
+ }
956
+
957
+ alm.el.append(alm.data).hide();
958
  }
959
+ }
960
  }
961
+
962
+ // Append alm.el to ALM container
963
  alm.content.append(alm.el);
964
+
965
  // Transition
966
  if (alm.transition === 'fade') { // Fade
967
  if(alm.images_loaded === 'true'){
970
  alm.loading = false;
971
  if(!alm.paging){
972
  alm.button.delay(alm.speed).removeClass('loading');
973
+ alm.container.delay(alm.speed).removeClass('alm-loading');
974
  alm.AjaxLoadMore.resetBtnText();
975
  }
976
  alm.AjaxLoadMore.triggerAddons(alm);
983
  alm.button.delay(alm.speed).removeClass('loading');
984
  alm.container.delay(alm.speed).removeClass('loading');
985
  alm.AjaxLoadMore.resetBtnText();
986
+ }
987
  alm.AjaxLoadMore.triggerAddons(alm);
988
  });
989
  }
990
+
991
  }else if(alm.transition === 'none') { // None
992
  if(alm.images_loaded === 'true'){
993
  alm.el.almWaitForImages().done(function(){
994
+ alm.el.show();
995
  alm.AjaxLoadMore.triggerAddons(alm);
996
  });
997
  }else{
998
+ alm.el.show();
999
  alm.AjaxLoadMore.triggerAddons(alm);
1000
  }
1001
  alm.loading = false;
1003
  alm.button.delay(alm.speed).removeClass('loading');
1004
  alm.container.delay(alm.speed).removeClass('loading');
1005
  alm.AjaxLoadMore.resetBtnText();
1006
+ }
1007
+
1008
  }else { // Slide
1009
  if(alm.images_loaded === 'true'){
1010
  alm.el.almWaitForImages().done(function(){
1014
  alm.button.delay(alm.speed).removeClass('loading');
1015
  alm.container.delay(alm.speed).removeClass('loading');
1016
  alm.AjaxLoadMore.resetBtnText();
1017
+ }
1018
  alm.AjaxLoadMore.triggerAddons(alm);
1019
  });
1020
  });
1025
  alm.button.delay(alm.speed).removeClass('loading');
1026
  alm.container.delay(alm.speed).removeClass('loading');
1027
  alm.AjaxLoadMore.resetBtnText();
1028
+ }
1029
  alm.AjaxLoadMore.triggerAddons(alm);
1030
  });
1031
  }
1032
  }
1033
  // End Transition
1034
+
1035
+ } else {
1036
+
1037
+ // Paging
1038
+ if(!alm.init){
1039
  $('.alm-paging-content', alm.el).html('').append(alm.data).almWaitForImages().done(function(){ // Remove loading class and append data
1040
  $('.alm-paging-loading', alm.el).fadeOut(alm.speed); // Fade out loader
1041
  if ($.isFunction($.fn.almOnPagingComplete)){
1042
+ $.fn.almOnPagingComplete(alm);
1043
+ }
1044
  alm.AjaxLoadMore.triggerAddons(alm);
1045
  });
1046
  } else {
1047
  alm.AjaxLoadMore.triggerAddons(alm);
1048
+ }
1049
  // End Paging
1050
+
1051
+ }
1052
+
1053
+
1054
  // ALM Complete
1055
  if ($.isFunction($.fn.almComplete)) {
1056
  if(alm.images_loaded === 'true'){
1059
  });
1060
  }else{
1061
  $.fn.almComplete(alm);
1062
+ }
1063
+ }
1064
  // End ALM Complete
1065
+
1066
+
1067
  // ALM Done
1068
+ if(!alm.cache){
1069
+ // Not Cache & Previous Post
1070
+ if(alm.posts >= alm.totalposts && !alm.previous_post){
1071
  alm.AjaxLoadMore.triggerDone();
1072
+ }
1073
+ }else{ // Cache
1074
  if(total < alm.posts_per_page){
1075
  alm.AjaxLoadMore.triggerDone();
1076
+ }
1077
+ }
1078
+ // End ALM Done
1079
+
1080
+
1081
+ } else {
1082
+
1083
+ // No Results!
1084
  if(!alm.paging){
1085
  alm.button.delay(alm.speed).removeClass('loading').addClass('done');
1086
  alm.AjaxLoadMore.resetBtnText();
1087
+ }
1088
  alm.AjaxLoadMore.triggerDone(); // ALM Done
1089
+
1090
  }
1091
+
1092
+
1093
  // Destroy After
1094
  if (alm.destroy_after !== undefined && alm.destroy_after !== '') {
1095
+ var currentPage = alm.page + 1; // Add 1 because alm.page starts at 0
1096
  if(alm.preload){
1097
  currentPage++;
1098
+ }
1099
  if(currentPage == alm.destroy_after){ // - Disable ALM is page = alm.destroy_after value
1100
  alm.disable_ajax = true;
1101
  if(!alm.paging){
1104
  }
1105
  }
1106
  // End Destroy After
1107
+
1108
+ alm.init = false;
1109
+
1110
  };
1111
+
1112
+
1113
+
1114
  /* pagingPreloadedInit()
1115
+ *
1116
  * First run for Paging + Preloaded add-ons
1117
  * Moves preloaded content into ajax container
1118
  *
1119
  * @param data The results of the Ajax request
1120
  * @since 2.11.3
1121
+ */
1122
  alm.AjaxLoadMore.pagingPreloadedInit = function(data){
1123
+
1124
  alm.el = $('<div class="alm-reveal"/>');
1125
  alm.el.append('<div class="alm-paging-content">'+data+'</div><div class="alm-paging-loading"></div>');
1126
+ alm.content.append(alm.el);
1127
+ alm.content.parent().removeClass('loading'); // Remove loading class from main container
1128
  alm.AjaxLoadMore.resetBtnText();
1129
+
1130
  var paddingT = parseInt(alm.content.css('padding-top')),
1131
+ paddingB = parseInt(alm.content.css('padding-bottom'));
1132
  alm.content.css('height', alm.el.height() + paddingT + paddingB + 'px');
1133
+
1134
  if ($.isFunction($.fn.almFadePageControls)){
1135
+ $.fn.almFadePageControls(alm.btnWrap);
1136
  }
1137
  }
1138
+
1139
+
1140
+
1141
  /* pagingNextpageInit()
1142
+ *
1143
  * First run for Paging + Next Page add-ons
1144
  * Moves .alm-nextpage content into ajax container
1145
  *
1146
  * @param data The results of the Ajax request
1147
  * @since 2.14.0
1148
+ */
1149
  alm.AjaxLoadMore.pagingNextpageInit = function(data){
1150
  alm.el = $('<div class="alm-reveal alm-nextpage"/>');
1151
  alm.el.append('<div class="alm-paging-content">'+data+'</div><div class="alm-paging-loading"></div>');
1152
+ alm.el.appendTo(alm.content);
1153
+ alm.content.parent().removeClass('loading'); // Remove loading class from main container
1154
  alm.AjaxLoadMore.resetBtnText();
1155
+
1156
  var paddingT = parseInt(alm.content.css('padding-top')),
1157
+ paddingB = parseInt(alm.content.css('padding-bottom'));
1158
  alm.content.css('height', alm.el.height() + paddingT + paddingB + 'px');
1159
+
1160
  if ($.isFunction($.fn.almSetNextPageVars)){
1161
  $.fn.almSetNextPageVars(alm); // Next Page Add-on
1162
  }
1163
+
1164
  // Delay the following to avoid positioning
1165
+ setTimeout(function(){
1166
  if ($.isFunction($.fn.almFadePageControls)){
1167
+ $.fn.almFadePageControls(alm.btnWrap); // Paging Add-on
1168
+ }
1169
+
1170
+ if ($.isFunction($.fn.almOnWindowResize)){
1171
  $.fn.almOnWindowResize(alm); // Paging Add-on
1172
+ }
1173
  }, 200);
1174
  }
1175
+
1176
+
1177
+
1178
+
1179
  /* getPreviousPost()
1180
+ *
1181
  * Get the previous post ID via ajax
1182
  * @since 2.7.4
1183
  */
1184
  alm.fetchingPreviousPost = false;
1185
+
1186
  alm.AjaxLoadMore.getPreviousPost = function () {
1187
  alm.fetchingPreviousPost = true;
1188
  $.ajax({
1195
  taxonomy: alm.previous_post_taxonomy
1196
  },
1197
  success: function (data) {
1198
+ if(data.has_previous_post){
1199
  alm.content.attr('data-previous-post-id', data.prev_id); // update previous-post-id on ALM element
1200
+ alm.previous_post_id = data.prev_id;
1201
+ alm.previous_post_permalink = data.prev_permalink;
1202
+ alm.previous_post_title = data.prev_title;
1203
+ alm.previous_post_slug = data.prev_slug;
1204
+
1205
  }else{
1206
  if(!data.has_previous_post){
1207
  alm.AjaxLoadMore.triggerDone();
1208
  }
1209
+ }
1210
+ if($.isFunction($.fn.almSetPreviousPost)){
1211
  $.fn.almSetPreviousPost(alm, data.current_id, data.permalink, data.title);
1212
+ }
1213
  alm.fetchingPreviousPost = false;
1214
  },
1215
  error: function (jqXHR, textStatus, errorThrown) {
1216
  alm.AjaxLoadMore.error(jqXHR, textStatus, errorThrown);
1217
  alm.fetchingPreviousPost = false;
1218
  }
1219
+
1220
  });
1221
  };
1222
+
1223
+
1224
+
1225
  /* loadComplete()
1226
+ *
1227
  * Fires various add-on functions (if available) after load complete.
1228
  * @since 2.14.0
1229
  */
1230
  alm.AjaxLoadMore.triggerAddons = function(alm){
1231
  if ($.isFunction($.fn.almSEO) && alm.seo) {
1232
  $.fn.almSEO(alm);
1233
+ }
1234
  if($.isFunction($.fn.almSetNextPage)){
1235
  $.fn.almSetNextPage(alm);
1236
  }
1237
  };
1238
+
1239
+
1240
+
1241
  /* triggerDone()
1242
+ *
1243
  * Fires the almDone() function (if available).
1244
  * @since 2.11.3
1245
  */
1251
  }
1252
  if ($.isFunction($.fn.almDone)) {
1253
  // Delay done until after animation
1254
+ setTimeout(function(){
1255
+ $.fn.almDone(alm)
1256
+ }, alm.speed + 10);
1257
+ }
1258
  };
1259
+
1260
+
1261
+
1262
  /* resetBtnText()
1263
+ *
1264
  * Resets the loading button text after loading has completed
1265
  * @since 2.8.4
1266
  */
1267
  alm.AjaxLoadMore.resetBtnText = function(){
1268
+
1269
+ if(alm.button_loading_label !== false){ // Reset button text
1270
  if(!alm.paging){
1271
+ alm.button.text(alm.button_label);
1272
  }
1273
+ }
1274
+
1275
  };
1276
+
1277
+
1278
+
1279
  /* error()
1280
+ *
1281
  * Error function after failed data
1282
  * @since 2.6.0
1283
  */
1284
+
1285
  alm.AjaxLoadMore.error = function (jqXHR, textStatus, errorThrown) {
1286
  alm.loading = false;
1287
  if(!alm.paging){
1290
  }
1291
  console.log(errorThrown);
1292
  };
1293
+
1294
+
1295
 
1296
  /* Button onClick()
1297
+ *
1298
  * Load more button click event
1299
  * @since 1.0.0
1300
  */
1301
+
1302
  if(!alm.paging && !alm.fetchingPreviousPost){
1303
  alm.button.on('click', function () {
1304
  if (alm.pause === 'true') {
1313
  }
1314
  });
1315
  }
1316
+
1317
+
1318
+
1319
  /* Window Resize
1320
+ *
1321
  * Add resize function for Paging add-on only.
1322
  * @since 2.1.2
1323
  */
1324
  if(alm.paging){
1325
+
1326
  alm.window.bind('resizeEnd', function() {
1327
  if ($.isFunction($.fn.almOnWindowResize)){
1328
+ $.fn.almOnWindowResize(alm);
1329
+ }
1330
+ });
1331
+
1332
  alm.window.resize(function() {
1333
  if(this.resizeTO){
1334
  clearTimeout(this.resizeTO);
1336
  this.resizeTO = setTimeout(function() {
1337
  $(this).trigger('resizeEnd');
1338
  }, 250);
1339
+ });
1340
+
1341
  }
1342
 
1343
 
1344
 
1345
  /* alm.AjaxLoadMore.isVisible()
1346
+ *
1347
  * Check to see if element is visible before loading posts
1348
  * @since 2.1.2
1349
  */
1350
+
1351
  alm.AjaxLoadMore.isVisible = function () {
1352
  alm.visible = false;
1353
  if (alm.el.is(":visible")) {
1355
  }
1356
  return alm.visible;
1357
  };
1358
+
1359
+
1360
 
1361
  /* Window scroll and touchmove events
1362
+ *
1363
  * Load posts as user scrolls the page
1364
  * @since 1.0
1365
  */
1366
  if (alm.scroll && !alm.paging) {
1367
  alm.window.bind("scroll touchstart", function () {
1368
+ if (alm.AjaxLoadMore.isVisible() && !alm.fetchingPreviousPost) {
1369
  var content_offset = alm.button.offset(),
1370
+ top = Math.round(content_offset.top - (alm.window.height() - alm.scroll_distance));
1371
+
1372
+ // If Pause && Pause Override
1373
+ if(!alm.loading && !alm.finished && (alm.window.scrollTop() >= top) && alm.page < (alm.max_pages - 1) && alm.proceed && alm.pause === 'true' && alm.pause_override === 'true'){
1374
+ alm.button.trigger('click');
1375
  }
1376
+
1377
+ // Standard Scroll event
1378
+ else{
1379
+ if (!alm.loading && !alm.finished && (alm.window.scrollTop() >= top) && alm.page < (alm.max_pages - 1) && alm.proceed && alm.pause !== 'true') {
1380
  alm.page++;
1381
+ alm.AjaxLoadMore.loadPosts();
1382
  }
1383
+ }
1384
  }
1385
  });
1386
  }
1387
+
1388
+
1389
 
1390
  /* Init Ajax load More
1391
+ *
1392
  * Load posts as user scrolls the page
1393
  * @since 2.0
1394
  */
1397
  if(alm.disable_ajax){
1398
  alm.finished = true;
1399
  alm.button.addClass('done');
1400
+
1401
  }else{
1402
  if (alm.pause === 'true') {
1403
+ alm.button.text(alm.button_label);
1404
  alm.loading = false;
1405
  } else {
1406
  alm.AjaxLoadMore.loadPosts();
1417
  // triggerDone is total equals total-pages
1418
  var alm_nextpage_pages = $('.alm-nextpage').length,
1419
  alm_nextpage_total = $('.alm-nextpage').eq(0).data('total-pages');
1420
+
1421
  if(alm_nextpage_pages == alm_nextpage_total){
1422
  alm.AjaxLoadMore.triggerDone();
1423
  }
1425
  }
1426
  }
1427
  alm.AjaxLoadMore.init();
1428
+
1429
 
1430
 
1431
  //flag to prevent unnecessary loading of post on init. Hold for 3/10 of a second
1432
  setTimeout(function () {
1433
  alm.proceed = true;
1434
  }, 300);
1435
+
1436
+
1437
+
1438
  /* $.fn.almUpdateCurrentPage()
1439
+ *
1440
  * Update current page - triggered from paging add-on
1441
  * @since 2.7.0
1442
  */
1443
+
1444
  $.fn.almUpdateCurrentPage = function(current, obj, alm){
1445
  alm.page = current;
1446
+
1447
  // Next Page add-on
1448
+ if(alm.nextpage && !alm.paging){
1449
+ alm.page = alm.page - 1; // Remove 1 from next page since it starts at 0
1450
  }
1451
+
1452
  var data = '';
1453
+
1454
  /*
1455
  Paging + Preloaded & Paging + Next Page
1456
  If is paging init and preloaded, grab preloaded data, and append it .alm-reveal
1457
  */
1458
+
1459
+ if(alm.paging_init && alm.preloaded === 'true'){
1460
+
1461
+ // Paging + Preloaded Firstrun
1462
  data = $('.alm-preloaded .alm-reveal', alm.el).html(); // Content of preloaded page
1463
  $('.alm-preloaded', alm.el).remove();
1464
+ alm.preloaded_amount = 0; // Reset
1465
  //alm.AjaxLoadMore.success(data, true); // Skip post loading and go right to success() for display
1466
  alm.AjaxLoadMore.pagingPreloadedInit(data);
1467
  alm.paging_init = false;
1468
+ alm.init = false;
1469
+
1470
  }
1471
+ else if(alm.paging_init && alm.nextpage){
1472
+
1473
  // Paging + Next Page Firstrun
1474
  data = $('.alm-nextpage', alm.el).html();
1475
  $('.alm-nextpage', alm.el).remove();
1476
  alm.AjaxLoadMore.pagingNextpageInit(data);
1477
  alm.paging_init = false;
1478
  alm.init = false;
1479
+
1480
+ }
1481
+ else{
1482
+
1483
  // Standard Paging
1484
+ alm.AjaxLoadMore.loadPosts();
1485
+
1486
  }
1487
+ };
1488
+
1489
+
1490
+
1491
+ /* $.fn.almGetParentContainer()
1492
+ *
1493
  * return the parent ALM container
1494
  *
1495
  * @since 2.7.0
1496
  * @return element
1497
  */
1498
  $.fn.almGetParentContainer = function(){
1499
+ return alm.el.closest('#ajax-load-more');v
1500
  };
1501
+
1502
+
1503
+
1504
  /* $.fn.almGetObj()
1505
+ *
1506
  * return the current ALM obj
1507
  *
1508
  * @since 2.7.0
1511
  $.fn.almGetObj = function(){
1512
  return alm; // Return the entire alm object
1513
  };
1514
+
1515
+
1516
+
1517
  /* $.fn.almTriggerClick()
1518
+ *
1519
  * Trigger ajaxloadmore from any element on page
1520
  *
1521
  * @since 2.12.0
1524
  $.fn.almTriggerClick = function(){
1525
  alm.button.trigger('click');
1526
  };
1527
+
1528
 
1529
 
1530
  //Custom easing function
1532
  if ((t /= d / 2) < 1) { return c / 2 * t * t + b; }
1533
  return -c / 2 * ((--t) * (t - 2) - 1) + b;
1534
  };
1535
+
1536
  };
1537
 
1538
  // End $.ajaxloadmore
1539
+
1540
+
1541
+
1542
+
1543
  /* $.fn.almFilter(type, speed, data)
1544
+ *
1545
  * Filter Ajax Load More
1546
  * @type ('slide', 'fade', null);
1547
  * @speed '300';
1548
+ * @data obj;
1549
  *
1550
  * @since 2.6.1
1551
  */
1552
  $.fn.almFilter = function (transition, speed, data) {
1553
+
1554
  if(data.target){
1555
  // if a target has been specified
1556
+ $(".ajax-load-more-wrap[data-id='" + data.target + "']").each(function (e) {
1557
+ var el = $(this);
1558
  $.fn.almFilterTransition(transition, speed, data, el);
1559
  });
1560
  } else {
1565
  });
1566
  }
1567
  };
1568
+
1569
+
1570
  /* $.fn.almFilterTransition(transition, speed, data, el)
1571
+ *
1572
  * Transition Ajax Load More
1573
  *
1574
  * @since 2.13.1
1577
  if(transition === 'slide'){ // Slide transition
1578
  el.slideUp(speed, function(){
1579
  $('.alm-listing', el).html(''); // Clear listings
1580
+ $('.alm-btn-wrap', el).remove(); // remove buttons
1581
+ el.fadeIn(speed);
1582
+
1583
  $.fn.almSetFilters(el, data);
1584
+
1585
  });
1586
  }else if(transition === 'fade'){ // Fade transition
1587
  el.fadeOut(speed, function(){
1588
+ $('.alm-listing', el).html(''); // Clear listings
1589
+ $('.alm-btn-wrap', el).remove(); // remove buttons
1590
+ el.fadeIn(speed);
1591
+
1592
  $.fn.almSetFilters(el, data);
1593
+
1594
  });
1595
  }else{
1596
  $('.alm-listing', el).html(''); // Clear listings
1597
+ $('.alm-btn-wrap', el).remove(); // remove buttons
1598
+ el.fadeIn(speed);
1599
+
1600
  $.fn.almSetFilters(el, data);
1601
+
1602
  }
1603
  };
1604
+
1605
+
1606
  /* $.fn.almSetFilters(el, data)
1607
+ *
1608
  * Set filter parameters on .alm-listing element
1609
  *
1610
  * @since 2.6.1
1614
  key = key.replace(/\W+/g, '-').replace(/([a-z\d])([A-Z])/g, '$1-$2'); // Convert camelCase data() object back to dash (-)
1615
  $('.alm-listing', el).attr('data-'+key, value);
1616
  });
1617
+
1618
  if ($.isFunction($.fn.almFilterComplete)){
1619
  $.fn.almFilterComplete();
1620
  }
1621
+
1622
  if(data.target){
1623
  // if a target has been specified
1624
+ $(".ajax-load-more-wrap[data-id="+data.target+"]").ajaxloadmore(); // re-initiate Ajax Load More
1625
  } else {
1626
  // Target not specified
1627
+ $(".ajax-load-more-wrap").ajaxloadmore(); // re-initiate Ajax Load More
1628
  }
1629
  };
1630
+
1631
+
1632
 
1633
  /* $.fn.ajaxloadmore()
1634
+ *
1635
  * Initiate all instances of Ajax load More
1636
  * @since 2.1.2
1637
  */
1640
  $(this).data('alm', new $.ajaxloadmore($(this), e));
1641
  });
1642
  };
 
 
1643
 
1644
+
1645
+
1646
+ /*
1647
  * Initiate Ajax load More if div is present on screen
1648
  * @since 2.1.2
1649
  */
1650
  if ($(".ajax-load-more-wrap").length){
1651
  $(".ajax-load-more-wrap").ajaxloadmore();
1652
  }
1653
+
1654
 
1655
  })(jQuery);
1656
 
1657
 
1658
 
1659
 
1660
+ /*! almWaitForImages
1661
  jQuery Plugin
1662
  v2.0.2
1663
  Based on https://github.com/alexanderdickson/almWaitForImages
core/js/ajax-load-more.min.js CHANGED
@@ -1,5 +1,6 @@
 
1
  (function($){"use strict";$.ajaxloadmore=function(el,e){if(alm_localize.scrolltop==='true'){$(window).scrollTop(0);}
2
- var alm=this;alm.AjaxLoadMore={};alm.page=0;alm.posts=0;alm.totalposts=0;alm.proceed=false;alm.disable_ajax=false;alm.init=true;alm.loading=true;alm.finished=false;alm.window=$(window);alm.button_label='';alm.data;alm.el=el;alm.container=el;alm.container.addClass('alm-'+e).attr('data-alm-id',e);alm.content=$('.alm-ajax',alm.container);alm.content_preloaded=$('.alm-listing.alm-preloaded',alm.container);alm.canonical_url=alm.el.attr('data-canonical-url');alm.is_search=alm.el.attr('data-search');alm.slug=alm.el.attr('data-slug');alm.post_id=alm.el.attr('data-post-id');alm.prefix='alm-';alm.cache=alm.content.attr('data-cache');alm.cache_id=alm.content.attr('data-cache-id');alm.cache_path=alm.content.attr('data-cache-path');alm.cache_logged_in=alm.content.attr('data-cache-logged-in');alm.repeater=alm.content.attr('data-repeater');alm.theme_repeater=alm.content.attr('data-theme-repeater');alm.scroll_distance=parseInt(alm.content.attr('data-scroll-distance'));alm.max_pages=parseInt(alm.content.attr('data-max-pages'));alm.pause_override=alm.content.attr('data-pause-override');alm.pause=alm.content.attr('data-pause');alm.transition=alm.content.attr('data-transition');alm.transition_container=alm.content.attr('data-transition-container');alm.speed=alm.content.attr('data-transition-speed');alm.images_loaded=alm.content.attr('data-images-loaded');alm.destroy_after=alm.content.attr('data-destroy-after');alm.lang=alm.content.attr('data-lang');alm.orginal_posts_per_page=alm.content.attr('data-posts-per-page');alm.posts_per_page=alm.content.attr('data-posts-per-page');alm.cta_array='';alm.cta=alm.content.attr('data-cta');alm.cta_position=alm.content.attr('data-cta-position');alm.cta_repeater=alm.content.attr('data-cta-repeater');alm.cta_theme_repeater=alm.content.attr('data-cta-theme-repeater');alm.acf_array='';alm.acf=alm.content.attr('data-acf');alm.acf_field_type=alm.content.attr('data-acf-field-type');alm.acf_field_name=alm.content.attr('data-acf-field-name');alm.acf_post_id=alm.content.attr('data-acf-post-id');alm.nextpage_array='';alm.nextpage=alm.content.attr('data-nextpage');alm.nextpage_urls=alm.content.attr('data-nextpage-urls');alm.nextpage_scroll=alm.content.attr('data-nextpage-scroll');alm.nextpage_pageviews=alm.content.attr('data-nextpage-pageviews');alm.nextpage_post_id=alm.content.attr('data-nextpage-post-id');alm.nextpage_startpage=alm.content.attr('data-nextpage-startpage');alm.previous_post=alm.content.attr('data-previous-post');alm.previous_post_id=alm.content.attr('data-previous-post-id');alm.previous_post_taxonomy=alm.content.attr('data-previous-post-taxonomy');alm.comments=alm.content.attr('data-comments');if(alm.comments==='true'){alm.content=$('.alm-comments',alm.container);}
3
  alm.comments_array='';alm.comments_post_id=alm.content.attr('data-comments_post_id');alm.comments_per_page=alm.content.attr('data-comments_per_page');alm.comments_type=alm.content.attr('data-comments_type');alm.comments_style=alm.content.attr('data-comments_style');alm.comments_template=alm.content.attr('data-comments_template');alm.comments_callback=alm.content.attr('data-comments_callback');alm.restapi=alm.content.attr('data-restapi');alm.restapi_base_url=alm.content.attr('data-restapi-base-url');alm.restapi_namespace=alm.content.attr('data-restapi-namespace');alm.restapi_endpoint=alm.content.attr('data-restapi-endpoint');alm.restapi_template_id=alm.content.attr('data-restapi-template-id');alm.restapi_debug=alm.content.attr('data-restapi-debug');alm.seo=alm.content.attr('data-seo');alm.preloaded=alm.content.attr('data-preloaded');alm.preloaded_amount=alm.content.attr('data-preloaded-amount');alm.paging=alm.content.attr('data-paging');alm.paging_controls=alm.content.attr('data-paging-controls');alm.paging_show_at_most=alm.content.attr('data-paging-show-at-most');alm.paging_classes=alm.content.attr('data-paging-classes');alm.paging_init=true;if(alm.restapi==='true'){alm.restapi=true;if(alm.restapi_debug===undefined){alm.restapi_debug=false;}
4
  if(alm.restapi_template_id===''){alm.restapi=false;}}else{alm.restapi=false;}
5
  if(alm.paging==='true'){alm.paging=true;if(alm.paging_show_at_most===undefined){alm.paging_show_at_most=7;}
@@ -24,7 +25,7 @@ if(alm.nextpage_startpage===undefined){alm.nextpage_startpage=1;}
24
  if(alm.nextpage_startpage>1){alm.isPaged=true;}
25
  if(alm.acf==='true'){alm.acf=true;}else{alm.acf=false;}
26
  if(alm.acf_field_type===undefined||alm.acf_field_name===undefined||alm.acf_post_id===undefined){alm.acf=false;}
27
- if(alm.previous_post==='true'){alm.previous_post=true;alm.previous_post_permalink='';alm.previous_post_title='';}else{alm.previous_post=false;}
28
  if(alm.previous_post_id===undefined){alm.previous_post_id='';}
29
  if(alm.previous_post_taxonomy===undefined){alm.previous_post_taxonomy='';}
30
  alm.previous_post_title_template=alm.content.attr('data-previous-post-title-template');alm.siteTitle=alm.content.attr('data-previous-post-site-title');alm.siteTagline=alm.content.attr('data-previous-post-site-tagline');alm.previous_post_pageview=alm.content.attr('data-previous-post-pageview');alm.previous_post_scroll=alm.content.attr('data-previous-post-scroll');alm.previous_post_scroll_speed=alm.content.attr('data-previous-post-scroll-speed');alm.previous_post_scroll_top=alm.content.attr('data-previous-post-scrolltop');if(alm.content.attr('data-offset')===undefined){alm.offset=0;}else{alm.offset=alm.content.attr('data-offset');}
@@ -36,7 +37,7 @@ if(alm.theme_repeater===undefined){alm.theme_repeater='null';}
36
  if(alm.max_pages===undefined){alm.max_pages=0;}
37
  if(alm.max_pages===0){alm.max_pages=10000;}
38
  if(alm.scroll_distance===undefined){alm.scroll_distance=150;}
39
- if(alm.transition===undefined){alm.transition='slide';}else if(alm.transition==="fade"){alm.transition='fade';}else if(alm.transition==="none"){alm.transition='none';}else{alm.transition='slide';}
40
  if(alm.speed===undefined){alm.speed=250;}else{alm.speed=parseInt(alm.speed);}
41
  if(alm.transition_container===undefined||alm.transition_container==='true'){alm.transition_container=true;}else{alm.transition_container=false;}
42
  if(alm.images_loaded===undefined){alm.images_loaded='false';}
@@ -47,20 +48,21 @@ if(alm.content.attr('data-button-class')===undefined){alm.button_class='';}else{
47
  if(alm.content.attr('data-scroll')===undefined){alm.scroll=true;}else if(alm.content.attr('data-scroll')==='false'){alm.scroll=false;}else{alm.scroll=true;}
48
  alm.post_type=alm.content.attr('data-post-type');alm.post_type=alm.post_type.split(",");alm.sticky_posts=alm.content.attr('data-sticky-posts');alm.container.append('<div class="'+alm.prefix+'btn-wrap"/>');alm.btnWrap=$('.'+alm.prefix+'btn-wrap',alm.container);if(alm.paging){alm.content.parent().addClass('loading');}else{$('.'+alm.prefix+'btn-wrap',alm.container).append('<button id="load-more" class="'+alm.prefix+'load-more-btn more'+alm.button_class+'">'+alm.button_label+'</button>');alm.button=$('.alm-load-more-btn',alm.container);}
49
  alm.AjaxLoadMore.loadPosts=function(){if(!alm.disable_ajax){if(!alm.paging){alm.button.addClass('loading');alm.container.addClass('alm-loading');if(alm.button_loading_label!==false){alm.button.text(alm.button_loading_label);}}
50
- alm.loading=true;if(alm.cache==='true'&&!alm.cache_logged_in){var cache_page;if(alm.init&&alm.seo&&alm.isPaged){var firstpage='1';cache_page=alm.cache_path+'/page-'+firstpage+'-'+alm.start_page+'.html';}
51
  else if(alm.nextpage){var nextpage_cache_page;if(alm.paging){nextpage_cache_page=parseInt(alm.page)+1;}else{nextpage_cache_page=parseInt(alm.page)+2;if(alm.isPaged){nextpage_cache_page=parseInt(alm.page)+parseInt(alm.nextpage_startpage)+1;}}
52
- cache_page=alm.cache_path+'/page'+'-'+nextpage_cache_page+'.html';}
53
- else{cache_page=alm.cache_path+'/page-'+(alm.page+1)+'.html';}
54
- $.get(cache_page,function(data){alm.AjaxLoadMore.success(data,true);}).fail(function(){alm.AjaxLoadMore.ajax('standard');});}else{alm.AjaxLoadMore.ajax('standard');}}};alm.AjaxLoadMore.ajax=function(queryType){var action='alm_query_posts';if(alm.acf){if(alm.acf_field_type==='repeater'){action='alm_acf_query';}
 
55
  alm.acf_array={'acf':'true','post_id':alm.acf_post_id,'field_type':alm.acf_field_type,'field_name':alm.acf_field_name};}
56
  if(alm.nextpage){action='alm_nextpage_query';alm.nextpage_array={'nextpage':'true','urls':alm.nextpage_urls,'scroll':alm.nextpage_scroll,'pageviews':alm.nextpage_pageviews,'post_id':alm.nextpage_post_id,'startpage':alm.nextpage_startpage};}
57
- if(alm.previous_post){alm.previous_post_id=alm.content.attr('data-previous-post-id');alm.previous_post_taxonomy=alm.content.attr('data-previous-post-taxonomy');}
58
  if(alm.comments==='true'){action='alm_comments_query';alm.posts_per_page=alm.comments_per_page;alm.comments_array={'comments':'true','post_id':alm.comments_post_id,'per_page':alm.comments_per_page,'type':alm.comments_type,'style':alm.comments_style,'template':alm.comments_template,'callback':alm.comments_callback,};}
59
  if(alm.cta==='true'){alm.cta_array={'cta':'true','cta_position':alm.cta_position,'cta_repeater':alm.cta_repeater,'cta_theme_repeater':alm.cta_theme_repeater,};}
60
  if(alm.restapi){var alm_template=wp.template(alm.restapi_template_id),rest_url=alm.restapi_base_url+'/'+alm.restapi_namespace+'/'+alm.restapi_endpoint,rest_data={posts_per_page:alm.posts_per_page,page:alm.page,offset:alm.offset,slug:alm.slug,canonical_url:alm.canonical_url,post_type:alm.post_type,post_format:alm.content.attr('data-post-format'),category:alm.content.attr('data-category'),category__not_in:alm.content.attr('data-category-not-in'),tag:alm.content.attr('data-tag'),tag__not_in:alm.content.attr('data-tag-not-in'),taxonomy:alm.content.attr('data-taxonomy'),taxonomy_terms:alm.content.attr('data-taxonomy-terms'),taxonomy_operator:alm.content.attr('data-taxonomy-operator'),taxonomy_relation:alm.content.attr('data-taxonomy-relation'),meta_key:alm.content.attr('data-meta-key'),meta_value:alm.content.attr('data-meta-value'),meta_compare:alm.content.attr('data-meta-compare'),meta_relation:alm.content.attr('data-meta-relation'),meta_type:alm.content.attr('data-meta-type'),author:alm.content.attr('data-author'),year:alm.content.attr('data-year'),month:alm.content.attr('data-month'),day:alm.content.attr('data-day'),post_status:alm.content.attr('data-post-status'),order:alm.content.attr('data-order'),orderby:alm.content.attr('data-orderby'),post__in:alm.content.attr('data-post-in'),post__not_in:alm.content.attr('data-post-not-in'),search:alm.content.attr('data-search'),custom_args:alm.content.attr('data-custom-args'),lang:alm.lang,preloaded:alm.preloaded,preloaded_amount:alm.preloaded_amount,seo_start_page:alm.start_page,id:el.attr('data-id')};$.ajax({type:"GET",url:rest_url,data:rest_data,dataType:"JSON",beforeSend:function(){if(alm.page!=1&&!alm.paging){alm.button.addClass('loading');}},success:function(results){var data,html=results.html,meta=results.meta,postcount=meta.postcount,totalposts=meta.totalposts;$.each(html,function(e){var result=html[e];if(alm.restapi_debug==='true'){console.log(result);}
61
  data+=alm_template(result);});var obj={'html':data,'meta':{'postcount':postcount,'totalposts':totalposts},}
62
  alm.AjaxLoadMore.success(obj,false);}});}
63
- else{$.ajax({type:"GET",url:alm_localize.ajaxurl,dataType:"JSON",data:{action:action,query_type:queryType,nonce:alm_localize.alm_nonce,cache_id:alm.cache_id,repeater:alm.repeater,theme_repeater:alm.theme_repeater,acf:alm.acf_array,nextpage:alm.nextpage_array,cta:alm.cta_array,comments:alm.comments_array,post_type:alm.post_type,sticky_posts:alm.sticky_posts,post_format:alm.content.attr('data-post-format'),category:alm.content.attr('data-category'),category__not_in:alm.content.attr('data-category-not-in'),tag:alm.content.attr('data-tag'),tag__not_in:alm.content.attr('data-tag-not-in'),taxonomy:alm.content.attr('data-taxonomy'),taxonomy_terms:alm.content.attr('data-taxonomy-terms'),taxonomy_operator:alm.content.attr('data-taxonomy-operator'),taxonomy_relation:alm.content.attr('data-taxonomy-relation'),meta_key:alm.content.attr('data-meta-key'),meta_value:alm.content.attr('data-meta-value'),meta_compare:alm.content.attr('data-meta-compare'),meta_relation:alm.content.attr('data-meta-relation'),meta_type:alm.content.attr('data-meta-type'),author:alm.content.attr('data-author'),year:alm.content.attr('data-year'),month:alm.content.attr('data-month'),day:alm.content.attr('data-day'),post_status:alm.content.attr('data-post-status'),order:alm.content.attr('data-order'),orderby:alm.content.attr('data-orderby'),post__in:alm.content.attr('data-post-in'),post__not_in:alm.content.attr('data-post-not-in'),exclude:alm.content.attr('data-exclude'),search:alm.content.attr('data-search'),custom_args:alm.content.attr('data-custom-args'),posts_per_page:alm.posts_per_page,page:alm.page,offset:alm.offset,preloaded:alm.preloaded,preloaded_amount:alm.preloaded_amount,seo_start_page:alm.start_page,paging:alm.paging,previous_post:alm.previous_post,previous_post_id:alm.previous_post_id,previous_post_taxonomy:alm.previous_post_taxonomy,lang:alm.lang,slug:alm.slug,canonical_url:alm.canonical_url,id:el.attr('data-id')},beforeSend:function(){if(alm.page!=1&&!alm.paging){alm.button.addClass('loading');}},success:function(data){if(queryType==='standard'){alm.AjaxLoadMore.success(data,false);}
64
  else if(queryType==='totalpages'&&alm.paging&&alm.nextpage){if($.isFunction($.fn.almBuildPagination)){$.fn.almBuildPagination(data,alm);}}
65
  else if(queryType==='totalposts'&&alm.paging){if($.isFunction($.fn.almBuildPagination)){$.fn.almBuildPagination(data,alm);}}},error:function(jqXHR,textStatus,errorThrown){alm.AjaxLoadMore.error(jqXHR,textStatus,errorThrown);}});}};if(alm.paging){if(alm.nextpage){alm.AjaxLoadMore.ajax('totalpages');}else{alm.AjaxLoadMore.ajax('totalposts');}}
66
  alm.AjaxLoadMore.success=function(data,is_cache){if(alm.previous_post){alm.AjaxLoadMore.getPreviousPost();}
@@ -69,7 +71,7 @@ alm.data=$(html);if(is_cache){total=alm.data.length;}
69
  if(alm.init){if(!alm.paging){alm.button.text(alm.button_label);}else{if(total>0){alm.el=$('<div class="alm-reveal"/>');alm.el.append('<div class="alm-paging-content"></div><div class="alm-paging-loading"></div>');$('.alm-paging-content',alm.el).append(alm.data).hide();alm.content.append(alm.el);alm.content.parent().removeClass('loading');alm.AjaxLoadMore.resetBtnText();$('.alm-paging-content',alm.el).fadeIn(alm.speed,'alm_easeInOutQuad',function(){var paddingT=parseInt(alm.content.css('padding-top')),paddingB=parseInt(alm.content.css('padding-bottom'));alm.content.css('height',alm.el.height()+paddingT+paddingB+'px');if($.isFunction($.fn.almFadePageControls)){$.fn.almFadePageControls(alm.btnWrap);}});}}
70
  if(total===0){if($.isFunction($.fn.almEmpty)){$.fn.almEmpty(alm);}}
71
  if(alm.isPaged){alm.posts_per_page=alm.content.attr('data-posts-per-page');alm.page=alm.start_page-1;}}
72
- if(total>0){if(!alm.paging){if(alm.previous_post){alm.el=$('<div class="alm-reveal alm-previous-post post-'+alm.previous_post_id+'" data-id="'+alm.previous_post_id+'" data-title="'+alm.previous_post_title+'" data-url="'+alm.previous_post_permalink+'"/>');alm.el.append(alm.data).hide();}else{if(!alm.transition_container){alm.data.hide();alm.el=alm.data;}else{if(alm.init&&alm.start_page>1){var data=[],posts_per_page=parseInt(alm.posts_per_page);if(alm.cta==='true'){posts_per_page=posts_per_page+1;}
73
  var pages=Math.ceil(total/posts_per_page);for(var i=0;i<total;i+=posts_per_page){data.push(alm.data.slice(i,posts_per_page+i));}
74
  alm.el=alm.content;for(var k=0;k<data.length;k++){var p=0;if(alm.preloaded==='true'){p=1;}
75
  var div;if(k>0||alm.preloaded==='true'){var pagenum=(k+1+p);if(alm.permalink==='default'){div=$('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+''+alm.search_value+'&paged='+pagenum+'" data-page="'+pagenum+'" />');}else{div=$('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+'page/'+pagenum+'/'+alm.search_value+'" data-page="'+pagenum+'" />');}}else{div=$('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+''+alm.search_value+'" data-page="1" />');}
@@ -93,7 +95,7 @@ alm.init=false;};alm.AjaxLoadMore.pagingPreloadedInit=function(data){alm.el=$('<
93
  alm.AjaxLoadMore.pagingNextpageInit=function(data){alm.el=$('<div class="alm-reveal alm-nextpage"/>');alm.el.append('<div class="alm-paging-content">'+data+'</div><div class="alm-paging-loading"></div>');alm.el.appendTo(alm.content);alm.content.parent().removeClass('loading');alm.AjaxLoadMore.resetBtnText();var paddingT=parseInt(alm.content.css('padding-top')),paddingB=parseInt(alm.content.css('padding-bottom'));alm.content.css('height',alm.el.height()+paddingT+paddingB+'px');if($.isFunction($.fn.almSetNextPageVars)){$.fn.almSetNextPageVars(alm);}
94
  setTimeout(function(){if($.isFunction($.fn.almFadePageControls)){$.fn.almFadePageControls(alm.btnWrap);}
95
  if($.isFunction($.fn.almOnWindowResize)){$.fn.almOnWindowResize(alm);}},200);}
96
- alm.fetchingPreviousPost=false;alm.AjaxLoadMore.getPreviousPost=function(){alm.fetchingPreviousPost=true;$.ajax({type:"GET",dataType:"JSON",url:alm_localize.ajaxurl,data:{action:'alm_query_previous_post',id:alm.previous_post_id,taxonomy:alm.previous_post_taxonomy},success:function(data){if(data.has_previous_post){alm.content.attr('data-previous-post-id',data.prev_id);alm.previous_post_permalink=data.prev_permalink;alm.previous_post_title=data.prev_title;}else{if(!data.has_previous_post){alm.AjaxLoadMore.triggerDone();}}
97
  if($.isFunction($.fn.almSetPreviousPost)){$.fn.almSetPreviousPost(alm,data.current_id,data.permalink,data.title);}
98
  alm.fetchingPreviousPost=false;},error:function(jqXHR,textStatus,errorThrown){alm.AjaxLoadMore.error(jqXHR,textStatus,errorThrown);alm.fetchingPreviousPost=false;}});};alm.AjaxLoadMore.triggerAddons=function(alm){if($.isFunction($.fn.almSEO)&&alm.seo){$.fn.almSEO(alm);}
99
  if($.isFunction($.fn.almSetNextPage)){$.fn.almSetNextPage(alm);}};alm.AjaxLoadMore.triggerDone=function(){alm.loading=false;alm.finished=true;if(!alm.paging){alm.button.addClass('done');}
@@ -111,7 +113,7 @@ if(alm.nextpage){if($('.alm-nextpage').length>1){var alm_nextpage_pages=$('.alm-
111
  alm.AjaxLoadMore.init();setTimeout(function(){alm.proceed=true;},300);$.fn.almUpdateCurrentPage=function(current,obj,alm){alm.page=current;if(alm.nextpage&&!alm.paging){alm.page=alm.page-1;}
112
  var data='';if(alm.paging_init&&alm.preloaded==='true'){data=$('.alm-preloaded .alm-reveal',alm.el).html();$('.alm-preloaded',alm.el).remove();alm.preloaded_amount=0;alm.AjaxLoadMore.pagingPreloadedInit(data);alm.paging_init=false;alm.init=false;}
113
  else if(alm.paging_init&&alm.nextpage){data=$('.alm-nextpage',alm.el).html();$('.alm-nextpage',alm.el).remove();alm.AjaxLoadMore.pagingNextpageInit(data);alm.paging_init=false;alm.init=false;}
114
- else{alm.AjaxLoadMore.loadPosts();}};$.fn.almGetParentContainer=function(){return alm.el.closest('#ajax-load-more');};$.fn.almGetObj=function(){return alm;};$.fn.almTriggerClick=function(){alm.button.trigger('click');};$.easing.alm_easeInOutQuad=function(x,t,b,c,d){if((t/=d/2)<1){return c/2*t*t+b;}
115
  return-c/2*((--t)*(t-2)-1)+b;};};$.fn.almFilter=function(transition,speed,data){if(data.target){$(".ajax-load-more-wrap[data-id='"+data.target+"']").each(function(e){var el=$(this);$.fn.almFilterTransition(transition,speed,data,el);});}else{$(".ajax-load-more-wrap").each(function(e){var el=$(this);$.fn.almFilterTransition(transition,speed,data,el);});}};$.fn.almFilterTransition=function(transition,speed,data,el){if(transition==='slide'){el.slideUp(speed,function(){$('.alm-listing',el).html('');$('.alm-btn-wrap',el).remove();el.fadeIn(speed);$.fn.almSetFilters(el,data);});}else if(transition==='fade'){el.fadeOut(speed,function(){$('.alm-listing',el).html('');$('.alm-btn-wrap',el).remove();el.fadeIn(speed);$.fn.almSetFilters(el,data);});}else{$('.alm-listing',el).html('');$('.alm-btn-wrap',el).remove();el.fadeIn(speed);$.fn.almSetFilters(el,data);}};$.fn.almSetFilters=function(el,data){$.each(data,function(key,value){key=key.replace(/\W+/g,'-').replace(/([a-z\d])([A-Z])/g,'$1-$2');$('.alm-listing',el).attr('data-'+key,value);});if($.isFunction($.fn.almFilterComplete)){$.fn.almFilterComplete();}
116
  if(data.target){$(".ajax-load-more-wrap[data-id="+data.target+"]").ajaxloadmore();}else{$(".ajax-load-more-wrap").ajaxloadmore();}};$.fn.ajaxloadmore=function(){return this.each(function(e){$(this).data('alm',new $.ajaxloadmore($(this),e));});};if($(".ajax-load-more-wrap").length){$(".ajax-load-more-wrap").ajaxloadmore();}})(jQuery);;(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory);}else if(typeof exports==='object'){module.exports=factory(require('jquery'));}else{factory(jQuery);}}(function($){var eventNamespace='almWaitForImages';$.almWaitForImages={hasImageProperties:['backgroundImage','listStyleImage','borderImage','borderCornerImage','cursor'],hasImageAttributes:['srcset']};$.expr[':']['has-src']=function(obj){return $(obj).is('img[src][src!=""]');};$.expr[':'].uncached=function(obj){if(!$(obj).is(':has-src')){return false;}
117
  return!obj.complete;};$.fn.almWaitForImages=function(){var allImgsLength=0;var allImgsLoaded=0;var deferred=$.Deferred();var finishedCallback;var eachCallback;var waitForAll;if($.isPlainObject(arguments[0])){waitForAll=arguments[0].waitForAll;eachCallback=arguments[0].each;finishedCallback=arguments[0].finished;}else{if(arguments.length===1&&$.type(arguments[0])==='boolean'){waitForAll=arguments[0];}else{finishedCallback=arguments[0];eachCallback=arguments[1];waitForAll=arguments[2];}}
1
+
2
  (function($){"use strict";$.ajaxloadmore=function(el,e){if(alm_localize.scrolltop==='true'){$(window).scrollTop(0);}
3
+ var alm=this;alm.AjaxLoadMore={};alm.page=0;alm.posts=0;alm.totalposts=0;alm.proceed=false;alm.disable_ajax=false;alm.init=true;alm.loading=true;alm.finished=false;alm.window=$(window);alm.button_label='';alm.el=el;alm.container=el;alm.container.addClass('alm-'+e).attr('data-alm-id',e);alm.content=$('.alm-ajax',alm.container);alm.content_preloaded=$('.alm-listing.alm-preloaded',alm.container);alm.canonical_url=alm.el.attr('data-canonical-url');alm.is_search=alm.el.attr('data-search');alm.slug=alm.el.attr('data-slug');alm.post_id=alm.el.attr('data-post-id');alm.prefix='alm-';alm.cache=alm.content.attr('data-cache');alm.cache_id=alm.content.attr('data-cache-id');alm.cache_path=alm.content.attr('data-cache-path');alm.cache_logged_in=alm.content.attr('data-cache-logged-in');alm.repeater=alm.content.attr('data-repeater');alm.theme_repeater=alm.content.attr('data-theme-repeater');alm.scroll_distance=parseInt(alm.content.attr('data-scroll-distance'));alm.max_pages=parseInt(alm.content.attr('data-max-pages'));alm.pause_override=alm.content.attr('data-pause-override');alm.pause=alm.content.attr('data-pause');alm.transition=alm.content.attr('data-transition');alm.transition_container=alm.content.attr('data-transition-container');alm.speed=alm.content.attr('data-transition-speed');alm.images_loaded=alm.content.attr('data-images-loaded');alm.destroy_after=alm.content.attr('data-destroy-after');alm.lang=alm.content.attr('data-lang');alm.orginal_posts_per_page=alm.content.attr('data-posts-per-page');alm.posts_per_page=alm.content.attr('data-posts-per-page');alm.cta_array='';alm.cta=alm.content.attr('data-cta');alm.cta_position=alm.content.attr('data-cta-position');alm.cta_repeater=alm.content.attr('data-cta-repeater');alm.cta_theme_repeater=alm.content.attr('data-cta-theme-repeater');alm.acf_array='';alm.acf=alm.content.attr('data-acf');alm.acf_field_type=alm.content.attr('data-acf-field-type');alm.acf_field_name=alm.content.attr('data-acf-field-name');alm.acf_post_id=alm.content.attr('data-acf-post-id');alm.nextpage_array='';alm.nextpage=alm.content.attr('data-nextpage');alm.nextpage_urls=alm.content.attr('data-nextpage-urls');alm.nextpage_scroll=alm.content.attr('data-nextpage-scroll');alm.nextpage_pageviews=alm.content.attr('data-nextpage-pageviews');alm.nextpage_post_id=alm.content.attr('data-nextpage-post-id');alm.nextpage_startpage=alm.content.attr('data-nextpage-startpage');alm.previous_post=alm.content.attr('data-previous-post');alm.previous_post_id=alm.content.attr('data-previous-post-id');alm.previous_post_taxonomy=alm.content.attr('data-previous-post-taxonomy');alm.comments=alm.content.attr('data-comments');if(alm.comments==='true'){alm.content=$('.alm-comments',alm.container);}
4
  alm.comments_array='';alm.comments_post_id=alm.content.attr('data-comments_post_id');alm.comments_per_page=alm.content.attr('data-comments_per_page');alm.comments_type=alm.content.attr('data-comments_type');alm.comments_style=alm.content.attr('data-comments_style');alm.comments_template=alm.content.attr('data-comments_template');alm.comments_callback=alm.content.attr('data-comments_callback');alm.restapi=alm.content.attr('data-restapi');alm.restapi_base_url=alm.content.attr('data-restapi-base-url');alm.restapi_namespace=alm.content.attr('data-restapi-namespace');alm.restapi_endpoint=alm.content.attr('data-restapi-endpoint');alm.restapi_template_id=alm.content.attr('data-restapi-template-id');alm.restapi_debug=alm.content.attr('data-restapi-debug');alm.seo=alm.content.attr('data-seo');alm.preloaded=alm.content.attr('data-preloaded');alm.preloaded_amount=alm.content.attr('data-preloaded-amount');alm.paging=alm.content.attr('data-paging');alm.paging_controls=alm.content.attr('data-paging-controls');alm.paging_show_at_most=alm.content.attr('data-paging-show-at-most');alm.paging_classes=alm.content.attr('data-paging-classes');alm.paging_init=true;if(alm.restapi==='true'){alm.restapi=true;if(alm.restapi_debug===undefined){alm.restapi_debug=false;}
5
  if(alm.restapi_template_id===''){alm.restapi=false;}}else{alm.restapi=false;}
6
  if(alm.paging==='true'){alm.paging=true;if(alm.paging_show_at_most===undefined){alm.paging_show_at_most=7;}
25
  if(alm.nextpage_startpage>1){alm.isPaged=true;}
26
  if(alm.acf==='true'){alm.acf=true;}else{alm.acf=false;}
27
  if(alm.acf_field_type===undefined||alm.acf_field_name===undefined||alm.acf_post_id===undefined){alm.acf=false;}
28
+ if(alm.previous_post==='true'){alm.previous_post=true;alm.previous_post_permalink='';alm.previous_post_title='';alm.previous_post_slug='';}else{alm.previous_post=false;}
29
  if(alm.previous_post_id===undefined){alm.previous_post_id='';}
30
  if(alm.previous_post_taxonomy===undefined){alm.previous_post_taxonomy='';}
31
  alm.previous_post_title_template=alm.content.attr('data-previous-post-title-template');alm.siteTitle=alm.content.attr('data-previous-post-site-title');alm.siteTagline=alm.content.attr('data-previous-post-site-tagline');alm.previous_post_pageview=alm.content.attr('data-previous-post-pageview');alm.previous_post_scroll=alm.content.attr('data-previous-post-scroll');alm.previous_post_scroll_speed=alm.content.attr('data-previous-post-scroll-speed');alm.previous_post_scroll_top=alm.content.attr('data-previous-post-scrolltop');if(alm.content.attr('data-offset')===undefined){alm.offset=0;}else{alm.offset=alm.content.attr('data-offset');}
37
  if(alm.max_pages===undefined){alm.max_pages=0;}
38
  if(alm.max_pages===0){alm.max_pages=10000;}
39
  if(alm.scroll_distance===undefined){alm.scroll_distance=150;}
40
+ if(alm.transition===undefined){alm.transition='slide';}
41
  if(alm.speed===undefined){alm.speed=250;}else{alm.speed=parseInt(alm.speed);}
42
  if(alm.transition_container===undefined||alm.transition_container==='true'){alm.transition_container=true;}else{alm.transition_container=false;}
43
  if(alm.images_loaded===undefined){alm.images_loaded='false';}
48
  if(alm.content.attr('data-scroll')===undefined){alm.scroll=true;}else if(alm.content.attr('data-scroll')==='false'){alm.scroll=false;}else{alm.scroll=true;}
49
  alm.post_type=alm.content.attr('data-post-type');alm.post_type=alm.post_type.split(",");alm.sticky_posts=alm.content.attr('data-sticky-posts');alm.container.append('<div class="'+alm.prefix+'btn-wrap"/>');alm.btnWrap=$('.'+alm.prefix+'btn-wrap',alm.container);if(alm.paging){alm.content.parent().addClass('loading');}else{$('.'+alm.prefix+'btn-wrap',alm.container).append('<button id="load-more" class="'+alm.prefix+'load-more-btn more'+alm.button_class+'">'+alm.button_label+'</button>');alm.button=$('.alm-load-more-btn',alm.container);}
50
  alm.AjaxLoadMore.loadPosts=function(){if(!alm.disable_ajax){if(!alm.paging){alm.button.addClass('loading');alm.container.addClass('alm-loading');if(alm.button_loading_label!==false){alm.button.text(alm.button_loading_label);}}
51
+ alm.loading=true;if(alm.cache==='true'&&!alm.cache_logged_in){var cache_page;if(alm.init&&alm.seo&&alm.isPaged){var firstpage='1';cache_page=alm.cache_path+alm.cache_id+'/page-'+firstpage+'-'+alm.start_page+'.html';}
52
  else if(alm.nextpage){var nextpage_cache_page;if(alm.paging){nextpage_cache_page=parseInt(alm.page)+1;}else{nextpage_cache_page=parseInt(alm.page)+2;if(alm.isPaged){nextpage_cache_page=parseInt(alm.page)+parseInt(alm.nextpage_startpage)+1;}}
53
+ cache_page=alm.cache_path+alm.cache_id+'/page'+'-'+nextpage_cache_page+'.html';}
54
+ else if(alm.previous_post){cache_page=alm.cache_path+alm.cache_id+'/'+alm.previous_post_slug+'.html';}
55
+ else{cache_page=alm.cache_path+alm.cache_id+'/page-'+(alm.page+1)+'.html';}
56
+ $.get(cache_page,function(data){alm.AjaxLoadMore.success(data,true);}).fail(function(){alm.AjaxLoadMore.ajax('standard');});}else{alm.AjaxLoadMore.ajax('standard');}}};alm.AjaxLoadMore.ajax=function(queryType){var action='alm_query_posts';if(alm.acf){if(alm.acf_field_type!=='relationship'){action='alm_acf_query';}
57
  alm.acf_array={'acf':'true','post_id':alm.acf_post_id,'field_type':alm.acf_field_type,'field_name':alm.acf_field_name};}
58
  if(alm.nextpage){action='alm_nextpage_query';alm.nextpage_array={'nextpage':'true','urls':alm.nextpage_urls,'scroll':alm.nextpage_scroll,'pageviews':alm.nextpage_pageviews,'post_id':alm.nextpage_post_id,'startpage':alm.nextpage_startpage};}
59
+ if(alm.previous_post){alm.previous_post_array={'previous_post':'true','id':alm.previous_post_id,'slug':alm.previous_post_slug,};}
60
  if(alm.comments==='true'){action='alm_comments_query';alm.posts_per_page=alm.comments_per_page;alm.comments_array={'comments':'true','post_id':alm.comments_post_id,'per_page':alm.comments_per_page,'type':alm.comments_type,'style':alm.comments_style,'template':alm.comments_template,'callback':alm.comments_callback,};}
61
  if(alm.cta==='true'){alm.cta_array={'cta':'true','cta_position':alm.cta_position,'cta_repeater':alm.cta_repeater,'cta_theme_repeater':alm.cta_theme_repeater,};}
62
  if(alm.restapi){var alm_template=wp.template(alm.restapi_template_id),rest_url=alm.restapi_base_url+'/'+alm.restapi_namespace+'/'+alm.restapi_endpoint,rest_data={posts_per_page:alm.posts_per_page,page:alm.page,offset:alm.offset,slug:alm.slug,canonical_url:alm.canonical_url,post_type:alm.post_type,post_format:alm.content.attr('data-post-format'),category:alm.content.attr('data-category'),category__not_in:alm.content.attr('data-category-not-in'),tag:alm.content.attr('data-tag'),tag__not_in:alm.content.attr('data-tag-not-in'),taxonomy:alm.content.attr('data-taxonomy'),taxonomy_terms:alm.content.attr('data-taxonomy-terms'),taxonomy_operator:alm.content.attr('data-taxonomy-operator'),taxonomy_relation:alm.content.attr('data-taxonomy-relation'),meta_key:alm.content.attr('data-meta-key'),meta_value:alm.content.attr('data-meta-value'),meta_compare:alm.content.attr('data-meta-compare'),meta_relation:alm.content.attr('data-meta-relation'),meta_type:alm.content.attr('data-meta-type'),author:alm.content.attr('data-author'),year:alm.content.attr('data-year'),month:alm.content.attr('data-month'),day:alm.content.attr('data-day'),post_status:alm.content.attr('data-post-status'),order:alm.content.attr('data-order'),orderby:alm.content.attr('data-orderby'),post__in:alm.content.attr('data-post-in'),post__not_in:alm.content.attr('data-post-not-in'),search:alm.content.attr('data-search'),custom_args:alm.content.attr('data-custom-args'),lang:alm.lang,preloaded:alm.preloaded,preloaded_amount:alm.preloaded_amount,seo_start_page:alm.start_page,id:el.attr('data-id')};$.ajax({type:"GET",url:rest_url,data:rest_data,dataType:"JSON",beforeSend:function(){if(alm.page!=1&&!alm.paging){alm.button.addClass('loading');}},success:function(results){var data,html=results.html,meta=results.meta,postcount=meta.postcount,totalposts=meta.totalposts;$.each(html,function(e){var result=html[e];if(alm.restapi_debug==='true'){console.log(result);}
63
  data+=alm_template(result);});var obj={'html':data,'meta':{'postcount':postcount,'totalposts':totalposts},}
64
  alm.AjaxLoadMore.success(obj,false);}});}
65
+ else{$.ajax({type:"GET",url:alm_localize.ajaxurl,dataType:"JSON",data:{action:action,query_type:queryType,nonce:alm_localize.alm_nonce,cache_id:alm.cache_id,repeater:alm.repeater,theme_repeater:alm.theme_repeater,acf:alm.acf_array,nextpage:alm.nextpage_array,cta:alm.cta_array,comments:alm.comments_array,post_type:alm.post_type,sticky_posts:alm.sticky_posts,post_format:alm.content.attr('data-post-format'),category:alm.content.attr('data-category'),category__not_in:alm.content.attr('data-category-not-in'),tag:alm.content.attr('data-tag'),tag__not_in:alm.content.attr('data-tag-not-in'),taxonomy:alm.content.attr('data-taxonomy'),taxonomy_terms:alm.content.attr('data-taxonomy-terms'),taxonomy_operator:alm.content.attr('data-taxonomy-operator'),taxonomy_relation:alm.content.attr('data-taxonomy-relation'),meta_key:alm.content.attr('data-meta-key'),meta_value:alm.content.attr('data-meta-value'),meta_compare:alm.content.attr('data-meta-compare'),meta_relation:alm.content.attr('data-meta-relation'),meta_type:alm.content.attr('data-meta-type'),author:alm.content.attr('data-author'),year:alm.content.attr('data-year'),month:alm.content.attr('data-month'),day:alm.content.attr('data-day'),post_status:alm.content.attr('data-post-status'),order:alm.content.attr('data-order'),orderby:alm.content.attr('data-orderby'),post__in:alm.content.attr('data-post-in'),post__not_in:alm.content.attr('data-post-not-in'),exclude:alm.content.attr('data-exclude'),search:alm.content.attr('data-search'),custom_args:alm.content.attr('data-custom-args'),posts_per_page:alm.posts_per_page,page:alm.page,offset:alm.offset,preloaded:alm.preloaded,preloaded_amount:alm.preloaded_amount,seo_start_page:alm.start_page,paging:alm.paging,previous_post:alm.previous_post_array,lang:alm.lang,slug:alm.slug,canonical_url:alm.canonical_url,id:el.attr('data-id')},beforeSend:function(){if(alm.page!=1&&!alm.paging){alm.button.addClass('loading');}},success:function(data){if(queryType==='standard'){alm.AjaxLoadMore.success(data,false);}
66
  else if(queryType==='totalpages'&&alm.paging&&alm.nextpage){if($.isFunction($.fn.almBuildPagination)){$.fn.almBuildPagination(data,alm);}}
67
  else if(queryType==='totalposts'&&alm.paging){if($.isFunction($.fn.almBuildPagination)){$.fn.almBuildPagination(data,alm);}}},error:function(jqXHR,textStatus,errorThrown){alm.AjaxLoadMore.error(jqXHR,textStatus,errorThrown);}});}};if(alm.paging){if(alm.nextpage){alm.AjaxLoadMore.ajax('totalpages');}else{alm.AjaxLoadMore.ajax('totalposts');}}
68
  alm.AjaxLoadMore.success=function(data,is_cache){if(alm.previous_post){alm.AjaxLoadMore.getPreviousPost();}
71
  if(alm.init){if(!alm.paging){alm.button.text(alm.button_label);}else{if(total>0){alm.el=$('<div class="alm-reveal"/>');alm.el.append('<div class="alm-paging-content"></div><div class="alm-paging-loading"></div>');$('.alm-paging-content',alm.el).append(alm.data).hide();alm.content.append(alm.el);alm.content.parent().removeClass('loading');alm.AjaxLoadMore.resetBtnText();$('.alm-paging-content',alm.el).fadeIn(alm.speed,'alm_easeInOutQuad',function(){var paddingT=parseInt(alm.content.css('padding-top')),paddingB=parseInt(alm.content.css('padding-bottom'));alm.content.css('height',alm.el.height()+paddingT+paddingB+'px');if($.isFunction($.fn.almFadePageControls)){$.fn.almFadePageControls(alm.btnWrap);}});}}
72
  if(total===0){if($.isFunction($.fn.almEmpty)){$.fn.almEmpty(alm);}}
73
  if(alm.isPaged){alm.posts_per_page=alm.content.attr('data-posts-per-page');alm.page=alm.start_page-1;}}
74
+ if(total>0){if(!alm.paging){if(alm.previous_post){alm.el=$('<div class="alm-reveal alm-previous-post post-'+alm.previous_post_id+'" data-id="'+alm.previous_post_id+'" data-title="'+alm.previous_post_title+'" data-url="'+alm.previous_post_permalink+'" data-page="'+alm.page+'"/>');alm.el.append(alm.data).hide();}else{if(!alm.transition_container){alm.data.hide();alm.el=alm.data;}else{if(alm.init&&alm.start_page>1){var data=[],posts_per_page=parseInt(alm.posts_per_page);if(alm.cta==='true'){posts_per_page=posts_per_page+1;}
75
  var pages=Math.ceil(total/posts_per_page);for(var i=0;i<total;i+=posts_per_page){data.push(alm.data.slice(i,posts_per_page+i));}
76
  alm.el=alm.content;for(var k=0;k<data.length;k++){var p=0;if(alm.preloaded==='true'){p=1;}
77
  var div;if(k>0||alm.preloaded==='true'){var pagenum=(k+1+p);if(alm.permalink==='default'){div=$('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+''+alm.search_value+'&paged='+pagenum+'" data-page="'+pagenum+'" />');}else{div=$('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+'page/'+pagenum+'/'+alm.search_value+'" data-page="'+pagenum+'" />');}}else{div=$('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+''+alm.search_value+'" data-page="1" />');}
95
  alm.AjaxLoadMore.pagingNextpageInit=function(data){alm.el=$('<div class="alm-reveal alm-nextpage"/>');alm.el.append('<div class="alm-paging-content">'+data+'</div><div class="alm-paging-loading"></div>');alm.el.appendTo(alm.content);alm.content.parent().removeClass('loading');alm.AjaxLoadMore.resetBtnText();var paddingT=parseInt(alm.content.css('padding-top')),paddingB=parseInt(alm.content.css('padding-bottom'));alm.content.css('height',alm.el.height()+paddingT+paddingB+'px');if($.isFunction($.fn.almSetNextPageVars)){$.fn.almSetNextPageVars(alm);}
96
  setTimeout(function(){if($.isFunction($.fn.almFadePageControls)){$.fn.almFadePageControls(alm.btnWrap);}
97
  if($.isFunction($.fn.almOnWindowResize)){$.fn.almOnWindowResize(alm);}},200);}
98
+ alm.fetchingPreviousPost=false;alm.AjaxLoadMore.getPreviousPost=function(){alm.fetchingPreviousPost=true;$.ajax({type:"GET",dataType:"JSON",url:alm_localize.ajaxurl,data:{action:'alm_query_previous_post',id:alm.previous_post_id,taxonomy:alm.previous_post_taxonomy},success:function(data){if(data.has_previous_post){alm.content.attr('data-previous-post-id',data.prev_id);alm.previous_post_id=data.prev_id;alm.previous_post_permalink=data.prev_permalink;alm.previous_post_title=data.prev_title;alm.previous_post_slug=data.prev_slug;}else{if(!data.has_previous_post){alm.AjaxLoadMore.triggerDone();}}
99
  if($.isFunction($.fn.almSetPreviousPost)){$.fn.almSetPreviousPost(alm,data.current_id,data.permalink,data.title);}
100
  alm.fetchingPreviousPost=false;},error:function(jqXHR,textStatus,errorThrown){alm.AjaxLoadMore.error(jqXHR,textStatus,errorThrown);alm.fetchingPreviousPost=false;}});};alm.AjaxLoadMore.triggerAddons=function(alm){if($.isFunction($.fn.almSEO)&&alm.seo){$.fn.almSEO(alm);}
101
  if($.isFunction($.fn.almSetNextPage)){$.fn.almSetNextPage(alm);}};alm.AjaxLoadMore.triggerDone=function(){alm.loading=false;alm.finished=true;if(!alm.paging){alm.button.addClass('done');}
113
  alm.AjaxLoadMore.init();setTimeout(function(){alm.proceed=true;},300);$.fn.almUpdateCurrentPage=function(current,obj,alm){alm.page=current;if(alm.nextpage&&!alm.paging){alm.page=alm.page-1;}
114
  var data='';if(alm.paging_init&&alm.preloaded==='true'){data=$('.alm-preloaded .alm-reveal',alm.el).html();$('.alm-preloaded',alm.el).remove();alm.preloaded_amount=0;alm.AjaxLoadMore.pagingPreloadedInit(data);alm.paging_init=false;alm.init=false;}
115
  else if(alm.paging_init&&alm.nextpage){data=$('.alm-nextpage',alm.el).html();$('.alm-nextpage',alm.el).remove();alm.AjaxLoadMore.pagingNextpageInit(data);alm.paging_init=false;alm.init=false;}
116
+ else{alm.AjaxLoadMore.loadPosts();}};$.fn.almGetParentContainer=function(){return alm.el.closest('#ajax-load-more');v};$.fn.almGetObj=function(){return alm;};$.fn.almTriggerClick=function(){alm.button.trigger('click');};$.easing.alm_easeInOutQuad=function(x,t,b,c,d){if((t/=d/2)<1){return c/2*t*t+b;}
117
  return-c/2*((--t)*(t-2)-1)+b;};};$.fn.almFilter=function(transition,speed,data){if(data.target){$(".ajax-load-more-wrap[data-id='"+data.target+"']").each(function(e){var el=$(this);$.fn.almFilterTransition(transition,speed,data,el);});}else{$(".ajax-load-more-wrap").each(function(e){var el=$(this);$.fn.almFilterTransition(transition,speed,data,el);});}};$.fn.almFilterTransition=function(transition,speed,data,el){if(transition==='slide'){el.slideUp(speed,function(){$('.alm-listing',el).html('');$('.alm-btn-wrap',el).remove();el.fadeIn(speed);$.fn.almSetFilters(el,data);});}else if(transition==='fade'){el.fadeOut(speed,function(){$('.alm-listing',el).html('');$('.alm-btn-wrap',el).remove();el.fadeIn(speed);$.fn.almSetFilters(el,data);});}else{$('.alm-listing',el).html('');$('.alm-btn-wrap',el).remove();el.fadeIn(speed);$.fn.almSetFilters(el,data);}};$.fn.almSetFilters=function(el,data){$.each(data,function(key,value){key=key.replace(/\W+/g,'-').replace(/([a-z\d])([A-Z])/g,'$1-$2');$('.alm-listing',el).attr('data-'+key,value);});if($.isFunction($.fn.almFilterComplete)){$.fn.almFilterComplete();}
118
  if(data.target){$(".ajax-load-more-wrap[data-id="+data.target+"]").ajaxloadmore();}else{$(".ajax-load-more-wrap").ajaxloadmore();}};$.fn.ajaxloadmore=function(){return this.each(function(e){$(this).data('alm',new $.ajaxloadmore($(this),e));});};if($(".ajax-load-more-wrap").length){$(".ajax-load-more-wrap").ajaxloadmore();}})(jQuery);;(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory);}else if(typeof exports==='object'){module.exports=factory(require('jquery'));}else{factory(jQuery);}}(function($){var eventNamespace='almWaitForImages';$.almWaitForImages={hasImageProperties:['backgroundImage','listStyleImage','borderImage','borderCornerImage','cursor'],hasImageAttributes:['srcset']};$.expr[':']['has-src']=function(obj){return $(obj).is('img[src][src!=""]');};$.expr[':'].uncached=function(obj){if(!$(obj).is(':has-src')){return false;}
119
  return!obj.complete;};$.fn.almWaitForImages=function(){var allImgsLength=0;var allImgsLoaded=0;var deferred=$.Deferred();var finishedCallback;var eachCallback;var waitForAll;if($.isPlainObject(arguments[0])){waitForAll=arguments[0].waitForAll;eachCallback=arguments[0].each;finishedCallback=arguments[0].finished;}else{if(arguments.length===1&&$.type(arguments[0])==='boolean'){waitForAll=arguments[0];}else{finishedCallback=arguments[0];eachCallback=arguments[1];waitForAll=arguments[2];}}
lang/ajax-load-more.pot CHANGED
@@ -1,15 +1,15 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Ajax Load More\n"
4
- "POT-Creation-Date: 2017-05-04 13:26-0500\n"
5
- "PO-Revision-Date: 2017-05-04 13:26-0500\n"
6
- "Last-Translator: Darren Cooney <dcooney@ecentricarts.com>\n"
7
  "Language-Team: \n"
8
  "Language: en_CA\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.6.4\n"
13
  "X-Poedit-Basepath: .\n"
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
  "X-Poedit-KeywordsList: __;_e\n"
@@ -116,11 +116,11 @@ msgstr ""
116
  msgid "Error Writing File"
117
  msgstr ""
118
 
119
- #: ../admin/admin.php:936 ../admin/shortcode-builder/shortcode-builder.php:926
120
  msgid "Container Type"
121
  msgstr ""
122
 
123
- #: ../admin/admin.php:944 ../admin/shortcode-builder/shortcode-builder.php:956
124
  msgid "Container Classes"
125
  msgstr ""
126
 
@@ -224,8 +224,8 @@ msgid "Preview"
224
  msgstr ""
225
 
226
  #: ../admin/admin.php:1314
227
- #: ../admin/shortcode-builder/shortcode-builder.php:981
228
- #: ../core/classes/class.alm-shortcode.php:133
229
  msgid "Older Posts"
230
  msgstr ""
231
 
@@ -340,7 +340,7 @@ msgid ""
340
  msgstr ""
341
 
342
  #: ../admin/includes/components/repeater-options.php:2
343
- #: ../admin/shortcode-builder/shortcode-builder.php:906
344
  msgid "Options"
345
  msgstr ""
346
 
@@ -551,7 +551,7 @@ msgstr ""
551
  #: ../admin/shortcode-builder/includes/tax-query-options.php:5
552
  #: ../admin/shortcode-builder/includes/tax-query-options.php:50
553
  #: ../admin/shortcode-builder/includes/tax-query-options.php:81
554
- #: ../admin/shortcode-builder/shortcode-builder.php:674
555
  msgid "Select Taxonomy"
556
  msgstr ""
557
 
@@ -568,7 +568,7 @@ msgid "Taxonomy Operator:"
568
  msgstr ""
569
 
570
  #: ../admin/shortcode-builder/includes/tax-query-options.php:36
571
- #: ../admin/shortcode-builder/shortcode-builder.php:1506
572
  msgid "Relation:"
573
  msgstr ""
574
 
@@ -591,47 +591,47 @@ msgid "Enable compatibility with Advanced Custom Fields."
591
  msgstr ""
592
 
593
  #: ../admin/shortcode-builder/shortcode-builder.php:31
594
- #: ../admin/shortcode-builder/shortcode-builder.php:109
595
- #: ../admin/shortcode-builder/shortcode-builder.php:153
596
- #: ../admin/shortcode-builder/shortcode-builder.php:247
597
- #: ../admin/shortcode-builder/shortcode-builder.php:398
598
- #: ../admin/shortcode-builder/shortcode-builder.php:515
599
- #: ../admin/shortcode-builder/shortcode-builder.php:538
600
- #: ../admin/shortcode-builder/shortcode-builder.php:592
601
- #: ../admin/shortcode-builder/shortcode-builder.php:633
602
- #: ../admin/shortcode-builder/shortcode-builder.php:726
603
- #: ../admin/shortcode-builder/shortcode-builder.php:806
604
- #: ../admin/shortcode-builder/shortcode-builder.php:840
605
- #: ../admin/shortcode-builder/shortcode-builder.php:1016
606
- #: ../admin/shortcode-builder/shortcode-builder.php:1041
607
- #: ../admin/shortcode-builder/shortcode-builder.php:1067
608
- #: ../admin/shortcode-builder/shortcode-builder.php:1114
609
  msgid "True"
610
  msgstr ""
611
 
612
  #: ../admin/shortcode-builder/shortcode-builder.php:35
613
- #: ../admin/shortcode-builder/shortcode-builder.php:113
614
- #: ../admin/shortcode-builder/shortcode-builder.php:157
615
- #: ../admin/shortcode-builder/shortcode-builder.php:251
616
- #: ../admin/shortcode-builder/shortcode-builder.php:402
617
- #: ../admin/shortcode-builder/shortcode-builder.php:519
618
- #: ../admin/shortcode-builder/shortcode-builder.php:542
619
- #: ../admin/shortcode-builder/shortcode-builder.php:596
620
- #: ../admin/shortcode-builder/shortcode-builder.php:637
621
- #: ../admin/shortcode-builder/shortcode-builder.php:730
622
- #: ../admin/shortcode-builder/shortcode-builder.php:810
623
- #: ../admin/shortcode-builder/shortcode-builder.php:844
624
- #: ../admin/shortcode-builder/shortcode-builder.php:1020
625
- #: ../admin/shortcode-builder/shortcode-builder.php:1045
626
- #: ../admin/shortcode-builder/shortcode-builder.php:1071
627
- #: ../admin/shortcode-builder/shortcode-builder.php:1118
628
  msgid "False"
629
  msgstr ""
630
 
631
  #: ../admin/shortcode-builder/shortcode-builder.php:47
632
- #: ../admin/shortcode-builder/shortcode-builder.php:262
633
- #: ../admin/shortcode-builder/shortcode-builder.php:415
634
- #: ../admin/shortcode-builder/shortcode-builder.php:647
635
  msgid "Post ID"
636
  msgstr ""
637
 
@@ -642,13 +642,13 @@ msgid ""
642
  msgstr ""
643
 
644
  #: ../admin/shortcode-builder/shortcode-builder.php:48
645
- #: ../admin/shortcode-builder/shortcode-builder.php:416
646
  msgid "The ID of the current page/post."
647
  msgstr ""
648
 
649
  #: ../admin/shortcode-builder/shortcode-builder.php:61
650
  #: ../admin/shortcode-builder/shortcode-builder.php:66
651
- #: ../admin/shortcode-builder/shortcode-builder.php:85
652
  msgid "Field Type"
653
  msgstr ""
654
 
@@ -661,209 +661,217 @@ msgid "Select Field Type"
661
  msgstr ""
662
 
663
  #: ../admin/shortcode-builder/shortcode-builder.php:69
664
- msgid "Relationship"
665
  msgstr ""
666
 
667
  #: ../admin/shortcode-builder/shortcode-builder.php:70
 
 
 
 
 
 
 
 
668
  msgid "Repeater"
669
  msgstr ""
670
 
671
- #: ../admin/shortcode-builder/shortcode-builder.php:80
672
  msgid "Field Name"
673
  msgstr ""
674
 
675
- #: ../admin/shortcode-builder/shortcode-builder.php:81
676
  msgid "Enter the name of the ACF field"
677
  msgstr ""
678
 
679
- #: ../admin/shortcode-builder/shortcode-builder.php:99
680
  #: ../admin/views/add-ons.php:21 ../admin/views/licenses.php:111
681
  #: ../admin/views/settings.php:57
682
  msgid "Cache"
683
  msgstr ""
684
 
685
- #: ../admin/shortcode-builder/shortcode-builder.php:102
686
  msgid "Turn on content caching."
687
  msgstr ""
688
 
689
- #: ../admin/shortcode-builder/shortcode-builder.php:123
690
  msgid "Cache ID"
691
  msgstr ""
692
 
693
- #: ../admin/shortcode-builder/shortcode-builder.php:124
694
  msgid ""
695
  "You <u>must</u> generate a unique ID for this cached query - this unique ID "
696
  "will be used as a content identifier."
697
  msgstr ""
698
 
699
- #: ../admin/shortcode-builder/shortcode-builder.php:130
700
  msgid "Generate Cache ID"
701
  msgstr ""
702
 
703
- #: ../admin/shortcode-builder/shortcode-builder.php:142
704
  #: ../admin/views/add-ons.php:48 ../admin/views/licenses.php:176
705
  msgid "Call to Actions"
706
  msgstr ""
707
 
708
- #: ../admin/shortcode-builder/shortcode-builder.php:146
709
  msgid "Insert call to action block."
710
  msgstr ""
711
 
712
- #: ../admin/shortcode-builder/shortcode-builder.php:170
713
  msgid "CTA Positioning"
714
  msgstr ""
715
 
716
- #: ../admin/shortcode-builder/shortcode-builder.php:171
717
  msgid ""
718
  "Insert call to action <strong><em id=\"sequence-update-before-after"
719
  "\">before</em></strong> post #<strong><em id=\"sequence-update\">1</em></"
720
  "strong>"
721
  msgstr ""
722
 
723
- #: ../admin/shortcode-builder/shortcode-builder.php:176
724
  msgid "Before / After"
725
  msgstr ""
726
 
727
- #: ../admin/shortcode-builder/shortcode-builder.php:178
728
  msgid "Before"
729
  msgstr ""
730
 
731
- #: ../admin/shortcode-builder/shortcode-builder.php:179
732
  msgid "After"
733
  msgstr ""
734
 
735
- #: ../admin/shortcode-builder/shortcode-builder.php:183
736
  msgid "Post #"
737
  msgstr ""
738
 
739
- #: ../admin/shortcode-builder/shortcode-builder.php:194
740
- #: ../admin/shortcode-builder/shortcode-builder.php:866
741
  msgid "Template"
742
  msgstr ""
743
 
744
- #: ../admin/shortcode-builder/shortcode-builder.php:196
745
  msgid ""
746
  "Select the <a href=\"admin.php?page=ajax-load-more-repeaters\" target="
747
  "\"_parent\">repeater template</a> that will display your call to action."
748
  msgstr ""
749
 
750
- #: ../admin/shortcode-builder/shortcode-builder.php:203
751
  #, fuzzy
752
  msgid "-- Select Repeater --"
753
  msgstr "Sélectionnez province"
754
 
755
- #: ../admin/shortcode-builder/shortcode-builder.php:223
756
  msgid ""
757
  "Call to actions do NOT count as a post within an Ajax Load More loop.<br/>\n"
758
  " For example, if you set <strong>posts_per_page=\"5\"</"
759
  "strong> in your shortcode, 6 items will be displayed."
760
  msgstr ""
761
 
762
- #: ../admin/shortcode-builder/shortcode-builder.php:237
763
  #: ../admin/views/add-ons.php:75 ../admin/views/licenses.php:241
764
  msgid "Comments"
765
  msgstr ""
766
 
767
- #: ../admin/shortcode-builder/shortcode-builder.php:240
768
  msgid "Enable Ajax Load More to display blog comments."
769
  msgstr ""
770
 
771
- #: ../admin/shortcode-builder/shortcode-builder.php:263
772
- #: ../admin/shortcode-builder/shortcode-builder.php:648
773
  msgid "The ID of the current single post."
774
  msgstr ""
775
 
776
- #: ../admin/shortcode-builder/shortcode-builder.php:274
777
  msgid "Comments Per Page"
778
  msgstr ""
779
 
780
- #: ../admin/shortcode-builder/shortcode-builder.php:275
781
  msgid "The number of top level items to show for each page of comments."
782
  msgstr ""
783
 
784
- #: ../admin/shortcode-builder/shortcode-builder.php:283
785
  msgid ""
786
  "<strong>Note</strong>: The amount selected does NOT include comment replies."
787
  msgstr ""
788
 
789
- #: ../admin/shortcode-builder/shortcode-builder.php:289
790
  msgid "Comment Type"
791
  msgstr ""
792
 
793
- #: ../admin/shortcode-builder/shortcode-builder.php:290
794
  msgid "The type of comment(s) to display."
795
  msgstr ""
796
 
797
- #: ../admin/shortcode-builder/shortcode-builder.php:295
798
  msgid "Comment"
799
  msgstr ""
800
 
801
- #: ../admin/shortcode-builder/shortcode-builder.php:296
802
  msgid "All"
803
  msgstr ""
804
 
805
- #: ../admin/shortcode-builder/shortcode-builder.php:297
806
  msgid "Trackback"
807
  msgstr ""
808
 
809
- #: ../admin/shortcode-builder/shortcode-builder.php:298
810
  msgid "Pingback"
811
  msgstr ""
812
 
813
- #: ../admin/shortcode-builder/shortcode-builder.php:299
814
  msgid "Pings"
815
  msgstr ""
816
 
817
- #: ../admin/shortcode-builder/shortcode-builder.php:307
818
  msgid "Comment Style"
819
  msgstr ""
820
 
821
- #: ../admin/shortcode-builder/shortcode-builder.php:308
822
  msgid "Select the HTML container style for your comments."
823
  msgstr ""
824
 
825
- #: ../admin/shortcode-builder/shortcode-builder.php:333
826
  msgid "Comment Template"
827
  msgstr ""
828
 
829
- #: ../admin/shortcode-builder/shortcode-builder.php:334
830
  msgid "Select a repeater template that will display comment data."
831
  msgstr ""
832
 
833
- #: ../admin/shortcode-builder/shortcode-builder.php:340
834
- #: ../admin/shortcode-builder/shortcode-builder.php:1148
835
  msgid "None"
836
  msgstr ""
837
 
838
- #: ../admin/shortcode-builder/shortcode-builder.php:341
839
  msgid "Default"
840
  msgstr ""
841
 
842
- #: ../admin/shortcode-builder/shortcode-builder.php:353
843
  msgid ""
844
  "<strong>Note</strong>: <span>None</span> will use the default WordPress "
845
  "comment layout."
846
  msgstr ""
847
 
848
- #: ../admin/shortcode-builder/shortcode-builder.php:362
849
  msgid "Callback Function"
850
  msgstr ""
851
 
852
- #: ../admin/shortcode-builder/shortcode-builder.php:363
853
  msgid ""
854
  "A custom <a href=\"https://codex.wordpress.org/Function_Reference/"
855
  "wp_list_comments#Arguments\" target=\"_blank\">callback</a> function that "
856
  "will display each comment."
857
  msgstr ""
858
 
859
- #: ../admin/shortcode-builder/shortcode-builder.php:371
860
  msgid ""
861
  "<strong>Note</strong>: The majority of premium themes have a custom callback "
862
  "function for displaying comments. Please see comments.php or functions.php "
863
  "within your theme directory to locate the callback function for your theme."
864
  msgstr ""
865
 
866
- #: ../admin/shortcode-builder/shortcode-builder.php:376
867
  msgid ""
868
  "You must add the comments shortcode directly to your single template file "
869
  "using the <a href=\"https://developer.wordpress.org/reference/functions/"
@@ -872,81 +880,81 @@ msgid ""
872
  "\"_blank\">View documentation</a>"
873
  msgstr ""
874
 
875
- #: ../admin/shortcode-builder/shortcode-builder.php:388
876
  #: ../admin/views/add-ons.php:154 ../admin/views/licenses.php:440
877
  #, fuzzy
878
  msgid "Next Page"
879
  msgstr "Imprimer cette page"
880
 
881
- #: ../admin/shortcode-builder/shortcode-builder.php:391
882
  msgid "Enable the infinite scrolling of multipage WordPress content using the"
883
  msgstr ""
884
 
885
- #: ../admin/shortcode-builder/shortcode-builder.php:391
886
  msgid "Quicktag"
887
  msgstr ""
888
 
889
- #: ../admin/shortcode-builder/shortcode-builder.php:428
890
  msgid "URL Rewrite"
891
  msgstr ""
892
 
893
- #: ../admin/shortcode-builder/shortcode-builder.php:429
894
  msgid "Update the browser address bar as pages come into view"
895
  msgstr ""
896
 
897
- #: ../admin/shortcode-builder/shortcode-builder.php:436
898
  msgid "Yes, update the URL"
899
  msgstr ""
900
 
901
- #: ../admin/shortcode-builder/shortcode-builder.php:448
902
  msgid "Google Analytics"
903
  msgstr ""
904
 
905
- #: ../admin/shortcode-builder/shortcode-builder.php:449
906
  msgid ""
907
  "You must have a reference to your Google Analytics tracking code already on "
908
  "the page"
909
  msgstr ""
910
 
911
- #: ../admin/shortcode-builder/shortcode-builder.php:451
912
  msgid "Each time a page is loaded it will count as a pageview"
913
  msgstr ""
914
 
915
- #: ../admin/shortcode-builder/shortcode-builder.php:458
916
  msgid "Yes, send pageviews to Google Analytics"
917
  msgstr ""
918
 
919
- #: ../admin/shortcode-builder/shortcode-builder.php:469
920
  msgid "Scroll to Page"
921
  msgstr ""
922
 
923
- #: ../admin/shortcode-builder/shortcode-builder.php:470
924
  msgid "Set Scroll Speed to 0 to disable scrolling to page"
925
  msgstr ""
926
 
927
- #: ../admin/shortcode-builder/shortcode-builder.php:473
928
  msgid "Scroll users automatically to the next page on 'Load More' button click"
929
  msgstr ""
930
 
931
- #: ../admin/shortcode-builder/shortcode-builder.php:479
932
  msgid "Scroll Speed"
933
  msgstr ""
934
 
935
- #: ../admin/shortcode-builder/shortcode-builder.php:480
936
  msgid "Scrolling speed in milliseconds (e.g. 1 second = 1000)"
937
  msgstr ""
938
 
939
- #: ../admin/shortcode-builder/shortcode-builder.php:486
940
  msgid "Scroll Top"
941
  msgstr ""
942
 
943
- #: ../admin/shortcode-builder/shortcode-builder.php:487
944
  msgid ""
945
  "The scrolltop position of the window (used with scrolling and fwd/back "
946
  "browser buttons)"
947
  msgstr ""
948
 
949
- #: ../admin/shortcode-builder/shortcode-builder.php:494
950
  msgid ""
951
  "You must add the Next Page shortcode directly to your single template file "
952
  "using the <a href=\"https://developer.wordpress.org/reference/functions/"
@@ -955,94 +963,94 @@ msgid ""
955
  "\"_blank\">View documentation</a>"
956
  msgstr ""
957
 
958
- #: ../admin/shortcode-builder/shortcode-builder.php:506
959
  #: ../admin/views/add-ons.php:180 ../admin/views/licenses.php:507
960
  #: ../admin/views/settings.php:61
961
  msgid "Paging"
962
  msgstr ""
963
 
964
- #: ../admin/shortcode-builder/shortcode-builder.php:508
965
  msgid "Replace infinite scrolling with a paged ajax navigation system."
966
  msgstr ""
967
 
968
- #: ../admin/shortcode-builder/shortcode-builder.php:530
969
  msgid "Paging Controls"
970
  msgstr ""
971
 
972
- #: ../admin/shortcode-builder/shortcode-builder.php:531
973
  msgid "Show (&laquo;)previous and next(&raquo;) buttons."
974
  msgstr ""
975
 
976
- #: ../admin/shortcode-builder/shortcode-builder.php:551
977
  msgid "Paging Navigation Classes"
978
  msgstr ""
979
 
980
- #: ../admin/shortcode-builder/shortcode-builder.php:552
981
  msgid "Add custom CSS classes to the paging navigation menu."
982
  msgstr ""
983
 
984
- #: ../admin/shortcode-builder/shortcode-builder.php:563
985
  msgid "Show at Most"
986
  msgstr ""
987
 
988
- #: ../admin/shortcode-builder/shortcode-builder.php:564
989
  msgid ""
990
  "The maximum amount of page menu items to show at a time. <br/.>0 = no maximum"
991
  msgstr ""
992
 
993
- #: ../admin/shortcode-builder/shortcode-builder.php:582
994
  #: ../admin/views/add-ons.php:207 ../admin/views/licenses.php:572
995
  msgid "Preloaded"
996
  msgstr ""
997
 
998
- #: ../admin/shortcode-builder/shortcode-builder.php:585
999
  msgid "Preload posts prior to making Ajax requests."
1000
  msgstr ""
1001
 
1002
- #: ../admin/shortcode-builder/shortcode-builder.php:606
1003
  msgid "Preload Amount"
1004
  msgstr ""
1005
 
1006
- #: ../admin/shortcode-builder/shortcode-builder.php:607
1007
  msgid "Enter the number of posts to preload."
1008
  msgstr ""
1009
 
1010
- #: ../admin/shortcode-builder/shortcode-builder.php:623
1011
  #: ../admin/views/add-ons.php:233 ../admin/views/licenses.php:636
1012
  #: ../admin/views/settings.php:63
1013
  msgid "Previous Post"
1014
  msgstr ""
1015
 
1016
- #: ../admin/shortcode-builder/shortcode-builder.php:626
1017
  msgid "Enable the infinite scrolling of single posts."
1018
  msgstr ""
1019
 
1020
- #: ../admin/shortcode-builder/shortcode-builder.php:660
1021
- #: ../admin/shortcode-builder/shortcode-builder.php:1446
1022
  msgid "Taxonomy"
1023
  msgstr ""
1024
 
1025
- #: ../admin/shortcode-builder/shortcode-builder.php:660
1026
  msgid ""
1027
  "Selecting a taxonomy means only previous posts from the same taxonomy will "
1028
  "be returned"
1029
  msgstr ""
1030
 
1031
- #: ../admin/shortcode-builder/shortcode-builder.php:661
1032
  msgid "Query previous posts from the same taxonomy."
1033
  msgstr ""
1034
 
1035
- #: ../admin/shortcode-builder/shortcode-builder.php:675
1036
- #: ../admin/shortcode-builder/shortcode-builder.php:1327
1037
  msgid "Category"
1038
  msgstr ""
1039
 
1040
- #: ../admin/shortcode-builder/shortcode-builder.php:676
1041
- #: ../admin/shortcode-builder/shortcode-builder.php:1387
1042
  msgid "Tag"
1043
  msgstr ""
1044
 
1045
- #: ../admin/shortcode-builder/shortcode-builder.php:690
1046
  msgid ""
1047
  "You must add the Previous Post shortcode directly to your single template "
1048
  "file using the <a href=\"https://developer.wordpress.org/reference/functions/"
@@ -1051,84 +1059,84 @@ msgid ""
1051
  "target=\"_blank\">View documentation</a>"
1052
  msgstr ""
1053
 
1054
- #: ../admin/shortcode-builder/shortcode-builder.php:716
1055
  #: ../admin/views/settings.php:65
1056
  msgid "REST API"
1057
  msgstr ""
1058
 
1059
- #: ../admin/shortcode-builder/shortcode-builder.php:719
1060
  msgid "Enable the WordPress REST API."
1061
  msgstr ""
1062
 
1063
- #: ../admin/shortcode-builder/shortcode-builder.php:743
1064
  msgid "Base URL"
1065
  msgstr ""
1066
 
1067
- #: ../admin/shortcode-builder/shortcode-builder.php:744
1068
  msgid "Set a default Base URL in the Ajax Load More settings panel"
1069
  msgstr ""
1070
 
1071
- #: ../admin/shortcode-builder/shortcode-builder.php:745
1072
  msgid "Enter the base URL to your installation of the REST API."
1073
  msgstr ""
1074
 
1075
- #: ../admin/shortcode-builder/shortcode-builder.php:757
1076
  msgid "Namespace"
1077
  msgstr ""
1078
 
1079
- #: ../admin/shortcode-builder/shortcode-builder.php:758
1080
  msgid "Set a default Namespace in the Ajax Load More settings panel"
1081
  msgstr ""
1082
 
1083
- #: ../admin/shortcode-builder/shortcode-builder.php:759
1084
  msgid "Enter the custom namespace for this Ajax Load More query."
1085
  msgstr ""
1086
 
1087
- #: ../admin/shortcode-builder/shortcode-builder.php:771
1088
  msgid "Endpoint"
1089
  msgstr ""
1090
 
1091
- #: ../admin/shortcode-builder/shortcode-builder.php:772
1092
  msgid "Set a default Endpoint in the Ajax Load More settings panel"
1093
  msgstr ""
1094
 
1095
- #: ../admin/shortcode-builder/shortcode-builder.php:773
1096
  msgid "Enter your custom endpoint for this Ajax Load More query."
1097
  msgstr ""
1098
 
1099
- #: ../admin/shortcode-builder/shortcode-builder.php:785
1100
  msgid "Template ID"
1101
  msgstr ""
1102
 
1103
- #: ../admin/shortcode-builder/shortcode-builder.php:785
1104
  msgid ""
1105
  "Ajax Load More references this ID while looping and displaying your data. "
1106
  "You must still select a repeater template for this instance of Ajax Load More"
1107
  msgstr ""
1108
 
1109
- #: ../admin/shortcode-builder/shortcode-builder.php:786
1110
  msgid ""
1111
  "Enter the ID of your javascript template.<br/><br/>e.g. <em>tmpl-alm-"
1112
  "template</em> = <em>alm-template</em>"
1113
  msgstr ""
1114
 
1115
- #: ../admin/shortcode-builder/shortcode-builder.php:786
1116
- #: ../admin/shortcode-builder/shortcode-builder.php:1332
1117
- #: ../admin/shortcode-builder/shortcode-builder.php:1391
1118
- #: ../admin/shortcode-builder/shortcode-builder.php:1591
1119
  msgid "View Example"
1120
  msgstr ""
1121
 
1122
- #: ../admin/shortcode-builder/shortcode-builder.php:798
1123
  msgid "Debug Mode"
1124
  msgstr ""
1125
 
1126
- #: ../admin/shortcode-builder/shortcode-builder.php:799
1127
  msgid ""
1128
  "Enable debugging (console.log) of REST API responses in the browser console. "
1129
  msgstr ""
1130
 
1131
- #: ../admin/shortcode-builder/shortcode-builder.php:817
1132
  msgid ""
1133
  "Visit <a href=\"http://v2.wp-api.org/\" target=\"_blank\">http://v2.wp-api."
1134
  "org</a> for documentation on creating custom <a href=\"http://v2.wp-api.org/"
@@ -1136,462 +1144,462 @@ msgid ""
1136
  "More."
1137
  msgstr ""
1138
 
1139
- #: ../admin/shortcode-builder/shortcode-builder.php:830
1140
  msgid "SEO (Search Engine Optimization)"
1141
  msgstr ""
1142
 
1143
- #: ../admin/shortcode-builder/shortcode-builder.php:833
1144
  msgid ""
1145
  "Enable address bar URL rewrites as users page through ajax loaded content."
1146
  msgstr ""
1147
 
1148
- #: ../admin/shortcode-builder/shortcode-builder.php:861
1149
  msgid "Display Settings"
1150
  msgstr ""
1151
 
1152
- #: ../admin/shortcode-builder/shortcode-builder.php:870
1153
  msgid "Repeater Template"
1154
  msgstr ""
1155
 
1156
- #: ../admin/shortcode-builder/shortcode-builder.php:872
1157
  msgid ""
1158
  "Select which <a href=\"admin.php?page=ajax-load-more-repeaters\" target="
1159
  "\"_parent\">repeater template</a> you would like to use."
1160
  msgstr ""
1161
 
1162
- #: ../admin/shortcode-builder/shortcode-builder.php:910
1163
  msgid "ID"
1164
  msgstr ""
1165
 
1166
- #: ../admin/shortcode-builder/shortcode-builder.php:910
1167
  msgid ""
1168
  "Adding a unique ID will allow you target this specific Ajax Load More "
1169
  "instance with the alm_query_args_id() filter."
1170
  msgstr ""
1171
 
1172
- #: ../admin/shortcode-builder/shortcode-builder.php:911
1173
  msgid "Set a unique ID for this Ajax Load More instance."
1174
  msgstr ""
1175
 
1176
- #: ../admin/shortcode-builder/shortcode-builder.php:918
1177
  msgid "Generate Unique ID"
1178
  msgstr ""
1179
 
1180
- #: ../admin/shortcode-builder/shortcode-builder.php:926
1181
  msgid ""
1182
  "You can define a global container type on the Ajax Load More settings screen"
1183
  msgstr ""
1184
 
1185
- #: ../admin/shortcode-builder/shortcode-builder.php:927
1186
  msgid ""
1187
  "Override the global Container Type that was set on <a href=\"admin.php?"
1188
  "page=ajax-load-more\">ALM Settings page</a>."
1189
  msgstr ""
1190
 
1191
- #: ../admin/shortcode-builder/shortcode-builder.php:956
1192
  msgid ""
1193
  "You can define global container classes on the Ajax Load More settings screen"
1194
  msgstr ""
1195
 
1196
- #: ../admin/shortcode-builder/shortcode-builder.php:957
1197
  msgid ""
1198
  "Add custom CSS classes to the Ajax Load More container. <br/><br/> e.g. "
1199
  "portfolio-listing large-12 etc"
1200
  msgstr ""
1201
 
1202
- #: ../admin/shortcode-builder/shortcode-builder.php:971
1203
  msgid "Button Labels"
1204
  msgstr ""
1205
 
1206
- #: ../admin/shortcode-builder/shortcode-builder.php:976
1207
  msgid "Label"
1208
  msgstr ""
1209
 
1210
- #: ../admin/shortcode-builder/shortcode-builder.php:977
1211
  msgid "Customize the text of the <em>Load More</em> button."
1212
  msgstr ""
1213
 
1214
- #: ../admin/shortcode-builder/shortcode-builder.php:989
1215
  msgid "Loading Label"
1216
  msgstr ""
1217
 
1218
- #: ../admin/shortcode-builder/shortcode-builder.php:989
1219
  msgid "Leave field empty to not update text while loading content"
1220
  msgstr ""
1221
 
1222
- #: ../admin/shortcode-builder/shortcode-builder.php:990
1223
  msgid ""
1224
  "Update the text of the <em>Load More</em> button while content is loading."
1225
  msgstr ""
1226
 
1227
- #: ../admin/shortcode-builder/shortcode-builder.php:994
1228
  msgid "Loading Posts..."
1229
  msgstr ""
1230
 
1231
- #: ../admin/shortcode-builder/shortcode-builder.php:1004
1232
  msgid "Images Loaded"
1233
  msgstr ""
1234
 
1235
- #: ../admin/shortcode-builder/shortcode-builder.php:1007
1236
  msgid "Wait for all images to load before displaying ajax loaded content"
1237
  msgstr ""
1238
 
1239
- #: ../admin/shortcode-builder/shortcode-builder.php:1008
1240
  msgid "Background images are currently not supported"
1241
  msgstr ""
1242
 
1243
- #: ../admin/shortcode-builder/shortcode-builder.php:1031
1244
  msgid "Pause"
1245
  msgstr ""
1246
 
1247
- #: ../admin/shortcode-builder/shortcode-builder.php:1034
1248
  msgid ""
1249
  "Do <u>NOT</u> load any posts until user clicks the <em>Load More</em> button."
1250
  msgstr ""
1251
 
1252
- #: ../admin/shortcode-builder/shortcode-builder.php:1056
1253
  msgid "Scrolling"
1254
  msgstr ""
1255
 
1256
- #: ../admin/shortcode-builder/shortcode-builder.php:1059
1257
  msgid "Enable Scrolling"
1258
  msgstr ""
1259
 
1260
- #: ../admin/shortcode-builder/shortcode-builder.php:1060
1261
  msgid "Load more posts as the user scrolls the page."
1262
  msgstr ""
1263
 
1264
- #: ../admin/shortcode-builder/shortcode-builder.php:1081
1265
  msgid "Scroll Distance"
1266
  msgstr ""
1267
 
1268
- #: ../admin/shortcode-builder/shortcode-builder.php:1081
1269
  msgid ""
1270
  "Distance is based on the position of the loading button from the bottom of "
1271
  "the screen"
1272
  msgstr ""
1273
 
1274
- #: ../admin/shortcode-builder/shortcode-builder.php:1082
1275
  msgid ""
1276
  "The distance from the bottom of the screen to trigger loading of posts. "
1277
  "(Default = 150)"
1278
  msgstr ""
1279
 
1280
- #: ../admin/shortcode-builder/shortcode-builder.php:1094
1281
  msgid "Maximum Pages"
1282
  msgstr ""
1283
 
1284
- #: ../admin/shortcode-builder/shortcode-builder.php:1094
1285
  msgid "If using an Infinite Scroll button style you should set this to 0"
1286
  msgstr ""
1287
 
1288
- #: ../admin/shortcode-builder/shortcode-builder.php:1095
1289
  msgid "Maximum number of pages to load while scrolling. (0 = unlimited)"
1290
  msgstr ""
1291
 
1292
- #: ../admin/shortcode-builder/shortcode-builder.php:1107
1293
  msgid "Pause Override"
1294
  msgstr ""
1295
 
1296
- #: ../admin/shortcode-builder/shortcode-builder.php:1108
1297
  msgid ""
1298
  "Allow scrolling to override the Pause parameter and trigger the loading of "
1299
  "posts on scroll."
1300
  msgstr ""
1301
 
1302
- #: ../admin/shortcode-builder/shortcode-builder.php:1129
1303
  msgid "Transition"
1304
  msgstr ""
1305
 
1306
- #: ../admin/shortcode-builder/shortcode-builder.php:1132
1307
  msgid "Transition Type"
1308
  msgstr ""
1309
 
1310
- #: ../admin/shortcode-builder/shortcode-builder.php:1133
1311
  msgid "Select a loading transition style."
1312
  msgstr ""
1313
 
1314
- #: ../admin/shortcode-builder/shortcode-builder.php:1140
1315
  msgid "Slide"
1316
  msgstr ""
1317
 
1318
- #: ../admin/shortcode-builder/shortcode-builder.php:1144
1319
  msgid "Fade"
1320
  msgstr ""
1321
 
1322
- #: ../admin/shortcode-builder/shortcode-builder.php:1158
1323
  msgid "Transition Speed"
1324
  msgstr ""
1325
 
1326
- #: ../admin/shortcode-builder/shortcode-builder.php:1158
1327
  msgid "0.5 seconds = 500, 1 second = 1000 etc."
1328
  msgstr ""
1329
 
1330
- #: ../admin/shortcode-builder/shortcode-builder.php:1159
1331
  msgid "The speed of the loading transition in milliseconds"
1332
  msgstr ""
1333
 
1334
- #: ../admin/shortcode-builder/shortcode-builder.php:1171
1335
  msgid "Transition Container"
1336
  msgstr ""
1337
 
1338
- #: ../admin/shortcode-builder/shortcode-builder.php:1171
1339
  msgid ""
1340
  "Removing the transition container may have undesired results and is not "
1341
  "recommended."
1342
  msgstr ""
1343
 
1344
- #: ../admin/shortcode-builder/shortcode-builder.php:1172
1345
  msgid "Remove the Ajax Load More (.alm-reveal) loading container."
1346
  msgstr ""
1347
 
1348
- #: ../admin/shortcode-builder/shortcode-builder.php:1179
1349
  msgid "Remove Container"
1350
  msgstr ""
1351
 
1352
- #: ../admin/shortcode-builder/shortcode-builder.php:1190
1353
  msgid "Destroy After"
1354
  msgstr ""
1355
 
1356
- #: ../admin/shortcode-builder/shortcode-builder.php:1193
1357
  msgid ""
1358
  "Remove ajax load more functionality after '<em>n</em>' number of pages have "
1359
  "been loaded."
1360
  msgstr ""
1361
 
1362
- #: ../admin/shortcode-builder/shortcode-builder.php:1211
1363
  msgid "Query Parameters"
1364
  msgstr ""
1365
 
1366
- #: ../admin/shortcode-builder/shortcode-builder.php:1215
1367
  msgid "Posts Per Page"
1368
  msgstr ""
1369
 
1370
- #: ../admin/shortcode-builder/shortcode-builder.php:1218
1371
  msgid "Select the number of posts to load with each request."
1372
  msgstr ""
1373
 
1374
- #: ../admin/shortcode-builder/shortcode-builder.php:1237
1375
  msgid "Post Type"
1376
  msgstr ""
1377
 
1378
- #: ../admin/shortcode-builder/shortcode-builder.php:1242
1379
  msgid "Select the Post Types to include in this Ajax Load More query."
1380
  msgstr ""
1381
 
1382
- #: ../admin/shortcode-builder/shortcode-builder.php:1256
1383
  msgid "Any"
1384
  msgstr ""
1385
 
1386
- #: ../admin/shortcode-builder/shortcode-builder.php:1268
1387
  msgid "Sticky Posts"
1388
  msgstr ""
1389
 
1390
- #: ../admin/shortcode-builder/shortcode-builder.php:1268
1391
  msgid "Sticky posts are only available for Posts."
1392
  msgstr ""
1393
 
1394
- #: ../admin/shortcode-builder/shortcode-builder.php:1269
1395
  msgid ""
1396
  "Preserve the ordering of sticky posts by having them appear first in the "
1397
  "Ajax listing."
1398
  msgstr ""
1399
 
1400
- #: ../admin/shortcode-builder/shortcode-builder.php:1276
1401
  msgid "Enable Sticky Posts"
1402
  msgstr ""
1403
 
1404
- #: ../admin/shortcode-builder/shortcode-builder.php:1298
1405
  msgid "Post Format"
1406
  msgstr ""
1407
 
1408
- #: ../admin/shortcode-builder/shortcode-builder.php:1301
1409
  msgid ""
1410
  "Select a <a href=\"http://codex.wordpress.org/Post_Formats\" target=\"_blank"
1411
  "\">Post Format</a> to query."
1412
  msgstr ""
1413
 
1414
- #: ../admin/shortcode-builder/shortcode-builder.php:1304
1415
  msgid "Select Post Format"
1416
  msgstr ""
1417
 
1418
- #: ../admin/shortcode-builder/shortcode-builder.php:1305
1419
  msgid "Standard"
1420
  msgstr ""
1421
 
1422
- #: ../admin/shortcode-builder/shortcode-builder.php:1331
1423
  msgid ""
1424
  "A comma separated list of categories to include by slug. (design, research "
1425
  "etc...)"
1426
  msgstr ""
1427
 
1428
- #: ../admin/shortcode-builder/shortcode-builder.php:1354
1429
- #: ../admin/shortcode-builder/shortcode-builder.php:1412
1430
- #: ../admin/shortcode-builder/shortcode-builder.php:1590
1431
  msgid "Exclude"
1432
  msgstr ""
1433
 
1434
- #: ../admin/shortcode-builder/shortcode-builder.php:1355
1435
  msgid ""
1436
  "A comma separated list of categories to exclude by ID. (3, 12, 35 etc..)"
1437
  msgstr ""
1438
 
1439
- #: ../admin/shortcode-builder/shortcode-builder.php:1390
1440
- #: ../admin/shortcode-builder/shortcode-builder.php:1579
1441
  msgid "Include"
1442
  msgstr ""
1443
 
1444
- #: ../admin/shortcode-builder/shortcode-builder.php:1391
1445
  msgid ""
1446
  "A comma separated list of tags to include by slug. (toronto, canada etc...)"
1447
  msgstr ""
1448
 
1449
- #: ../admin/shortcode-builder/shortcode-builder.php:1413
1450
  msgid "A comma separated list of tags to exclude by ID. (30, 12, 99 etc..)"
1451
  msgstr ""
1452
 
1453
- #: ../admin/shortcode-builder/shortcode-builder.php:1449
1454
  msgid "Select a taxonomy then select the terms and an operator."
1455
  msgstr ""
1456
 
1457
- #: ../admin/shortcode-builder/shortcode-builder.php:1454
1458
- #: ../admin/shortcode-builder/shortcode-builder.php:1520
1459
  msgid "Add Another"
1460
  msgstr ""
1461
 
1462
- #: ../admin/shortcode-builder/shortcode-builder.php:1464
1463
  msgid "Date"
1464
  msgstr ""
1465
 
1466
- #: ../admin/shortcode-builder/shortcode-builder.php:1467
1467
  msgid ""
1468
  "Enter a year, month(number) and day to query by date archive.<br/>&raquo; <a "
1469
  "href=\"admin.php?page=ajax-load-more-examples#example-date\">View Example</a>"
1470
  msgstr ""
1471
 
1472
- #: ../admin/shortcode-builder/shortcode-builder.php:1473
1473
  msgid "Year:"
1474
  msgstr ""
1475
 
1476
- #: ../admin/shortcode-builder/shortcode-builder.php:1477
1477
  msgid "Month:"
1478
  msgstr ""
1479
 
1480
- #: ../admin/shortcode-builder/shortcode-builder.php:1481
1481
  msgid "Day:"
1482
  msgstr ""
1483
 
1484
- #: ../admin/shortcode-builder/shortcode-builder.php:1492
1485
  msgid "Custom Fields (Meta_Query)"
1486
  msgstr ""
1487
 
1488
- #: ../admin/shortcode-builder/shortcode-builder.php:1495
1489
  msgid ""
1490
  "Query for <a href=\"http://codex.wordpress.org/Class_Reference/WP_Meta_Query"
1491
  "\" target=\"_blank\">custom field</a> by entering a custom field key, value "
1492
  "and operator."
1493
  msgstr ""
1494
 
1495
- #: ../admin/shortcode-builder/shortcode-builder.php:1506
1496
  msgid ""
1497
  "The logical relationship between each custom field when there is more than "
1498
  "one."
1499
  msgstr ""
1500
 
1501
- #: ../admin/shortcode-builder/shortcode-builder.php:1536
1502
  msgid "Author"
1503
  msgstr ""
1504
 
1505
- #: ../admin/shortcode-builder/shortcode-builder.php:1539
1506
  msgid "Select an Author to query(by ID)."
1507
  msgstr ""
1508
 
1509
- #: ../admin/shortcode-builder/shortcode-builder.php:1560
1510
  msgid "Search Term"
1511
  msgstr ""
1512
 
1513
- #: ../admin/shortcode-builder/shortcode-builder.php:1563
1514
  msgid "Enter a search term to query."
1515
  msgstr ""
1516
 
1517
- #: ../admin/shortcode-builder/shortcode-builder.php:1567
1518
  msgid "Enter search term"
1519
  msgstr ""
1520
 
1521
- #: ../admin/shortcode-builder/shortcode-builder.php:1576
1522
  msgid "Post Parameters"
1523
  msgstr ""
1524
 
1525
- #: ../admin/shortcode-builder/shortcode-builder.php:1580
1526
  msgid "A comma separated list of post ID's to query."
1527
  msgstr ""
1528
 
1529
- #: ../admin/shortcode-builder/shortcode-builder.php:1584
1530
  msgid "225, 340, 818, etc..."
1531
  msgstr ""
1532
 
1533
- #: ../admin/shortcode-builder/shortcode-builder.php:1591
1534
  msgid "A comma separated list of post ID's to exclude from query."
1535
  msgstr ""
1536
 
1537
- #: ../admin/shortcode-builder/shortcode-builder.php:1601
1538
  msgid "Post Status"
1539
  msgstr ""
1540
 
1541
- #: ../admin/shortcode-builder/shortcode-builder.php:1601
1542
  msgid ""
1543
  "Post Status parameters are only available for logged in (admin) users. Non "
1544
  "logged in users will only have access to view content in a 'publish' or "
1545
  "'inherit' state. "
1546
  msgstr ""
1547
 
1548
- #: ../admin/shortcode-builder/shortcode-builder.php:1602
1549
  msgid "Select status of the post."
1550
  msgstr ""
1551
 
1552
- #: ../admin/shortcode-builder/shortcode-builder.php:1607
1553
  msgid "Published"
1554
  msgstr ""
1555
 
1556
- #: ../admin/shortcode-builder/shortcode-builder.php:1624
1557
  msgid "Ordering"
1558
  msgstr ""
1559
 
1560
- #: ../admin/shortcode-builder/shortcode-builder.php:1627
1561
  msgid "Sort posts by Order and Orderby parameters."
1562
  msgstr ""
1563
 
1564
- #: ../admin/shortcode-builder/shortcode-builder.php:1631
1565
  msgid "Order"
1566
  msgstr ""
1567
 
1568
- #: ../admin/shortcode-builder/shortcode-builder.php:1638
1569
  msgid "Order By"
1570
  msgstr ""
1571
 
1572
- #: ../admin/shortcode-builder/shortcode-builder.php:1659
1573
  msgid "Offset"
1574
  msgstr ""
1575
 
1576
- #: ../admin/shortcode-builder/shortcode-builder.php:1662
1577
  msgid "Offset the initial query by <em>'n'</em> number of posts"
1578
  msgstr ""
1579
 
1580
- #: ../admin/shortcode-builder/shortcode-builder.php:1675
1581
  msgid "Custom Arguments"
1582
  msgstr ""
1583
 
1584
- #: ../admin/shortcode-builder/shortcode-builder.php:1678
1585
  msgid "A semicolon separated list of custom value:pair arguments."
1586
  msgstr ""
1587
 
1588
- #: ../admin/shortcode-builder/shortcode-builder.php:1678
1589
  msgid ""
1590
  "Custom Arguments can be used to query by parameters not available in the "
1591
  "Shortcode Builder."
1592
  msgstr ""
1593
 
1594
- #: ../admin/shortcode-builder/shortcode-builder.php:1682
1595
  msgid "event_display:upcoming"
1596
  msgstr ""
1597
 
@@ -2046,11 +2054,11 @@ msgstr ""
2046
  msgid "Reset Shortcode Builder"
2047
  msgstr ""
2048
 
2049
- #: ../ajax-load-more.php:236
2050
  msgid "Settings"
2051
  msgstr ""
2052
 
2053
- #: ../core/functions.php:575
2054
  msgid "Pages:"
2055
  msgstr ""
2056
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Ajax Load More\n"
4
+ "POT-Creation-Date: 2017-05-22 21:25-0500\n"
5
+ "PO-Revision-Date: 2017-05-22 21:25-0500\n"
6
+ "Last-Translator: Darren Cooney <darren.cooney@gmail.com>\n"
7
  "Language-Team: \n"
8
  "Language: en_CA\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.6.7\n"
13
  "X-Poedit-Basepath: .\n"
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
  "X-Poedit-KeywordsList: __;_e\n"
116
  msgid "Error Writing File"
117
  msgstr ""
118
 
119
+ #: ../admin/admin.php:936 ../admin/shortcode-builder/shortcode-builder.php:928
120
  msgid "Container Type"
121
  msgstr ""
122
 
123
+ #: ../admin/admin.php:944 ../admin/shortcode-builder/shortcode-builder.php:958
124
  msgid "Container Classes"
125
  msgstr ""
126
 
224
  msgstr ""
225
 
226
  #: ../admin/admin.php:1314
227
+ #: ../admin/shortcode-builder/shortcode-builder.php:983
228
+ #: ../core/classes/class.alm-shortcode.php:132
229
  msgid "Older Posts"
230
  msgstr ""
231
 
340
  msgstr ""
341
 
342
  #: ../admin/includes/components/repeater-options.php:2
343
+ #: ../admin/shortcode-builder/shortcode-builder.php:908
344
  msgid "Options"
345
  msgstr ""
346
 
551
  #: ../admin/shortcode-builder/includes/tax-query-options.php:5
552
  #: ../admin/shortcode-builder/includes/tax-query-options.php:50
553
  #: ../admin/shortcode-builder/includes/tax-query-options.php:81
554
+ #: ../admin/shortcode-builder/shortcode-builder.php:676
555
  msgid "Select Taxonomy"
556
  msgstr ""
557
 
568
  msgstr ""
569
 
570
  #: ../admin/shortcode-builder/includes/tax-query-options.php:36
571
+ #: ../admin/shortcode-builder/shortcode-builder.php:1508
572
  msgid "Relation:"
573
  msgstr ""
574
 
591
  msgstr ""
592
 
593
  #: ../admin/shortcode-builder/shortcode-builder.php:31
594
+ #: ../admin/shortcode-builder/shortcode-builder.php:111
595
+ #: ../admin/shortcode-builder/shortcode-builder.php:155
596
+ #: ../admin/shortcode-builder/shortcode-builder.php:249
597
+ #: ../admin/shortcode-builder/shortcode-builder.php:400
598
+ #: ../admin/shortcode-builder/shortcode-builder.php:517
599
+ #: ../admin/shortcode-builder/shortcode-builder.php:540
600
+ #: ../admin/shortcode-builder/shortcode-builder.php:594
601
+ #: ../admin/shortcode-builder/shortcode-builder.php:635
602
+ #: ../admin/shortcode-builder/shortcode-builder.php:728
603
+ #: ../admin/shortcode-builder/shortcode-builder.php:808
604
+ #: ../admin/shortcode-builder/shortcode-builder.php:842
605
+ #: ../admin/shortcode-builder/shortcode-builder.php:1018
606
+ #: ../admin/shortcode-builder/shortcode-builder.php:1043
607
+ #: ../admin/shortcode-builder/shortcode-builder.php:1069
608
+ #: ../admin/shortcode-builder/shortcode-builder.php:1116
609
  msgid "True"
610
  msgstr ""
611
 
612
  #: ../admin/shortcode-builder/shortcode-builder.php:35
613
+ #: ../admin/shortcode-builder/shortcode-builder.php:115
614
+ #: ../admin/shortcode-builder/shortcode-builder.php:159
615
+ #: ../admin/shortcode-builder/shortcode-builder.php:253
616
+ #: ../admin/shortcode-builder/shortcode-builder.php:404
617
+ #: ../admin/shortcode-builder/shortcode-builder.php:521
618
+ #: ../admin/shortcode-builder/shortcode-builder.php:544
619
+ #: ../admin/shortcode-builder/shortcode-builder.php:598
620
+ #: ../admin/shortcode-builder/shortcode-builder.php:639
621
+ #: ../admin/shortcode-builder/shortcode-builder.php:732
622
+ #: ../admin/shortcode-builder/shortcode-builder.php:812
623
+ #: ../admin/shortcode-builder/shortcode-builder.php:846
624
+ #: ../admin/shortcode-builder/shortcode-builder.php:1022
625
+ #: ../admin/shortcode-builder/shortcode-builder.php:1047
626
+ #: ../admin/shortcode-builder/shortcode-builder.php:1073
627
+ #: ../admin/shortcode-builder/shortcode-builder.php:1120
628
  msgid "False"
629
  msgstr ""
630
 
631
  #: ../admin/shortcode-builder/shortcode-builder.php:47
632
+ #: ../admin/shortcode-builder/shortcode-builder.php:264
633
+ #: ../admin/shortcode-builder/shortcode-builder.php:417
634
+ #: ../admin/shortcode-builder/shortcode-builder.php:649
635
  msgid "Post ID"
636
  msgstr ""
637
 
642
  msgstr ""
643
 
644
  #: ../admin/shortcode-builder/shortcode-builder.php:48
645
+ #: ../admin/shortcode-builder/shortcode-builder.php:418
646
  msgid "The ID of the current page/post."
647
  msgstr ""
648
 
649
  #: ../admin/shortcode-builder/shortcode-builder.php:61
650
  #: ../admin/shortcode-builder/shortcode-builder.php:66
651
+ #: ../admin/shortcode-builder/shortcode-builder.php:87
652
  msgid "Field Type"
653
  msgstr ""
654
 
661
  msgstr ""
662
 
663
  #: ../admin/shortcode-builder/shortcode-builder.php:69
664
+ msgid "Flexible Content"
665
  msgstr ""
666
 
667
  #: ../admin/shortcode-builder/shortcode-builder.php:70
668
+ msgid "Gallery"
669
+ msgstr ""
670
+
671
+ #: ../admin/shortcode-builder/shortcode-builder.php:71
672
+ msgid "Relationship"
673
+ msgstr ""
674
+
675
+ #: ../admin/shortcode-builder/shortcode-builder.php:72
676
  msgid "Repeater"
677
  msgstr ""
678
 
679
+ #: ../admin/shortcode-builder/shortcode-builder.php:82
680
  msgid "Field Name"
681
  msgstr ""
682
 
683
+ #: ../admin/shortcode-builder/shortcode-builder.php:83
684
  msgid "Enter the name of the ACF field"
685
  msgstr ""
686
 
687
+ #: ../admin/shortcode-builder/shortcode-builder.php:101
688
  #: ../admin/views/add-ons.php:21 ../admin/views/licenses.php:111
689
  #: ../admin/views/settings.php:57
690
  msgid "Cache"
691
  msgstr ""
692
 
693
+ #: ../admin/shortcode-builder/shortcode-builder.php:104
694
  msgid "Turn on content caching."
695
  msgstr ""
696
 
697
+ #: ../admin/shortcode-builder/shortcode-builder.php:125
698
  msgid "Cache ID"
699
  msgstr ""
700
 
701
+ #: ../admin/shortcode-builder/shortcode-builder.php:126
702
  msgid ""
703
  "You <u>must</u> generate a unique ID for this cached query - this unique ID "
704
  "will be used as a content identifier."
705
  msgstr ""
706
 
707
+ #: ../admin/shortcode-builder/shortcode-builder.php:132
708
  msgid "Generate Cache ID"
709
  msgstr ""
710
 
711
+ #: ../admin/shortcode-builder/shortcode-builder.php:144
712
  #: ../admin/views/add-ons.php:48 ../admin/views/licenses.php:176
713
  msgid "Call to Actions"
714
  msgstr ""
715
 
716
+ #: ../admin/shortcode-builder/shortcode-builder.php:148
717
  msgid "Insert call to action block."
718
  msgstr ""
719
 
720
+ #: ../admin/shortcode-builder/shortcode-builder.php:172
721
  msgid "CTA Positioning"
722
  msgstr ""
723
 
724
+ #: ../admin/shortcode-builder/shortcode-builder.php:173
725
  msgid ""
726
  "Insert call to action <strong><em id=\"sequence-update-before-after"
727
  "\">before</em></strong> post #<strong><em id=\"sequence-update\">1</em></"
728
  "strong>"
729
  msgstr ""
730
 
731
+ #: ../admin/shortcode-builder/shortcode-builder.php:178
732
  msgid "Before / After"
733
  msgstr ""
734
 
735
+ #: ../admin/shortcode-builder/shortcode-builder.php:180
736
  msgid "Before"
737
  msgstr ""
738
 
739
+ #: ../admin/shortcode-builder/shortcode-builder.php:181
740
  msgid "After"
741
  msgstr ""
742
 
743
+ #: ../admin/shortcode-builder/shortcode-builder.php:185
744
  msgid "Post #"
745
  msgstr ""
746
 
747
+ #: ../admin/shortcode-builder/shortcode-builder.php:196
748
+ #: ../admin/shortcode-builder/shortcode-builder.php:868
749
  msgid "Template"
750
  msgstr ""
751
 
752
+ #: ../admin/shortcode-builder/shortcode-builder.php:198
753
  msgid ""
754
  "Select the <a href=\"admin.php?page=ajax-load-more-repeaters\" target="
755
  "\"_parent\">repeater template</a> that will display your call to action."
756
  msgstr ""
757
 
758
+ #: ../admin/shortcode-builder/shortcode-builder.php:205
759
  #, fuzzy
760
  msgid "-- Select Repeater --"
761
  msgstr "Sélectionnez province"
762
 
763
+ #: ../admin/shortcode-builder/shortcode-builder.php:225
764
  msgid ""
765
  "Call to actions do NOT count as a post within an Ajax Load More loop.<br/>\n"
766
  " For example, if you set <strong>posts_per_page=\"5\"</"
767
  "strong> in your shortcode, 6 items will be displayed."
768
  msgstr ""
769
 
770
+ #: ../admin/shortcode-builder/shortcode-builder.php:239
771
  #: ../admin/views/add-ons.php:75 ../admin/views/licenses.php:241
772
  msgid "Comments"
773
  msgstr ""
774
 
775
+ #: ../admin/shortcode-builder/shortcode-builder.php:242
776
  msgid "Enable Ajax Load More to display blog comments."
777
  msgstr ""
778
 
779
+ #: ../admin/shortcode-builder/shortcode-builder.php:265
780
+ #: ../admin/shortcode-builder/shortcode-builder.php:650
781
  msgid "The ID of the current single post."
782
  msgstr ""
783
 
784
+ #: ../admin/shortcode-builder/shortcode-builder.php:276
785
  msgid "Comments Per Page"
786
  msgstr ""
787
 
788
+ #: ../admin/shortcode-builder/shortcode-builder.php:277
789
  msgid "The number of top level items to show for each page of comments."
790
  msgstr ""
791
 
792
+ #: ../admin/shortcode-builder/shortcode-builder.php:285
793
  msgid ""
794
  "<strong>Note</strong>: The amount selected does NOT include comment replies."
795
  msgstr ""
796
 
797
+ #: ../admin/shortcode-builder/shortcode-builder.php:291
798
  msgid "Comment Type"
799
  msgstr ""
800
 
801
+ #: ../admin/shortcode-builder/shortcode-builder.php:292
802
  msgid "The type of comment(s) to display."
803
  msgstr ""
804
 
805
+ #: ../admin/shortcode-builder/shortcode-builder.php:297
806
  msgid "Comment"
807
  msgstr ""
808
 
809
+ #: ../admin/shortcode-builder/shortcode-builder.php:298
810
  msgid "All"
811
  msgstr ""
812
 
813
+ #: ../admin/shortcode-builder/shortcode-builder.php:299
814
  msgid "Trackback"
815
  msgstr ""
816
 
817
+ #: ../admin/shortcode-builder/shortcode-builder.php:300
818
  msgid "Pingback"
819
  msgstr ""
820
 
821
+ #: ../admin/shortcode-builder/shortcode-builder.php:301
822
  msgid "Pings"
823
  msgstr ""
824
 
825
+ #: ../admin/shortcode-builder/shortcode-builder.php:309
826
  msgid "Comment Style"
827
  msgstr ""
828
 
829
+ #: ../admin/shortcode-builder/shortcode-builder.php:310
830
  msgid "Select the HTML container style for your comments."
831
  msgstr ""
832
 
833
+ #: ../admin/shortcode-builder/shortcode-builder.php:335
834
  msgid "Comment Template"
835
  msgstr ""
836
 
837
+ #: ../admin/shortcode-builder/shortcode-builder.php:336
838
  msgid "Select a repeater template that will display comment data."
839
  msgstr ""
840
 
841
+ #: ../admin/shortcode-builder/shortcode-builder.php:342
842
+ #: ../admin/shortcode-builder/shortcode-builder.php:1150
843
  msgid "None"
844
  msgstr ""
845
 
846
+ #: ../admin/shortcode-builder/shortcode-builder.php:343
847
  msgid "Default"
848
  msgstr ""
849
 
850
+ #: ../admin/shortcode-builder/shortcode-builder.php:355
851
  msgid ""
852
  "<strong>Note</strong>: <span>None</span> will use the default WordPress "
853
  "comment layout."
854
  msgstr ""
855
 
856
+ #: ../admin/shortcode-builder/shortcode-builder.php:364
857
  msgid "Callback Function"
858
  msgstr ""
859
 
860
+ #: ../admin/shortcode-builder/shortcode-builder.php:365
861
  msgid ""
862
  "A custom <a href=\"https://codex.wordpress.org/Function_Reference/"
863
  "wp_list_comments#Arguments\" target=\"_blank\">callback</a> function that "
864
  "will display each comment."
865
  msgstr ""
866
 
867
+ #: ../admin/shortcode-builder/shortcode-builder.php:373
868
  msgid ""
869
  "<strong>Note</strong>: The majority of premium themes have a custom callback "
870
  "function for displaying comments. Please see comments.php or functions.php "
871
  "within your theme directory to locate the callback function for your theme."
872
  msgstr ""
873
 
874
+ #: ../admin/shortcode-builder/shortcode-builder.php:378
875
  msgid ""
876
  "You must add the comments shortcode directly to your single template file "
877
  "using the <a href=\"https://developer.wordpress.org/reference/functions/"
880
  "\"_blank\">View documentation</a>"
881
  msgstr ""
882
 
883
+ #: ../admin/shortcode-builder/shortcode-builder.php:390
884
  #: ../admin/views/add-ons.php:154 ../admin/views/licenses.php:440
885
  #, fuzzy
886
  msgid "Next Page"
887
  msgstr "Imprimer cette page"
888
 
889
+ #: ../admin/shortcode-builder/shortcode-builder.php:393
890
  msgid "Enable the infinite scrolling of multipage WordPress content using the"
891
  msgstr ""
892
 
893
+ #: ../admin/shortcode-builder/shortcode-builder.php:393
894
  msgid "Quicktag"
895
  msgstr ""
896
 
897
+ #: ../admin/shortcode-builder/shortcode-builder.php:430
898
  msgid "URL Rewrite"
899
  msgstr ""
900
 
901
+ #: ../admin/shortcode-builder/shortcode-builder.php:431
902
  msgid "Update the browser address bar as pages come into view"
903
  msgstr ""
904
 
905
+ #: ../admin/shortcode-builder/shortcode-builder.php:438
906
  msgid "Yes, update the URL"
907
  msgstr ""
908
 
909
+ #: ../admin/shortcode-builder/shortcode-builder.php:450
910
  msgid "Google Analytics"
911
  msgstr ""
912
 
913
+ #: ../admin/shortcode-builder/shortcode-builder.php:451
914
  msgid ""
915
  "You must have a reference to your Google Analytics tracking code already on "
916
  "the page"
917
  msgstr ""
918
 
919
+ #: ../admin/shortcode-builder/shortcode-builder.php:453
920
  msgid "Each time a page is loaded it will count as a pageview"
921
  msgstr ""
922
 
923
+ #: ../admin/shortcode-builder/shortcode-builder.php:460
924
  msgid "Yes, send pageviews to Google Analytics"
925
  msgstr ""
926
 
927
+ #: ../admin/shortcode-builder/shortcode-builder.php:471
928
  msgid "Scroll to Page"
929
  msgstr ""
930
 
931
+ #: ../admin/shortcode-builder/shortcode-builder.php:472
932
  msgid "Set Scroll Speed to 0 to disable scrolling to page"
933
  msgstr ""
934
 
935
+ #: ../admin/shortcode-builder/shortcode-builder.php:475
936
  msgid "Scroll users automatically to the next page on 'Load More' button click"
937
  msgstr ""
938
 
939
+ #: ../admin/shortcode-builder/shortcode-builder.php:481
940
  msgid "Scroll Speed"
941
  msgstr ""
942
 
943
+ #: ../admin/shortcode-builder/shortcode-builder.php:482
944
  msgid "Scrolling speed in milliseconds (e.g. 1 second = 1000)"
945
  msgstr ""
946
 
947
+ #: ../admin/shortcode-builder/shortcode-builder.php:488
948
  msgid "Scroll Top"
949
  msgstr ""
950
 
951
+ #: ../admin/shortcode-builder/shortcode-builder.php:489
952
  msgid ""
953
  "The scrolltop position of the window (used with scrolling and fwd/back "
954
  "browser buttons)"
955
  msgstr ""
956
 
957
+ #: ../admin/shortcode-builder/shortcode-builder.php:496
958
  msgid ""
959
  "You must add the Next Page shortcode directly to your single template file "
960
  "using the <a href=\"https://developer.wordpress.org/reference/functions/"
963
  "\"_blank\">View documentation</a>"
964
  msgstr ""
965
 
966
+ #: ../admin/shortcode-builder/shortcode-builder.php:508
967
  #: ../admin/views/add-ons.php:180 ../admin/views/licenses.php:507
968
  #: ../admin/views/settings.php:61
969
  msgid "Paging"
970
  msgstr ""
971
 
972
+ #: ../admin/shortcode-builder/shortcode-builder.php:510
973
  msgid "Replace infinite scrolling with a paged ajax navigation system."
974
  msgstr ""
975
 
976
+ #: ../admin/shortcode-builder/shortcode-builder.php:532
977
  msgid "Paging Controls"
978
  msgstr ""
979
 
980
+ #: ../admin/shortcode-builder/shortcode-builder.php:533
981
  msgid "Show (&laquo;)previous and next(&raquo;) buttons."
982
  msgstr ""
983
 
984
+ #: ../admin/shortcode-builder/shortcode-builder.php:553
985
  msgid "Paging Navigation Classes"
986
  msgstr ""
987
 
988
+ #: ../admin/shortcode-builder/shortcode-builder.php:554
989
  msgid "Add custom CSS classes to the paging navigation menu."
990
  msgstr ""
991
 
992
+ #: ../admin/shortcode-builder/shortcode-builder.php:565
993
  msgid "Show at Most"
994
  msgstr ""
995
 
996
+ #: ../admin/shortcode-builder/shortcode-builder.php:566
997
  msgid ""
998
  "The maximum amount of page menu items to show at a time. <br/.>0 = no maximum"
999
  msgstr ""
1000
 
1001
+ #: ../admin/shortcode-builder/shortcode-builder.php:584
1002
  #: ../admin/views/add-ons.php:207 ../admin/views/licenses.php:572
1003
  msgid "Preloaded"
1004
  msgstr ""
1005
 
1006
+ #: ../admin/shortcode-builder/shortcode-builder.php:587
1007
  msgid "Preload posts prior to making Ajax requests."
1008
  msgstr ""
1009
 
1010
+ #: ../admin/shortcode-builder/shortcode-builder.php:608
1011
  msgid "Preload Amount"
1012
  msgstr ""
1013
 
1014
+ #: ../admin/shortcode-builder/shortcode-builder.php:609
1015
  msgid "Enter the number of posts to preload."
1016
  msgstr ""
1017
 
1018
+ #: ../admin/shortcode-builder/shortcode-builder.php:625
1019
  #: ../admin/views/add-ons.php:233 ../admin/views/licenses.php:636
1020
  #: ../admin/views/settings.php:63
1021
  msgid "Previous Post"
1022
  msgstr ""
1023
 
1024
+ #: ../admin/shortcode-builder/shortcode-builder.php:628
1025
  msgid "Enable the infinite scrolling of single posts."
1026
  msgstr ""
1027
 
1028
+ #: ../admin/shortcode-builder/shortcode-builder.php:662
1029
+ #: ../admin/shortcode-builder/shortcode-builder.php:1448
1030
  msgid "Taxonomy"
1031
  msgstr ""
1032
 
1033
+ #: ../admin/shortcode-builder/shortcode-builder.php:662
1034
  msgid ""
1035
  "Selecting a taxonomy means only previous posts from the same taxonomy will "
1036
  "be returned"
1037
  msgstr ""
1038
 
1039
+ #: ../admin/shortcode-builder/shortcode-builder.php:663
1040
  msgid "Query previous posts from the same taxonomy."
1041
  msgstr ""
1042
 
1043
+ #: ../admin/shortcode-builder/shortcode-builder.php:677
1044
+ #: ../admin/shortcode-builder/shortcode-builder.php:1329
1045
  msgid "Category"
1046
  msgstr ""
1047
 
1048
+ #: ../admin/shortcode-builder/shortcode-builder.php:678
1049
+ #: ../admin/shortcode-builder/shortcode-builder.php:1389
1050
  msgid "Tag"
1051
  msgstr ""
1052
 
1053
+ #: ../admin/shortcode-builder/shortcode-builder.php:692
1054
  msgid ""
1055
  "You must add the Previous Post shortcode directly to your single template "
1056
  "file using the <a href=\"https://developer.wordpress.org/reference/functions/"
1059
  "target=\"_blank\">View documentation</a>"
1060
  msgstr ""
1061
 
1062
+ #: ../admin/shortcode-builder/shortcode-builder.php:718
1063
  #: ../admin/views/settings.php:65
1064
  msgid "REST API"
1065
  msgstr ""
1066
 
1067
+ #: ../admin/shortcode-builder/shortcode-builder.php:721
1068
  msgid "Enable the WordPress REST API."
1069
  msgstr ""
1070
 
1071
+ #: ../admin/shortcode-builder/shortcode-builder.php:745
1072
  msgid "Base URL"
1073
  msgstr ""
1074
 
1075
+ #: ../admin/shortcode-builder/shortcode-builder.php:746
1076
  msgid "Set a default Base URL in the Ajax Load More settings panel"
1077
  msgstr ""
1078
 
1079
+ #: ../admin/shortcode-builder/shortcode-builder.php:747
1080
  msgid "Enter the base URL to your installation of the REST API."
1081
  msgstr ""
1082
 
1083
+ #: ../admin/shortcode-builder/shortcode-builder.php:759
1084
  msgid "Namespace"
1085
  msgstr ""
1086
 
1087
+ #: ../admin/shortcode-builder/shortcode-builder.php:760
1088
  msgid "Set a default Namespace in the Ajax Load More settings panel"
1089
  msgstr ""
1090
 
1091
+ #: ../admin/shortcode-builder/shortcode-builder.php:761
1092
  msgid "Enter the custom namespace for this Ajax Load More query."
1093
  msgstr ""
1094
 
1095
+ #: ../admin/shortcode-builder/shortcode-builder.php:773
1096
  msgid "Endpoint"
1097
  msgstr ""
1098
 
1099
+ #: ../admin/shortcode-builder/shortcode-builder.php:774
1100
  msgid "Set a default Endpoint in the Ajax Load More settings panel"
1101
  msgstr ""
1102
 
1103
+ #: ../admin/shortcode-builder/shortcode-builder.php:775
1104
  msgid "Enter your custom endpoint for this Ajax Load More query."
1105
  msgstr ""
1106
 
1107
+ #: ../admin/shortcode-builder/shortcode-builder.php:787
1108
  msgid "Template ID"
1109
  msgstr ""
1110
 
1111
+ #: ../admin/shortcode-builder/shortcode-builder.php:787
1112
  msgid ""
1113
  "Ajax Load More references this ID while looping and displaying your data. "
1114
  "You must still select a repeater template for this instance of Ajax Load More"
1115
  msgstr ""
1116
 
1117
+ #: ../admin/shortcode-builder/shortcode-builder.php:788
1118
  msgid ""
1119
  "Enter the ID of your javascript template.<br/><br/>e.g. <em>tmpl-alm-"
1120
  "template</em> = <em>alm-template</em>"
1121
  msgstr ""
1122
 
1123
+ #: ../admin/shortcode-builder/shortcode-builder.php:788
1124
+ #: ../admin/shortcode-builder/shortcode-builder.php:1334
1125
+ #: ../admin/shortcode-builder/shortcode-builder.php:1393
1126
+ #: ../admin/shortcode-builder/shortcode-builder.php:1593
1127
  msgid "View Example"
1128
  msgstr ""
1129
 
1130
+ #: ../admin/shortcode-builder/shortcode-builder.php:800
1131
  msgid "Debug Mode"
1132
  msgstr ""
1133
 
1134
+ #: ../admin/shortcode-builder/shortcode-builder.php:801
1135
  msgid ""
1136
  "Enable debugging (console.log) of REST API responses in the browser console. "
1137
  msgstr ""
1138
 
1139
+ #: ../admin/shortcode-builder/shortcode-builder.php:819
1140
  msgid ""
1141
  "Visit <a href=\"http://v2.wp-api.org/\" target=\"_blank\">http://v2.wp-api."
1142
  "org</a> for documentation on creating custom <a href=\"http://v2.wp-api.org/"
1144
  "More."
1145
  msgstr ""
1146
 
1147
+ #: ../admin/shortcode-builder/shortcode-builder.php:832
1148
  msgid "SEO (Search Engine Optimization)"
1149
  msgstr ""
1150
 
1151
+ #: ../admin/shortcode-builder/shortcode-builder.php:835
1152
  msgid ""
1153
  "Enable address bar URL rewrites as users page through ajax loaded content."
1154
  msgstr ""
1155
 
1156
+ #: ../admin/shortcode-builder/shortcode-builder.php:863
1157
  msgid "Display Settings"
1158
  msgstr ""
1159
 
1160
+ #: ../admin/shortcode-builder/shortcode-builder.php:872
1161
  msgid "Repeater Template"
1162
  msgstr ""
1163
 
1164
+ #: ../admin/shortcode-builder/shortcode-builder.php:874
1165
  msgid ""
1166
  "Select which <a href=\"admin.php?page=ajax-load-more-repeaters\" target="
1167
  "\"_parent\">repeater template</a> you would like to use."
1168
  msgstr ""
1169
 
1170
+ #: ../admin/shortcode-builder/shortcode-builder.php:912
1171
  msgid "ID"
1172
  msgstr ""
1173
 
1174
+ #: ../admin/shortcode-builder/shortcode-builder.php:912
1175
  msgid ""
1176
  "Adding a unique ID will allow you target this specific Ajax Load More "
1177
  "instance with the alm_query_args_id() filter."
1178
  msgstr ""
1179
 
1180
+ #: ../admin/shortcode-builder/shortcode-builder.php:913
1181
  msgid "Set a unique ID for this Ajax Load More instance."
1182
  msgstr ""
1183
 
1184
+ #: ../admin/shortcode-builder/shortcode-builder.php:920
1185
  msgid "Generate Unique ID"
1186
  msgstr ""
1187
 
1188
+ #: ../admin/shortcode-builder/shortcode-builder.php:928
1189
  msgid ""
1190
  "You can define a global container type on the Ajax Load More settings screen"
1191
  msgstr ""
1192
 
1193
+ #: ../admin/shortcode-builder/shortcode-builder.php:929
1194
  msgid ""
1195
  "Override the global Container Type that was set on <a href=\"admin.php?"
1196
  "page=ajax-load-more\">ALM Settings page</a>."
1197
  msgstr ""
1198
 
1199
+ #: ../admin/shortcode-builder/shortcode-builder.php:958
1200
  msgid ""
1201
  "You can define global container classes on the Ajax Load More settings screen"
1202
  msgstr ""
1203
 
1204
+ #: ../admin/shortcode-builder/shortcode-builder.php:959
1205
  msgid ""
1206
  "Add custom CSS classes to the Ajax Load More container. <br/><br/> e.g. "
1207
  "portfolio-listing large-12 etc"
1208
  msgstr ""
1209
 
1210
+ #: ../admin/shortcode-builder/shortcode-builder.php:973
1211
  msgid "Button Labels"
1212
  msgstr ""
1213
 
1214
+ #: ../admin/shortcode-builder/shortcode-builder.php:978
1215
  msgid "Label"
1216
  msgstr ""
1217
 
1218
+ #: ../admin/shortcode-builder/shortcode-builder.php:979
1219
  msgid "Customize the text of the <em>Load More</em> button."
1220
  msgstr ""
1221
 
1222
+ #: ../admin/shortcode-builder/shortcode-builder.php:991
1223
  msgid "Loading Label"
1224
  msgstr ""
1225
 
1226
+ #: ../admin/shortcode-builder/shortcode-builder.php:991
1227
  msgid "Leave field empty to not update text while loading content"
1228
  msgstr ""
1229
 
1230
+ #: ../admin/shortcode-builder/shortcode-builder.php:992
1231
  msgid ""
1232
  "Update the text of the <em>Load More</em> button while content is loading."
1233
  msgstr ""
1234
 
1235
+ #: ../admin/shortcode-builder/shortcode-builder.php:996
1236
  msgid "Loading Posts..."
1237
  msgstr ""
1238
 
1239
+ #: ../admin/shortcode-builder/shortcode-builder.php:1006
1240
  msgid "Images Loaded"
1241
  msgstr ""
1242
 
1243
+ #: ../admin/shortcode-builder/shortcode-builder.php:1009
1244
  msgid "Wait for all images to load before displaying ajax loaded content"
1245
  msgstr ""
1246
 
1247
+ #: ../admin/shortcode-builder/shortcode-builder.php:1010
1248
  msgid "Background images are currently not supported"
1249
  msgstr ""
1250
 
1251
+ #: ../admin/shortcode-builder/shortcode-builder.php:1033
1252
  msgid "Pause"
1253
  msgstr ""
1254
 
1255
+ #: ../admin/shortcode-builder/shortcode-builder.php:1036
1256
  msgid ""
1257
  "Do <u>NOT</u> load any posts until user clicks the <em>Load More</em> button."
1258
  msgstr ""
1259
 
1260
+ #: ../admin/shortcode-builder/shortcode-builder.php:1058
1261
  msgid "Scrolling"
1262
  msgstr ""
1263
 
1264
+ #: ../admin/shortcode-builder/shortcode-builder.php:1061
1265
  msgid "Enable Scrolling"
1266
  msgstr ""
1267
 
1268
+ #: ../admin/shortcode-builder/shortcode-builder.php:1062
1269
  msgid "Load more posts as the user scrolls the page."
1270
  msgstr ""
1271
 
1272
+ #: ../admin/shortcode-builder/shortcode-builder.php:1083
1273
  msgid "Scroll Distance"
1274
  msgstr ""
1275
 
1276
+ #: ../admin/shortcode-builder/shortcode-builder.php:1083
1277
  msgid ""
1278
  "Distance is based on the position of the loading button from the bottom of "
1279
  "the screen"
1280
  msgstr ""
1281
 
1282
+ #: ../admin/shortcode-builder/shortcode-builder.php:1084
1283
  msgid ""
1284
  "The distance from the bottom of the screen to trigger loading of posts. "
1285
  "(Default = 150)"
1286
  msgstr ""
1287
 
1288
+ #: ../admin/shortcode-builder/shortcode-builder.php:1096
1289
  msgid "Maximum Pages"
1290
  msgstr ""
1291
 
1292
+ #: ../admin/shortcode-builder/shortcode-builder.php:1096
1293
  msgid "If using an Infinite Scroll button style you should set this to 0"
1294
  msgstr ""
1295
 
1296
+ #: ../admin/shortcode-builder/shortcode-builder.php:1097
1297
  msgid "Maximum number of pages to load while scrolling. (0 = unlimited)"
1298
  msgstr ""
1299
 
1300
+ #: ../admin/shortcode-builder/shortcode-builder.php:1109
1301
  msgid "Pause Override"
1302
  msgstr ""
1303
 
1304
+ #: ../admin/shortcode-builder/shortcode-builder.php:1110
1305
  msgid ""
1306
  "Allow scrolling to override the Pause parameter and trigger the loading of "
1307
  "posts on scroll."
1308
  msgstr ""
1309
 
1310
+ #: ../admin/shortcode-builder/shortcode-builder.php:1131
1311
  msgid "Transition"
1312
  msgstr ""
1313
 
1314
+ #: ../admin/shortcode-builder/shortcode-builder.php:1134
1315
  msgid "Transition Type"
1316
  msgstr ""
1317
 
1318
+ #: ../admin/shortcode-builder/shortcode-builder.php:1135
1319
  msgid "Select a loading transition style."
1320
  msgstr ""
1321
 
1322
+ #: ../admin/shortcode-builder/shortcode-builder.php:1142
1323
  msgid "Slide"
1324
  msgstr ""
1325
 
1326
+ #: ../admin/shortcode-builder/shortcode-builder.php:1146
1327
  msgid "Fade"
1328
  msgstr ""
1329
 
1330
+ #: ../admin/shortcode-builder/shortcode-builder.php:1160
1331
  msgid "Transition Speed"
1332
  msgstr ""
1333
 
1334
+ #: ../admin/shortcode-builder/shortcode-builder.php:1160
1335
  msgid "0.5 seconds = 500, 1 second = 1000 etc."
1336
  msgstr ""
1337
 
1338
+ #: ../admin/shortcode-builder/shortcode-builder.php:1161
1339
  msgid "The speed of the loading transition in milliseconds"
1340
  msgstr ""
1341
 
1342
+ #: ../admin/shortcode-builder/shortcode-builder.php:1173
1343
  msgid "Transition Container"
1344
  msgstr ""
1345
 
1346
+ #: ../admin/shortcode-builder/shortcode-builder.php:1173
1347
  msgid ""
1348
  "Removing the transition container may have undesired results and is not "
1349
  "recommended."
1350
  msgstr ""
1351
 
1352
+ #: ../admin/shortcode-builder/shortcode-builder.php:1174
1353
  msgid "Remove the Ajax Load More (.alm-reveal) loading container."
1354
  msgstr ""
1355
 
1356
+ #: ../admin/shortcode-builder/shortcode-builder.php:1181
1357
  msgid "Remove Container"
1358
  msgstr ""
1359
 
1360
+ #: ../admin/shortcode-builder/shortcode-builder.php:1192
1361
  msgid "Destroy After"
1362
  msgstr ""
1363
 
1364
+ #: ../admin/shortcode-builder/shortcode-builder.php:1195
1365
  msgid ""
1366
  "Remove ajax load more functionality after '<em>n</em>' number of pages have "
1367
  "been loaded."
1368
  msgstr ""
1369
 
1370
+ #: ../admin/shortcode-builder/shortcode-builder.php:1213
1371
  msgid "Query Parameters"
1372
  msgstr ""
1373
 
1374
+ #: ../admin/shortcode-builder/shortcode-builder.php:1217
1375
  msgid "Posts Per Page"
1376
  msgstr ""
1377
 
1378
+ #: ../admin/shortcode-builder/shortcode-builder.php:1220
1379
  msgid "Select the number of posts to load with each request."
1380
  msgstr ""
1381
 
1382
+ #: ../admin/shortcode-builder/shortcode-builder.php:1239
1383
  msgid "Post Type"
1384
  msgstr ""
1385
 
1386
+ #: ../admin/shortcode-builder/shortcode-builder.php:1244
1387
  msgid "Select the Post Types to include in this Ajax Load More query."
1388
  msgstr ""
1389
 
1390
+ #: ../admin/shortcode-builder/shortcode-builder.php:1258
1391
  msgid "Any"
1392
  msgstr ""
1393
 
1394
+ #: ../admin/shortcode-builder/shortcode-builder.php:1270
1395
  msgid "Sticky Posts"
1396
  msgstr ""
1397
 
1398
+ #: ../admin/shortcode-builder/shortcode-builder.php:1270
1399
  msgid "Sticky posts are only available for Posts."
1400
  msgstr ""
1401
 
1402
+ #: ../admin/shortcode-builder/shortcode-builder.php:1271
1403
  msgid ""
1404
  "Preserve the ordering of sticky posts by having them appear first in the "
1405
  "Ajax listing."
1406
  msgstr ""
1407
 
1408
+ #: ../admin/shortcode-builder/shortcode-builder.php:1278
1409
  msgid "Enable Sticky Posts"
1410
  msgstr ""
1411
 
1412
+ #: ../admin/shortcode-builder/shortcode-builder.php:1300
1413
  msgid "Post Format"
1414
  msgstr ""
1415
 
1416
+ #: ../admin/shortcode-builder/shortcode-builder.php:1303
1417
  msgid ""
1418
  "Select a <a href=\"http://codex.wordpress.org/Post_Formats\" target=\"_blank"
1419
  "\">Post Format</a> to query."
1420
  msgstr ""
1421
 
1422
+ #: ../admin/shortcode-builder/shortcode-builder.php:1306
1423
  msgid "Select Post Format"
1424
  msgstr ""
1425
 
1426
+ #: ../admin/shortcode-builder/shortcode-builder.php:1307
1427
  msgid "Standard"
1428
  msgstr ""
1429
 
1430
+ #: ../admin/shortcode-builder/shortcode-builder.php:1333
1431
  msgid ""
1432
  "A comma separated list of categories to include by slug. (design, research "
1433
  "etc...)"
1434
  msgstr ""
1435
 
1436
+ #: ../admin/shortcode-builder/shortcode-builder.php:1356
1437
+ #: ../admin/shortcode-builder/shortcode-builder.php:1414
1438
+ #: ../admin/shortcode-builder/shortcode-builder.php:1592
1439
  msgid "Exclude"
1440
  msgstr ""
1441
 
1442
+ #: ../admin/shortcode-builder/shortcode-builder.php:1357
1443
  msgid ""
1444
  "A comma separated list of categories to exclude by ID. (3, 12, 35 etc..)"
1445
  msgstr ""
1446
 
1447
+ #: ../admin/shortcode-builder/shortcode-builder.php:1392
1448
+ #: ../admin/shortcode-builder/shortcode-builder.php:1581
1449
  msgid "Include"
1450
  msgstr ""
1451
 
1452
+ #: ../admin/shortcode-builder/shortcode-builder.php:1393
1453
  msgid ""
1454
  "A comma separated list of tags to include by slug. (toronto, canada etc...)"
1455
  msgstr ""
1456
 
1457
+ #: ../admin/shortcode-builder/shortcode-builder.php:1415
1458
  msgid "A comma separated list of tags to exclude by ID. (30, 12, 99 etc..)"
1459
  msgstr ""
1460
 
1461
+ #: ../admin/shortcode-builder/shortcode-builder.php:1451
1462
  msgid "Select a taxonomy then select the terms and an operator."
1463
  msgstr ""
1464
 
1465
+ #: ../admin/shortcode-builder/shortcode-builder.php:1456
1466
+ #: ../admin/shortcode-builder/shortcode-builder.php:1522
1467
  msgid "Add Another"
1468
  msgstr ""
1469
 
1470
+ #: ../admin/shortcode-builder/shortcode-builder.php:1466
1471
  msgid "Date"
1472
  msgstr ""
1473
 
1474
+ #: ../admin/shortcode-builder/shortcode-builder.php:1469
1475
  msgid ""
1476
  "Enter a year, month(number) and day to query by date archive.<br/>&raquo; <a "
1477
  "href=\"admin.php?page=ajax-load-more-examples#example-date\">View Example</a>"
1478
  msgstr ""
1479
 
1480
+ #: ../admin/shortcode-builder/shortcode-builder.php:1475
1481
  msgid "Year:"
1482
  msgstr ""
1483
 
1484
+ #: ../admin/shortcode-builder/shortcode-builder.php:1479
1485
  msgid "Month:"
1486
  msgstr ""
1487
 
1488
+ #: ../admin/shortcode-builder/shortcode-builder.php:1483
1489
  msgid "Day:"
1490
  msgstr ""
1491
 
1492
+ #: ../admin/shortcode-builder/shortcode-builder.php:1494
1493
  msgid "Custom Fields (Meta_Query)"
1494
  msgstr ""
1495
 
1496
+ #: ../admin/shortcode-builder/shortcode-builder.php:1497
1497
  msgid ""
1498
  "Query for <a href=\"http://codex.wordpress.org/Class_Reference/WP_Meta_Query"
1499
  "\" target=\"_blank\">custom field</a> by entering a custom field key, value "
1500
  "and operator."
1501
  msgstr ""
1502
 
1503
+ #: ../admin/shortcode-builder/shortcode-builder.php:1508
1504
  msgid ""
1505
  "The logical relationship between each custom field when there is more than "
1506
  "one."
1507
  msgstr ""
1508
 
1509
+ #: ../admin/shortcode-builder/shortcode-builder.php:1538
1510
  msgid "Author"
1511
  msgstr ""
1512
 
1513
+ #: ../admin/shortcode-builder/shortcode-builder.php:1541
1514
  msgid "Select an Author to query(by ID)."
1515
  msgstr ""
1516
 
1517
+ #: ../admin/shortcode-builder/shortcode-builder.php:1562
1518
  msgid "Search Term"
1519
  msgstr ""
1520
 
1521
+ #: ../admin/shortcode-builder/shortcode-builder.php:1565
1522
  msgid "Enter a search term to query."
1523
  msgstr ""
1524
 
1525
+ #: ../admin/shortcode-builder/shortcode-builder.php:1569
1526
  msgid "Enter search term"
1527
  msgstr ""
1528
 
1529
+ #: ../admin/shortcode-builder/shortcode-builder.php:1578
1530
  msgid "Post Parameters"
1531
  msgstr ""
1532
 
1533
+ #: ../admin/shortcode-builder/shortcode-builder.php:1582
1534
  msgid "A comma separated list of post ID's to query."
1535
  msgstr ""
1536
 
1537
+ #: ../admin/shortcode-builder/shortcode-builder.php:1586
1538
  msgid "225, 340, 818, etc..."
1539
  msgstr ""
1540
 
1541
+ #: ../admin/shortcode-builder/shortcode-builder.php:1593
1542
  msgid "A comma separated list of post ID's to exclude from query."
1543
  msgstr ""
1544
 
1545
+ #: ../admin/shortcode-builder/shortcode-builder.php:1603
1546
  msgid "Post Status"
1547
  msgstr ""
1548
 
1549
+ #: ../admin/shortcode-builder/shortcode-builder.php:1603
1550
  msgid ""
1551
  "Post Status parameters are only available for logged in (admin) users. Non "
1552
  "logged in users will only have access to view content in a 'publish' or "
1553
  "'inherit' state. "
1554
  msgstr ""
1555
 
1556
+ #: ../admin/shortcode-builder/shortcode-builder.php:1604
1557
  msgid "Select status of the post."
1558
  msgstr ""
1559
 
1560
+ #: ../admin/shortcode-builder/shortcode-builder.php:1609
1561
  msgid "Published"
1562
  msgstr ""
1563
 
1564
+ #: ../admin/shortcode-builder/shortcode-builder.php:1626
1565
  msgid "Ordering"
1566
  msgstr ""
1567
 
1568
+ #: ../admin/shortcode-builder/shortcode-builder.php:1629
1569
  msgid "Sort posts by Order and Orderby parameters."
1570
  msgstr ""
1571
 
1572
+ #: ../admin/shortcode-builder/shortcode-builder.php:1633
1573
  msgid "Order"
1574
  msgstr ""
1575
 
1576
+ #: ../admin/shortcode-builder/shortcode-builder.php:1640
1577
  msgid "Order By"
1578
  msgstr ""
1579
 
1580
+ #: ../admin/shortcode-builder/shortcode-builder.php:1661
1581
  msgid "Offset"
1582
  msgstr ""
1583
 
1584
+ #: ../admin/shortcode-builder/shortcode-builder.php:1664
1585
  msgid "Offset the initial query by <em>'n'</em> number of posts"
1586
  msgstr ""
1587
 
1588
+ #: ../admin/shortcode-builder/shortcode-builder.php:1677
1589
  msgid "Custom Arguments"
1590
  msgstr ""
1591
 
1592
+ #: ../admin/shortcode-builder/shortcode-builder.php:1680
1593
  msgid "A semicolon separated list of custom value:pair arguments."
1594
  msgstr ""
1595
 
1596
+ #: ../admin/shortcode-builder/shortcode-builder.php:1680
1597
  msgid ""
1598
  "Custom Arguments can be used to query by parameters not available in the "
1599
  "Shortcode Builder."
1600
  msgstr ""
1601
 
1602
+ #: ../admin/shortcode-builder/shortcode-builder.php:1684
1603
  msgid "event_display:upcoming"
1604
  msgstr ""
1605
 
2054
  msgid "Reset Shortcode Builder"
2055
  msgstr ""
2056
 
2057
+ #: ../ajax-load-more.php:211
2058
  msgid "Settings"
2059
  msgstr ""
2060
 
2061
+ #: ../core/functions.php:636
2062
  msgid "Pages:"
2063
  msgstr ""
2064