Version Description
- Adding required functionality for the NEW Ajax Load More Custom Repeaters v2 add-on - http://connekthq.com/plugins/ajax-load-more/custom-repeaters/
- Improved debug messaging for Ajax Load More and Add-Ons.
- Adding fix for ordering by meta value.
- Admin stying updates.
- Updated FAQs
- Fix meta_query query and orderby meta value
Download this release
Release Info
Developer | dcooney |
Plugin | WordPress Infinite Scroll – Ajax Load More |
Version | 2.2.8 |
Comparing to | |
See all releases |
Code changes from version 2.2.7 to 2.2.8
- README.txt +20 -4
- admin/admin.php +93 -46
- admin/css/admin.css +325 -106
- admin/img/add-ons/unlimited-add-ons.jpg +0 -0
- admin/img/loader-unlimited.gif +0 -0
- admin/includes/cta/writeable.php +42 -6
- admin/shortcode-builder/js/shortcode-builder.js +4 -3
- admin/shortcode-builder/shortcode-builder.php +18 -6
- ajax-load-more.php +52 -37
- core/repeater/default.php +9 -1
- screenshot-3.png +0 -0
README.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://connekthq.com/donate/
|
|
4 |
Tags: ajax, query, loop, paging, filter, jquery, shortcode builder, shortcode, search, tags, category, post types, taxonomy, post format, wmpl
|
5 |
Requires at least: 3.6
|
6 |
Tested up to: 4.0
|
7 |
-
Stable tag: 2.2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -22,7 +22,7 @@ Build complex WordPress queries using our shortcode builder then add the shortco
|
|
22 |
* **Multiple Instances** - One, two, three or ten - you can now include multiple instances of Ajax Load More on a single page.
|
23 |
* **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).
|
24 |
* **Query Parameters** - Ajax Load More allows you to query WordPress by many different content types. Query by Post Type, Post Format, Category, Tags, Custom Taxonomies, Search Term, Authors and more!!
|
25 |
-
* **Customizable Repeater Templates** - Edit and extend the functionality of Ajax Load More by creating your own repeater template to match the look and feel of your website
|
26 |
* **Setting Panel** - Customize your version of Ajax Load More by updating various plugin settings (see screenshots).
|
27 |
|
28 |
Check out the **[demo site](http://connekthq.com/plugins/ajax-load-more/)** for more information!
|
@@ -96,7 +96,7 @@ The following Add-ons are available to increase the functionality of Ajax Load M
|
|
96 |
|
97 |
**Custom Repeaters**
|
98 |
|
99 |
-
The **[Custom Repeaters](http://connekthq.com/plugins/ajax-load-more/custom-repeaters)** add-on will
|
100 |
[Get More Information](http://connekthq.com/plugins/ajax-load-more/custom-repeaters)
|
101 |
|
102 |
***
|
@@ -151,7 +151,12 @@ Yes, visit the Repeater Template section in your WordPress admin.
|
|
151 |
|
152 |
= How are my repeater templates saved? =
|
153 |
|
154 |
-
Repeater template data is saved
|
|
|
|
|
|
|
|
|
|
|
155 |
|
156 |
|
157 |
== Installation ==
|
@@ -193,10 +198,21 @@ How to install Ajax Load More.
|
|
193 |
|
194 |
== Changelog ==
|
195 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
= 2.2.7 =
|
197 |
* Fix for query by Standard post format.
|
198 |
* Fix for Shortcode Builder where Custom Taxonomies were not building correctly.
|
199 |
|
|
|
200 |
= 2.2.6 =
|
201 |
* Bug fix for meta_query parameters.
|
202 |
* Further improvements to WordPress query arguments from 2.2.4.
|
4 |
Tags: ajax, query, loop, paging, filter, jquery, shortcode builder, shortcode, search, tags, category, post types, taxonomy, post format, wmpl
|
5 |
Requires at least: 3.6
|
6 |
Tested up to: 4.0
|
7 |
+
Stable tag: 2.2.8
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
22 |
* **Multiple Instances** - One, two, three or ten - you can now include multiple instances of Ajax Load More on a single page.
|
23 |
* **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).
|
24 |
* **Query Parameters** - Ajax Load More allows you to query WordPress by many different content types. Query by Post Type, Post Format, Category, Tags, Custom Taxonomies, Search Term, Authors and more!!
|
25 |
+
* **Customizable Repeater Templates** - Edit and extend the functionality of Ajax Load More by creating your own repeater template to match the look and feel of your website (see screenshots).
|
26 |
* **Setting Panel** - Customize your version of Ajax Load More by updating various plugin settings (see screenshots).
|
27 |
|
28 |
Check out the **[demo site](http://connekthq.com/plugins/ajax-load-more/)** for more information!
|
96 |
|
97 |
**Custom Repeaters**
|
98 |
|
99 |
+
The **[Custom Repeaters](http://connekthq.com/plugins/ajax-load-more/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.
|
100 |
[Get More Information](http://connekthq.com/plugins/ajax-load-more/custom-repeaters)
|
101 |
|
102 |
***
|
151 |
|
152 |
= How are my repeater templates saved? =
|
153 |
|
154 |
+
Repeater template data is saved into your WordPress database as well as written directly to a repeater template .php file in the ajax-load-more plugin directory.
|
155 |
+
|
156 |
+
= Can I use custom fields in a repeater? =
|
157 |
+
|
158 |
+
Yes, but you will need to define $post at the top of the repeater before requesting your custom fields. Like so:
|
159 |
+
global $post;
|
160 |
|
161 |
|
162 |
== Installation ==
|
198 |
|
199 |
== Changelog ==
|
200 |
|
201 |
+
|
202 |
+
= 2.2.8 =
|
203 |
+
* Adding required functionality for the NEW Ajax Load More Custom Repeaters v2 add-on - http://connekthq.com/plugins/ajax-load-more/custom-repeaters/
|
204 |
+
* Improved debug messaging for Ajax Load More and Add-Ons.
|
205 |
+
* Adding fix for ordering by meta value.
|
206 |
+
* Admin stying updates.
|
207 |
+
* Updated FAQs
|
208 |
+
* Fix meta_query query and orderby meta value
|
209 |
+
|
210 |
+
|
211 |
= 2.2.7 =
|
212 |
* Fix for query by Standard post format.
|
213 |
* Fix for Shortcode Builder where Custom Taxonomies were not building correctly.
|
214 |
|
215 |
+
|
216 |
= 2.2.6 =
|
217 |
* Bug fix for meta_query parameters.
|
218 |
* Further improvements to WordPress query arguments from 2.2.4.
|
admin/admin.php
CHANGED
@@ -157,7 +157,7 @@ function alm_enqueue_admin_scripts(){
|
|
157 |
//Load Admin CSS
|
158 |
wp_enqueue_style( 'admin-css', ALM_ADMIN_URL. 'css/admin.css');
|
159 |
wp_enqueue_style( 'core-css', ALM_URL. '/core/css/ajax-load-more.css');
|
160 |
-
wp_enqueue_style( 'font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.
|
161 |
|
162 |
//Load CodeMirror Syntax Highlighting if on Repater Template page
|
163 |
$screen = get_current_screen();
|
@@ -247,7 +247,6 @@ function alm_settings_page(){ ?>
|
|
247 |
}
|
248 |
|
249 |
|
250 |
-
|
251 |
/*
|
252 |
* alm_repeater_page
|
253 |
* Custom Repeaters
|
@@ -267,7 +266,7 @@ function alm_repeater_page(){ ?>
|
|
267 |
<!-- Repeaters -->
|
268 |
<div class="group">
|
269 |
<?php
|
270 |
-
if (has_action('alm_custom_repeaters')){ ?>
|
271 |
<span class="toggle-all"><span class="inner-wrap"><em class="collapse"><?php _e('Collapse All', ALM_NAME); ?></em><em class="expand"><?php _e('Expand All', ALM_NAME); ?></em></span></span>
|
272 |
<?php } ?>
|
273 |
|
@@ -284,7 +283,7 @@ function alm_repeater_page(){ ?>
|
|
284 |
?>
|
285 |
<h3 class="heading"><?php _e('Default Template', ALM_NAME); ?></h3>
|
286 |
<div class="expand-wrap">
|
287 |
-
<div class="wrap repeater-wrap" data-name="default">
|
288 |
<label class="template-title" for="template-default"><?php _e('Enter the HTML and PHP code for the default template', ALM_NAME); ?></label>
|
289 |
<textarea rows="10" id="template-default" class="_alm_repeater"><?php echo $contents; ?></textarea>
|
290 |
<script>
|
@@ -305,17 +304,36 @@ function alm_repeater_page(){ ?>
|
|
305 |
</div>
|
306 |
</div>
|
307 |
<?php
|
|
|
|
|
|
|
308 |
if (!has_action('alm_get_custom_repeaters')) {
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
313 |
?>
|
314 |
<!-- End Default -->
|
315 |
<?php
|
316 |
if (has_action('alm_custom_repeaters'))
|
317 |
do_action('alm_custom_repeaters');
|
318 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
319 |
<script>
|
320 |
jQuery(document).ready(function($) {
|
321 |
"use strict";
|
@@ -333,7 +351,8 @@ function alm_repeater_page(){ ?>
|
|
333 |
el = $('textarea._alm_repeater', container),
|
334 |
btn = btn,
|
335 |
value = '',
|
336 |
-
repeater = container.data('name'),
|
|
|
337 |
alias = ($('input._alm_repeater_alias', container).length) ? $('input._alm_repeater_alias', container).val() : '',
|
338 |
responseText = $(".saved-response", container);
|
339 |
|
@@ -365,6 +384,7 @@ function alm_repeater_page(){ ?>
|
|
365 |
action: 'alm_save_repeater',
|
366 |
value: value,
|
367 |
repeater: repeater,
|
|
|
368 |
alias: alias,
|
369 |
nonce: alm_admin_localize.alm_admin_nonce,
|
370 |
},
|
@@ -391,12 +411,10 @@ function alm_repeater_page(){ ?>
|
|
391 |
}
|
392 |
}
|
393 |
|
394 |
-
$('input.save-repeater'
|
395 |
-
$(this)
|
396 |
-
|
397 |
-
|
398 |
-
_alm_admin.saveRepeater(btn, editorId);
|
399 |
-
});
|
400 |
});
|
401 |
|
402 |
});
|
@@ -443,15 +461,23 @@ function alm_save_repeater(){
|
|
443 |
// Check our nonce, if they don't match then bounce!
|
444 |
if (! wp_verify_nonce( $nonce, 'alm_repeater_nonce' ))
|
445 |
die('Get Bounced!');
|
446 |
-
|
447 |
-
|
448 |
$c = Trim(stripslashes($_POST["value"])); // Repeater Value
|
449 |
$n = Trim(stripslashes($_POST["repeater"])); // Repeater name
|
|
|
450 |
$a = Trim(stripslashes($_POST["alias"])); // Repeater alias
|
451 |
-
|
|
|
|
|
452 |
$f = ALM_PATH. 'core/repeater/'.$n .'.php'; // File
|
453 |
-
|
|
|
|
|
|
|
|
|
454 |
$f = ALM_REPEATER_PATH. 'repeaters/'.$n .'.php'; // File
|
|
|
455 |
|
456 |
|
457 |
$o_error = '<span class="saved-error"><b>'. __('Error Opening File', ALM_NAME) .'</b></span>';
|
@@ -462,24 +488,33 @@ function alm_save_repeater(){
|
|
462 |
$w_error .= '<em>'. $f .'</em>';
|
463 |
$w_error .= __('Please check your file path and ensure your server is configured to allow Ajax Load More to read and write files within the /ajax-load-more/ plugin directory', ALM_NAME);
|
464 |
|
465 |
-
//Open file
|
466 |
$o = fopen($f, 'w+') or die($o_error);
|
467 |
|
468 |
-
//Save/Write the file
|
469 |
-
$w = fwrite($o, $c) or die($w_error);
|
470 |
-
|
471 |
-
|
|
|
472 |
|
473 |
//Save to database
|
474 |
global $wpdb;
|
475 |
-
$table_name = $wpdb->prefix . "alm";
|
476 |
-
|
|
|
477 |
$data_update = array('repeaterDefault' => "$c", 'pluginVersion' => ALM_VERSION);
|
478 |
$data_where = array('name' => "default");
|
479 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
480 |
$data_update = array('repeaterDefault' => "$c", 'alias' => "$a", 'pluginVersion' => ALM_REPEATER_VERSION);
|
481 |
$data_where = array('name' => $n);
|
482 |
}
|
|
|
483 |
$wpdb->update($table_name , $data_update, $data_where);
|
484 |
|
485 |
//Our results
|
@@ -559,7 +594,8 @@ function alm_get_tax_terms(){
|
|
559 |
if ( !empty( $terms ) && !is_wp_error( $terms ) ){
|
560 |
$returnVal .= '<ul>';
|
561 |
foreach ( $terms as $term ) {
|
562 |
-
$
|
|
|
563 |
}
|
564 |
$returnVal .= '</ul>';
|
565 |
echo $returnVal;
|
@@ -586,7 +622,18 @@ function alm_example_page(){ ?>
|
|
586 |
<p><?php _e('A collection of everyday shortcode usages and implementation examples', ALM_NAME); ?></p>
|
587 |
</div>
|
588 |
<div class="cnkt-main forceColors">
|
589 |
-
<div class="group">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
590 |
<div class="row gist">
|
591 |
<h3 class="heading"><?php _e('Author.php', ALM_NAME); ?></h3>
|
592 |
<div class="expand-wrap">
|
@@ -621,11 +668,13 @@ function alm_example_page(){ ?>
|
|
621 |
<script src="https://gist.github.com/dcooney/fc4276bebbdd05af64d1.js"></script>
|
622 |
</div>
|
623 |
</div>
|
624 |
-
</div>
|
625 |
-
|
|
|
626 |
<p class="back2top"><a href="#wpcontent"><i class="fa fa-chevron-up"></i> <?php _e('Back to Top', ALM_NAME); ?></a></p>
|
627 |
</div>
|
628 |
</div>
|
|
|
629 |
</div>
|
630 |
<div class="cnkt-sidebar">
|
631 |
<div class="cta">
|
@@ -658,39 +707,37 @@ function alm_add_ons_page(){ ?>
|
|
658 |
<p><?php _e('The following Add-ons are available to increase the functionality of Ajax Load More.', ALM_NAME); ?></p>
|
659 |
</div>
|
660 |
<div class="cnkt-main">
|
661 |
-
|
|
|
662 |
<div class="group">
|
663 |
<div class="row no-brd">
|
664 |
-
<h3 class="add-on-title"><?php _e('Custom Repeaters', ALM_NAME); ?></h3>
|
665 |
<div class="expand-wrap">
|
666 |
<div class="section-title">
|
667 |
-
<img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/
|
668 |
</div>
|
669 |
<div class="wrap">
|
670 |
-
<
|
671 |
-
<p><?php _e('
|
|
|
672 |
</div>
|
673 |
</div>
|
674 |
</div>
|
675 |
<?php
|
676 |
-
if (has_action('
|
677 |
echo '<a class="btn installed" href="#"><i class="fa fa-check-square"></i> Installed</a> ';
|
678 |
}else{
|
679 |
-
echo '<a class="btn" href="http://connekthq.com/plugins/ajax-load-more/
|
680 |
}
|
681 |
?>
|
682 |
</div>
|
683 |
-
<!-- End
|
|
|
684 |
</div>
|
685 |
|
686 |
<div class="cnkt-sidebar">
|
687 |
<div class="cta">
|
688 |
-
<h3><?php _e('About Add-ons', ALM_NAME); ?></h3>
|
689 |
-
<p><?php _e('Add-ons are installed as
|
690 |
-
</div>
|
691 |
-
<div class="cta">
|
692 |
-
<h3><?php _e('About Add-ons', ALM_NAME); ?></h3>
|
693 |
-
<p><?php _e('Add-ons are installed as a separate plugin and will receive plug-in update notifications. ', ALM_NAME); ?></p>
|
694 |
</div>
|
695 |
<?php include( plugin_dir_path( __FILE__ ) . 'includes/cta/writeable.php'); ?>
|
696 |
</div>
|
157 |
//Load Admin CSS
|
158 |
wp_enqueue_style( 'admin-css', ALM_ADMIN_URL. 'css/admin.css');
|
159 |
wp_enqueue_style( 'core-css', ALM_URL. '/core/css/ajax-load-more.css');
|
160 |
+
wp_enqueue_style( 'font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css');
|
161 |
|
162 |
//Load CodeMirror Syntax Highlighting if on Repater Template page
|
163 |
$screen = get_current_screen();
|
247 |
}
|
248 |
|
249 |
|
|
|
250 |
/*
|
251 |
* alm_repeater_page
|
252 |
* Custom Repeaters
|
266 |
<!-- Repeaters -->
|
267 |
<div class="group">
|
268 |
<?php
|
269 |
+
if (has_action('alm_custom_repeaters') || has_action('alm_unlimited_repeaters')){ ?>
|
270 |
<span class="toggle-all"><span class="inner-wrap"><em class="collapse"><?php _e('Collapse All', ALM_NAME); ?></em><em class="expand"><?php _e('Expand All', ALM_NAME); ?></em></span></span>
|
271 |
<?php } ?>
|
272 |
|
283 |
?>
|
284 |
<h3 class="heading"><?php _e('Default Template', ALM_NAME); ?></h3>
|
285 |
<div class="expand-wrap">
|
286 |
+
<div class="wrap repeater-wrap" data-name="default" data-type="default">
|
287 |
<label class="template-title" for="template-default"><?php _e('Enter the HTML and PHP code for the default template', ALM_NAME); ?></label>
|
288 |
<textarea rows="10" id="template-default" class="_alm_repeater"><?php echo $contents; ?></textarea>
|
289 |
<script>
|
304 |
</div>
|
305 |
</div>
|
306 |
<?php
|
307 |
+
|
308 |
+
// Custom Repeaters - /cta/extend.php
|
309 |
+
// Removed in 2.2.8
|
310 |
if (!has_action('alm_get_custom_repeaters')) {
|
311 |
+
// echo '<div class="row no-brd">';
|
312 |
+
// include( ALM_PATH . 'admin/includes/cta/extend.php');
|
313 |
+
// echo '</div>';
|
314 |
+
}
|
315 |
+
|
316 |
+
// Custom Repeaters v2 - /cta/extend.php
|
317 |
+
if (!has_action('alm_get_unlimited_repeaters')) {
|
318 |
+
|
319 |
+
if (!has_action('alm_get_custom_repeaters')) { // If Custom Repeaters v1 is NOT installed
|
320 |
+
echo '<div class="row no-brd">';
|
321 |
+
include( ALM_PATH . 'admin/includes/cta/extend.php');
|
322 |
+
echo '</div>';
|
323 |
+
}
|
324 |
+
|
325 |
+
}
|
326 |
?>
|
327 |
<!-- End Default -->
|
328 |
<?php
|
329 |
if (has_action('alm_custom_repeaters'))
|
330 |
do_action('alm_custom_repeaters');
|
331 |
+
?>
|
332 |
+
<?php
|
333 |
+
if (has_action('alm_unlimited_repeaters'))
|
334 |
+
do_action('alm_unlimited_repeaters');
|
335 |
+
?>
|
336 |
+
|
337 |
<script>
|
338 |
jQuery(document).ready(function($) {
|
339 |
"use strict";
|
351 |
el = $('textarea._alm_repeater', container),
|
352 |
btn = btn,
|
353 |
value = '',
|
354 |
+
repeater = container.data('name'), // Get templete name
|
355 |
+
type = container.data('type'), // Get template type (default/repeater/unlimited)
|
356 |
alias = ($('input._alm_repeater_alias', container).length) ? $('input._alm_repeater_alias', container).val() : '',
|
357 |
responseText = $(".saved-response", container);
|
358 |
|
384 |
action: 'alm_save_repeater',
|
385 |
value: value,
|
386 |
repeater: repeater,
|
387 |
+
type: type,
|
388 |
alias: alias,
|
389 |
nonce: alm_admin_localize.alm_admin_nonce,
|
390 |
},
|
411 |
}
|
412 |
}
|
413 |
|
414 |
+
$(document).on('click', 'input.save-repeater' ,function(){
|
415 |
+
var btn = $(this),
|
416 |
+
editorId = btn.data('editor-id');
|
417 |
+
_alm_admin.saveRepeater(btn, editorId);
|
|
|
|
|
418 |
});
|
419 |
|
420 |
});
|
461 |
// Check our nonce, if they don't match then bounce!
|
462 |
if (! wp_verify_nonce( $nonce, 'alm_repeater_nonce' ))
|
463 |
die('Get Bounced!');
|
464 |
+
|
465 |
+
// Get variables
|
466 |
$c = Trim(stripslashes($_POST["value"])); // Repeater Value
|
467 |
$n = Trim(stripslashes($_POST["repeater"])); // Repeater name
|
468 |
+
$t = Trim(stripslashes($_POST["type"])); // Repeater name
|
469 |
$a = Trim(stripslashes($_POST["alias"])); // Repeater alias
|
470 |
+
|
471 |
+
// Write to repeater file
|
472 |
+
if($t === 'default'){
|
473 |
$f = ALM_PATH. 'core/repeater/'.$n .'.php'; // File
|
474 |
+
}
|
475 |
+
elseif($t === 'unlimited'){
|
476 |
+
$f = ALM_UNLIMITED_PATH. 'repeaters/'.$n .'.php'; // File
|
477 |
+
}
|
478 |
+
else{
|
479 |
$f = ALM_REPEATER_PATH. 'repeaters/'.$n .'.php'; // File
|
480 |
+
}
|
481 |
|
482 |
|
483 |
$o_error = '<span class="saved-error"><b>'. __('Error Opening File', ALM_NAME) .'</b></span>';
|
488 |
$w_error .= '<em>'. $f .'</em>';
|
489 |
$w_error .= __('Please check your file path and ensure your server is configured to allow Ajax Load More to read and write files within the /ajax-load-more/ plugin directory', ALM_NAME);
|
490 |
|
491 |
+
// Open file
|
492 |
$o = fopen($f, 'w+') or die($o_error);
|
493 |
|
494 |
+
// Save/Write the file
|
495 |
+
$w = fwrite($o, $c) or die($w_error);
|
496 |
+
|
497 |
+
// $r = fread($o, 100000); //Read it
|
498 |
+
fclose($o); //now close it
|
499 |
|
500 |
//Save to database
|
501 |
global $wpdb;
|
502 |
+
$table_name = $wpdb->prefix . "alm";
|
503 |
+
|
504 |
+
if($t === 'default') {
|
505 |
$data_update = array('repeaterDefault' => "$c", 'pluginVersion' => ALM_VERSION);
|
506 |
$data_where = array('name' => "default");
|
507 |
+
}
|
508 |
+
elseif($t === 'unlimited'){ // Unlimited Repeaters
|
509 |
+
$table_name = $wpdb->prefix . "alm_unlimited";
|
510 |
+
$data_update = array('repeaterDefault' => "$c", 'alias' => "$a", 'pluginVersion' => ALM_UNLIMITED_VERSION);
|
511 |
+
$data_where = array('name' => $n);
|
512 |
+
}
|
513 |
+
else{ // Custom Repeaters
|
514 |
$data_update = array('repeaterDefault' => "$c", 'alias' => "$a", 'pluginVersion' => ALM_REPEATER_VERSION);
|
515 |
$data_where = array('name' => $n);
|
516 |
}
|
517 |
+
|
518 |
$wpdb->update($table_name , $data_update, $data_where);
|
519 |
|
520 |
//Our results
|
594 |
if ( !empty( $terms ) && !is_wp_error( $terms ) ){
|
595 |
$returnVal .= '<ul>';
|
596 |
foreach ( $terms as $term ) {
|
597 |
+
//print_r($term);
|
598 |
+
$returnVal .='<li><input type="checkbox" class="alm_element" name="tax-term-'.$term->slug.'" id="tax-term-'.$term->slug.'" data-type="'.$term->slug.'"><label for="tax-term-'.$term->slug.'">'.$term->name.'</label></li>';
|
599 |
}
|
600 |
$returnVal .= '</ul>';
|
601 |
echo $returnVal;
|
622 |
<p><?php _e('A collection of everyday shortcode usages and implementation examples', ALM_NAME); ?></p>
|
623 |
</div>
|
624 |
<div class="cnkt-main forceColors">
|
625 |
+
<div class="group">
|
626 |
+
|
627 |
+
<div class="row gist">
|
628 |
+
<h3 class="heading"><?php _e('Archive.php', ALM_NAME); ?></h3>
|
629 |
+
<div class="expand-wrap">
|
630 |
+
<p><?php _e('Shortcode for use on generic archive page.', ALM_NAME); ?></p>
|
631 |
+
<div class="inner">
|
632 |
+
<script src="https://gist.github.com/dcooney/ebe912c7772e669f1370.js"></script>
|
633 |
+
</div>
|
634 |
+
</div>
|
635 |
+
</div>
|
636 |
+
|
637 |
<div class="row gist">
|
638 |
<h3 class="heading"><?php _e('Author.php', ALM_NAME); ?></h3>
|
639 |
<div class="expand-wrap">
|
668 |
<script src="https://gist.github.com/dcooney/fc4276bebbdd05af64d1.js"></script>
|
669 |
</div>
|
670 |
</div>
|
671 |
+
</div>
|
672 |
+
|
673 |
+
<div class="row no-brd">
|
674 |
<p class="back2top"><a href="#wpcontent"><i class="fa fa-chevron-up"></i> <?php _e('Back to Top', ALM_NAME); ?></a></p>
|
675 |
</div>
|
676 |
</div>
|
677 |
+
|
678 |
</div>
|
679 |
<div class="cnkt-sidebar">
|
680 |
<div class="cta">
|
707 |
<p><?php _e('The following Add-ons are available to increase the functionality of Ajax Load More.', ALM_NAME); ?></p>
|
708 |
</div>
|
709 |
<div class="cnkt-main">
|
710 |
+
|
711 |
+
<!-- Unlimited Repeater -->
|
712 |
<div class="group">
|
713 |
<div class="row no-brd">
|
|
|
714 |
<div class="expand-wrap">
|
715 |
<div class="section-title">
|
716 |
+
<img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/unlimited-add-ons.jpg">
|
717 |
</div>
|
718 |
<div class="wrap">
|
719 |
+
<h2 class="addon-title"><?php _e('Custom Repeaters', ALM_NAME); ?></h2>
|
720 |
+
<p class="addon-intro"><?php _e('Unlock the ability to add an infinite number repeater templates.', ALM_NAME); ?></p>
|
721 |
+
<p><?php _e('Create, delete and modify <a href="?page=ajax-load-more-repeaters">repeater templates</a> as you need them with absolutely zero restrictions. The Custom Repeater add-on allows you to create unique layouts for different content types throughout your theme.</p>', ALM_NAME); ?>
|
722 |
</div>
|
723 |
</div>
|
724 |
</div>
|
725 |
<?php
|
726 |
+
if (has_action('alm_unlimited_installed')){
|
727 |
echo '<a class="btn installed" href="#"><i class="fa fa-check-square"></i> Installed</a> ';
|
728 |
}else{
|
729 |
+
echo '<a class="btn" href="http://connekthq.com/plugins/ajax-load-more/unlimited-repeaters/" target="_blank"><i class="fa fa-download"></i> Purchase & Install</a>';
|
730 |
}
|
731 |
?>
|
732 |
</div>
|
733 |
+
<!-- End Unlimited Repeater -->
|
734 |
+
|
735 |
</div>
|
736 |
|
737 |
<div class="cnkt-sidebar">
|
738 |
<div class="cta">
|
739 |
+
<h3><?php _e('About the Add-ons', ALM_NAME); ?></h3>
|
740 |
+
<p><?php _e('Add-ons are available to extend and enhance the core functionality of Ajax Load More.</p><p>All add-ons are installed as stand alone plugins and will receive plugin update notifications.', ALM_NAME); ?></p>
|
|
|
|
|
|
|
|
|
741 |
</div>
|
742 |
<?php include( plugin_dir_path( __FILE__ ) . 'includes/cta/writeable.php'); ?>
|
743 |
</div>
|
admin/css/admin.css
CHANGED
@@ -14,7 +14,6 @@
|
|
14 |
font-size: 14px;
|
15 |
color:#666;
|
16 |
position: relative;
|
17 |
-
overflow-x: hidden;
|
18 |
font-family: 'Open Sans', sans-serif;
|
19 |
max-width: 1500px;
|
20 |
}
|
@@ -85,7 +84,7 @@
|
|
85 |
/* Expand Collapse Headings */
|
86 |
.ajax-load-more h3.heading{
|
87 |
font-weight: 700;
|
88 |
-
padding:
|
89 |
line-height: normal !important;
|
90 |
margin: 0 !important;
|
91 |
color: #555;
|
@@ -107,8 +106,8 @@
|
|
107 |
color:#e1e1e1;
|
108 |
font-size: 18px;
|
109 |
position: absolute;
|
110 |
-
left:
|
111 |
-
top:
|
112 |
height: 20px;
|
113 |
width: 20px;
|
114 |
}
|
@@ -315,7 +314,7 @@
|
|
315 |
/* --------------------------------------------------------------------------- */
|
316 |
|
317 |
.ajax-load-more .row{
|
318 |
-
padding:
|
319 |
margin: 15px 0 0;
|
320 |
height: auto;
|
321 |
width: 100%;
|
@@ -328,7 +327,7 @@
|
|
328 |
border-radius: 2px;
|
329 |
}
|
330 |
.ajax-load-more .row.no-brd{
|
331 |
-
border: none;
|
332 |
padding: 0 !important;
|
333 |
}
|
334 |
|
@@ -361,15 +360,18 @@
|
|
361 |
.ajax-load-more .expand-wrap{
|
362 |
display: block;
|
363 |
}
|
|
|
|
|
|
|
364 |
|
365 |
.ajax-load-more .section-title{
|
366 |
-
width:
|
367 |
padding-top: 5px;
|
368 |
float: left;
|
369 |
}
|
370 |
.ajax-load-more .section-title p{
|
371 |
font-size: 13px !important;
|
372 |
-
padding-left:
|
373 |
color: #999;
|
374 |
}
|
375 |
|
@@ -383,7 +385,7 @@
|
|
383 |
padding-left: 0 !important;
|
384 |
}
|
385 |
.ajax-load-more label.template-title{
|
386 |
-
padding: 10px 0
|
387 |
margin: 0;
|
388 |
font-size: 0.9em;
|
389 |
color: #888;
|
@@ -397,10 +399,10 @@
|
|
397 |
|
398 |
|
399 |
.ajax-load-more .row .wrap{
|
400 |
-
padding: 5px 0 0
|
401 |
margin: 0;
|
402 |
border: none;
|
403 |
-
width:
|
404 |
float: left;
|
405 |
position: relative;
|
406 |
}
|
@@ -650,17 +652,17 @@
|
|
650 |
|
651 |
.header-wrap{
|
652 |
background: url(../img/alm-logo-48x48.png) no-repeat left 12px;
|
653 |
-
padding-left:
|
654 |
min-height: 48px;
|
655 |
overflow: hidden;
|
656 |
-
padding-top:
|
657 |
}
|
658 |
.ajax-load-more .header-wrap h2{
|
659 |
padding-top: 0;
|
660 |
font-size: 26px;
|
661 |
}
|
662 |
.ajax-load-more .header-wrap h2 + p{
|
663 |
-
margin-top: -
|
664 |
opacity: 0.8;
|
665 |
}
|
666 |
|
@@ -673,10 +675,19 @@
|
|
673 |
position: relative;
|
674 |
top: -2px;
|
675 |
}
|
676 |
-
.ajax-load-more
|
677 |
font-size: 24px !important;
|
678 |
-
|
679 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
680 |
}
|
681 |
|
682 |
.ajax-load-more h3.add-on-title,
|
@@ -695,7 +706,7 @@
|
|
695 |
border-bottom: 1px solid #efefef;
|
696 |
}
|
697 |
.ajax-load-more p.desc{
|
698 |
-
font-size: 12px;
|
699 |
padding: 0 0 8px 24px;
|
700 |
}
|
701 |
|
@@ -826,7 +837,10 @@ table.highlight{
|
|
826 |
/* Repeaters */
|
827 |
.repeaters {}
|
828 |
.repeaters .repeater-wrap{
|
829 |
-
padding: 0 10px
|
|
|
|
|
|
|
830 |
}
|
831 |
.repeaters input.save-repeater{
|
832 |
display: inline-block;
|
@@ -840,6 +854,7 @@ table.highlight{
|
|
840 |
}
|
841 |
.repeaters input.save-repeater.saving{
|
842 |
cursor: default !important;
|
|
|
843 |
}
|
844 |
.repeaters .saved-response{
|
845 |
max-width: 72%;
|
@@ -853,8 +868,12 @@ table.highlight{
|
|
853 |
#alm-add-ons .group{
|
854 |
overflow: hidden;
|
855 |
}
|
856 |
-
#alm-add-ons .wrap{
|
857 |
padding-bottom: 60px;
|
|
|
|
|
|
|
|
|
858 |
}
|
859 |
#alm-add-ons .group .section-title p{
|
860 |
padding-left: 0 !important;
|
@@ -863,95 +882,96 @@ table.highlight{
|
|
863 |
position: absolute;
|
864 |
bottom: 20px;
|
865 |
right: 20px;
|
|
|
|
|
866 |
}
|
867 |
|
868 |
-
|
869 |
/* Add-on Callout! */
|
870 |
.call-out{
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
.default-repeater .call-out{
|
882 |
-
width: 100%;
|
883 |
-
margin: 0 0 0;
|
884 |
-
}
|
885 |
-
.call-out .btn{
|
886 |
-
padding: 5px 8px;
|
887 |
-
display: inline-block;
|
888 |
-
background: #fff;
|
889 |
-
border: 1px solid #5da592;
|
890 |
-
border-radius: 3px;
|
891 |
-
position: absolute;
|
892 |
-
right: 7px;
|
893 |
-
top:7px;
|
894 |
-
color: #387061 !important;
|
895 |
-
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
|
896 |
-
}
|
897 |
-
.call-out a{
|
898 |
-
color: #387061 !important;
|
899 |
-
text-decoration: none;
|
900 |
-
font-weight: 600;
|
901 |
-
}
|
902 |
-
.call-out a:hover{
|
903 |
-
color: #222 !important;
|
904 |
-
}
|
905 |
-
|
906 |
-
|
907 |
-
a.btn{
|
908 |
-
padding: 6px 10px;
|
909 |
-
display: inline-block;
|
910 |
-
background: #4DD5B0;
|
911 |
-
border: 1px solid #5da592;
|
912 |
-
border-radius: 3px;
|
913 |
-
position: static;
|
914 |
-
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
|
915 |
-
text-decoration: none !important;
|
916 |
-
color: #fff !important;
|
917 |
-
font-size: 13px;
|
918 |
-
font-weight: 600;
|
919 |
}
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
955 |
|
956 |
|
957 |
/*
|
@@ -1015,6 +1035,8 @@ a.btn{
|
|
1015 |
line-height: 18px;
|
1016 |
text-align: center;
|
1017 |
margin:0 7px 0 0;
|
|
|
|
|
1018 |
}
|
1019 |
|
1020 |
.ajax-load-more .cnkt-sidebar .item i.fa-check{
|
@@ -1121,8 +1143,189 @@ a.btn{
|
|
1121 |
}
|
1122 |
|
1123 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1124 |
|
1125 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1126 |
/*
|
1127 |
* Admin screen media queries
|
1128 |
*
|
@@ -1154,12 +1357,28 @@ a.btn{
|
|
1154 |
width: 100%;
|
1155 |
display: block;
|
1156 |
float: none;
|
1157 |
-
padding:
|
1158 |
}
|
1159 |
.ajax-load-more input[type=text],
|
1160 |
.select2-container{
|
1161 |
width: 100%;
|
1162 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1163 |
|
1164 |
}
|
1165 |
|
14 |
font-size: 14px;
|
15 |
color:#666;
|
16 |
position: relative;
|
|
|
17 |
font-family: 'Open Sans', sans-serif;
|
18 |
max-width: 1500px;
|
19 |
}
|
84 |
/* Expand Collapse Headings */
|
85 |
.ajax-load-more h3.heading{
|
86 |
font-weight: 700;
|
87 |
+
padding: 10px 10px 10px 35px !important;
|
88 |
line-height: normal !important;
|
89 |
margin: 0 !important;
|
90 |
color: #555;
|
106 |
color:#e1e1e1;
|
107 |
font-size: 18px;
|
108 |
position: absolute;
|
109 |
+
left: 10px;
|
110 |
+
top: 13px;
|
111 |
height: 20px;
|
112 |
width: 20px;
|
113 |
}
|
314 |
/* --------------------------------------------------------------------------- */
|
315 |
|
316 |
.ajax-load-more .row{
|
317 |
+
padding: 0 !important;
|
318 |
margin: 15px 0 0;
|
319 |
height: auto;
|
320 |
width: 100%;
|
327 |
border-radius: 2px;
|
328 |
}
|
329 |
.ajax-load-more .row.no-brd{
|
330 |
+
border: none !important;
|
331 |
padding: 0 !important;
|
332 |
}
|
333 |
|
360 |
.ajax-load-more .expand-wrap{
|
361 |
display: block;
|
362 |
}
|
363 |
+
#alm-examples.ajax-load-more .expand-wrap{
|
364 |
+
padding: 10px 10px 0;
|
365 |
+
}
|
366 |
|
367 |
.ajax-load-more .section-title{
|
368 |
+
width: 40%;
|
369 |
padding-top: 5px;
|
370 |
float: left;
|
371 |
}
|
372 |
.ajax-load-more .section-title p{
|
373 |
font-size: 13px !important;
|
374 |
+
padding-left: 35px !important;
|
375 |
color: #999;
|
376 |
}
|
377 |
|
385 |
padding-left: 0 !important;
|
386 |
}
|
387 |
.ajax-load-more label.template-title{
|
388 |
+
padding: 10px 0;
|
389 |
margin: 0;
|
390 |
font-size: 0.9em;
|
391 |
color: #888;
|
399 |
|
400 |
|
401 |
.ajax-load-more .row .wrap{
|
402 |
+
padding: 5px 0 0 3%;
|
403 |
margin: 0;
|
404 |
border: none;
|
405 |
+
width: 60%;
|
406 |
float: left;
|
407 |
position: relative;
|
408 |
}
|
652 |
|
653 |
.header-wrap{
|
654 |
background: url(../img/alm-logo-48x48.png) no-repeat left 12px;
|
655 |
+
padding-left: 62px;
|
656 |
min-height: 48px;
|
657 |
overflow: hidden;
|
658 |
+
padding-top: 11px;
|
659 |
}
|
660 |
.ajax-load-more .header-wrap h2{
|
661 |
padding-top: 0;
|
662 |
font-size: 26px;
|
663 |
}
|
664 |
.ajax-load-more .header-wrap h2 + p{
|
665 |
+
margin-top: -3px;
|
666 |
opacity: 0.8;
|
667 |
}
|
668 |
|
675 |
position: relative;
|
676 |
top: -2px;
|
677 |
}
|
678 |
+
.ajax-load-more h2.addon-title{
|
679 |
font-size: 24px !important;
|
680 |
+
font-weight: 600 !important;
|
681 |
+
color: #666 !important;
|
682 |
+
padding: 0;
|
683 |
+
margin: 0 0 10px;
|
684 |
+
padding: 0 0 10px;
|
685 |
+
border-bottom: 1px solid #efefef;
|
686 |
+
}
|
687 |
+
.ajax-load-more p.addon-intro{
|
688 |
+
font-size: 20px !important;
|
689 |
+
line-height: 27px !important;
|
690 |
+
color: #999 !important;
|
691 |
}
|
692 |
|
693 |
.ajax-load-more h3.add-on-title,
|
706 |
border-bottom: 1px solid #efefef;
|
707 |
}
|
708 |
.ajax-load-more p.desc{
|
709 |
+
font-size: 12px !important;
|
710 |
padding: 0 0 8px 24px;
|
711 |
}
|
712 |
|
837 |
/* Repeaters */
|
838 |
.repeaters {}
|
839 |
.repeaters .repeater-wrap{
|
840 |
+
padding: 0 20px 10px 35px !important;
|
841 |
+
}
|
842 |
+
.repeater-wrap label{
|
843 |
+
cursor: default;
|
844 |
}
|
845 |
.repeaters input.save-repeater{
|
846 |
display: inline-block;
|
854 |
}
|
855 |
.repeaters input.save-repeater.saving{
|
856 |
cursor: default !important;
|
857 |
+
opacity: 0.3 !important;
|
858 |
}
|
859 |
.repeaters .saved-response{
|
860 |
max-width: 72%;
|
868 |
#alm-add-ons .group{
|
869 |
overflow: hidden;
|
870 |
}
|
871 |
+
#alm-add-ons .row .wrap{
|
872 |
padding-bottom: 60px;
|
873 |
+
width: 55%;
|
874 |
+
}
|
875 |
+
#alm-add-ons .section-title{
|
876 |
+
width: 45%;
|
877 |
}
|
878 |
#alm-add-ons .group .section-title p{
|
879 |
padding-left: 0 !important;
|
882 |
position: absolute;
|
883 |
bottom: 20px;
|
884 |
right: 20px;
|
885 |
+
font-size: 14px;
|
886 |
+
padding: 8px 14px;
|
887 |
}
|
888 |
|
|
|
889 |
/* Add-on Callout! */
|
890 |
.call-out{
|
891 |
+
background: #4DD5B0;
|
892 |
+
padding: 13px 100px 13px 12px;
|
893 |
+
border-radius: 3px;
|
894 |
+
margin: 0;
|
895 |
+
width: 100%;
|
896 |
+
display: block;
|
897 |
+
color: #fff;
|
898 |
+
font-size: 13px;
|
899 |
+
font-weight: 600;
|
900 |
+
position: relative;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
901 |
}
|
902 |
+
#alm-builder .call-out,
|
903 |
+
.forceColors .call-out{ /* Shortcode builder */
|
904 |
+
width: 90%;
|
905 |
+
width: calc(100% - 20px);
|
906 |
+
margin: 10px;
|
907 |
+
}
|
908 |
+
.call-out .btn{
|
909 |
+
padding: 5px 8px;
|
910 |
+
display: inline-block;
|
911 |
+
background: #fff;
|
912 |
+
border: 1px solid #5da592;
|
913 |
+
border-radius: 3px;
|
914 |
+
position: absolute;
|
915 |
+
right: 7px;
|
916 |
+
top:7px;
|
917 |
+
color: #387061 !important;
|
918 |
+
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
|
919 |
+
}
|
920 |
+
.call-out a{
|
921 |
+
color: #387061 !important;
|
922 |
+
text-decoration: none;
|
923 |
+
font-weight: 600;
|
924 |
+
}
|
925 |
+
.call-out a:hover{
|
926 |
+
color: #222 !important;
|
927 |
+
}
|
928 |
+
a.btn{
|
929 |
+
padding: 6px 10px;
|
930 |
+
display: inline-block;
|
931 |
+
background: #4DD5B0;
|
932 |
+
border: 1px solid #5da592;
|
933 |
+
border-radius: 3px;
|
934 |
+
position: static;
|
935 |
+
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
|
936 |
+
text-decoration: none !important;
|
937 |
+
color: #fff !important;
|
938 |
+
font-size: 13px;
|
939 |
+
font-weight: 600;
|
940 |
+
}
|
941 |
+
a.btn:hover,
|
942 |
+
a.btn:hover i{
|
943 |
+
background-color: #935eaf;
|
944 |
+
border-color: #935eaf;
|
945 |
+
color:#fff !important;
|
946 |
+
box-shadow: none;
|
947 |
+
}
|
948 |
+
a.btn:active{
|
949 |
+
background-color: #83519d;
|
950 |
+
border-color: #935eaf;
|
951 |
+
color:#fff !important;
|
952 |
+
box-shadow: inset 0 2px 1px rgba(0, 0, 0, 0.1);
|
953 |
+
outline: none;
|
954 |
+
}
|
955 |
+
a.btn i{
|
956 |
+
color: #397666;
|
957 |
+
margin-right: 3px;
|
958 |
+
position: relative;
|
959 |
+
top:1px;
|
960 |
+
background: none !important;
|
961 |
+
}
|
962 |
+
a.btn.installed{
|
963 |
+
background: #efefef !important;
|
964 |
+
border-color: #ccc !important;
|
965 |
+
color:#666 !important;
|
966 |
+
cursor: default;
|
967 |
+
box-shadow: inset 0 2px 1px rgba(0, 0, 0, 0.1) !important;
|
968 |
+
}
|
969 |
+
a.btn.installed i,
|
970 |
+
a.btn.installed:hover i{
|
971 |
+
background: none !important;
|
972 |
+
color: #5da592 !important;
|
973 |
+
top: 0;
|
974 |
+
}
|
975 |
|
976 |
|
977 |
/*
|
1035 |
line-height: 18px;
|
1036 |
text-align: center;
|
1037 |
margin:0 7px 0 0;
|
1038 |
+
position: relative;
|
1039 |
+
top: 1px;
|
1040 |
}
|
1041 |
|
1042 |
.ajax-load-more .cnkt-sidebar .item i.fa-check{
|
1143 |
}
|
1144 |
|
1145 |
|
1146 |
+
|
1147 |
+
/*
|
1148 |
+
* Delete Template (Unlimited Repeaters
|
1149 |
+
*
|
1150 |
+
* @since 2.2.7
|
1151 |
+
*/
|
1152 |
+
|
1153 |
+
#unlmited-container{
|
1154 |
+
margin: 0;
|
1155 |
+
display: block;
|
1156 |
+
overflow: hidden;
|
1157 |
+
}
|
1158 |
+
.admin.ajax-load-more .row.unlimited:first-of-type{
|
1159 |
+
margin-top: 15px;
|
1160 |
+
}
|
1161 |
+
.repeaters .row.unlimited{
|
1162 |
+
-webkit-transition: background-color 0.5s ease;
|
1163 |
+
-moz-transition: background-color 0.5s ease;
|
1164 |
+
transition: background-color 0.5s ease;
|
1165 |
+
}
|
1166 |
+
.repeaters .row:hover,
|
1167 |
+
#alm-builder .row:hover{
|
1168 |
+
border-color: #ccc;
|
1169 |
+
}
|
1170 |
+
.unlimited-wrap{
|
1171 |
+
display: none;
|
1172 |
+
}
|
1173 |
+
|
1174 |
+
.admin.ajax-load-more .row.unlimited.deleting{ /* Deleting Row */
|
1175 |
+
background: #fff url(../img/loader-unlimited.gif) no-repeat center center;
|
1176 |
+
border-color: #fff;
|
1177 |
+
opacity: 0.4;
|
1178 |
+
}
|
1179 |
+
.admin.ajax-load-more .row.unlimited.deleting.deleted{ /* Deleting Row */
|
1180 |
+
background-image: none !important;
|
1181 |
+
}
|
1182 |
+
.admin.ajax-load-more .row.unlimited.new{ /* New Row */
|
1183 |
+
background: url(../img/loader-unlimited.gif) no-repeat center center;
|
1184 |
+
border-color: #efefef !important;
|
1185 |
+
min-height: 60px;
|
1186 |
+
display: none;
|
1187 |
+
}
|
1188 |
+
.admin.ajax-load-more .row.unlimited.new.done{
|
1189 |
+
background-image: none !important;
|
1190 |
+
}
|
1191 |
+
.admin.ajax-load-more .row.unlimited.loaded{ /* Loading complete */
|
1192 |
+
background-color: #64e49d;
|
1193 |
+
border-color: #64e49d;
|
1194 |
+
}
|
1195 |
+
|
1196 |
+
.admin.ajax-load-more .row.unlimited.deleting .expand-wrap,
|
1197 |
+
.row.unlimited.deleting h3.heading{
|
1198 |
+
opacity: 0.6;
|
1199 |
+
}
|
1200 |
+
.row.unlimited.deleting .alm-delete{
|
1201 |
+
display: none;
|
1202 |
+
}
|
1203 |
+
.row.unlimited.deleting .save-repeater{
|
1204 |
+
opacity: 0;
|
1205 |
+
cursor: default;
|
1206 |
+
}
|
1207 |
+
|
1208 |
+
.ajax-load-more .row.unlimited input[type=text]{
|
1209 |
+
width: 100.75%;
|
1210 |
+
}
|
1211 |
+
|
1212 |
+
.repeaters .alm-delete{
|
1213 |
+
clear: none;
|
1214 |
+
display: inline-block;
|
1215 |
+
margin: 15px 0 0;
|
1216 |
+
width: auto;
|
1217 |
+
float: right;
|
1218 |
+
opacity: 0;
|
1219 |
+
transition: all 0.2s ease;
|
1220 |
+
}
|
1221 |
+
.repeaters .alm-delete a{
|
1222 |
+
border-radius: 2px;
|
1223 |
+
background: none;
|
1224 |
+
color: #c94141;
|
1225 |
+
font-size: 13px;
|
1226 |
+
text-decoration: none;
|
1227 |
+
display: block;
|
1228 |
+
padding: 5px 10px;
|
1229 |
+
}
|
1230 |
+
.repeaters .alm-delete a:hover{
|
1231 |
+
background-color: #c94141;
|
1232 |
+
color: #fff;
|
1233 |
+
}
|
1234 |
+
.repeaters .alm-delete a:focus{
|
1235 |
+
-webkit-box-shadow: none;
|
1236 |
+
-moz-box-shadow: none;
|
1237 |
+
box-shadow: none;
|
1238 |
+
}
|
1239 |
+
.repeaters .alm-delete a:active{
|
1240 |
+
-webkit-box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.1);
|
1241 |
+
-moz-box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.1);
|
1242 |
+
box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.1);
|
1243 |
+
background-color: #b93636;
|
1244 |
+
}
|
1245 |
+
|
1246 |
+
.repeaters .row:hover .alm-delete{
|
1247 |
+
opacity: 1;
|
1248 |
+
}
|
1249 |
+
|
1250 |
+
.alm-add-template{
|
1251 |
+
text-align: center;
|
1252 |
+
margin: 15px 0 0 !important;
|
1253 |
+
display: block;
|
1254 |
+
font-size: 14px !important;
|
1255 |
+
font-weight: 700;
|
1256 |
+
text-transform: none !important;
|
1257 |
+
text-align: center;
|
1258 |
+
/* text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1); */
|
1259 |
+
}
|
1260 |
+
.alm-add-template a{
|
1261 |
+
background: #efefef;
|
1262 |
+
border: 1px solid #e1e1e1;
|
1263 |
+
color: #333;
|
1264 |
+
display: inline-block;
|
1265 |
+
padding: 9px 14px 8px;
|
1266 |
+
-webkit-border-radius: 3px;
|
1267 |
+
-moz-border-radius: 3px;
|
1268 |
+
border-radius: 3px;
|
1269 |
+
text-decoration: none;
|
1270 |
+
-webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.07);
|
1271 |
+
-moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.07);
|
1272 |
+
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.07);
|
1273 |
+
text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.4);
|
1274 |
+
}
|
1275 |
+
.alm-add-template a.active{
|
1276 |
+
opacity: 0.5;
|
1277 |
+
cursor: default;
|
1278 |
+
color: #333 !important;
|
1279 |
+
background: #efefef !important;
|
1280 |
+
border-color: #efefef !important;
|
1281 |
+
}
|
1282 |
+
.alm-add-template a:hover{
|
1283 |
+
background: #ff5a58;
|
1284 |
+
border-color: #ff5a58;
|
1285 |
+
color: #fff;
|
1286 |
+
-webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 0 rgba(0, 0, 0, 0.07);
|
1287 |
+
-moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 0 rgba(0, 0, 0, 0.07);
|
1288 |
+
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 0 rgba(0, 0, 0, 0.07);
|
1289 |
+
text-shadow: none;
|
1290 |
+
}
|
1291 |
+
.alm-add-template a:focus{
|
1292 |
+
-webkit-box-shadow: none;
|
1293 |
+
-moz-box-shadow: none;
|
1294 |
+
box-shadow: none;
|
1295 |
+
text-shadow: none;
|
1296 |
+
}
|
1297 |
+
.alm-add-template a:active{
|
1298 |
+
color: #fff;
|
1299 |
+
background: #ec4745;
|
1300 |
+
border-color: #ec4745;
|
1301 |
+
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
|
1302 |
+
-moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
|
1303 |
+
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
|
1304 |
+
text-shadow: none;
|
1305 |
+
}
|
1306 |
+
|
1307 |
+
.alm-add-template a i {
|
1308 |
+
font-size: 20px;
|
1309 |
+
color: #ec4745;
|
1310 |
+
margin: 0 3px 0 0;
|
1311 |
+
position: relative;
|
1312 |
+
top: 2px;
|
1313 |
+
left: -1px;
|
1314 |
+
}
|
1315 |
+
.alm-add-template a:hover i,
|
1316 |
+
.alm-add-template a:active i{
|
1317 |
+
color: #fff;
|
1318 |
+
}
|
1319 |
|
1320 |
+
|
1321 |
+
.spacer{
|
1322 |
+
height:10px;
|
1323 |
+
clear:both;
|
1324 |
+
display:block;
|
1325 |
+
}
|
1326 |
+
|
1327 |
+
|
1328 |
+
|
1329 |
/*
|
1330 |
* Admin screen media queries
|
1331 |
*
|
1357 |
width: 100%;
|
1358 |
display: block;
|
1359 |
float: none;
|
1360 |
+
padding: 10px;
|
1361 |
}
|
1362 |
.ajax-load-more input[type=text],
|
1363 |
.select2-container{
|
1364 |
width: 100%;
|
1365 |
}
|
1366 |
+
.ajax-load-more .row .wrap .inner.half {
|
1367 |
+
display: block;
|
1368 |
+
padding: 0 0 20px;
|
1369 |
+
width: 100%;
|
1370 |
+
}
|
1371 |
+
.ajax-load-more .section-title p {
|
1372 |
+
color: #999;
|
1373 |
+
padding: 0 !important;
|
1374 |
+
}
|
1375 |
+
#alm-add-ons .row .wrap{
|
1376 |
+
padding-bottom: 60px;
|
1377 |
+
width: 100%;
|
1378 |
+
}
|
1379 |
+
#alm-add-ons .section-title{
|
1380 |
+
width: 100%;
|
1381 |
+
}
|
1382 |
|
1383 |
}
|
1384 |
|
admin/img/add-ons/unlimited-add-ons.jpg
ADDED
Binary file
|
admin/img/loader-unlimited.gif
ADDED
Binary file
|
admin/includes/cta/writeable.php
CHANGED
@@ -3,12 +3,48 @@
|
|
3 |
<div class="item">
|
4 |
<?php
|
5 |
//Test server for write capabilities
|
6 |
-
|
7 |
-
|
8 |
-
if
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
?>
|
13 |
</div>
|
14 |
</div>
|
3 |
<div class="item">
|
4 |
<?php
|
5 |
//Test server for write capabilities
|
6 |
+
|
7 |
+
$alm_file = ALM_PATH .'core/repeater/default.php'; // Default ALM repeater
|
8 |
+
if(file_exists($alm_file)){
|
9 |
+
if (is_writable($alm_file))
|
10 |
+
echo __('<p><i class="fa fa-check"></i><strong>Ajax Load More</strong></p><p class="desc">Yay! Read/Write access is enabled within the /ajax-load-more/ directory.', ALM_NAME);
|
11 |
+
else
|
12 |
+
echo __('<p><i class="fa fa-exclamation"></i><strong>Ajax Load More</strong></p>Access Denied! You must enable read and write access for Ajax Load More directory (/ajax-load-more/core/repeater/) in order to save repeater template data.<br/><br/>Please contact your hosting provider or site administrator for more information.', ALM_NAME);
|
13 |
+
}else{
|
14 |
+
echo __('<p><i class="fa fa-exclamation"></i><strong>Ajax Load More</strong></p><p class="desc">Unable to locate configuration file. Directory access may not be granted.', ALM_NAME);
|
15 |
+
}
|
16 |
+
?>
|
17 |
+
|
18 |
+
<?php
|
19 |
+
// Custom Repeaters Add-on
|
20 |
+
if (has_action('alm_custom_repeaters')){
|
21 |
+
echo '<div class="spacer"></div>';
|
22 |
+
$alm_custom_repeater_file = ALM_REPEATER_PATH. '/repeaters/repeater2.php'; // Test file
|
23 |
+
if(file_exists($alm_custom_repeater_file)){
|
24 |
+
if (is_writable($alm_custom_repeater_file))
|
25 |
+
echo __('<p><i class="fa fa-check"></i><strong>ALM - Custom Repeaters</strong></p><p class="desc">Nice! Read/Write access is enabled within the /ajax-load-more-repeaters/repeaters/ directory.', ALM_NAME);
|
26 |
+
else
|
27 |
+
echo __('<p><i class="fa fa-exclamation"></i><strong>ALM Custom Repeaters</strong></p><p class="desc">Access Denied! You must enable read and write access for Ajax Load More Custom Repeaters directory (/ajax-load-more-repeaters/repeaters/) in order to save repeater template data.<br/><br/>Please contact your hosting provider or site administrator for more information.', ALM_NAME);
|
28 |
+
}else{
|
29 |
+
echo __('<p><i class="fa fa-exclamation"></i><strong>ALM Custom Repeaters</strong></p><p class="desc">Unable to locate configuration file. Directory access may not be granted.', ALM_NAME);
|
30 |
+
}
|
31 |
+
}
|
32 |
+
?>
|
33 |
+
|
34 |
+
<?php
|
35 |
+
// Unlimited Repeaters Add-on
|
36 |
+
if (has_action('alm_unlimited_repeaters')){
|
37 |
+
echo '<div class="spacer"></div>';
|
38 |
+
$alm_unlimited_file = ALM_UNLIMITED_REPEATER_PATH .'_is_writeable.php'; // Test file
|
39 |
+
if(file_exists($alm_unlimited_file)){
|
40 |
+
if (is_writable($alm_unlimited_file))
|
41 |
+
echo __('<p><i class="fa fa-check"></i><strong>ALM - Custom Repeaters v2</strong></p><p class="desc">Oh Ya! Read/Write access is enabled within the /ajax-load-more-repeaters-v2/repeaters/ directory.', ALM_NAME);
|
42 |
+
else
|
43 |
+
echo __('<p><i class="fa fa-exclamation"></i><strong>ALM - Custom Repeaters v2</strong></p><p class="desc">Access Denied! You must enable read and write access for Ajax Load More Unlimited directory (/ajax-load-more-repeaters-v2/repeaters/) in order to save repeater template data.<br/><br/>Please contact your hosting provider or site administrator for more information.', ALM_NAME);
|
44 |
+
}else{
|
45 |
+
echo __('<p><i class="fa fa-exclamation"></i><strong>ALM Unlimited</strong></p><p class="desc">Unable to locate configuration file. Directory access may not be granted.', ALM_NAME);
|
46 |
+
}
|
47 |
+
}
|
48 |
?>
|
49 |
</div>
|
50 |
</div>
|
admin/shortcode-builder/js/shortcode-builder.js
CHANGED
@@ -262,7 +262,8 @@ jQuery(document).ready(function($) {
|
|
262 |
//Select 'post' by default
|
263 |
$('.post_types input[type=checkbox]#chk-post').prop('checked', true).addClass('changed');
|
264 |
|
265 |
-
|
|
|
266 |
$(this).addClass('changed');
|
267 |
|
268 |
// If post type is not selected, select 'post'.
|
@@ -316,7 +317,7 @@ jQuery(document).ready(function($) {
|
|
316 |
* @since 2.0.0
|
317 |
*/
|
318 |
|
319 |
-
$('h3.heading'
|
320 |
var el = $(this);
|
321 |
if($(el).hasClass('open')){
|
322 |
$(el).next('.expand-wrap').slideDown(100, 'alm_easeInOutQuad', function(){
|
@@ -329,7 +330,7 @@ jQuery(document).ready(function($) {
|
|
329 |
}
|
330 |
});
|
331 |
|
332 |
-
|
333 |
var el = $(this);
|
334 |
if($(el).hasClass('closed')){
|
335 |
$(el).removeClass('closed');
|
262 |
//Select 'post' by default
|
263 |
$('.post_types input[type=checkbox]#chk-post').prop('checked', true).addClass('changed');
|
264 |
|
265 |
+
|
266 |
+
$(document).on('change keyup', '.alm_element', function() {
|
267 |
$(this).addClass('changed');
|
268 |
|
269 |
// If post type is not selected, select 'post'.
|
317 |
* @since 2.0.0
|
318 |
*/
|
319 |
|
320 |
+
$(document).on('click', 'h3.heading', function(){
|
321 |
var el = $(this);
|
322 |
if($(el).hasClass('open')){
|
323 |
$(el).next('.expand-wrap').slideDown(100, 'alm_easeInOutQuad', function(){
|
330 |
}
|
331 |
});
|
332 |
|
333 |
+
$(document).on('click', '.toggle-all', function(){
|
334 |
var el = $(this);
|
335 |
if($(el).hasClass('closed')){
|
336 |
$(el).removeClass('closed');
|
admin/shortcode-builder/shortcode-builder.php
CHANGED
@@ -16,12 +16,26 @@
|
|
16 |
if (has_action('alm_get_custom_repeaters')) {
|
17 |
do_action('alm_get_custom_repeaters');
|
18 |
}
|
|
|
|
|
|
|
19 |
echo '</select>';
|
20 |
|
21 |
echo '</div></div>';
|
|
|
|
|
|
|
22 |
if (!has_action('alm_get_custom_repeaters')) {
|
23 |
-
include( ALM_PATH . 'admin/includes/cta/extend.php');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
}
|
|
|
25 |
echo '</div>';
|
26 |
echo '</div>';
|
27 |
|
@@ -168,11 +182,9 @@
|
|
168 |
</div>
|
169 |
<div class="wrap">
|
170 |
<div class="inner">
|
171 |
-
<
|
172 |
-
|
173 |
-
|
174 |
-
</div>
|
175 |
-
</div>
|
176 |
<div id="meta-query-extended">
|
177 |
<?php // Meta Value ?>
|
178 |
<div class="inner border-top">
|
16 |
if (has_action('alm_get_custom_repeaters')) {
|
17 |
do_action('alm_get_custom_repeaters');
|
18 |
}
|
19 |
+
if (has_action('alm_get_unlimited_repeaters')) {
|
20 |
+
do_action('alm_get_unlimited_repeaters');
|
21 |
+
}
|
22 |
echo '</select>';
|
23 |
|
24 |
echo '</div></div>';
|
25 |
+
|
26 |
+
// Custom Repeaters - /cta/extend.php
|
27 |
+
// Removed in 2.2.8
|
28 |
if (!has_action('alm_get_custom_repeaters')) {
|
29 |
+
//include( ALM_PATH . 'admin/includes/cta/extend.php');
|
30 |
+
}
|
31 |
+
|
32 |
+
// Custom Repeaters v2 - /cta/extend.php
|
33 |
+
if (!has_action('alm_get_unlimited_repeaters')) {
|
34 |
+
if (!has_action('alm_get_custom_repeaters')) {
|
35 |
+
include( ALM_PATH . 'admin/includes/cta/extend.php');
|
36 |
+
}
|
37 |
}
|
38 |
+
|
39 |
echo '</div>';
|
40 |
echo '</div>';
|
41 |
|
182 |
</div>
|
183 |
<div class="wrap">
|
184 |
<div class="inner">
|
185 |
+
<label for="meta-key" class="full"><?php _e('Field Key (Name):', ALM_NAME); ?></label>
|
186 |
+
<input class="alm_element" name="meta-key" type="text" id="meta-key" value="" placeholder="<?php _e('Enter custom field key(name)', ALM_NAME); ?>">
|
187 |
+
</div>
|
|
|
|
|
188 |
<div id="meta-query-extended">
|
189 |
<?php // Meta Value ?>
|
190 |
<div class="inner border-top">
|
ajax-load-more.php
CHANGED
@@ -6,14 +6,14 @@ Description: A simple solution for lazy loading WordPress posts and pages with A
|
|
6 |
Author: Darren Cooney
|
7 |
Twitter: @KaptonKaos
|
8 |
Author URI: http://connekthq.com
|
9 |
-
Version: 2.2.
|
10 |
License: GPL
|
11 |
Copyright: Darren Cooney & Connekt Media
|
12 |
*/
|
13 |
|
14 |
|
15 |
-
define('ALM_VERSION', '2.2.
|
16 |
-
define('ALM_RELEASE', 'November
|
17 |
|
18 |
/*
|
19 |
* alm_install
|
@@ -42,16 +42,7 @@ function alm_install() {
|
|
42 |
|
43 |
//Insert default data in newly created table
|
44 |
$wpdb->insert($table_name , array('name' => 'default', 'repeaterDefault' => $defaultRepeater, 'pluginVersion' => ALM_VERSION));
|
45 |
-
}
|
46 |
-
|
47 |
-
// Updated 2.0.5
|
48 |
-
// Check column 'name' exists in $wpdb - this is an upgrade checker.
|
49 |
-
$row = $wpdb->get_results("SELECT COLUMN_NAME FROM $table_name.COLUMNS WHERE column_name = 'name'");
|
50 |
-
if(empty($row)){
|
51 |
-
$wpdb->query("ALTER TABLE $table_name ADD name text NOT NULL");
|
52 |
-
$wpdb->update($table_name , array('name' => 'default'), array('id' => 1));
|
53 |
-
}
|
54 |
-
|
55 |
}
|
56 |
|
57 |
|
@@ -220,7 +211,10 @@ if( !class_exists('AjaxLoadMore') ):
|
|
220 |
die('Get Bounced!');
|
221 |
}
|
222 |
|
223 |
-
$repeater = (isset($_GET['repeater'])) ? $_GET['repeater'] : 'default';
|
|
|
|
|
|
|
224 |
$postType = (isset($_GET['postType'])) ? $_GET['postType'] : 'post';
|
225 |
$postFormat = (isset($_GET['postFormat'])) ? $_GET['postFormat'] : '';
|
226 |
$category = (isset($_GET['category'])) ? $_GET['category'] : '';
|
@@ -337,7 +331,7 @@ if( !class_exists('AjaxLoadMore') ):
|
|
337 |
);
|
338 |
}
|
339 |
|
340 |
-
|
341 |
if(!empty($meta_key) && !empty($meta_value)){
|
342 |
$args['meta_query'] = array(
|
343 |
array(
|
@@ -348,10 +342,18 @@ if( !class_exists('AjaxLoadMore') ):
|
|
348 |
);
|
349 |
}
|
350 |
|
351 |
-
|
352 |
if(!empty($meta_key)){
|
353 |
$args['meta_key'] = $meta_key;
|
354 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
355 |
|
356 |
|
357 |
// WP_Query()
|
@@ -359,32 +361,45 @@ if( !class_exists('AjaxLoadMore') ):
|
|
359 |
|
360 |
// Run the loop
|
361 |
if ($alm_query->have_posts()) :
|
|
|
|
|
|
|
362 |
while ($alm_query->have_posts()): $alm_query->the_post();
|
363 |
-
$
|
364 |
$include = '';
|
365 |
$found = false;
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
|
|
|
|
|
|
|
|
386 |
$include = plugin_dir_path( __FILE__ ) . 'core/repeater/default.php';
|
387 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
388 |
|
389 |
//Include repeater template
|
390 |
include( $include );
|
6 |
Author: Darren Cooney
|
7 |
Twitter: @KaptonKaos
|
8 |
Author URI: http://connekthq.com
|
9 |
+
Version: 2.2.8
|
10 |
License: GPL
|
11 |
Copyright: Darren Cooney & Connekt Media
|
12 |
*/
|
13 |
|
14 |
|
15 |
+
define('ALM_VERSION', '2.2.8');
|
16 |
+
define('ALM_RELEASE', 'November 25, 2014');
|
17 |
|
18 |
/*
|
19 |
* alm_install
|
42 |
|
43 |
//Insert default data in newly created table
|
44 |
$wpdb->insert($table_name , array('name' => 'default', 'repeaterDefault' => $defaultRepeater, 'pluginVersion' => ALM_VERSION));
|
45 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
}
|
47 |
|
48 |
|
211 |
die('Get Bounced!');
|
212 |
}
|
213 |
|
214 |
+
$repeater = (isset($_GET['repeater'])) ? $_GET['repeater'] : 'default';
|
215 |
+
$type = preg_split('/(?=\d)/', $repeater, 2); // split $repeater vale at number to determine type
|
216 |
+
$type = $type[0]; // default | repeater | template_
|
217 |
+
|
218 |
$postType = (isset($_GET['postType'])) ? $_GET['postType'] : 'post';
|
219 |
$postFormat = (isset($_GET['postFormat'])) ? $_GET['postFormat'] : '';
|
220 |
$category = (isset($_GET['category'])) ? $_GET['category'] : '';
|
331 |
);
|
332 |
}
|
333 |
|
334 |
+
// Meta Query
|
335 |
if(!empty($meta_key) && !empty($meta_value)){
|
336 |
$args['meta_query'] = array(
|
337 |
array(
|
342 |
);
|
343 |
}
|
344 |
|
345 |
+
// Meta_key, used for ordering by meta value
|
346 |
if(!empty($meta_key)){
|
347 |
$args['meta_key'] = $meta_key;
|
348 |
}
|
349 |
+
|
350 |
+
|
351 |
+
// Set current page number for determining item number
|
352 |
+
if($page == 0){
|
353 |
+
$alm_page_count = 1;
|
354 |
+
}else{
|
355 |
+
$alm_page_count = $page + 1;
|
356 |
+
}
|
357 |
|
358 |
|
359 |
// WP_Query()
|
361 |
|
362 |
// Run the loop
|
363 |
if ($alm_query->have_posts()) :
|
364 |
+
|
365 |
+
$alm_loop_count = 0;
|
366 |
+
|
367 |
while ($alm_query->have_posts()): $alm_query->the_post();
|
368 |
+
$template = $repeater;
|
369 |
$include = '';
|
370 |
$found = false;
|
371 |
+
|
372 |
+
// If is Custom Repeaters add-on
|
373 |
+
if( $type == 'repeater' && has_action('alm_repeater_installed' ))
|
374 |
+
{
|
375 |
+
$include = ALM_REPEATER_PATH . 'repeaters/'. $template .'.php';
|
376 |
+
|
377 |
+
if(!file_exists($include)){ //confirm file exists
|
378 |
+
$include = plugin_dir_path( __FILE__ ) . 'core/repeater/default.php';
|
379 |
+
}
|
380 |
+
|
381 |
+
}
|
382 |
+
// If is Unlimited add-ons
|
383 |
+
elseif( $type == 'template_' && has_action('alm_unlimited_installed' ))
|
384 |
+
{
|
385 |
+
$include = ALM_UNLIMITED_REPEATER_PATH. ''.$template.'.php';
|
386 |
+
|
387 |
+
if(!file_exists($include)){ //confirm file exists
|
388 |
+
$include = plugin_dir_path( __FILE__ ) . 'core/repeater/default.php';
|
389 |
+
}
|
390 |
+
|
391 |
+
}
|
392 |
+
// Default repeater
|
393 |
+
else
|
394 |
+
{
|
395 |
$include = plugin_dir_path( __FILE__ ) . 'core/repeater/default.php';
|
396 |
}
|
397 |
+
|
398 |
+
// Get page number and current item in overall loop
|
399 |
+
$alm_loop_count++;
|
400 |
+
$alm_page = $alm_page_count;
|
401 |
+
$alm_total = ($alm_page_count * $numPosts) - $numPosts + $alm_loop_count;
|
402 |
+
$alm_item = $alm_total;
|
403 |
|
404 |
//Include repeater template
|
405 |
include( $include );
|
core/repeater/default.php
CHANGED
@@ -1 +1,9 @@
|
|
1 |
-
<li
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<li>
|
2 |
+
<?php if ( has_post_thumbnail() ) { the_post_thumbnail(array(100,100));
|
3 |
+
}?>
|
4 |
+
<h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
|
5 |
+
<p class="entry-meta">
|
6 |
+
<?php the_time("F d, Y"); ?>
|
7 |
+
</p>
|
8 |
+
<?php the_excerpt(); ?>
|
9 |
+
</li>
|
screenshot-3.png
CHANGED
Binary file
|