Version Description
Download this release
Release Info
Developer | cbaldelomar |
Plugin | Shortcodes by Angie Makes |
Version | 1.74 |
Comparing to | |
See all releases |
Code changes from version 1.73 to 1.74
- README.md +4 -0
- includes/shortcode-functions.php +5 -5
- includes/templates/nav-filtering.php +8 -5
- readme.txt +4 -0
- wc-shortcodes.php +2 -2
README.md
CHANGED
@@ -66,6 +66,10 @@ Use the shortcode manager in the TinyMCE text editor
|
|
66 |
|
67 |
## Changelog ##
|
68 |
|
|
|
|
|
|
|
|
|
69 |
### Version 1.73
|
70 |
|
71 |
* Added support for navigation filter to also link to category pages if there is pagination.
|
66 |
|
67 |
## Changelog ##
|
68 |
|
69 |
+
### Version 1.74
|
70 |
+
|
71 |
+
* Fixed style bug with wc_posts category links
|
72 |
+
|
73 |
### Version 1.73
|
74 |
|
75 |
* Added support for navigation filter to also link to category pages if there is pagination.
|
includes/shortcode-functions.php
CHANGED
@@ -1174,9 +1174,9 @@ if( ! function_exists( 'wc_shortcodes_posts' ) ) {
|
|
1174 |
|
1175 |
// clean input values
|
1176 |
$atts['terms'] = wc_shortcodes_comma_delim_to_array( $atts['terms'] );
|
1177 |
-
$
|
1178 |
-
if ( isset( $_GET['
|
1179 |
-
$
|
1180 |
}
|
1181 |
$atts['post__in'] = wc_shortcodes_comma_delim_to_array( $atts['post__in'] );
|
1182 |
$atts['columns'] == (int) $atts['columns'];
|
@@ -1205,12 +1205,12 @@ if( ! function_exists( 'wc_shortcodes_posts' ) ) {
|
|
1205 |
|
1206 |
|
1207 |
// add tax query if user specified
|
1208 |
-
if ( ! empty( $
|
1209 |
$atts['tax_query'] = array(
|
1210 |
array(
|
1211 |
'taxonomy' => $atts['taxonomy'],
|
1212 |
'field' => $atts['field'],
|
1213 |
-
'terms' => $
|
1214 |
),
|
1215 |
);
|
1216 |
}
|
1174 |
|
1175 |
// clean input values
|
1176 |
$atts['terms'] = wc_shortcodes_comma_delim_to_array( $atts['terms'] );
|
1177 |
+
$wpc_term = null;
|
1178 |
+
if ( isset( $_GET['wpc_term'] ) && ! empty( $_GET['wpc_term'] ) ) {
|
1179 |
+
$wpc_term = $_GET['wpc_term'];
|
1180 |
}
|
1181 |
$atts['post__in'] = wc_shortcodes_comma_delim_to_array( $atts['post__in'] );
|
1182 |
$atts['columns'] == (int) $atts['columns'];
|
1205 |
|
1206 |
|
1207 |
// add tax query if user specified
|
1208 |
+
if ( ! empty( $wpc_term ) ) {
|
1209 |
$atts['tax_query'] = array(
|
1210 |
array(
|
1211 |
'taxonomy' => $atts['taxonomy'],
|
1212 |
'field' => $atts['field'],
|
1213 |
+
'terms' => $wpc_term,
|
1214 |
),
|
1215 |
);
|
1216 |
}
|
includes/templates/nav-filtering.php
CHANGED
@@ -17,21 +17,24 @@ if ( ! empty( $taxonomy ) ) {
|
|
17 |
|
18 |
$links = array();
|
19 |
$link = $nav_filter_hard_links ? $permalink : '#';
|
20 |
-
$
|
|
|
21 |
|
22 |
if ( ! is_array( $whitelist ) || empty( $whitelist ) ) {
|
23 |
foreach ( $terms as $term ) {
|
24 |
-
$link = $nav_filter_hard_links ? $permalink . '?
|
25 |
|
26 |
-
$
|
|
|
27 |
}
|
28 |
}
|
29 |
else {
|
30 |
foreach ( $terms as $term ) {
|
31 |
if ( in_array( $term->slug, $whitelist ) ) {
|
32 |
-
$link = $nav_filter_hard_links ? $permalink . '?
|
33 |
|
34 |
-
$
|
|
|
35 |
}
|
36 |
}
|
37 |
}
|
17 |
|
18 |
$links = array();
|
19 |
$link = $nav_filter_hard_links ? $permalink : '#';
|
20 |
+
$term_class = empty( $wpc_term ) ? ' wc-shortcodes-term-active' : '';
|
21 |
+
$links[] = "<a href='{$link}' data-filter='*' title='All Tags' class='wc-shortcodes-term wc-shortcodes-all-tags{$term_class}'>" . __( 'All', 'wordpresscanvas' ) . "</a>";
|
22 |
|
23 |
if ( ! is_array( $whitelist ) || empty( $whitelist ) ) {
|
24 |
foreach ( $terms as $term ) {
|
25 |
+
$link = $nav_filter_hard_links ? $permalink . '?wpc_term=' . $term->slug : '#';
|
26 |
|
27 |
+
$term_class = $term->slug == $wpc_term ? ' wc-shortcodes-term-active' : '';
|
28 |
+
$links[] = "<a href='{$link}' data-filter='.wc-shortcodes-filter-{$term->slug}' title='{$term->name} Tag' class='wc-shortcodes-term wc-shortcodes-term-slug-{$term->slug}{$term_class}'>" . $term->name . "</a>";
|
29 |
}
|
30 |
}
|
31 |
else {
|
32 |
foreach ( $terms as $term ) {
|
33 |
if ( in_array( $term->slug, $whitelist ) ) {
|
34 |
+
$link = $nav_filter_hard_links ? $permalink . '?wpc_term=' . $term->slug : '#';
|
35 |
|
36 |
+
$term_class = $term->slug == $wpc_term ? ' wc-shortcodes-term-active' : '';
|
37 |
+
$links[] = "<a href='{$link}' data-filter='.wc-shortcodes-filter-{$term->slug}' title='{$term->name} Tag' class='wc-shortcodes-term wc-shortcodes-term-slug-{$term->slug}{$term_class}'>" . $term->name . "</a>";
|
38 |
}
|
39 |
}
|
40 |
}
|
readme.txt
CHANGED
@@ -88,6 +88,10 @@ Use the shortcode manager in the TinyMCE text editor
|
|
88 |
|
89 |
== Changelog ==
|
90 |
|
|
|
|
|
|
|
|
|
91 |
= Version 1.73 =
|
92 |
|
93 |
* Added support for navigation filter to also link to category pages if there is pagination.
|
88 |
|
89 |
== Changelog ==
|
90 |
|
91 |
+
= Version 1.74 =
|
92 |
+
|
93 |
+
* Fixed style bug with wc_posts category links
|
94 |
+
|
95 |
= Version 1.73 =
|
96 |
|
97 |
* Added support for navigation filter to also link to category pages if there is pagination.
|
wc-shortcodes.php
CHANGED
@@ -5,11 +5,11 @@ Plugin URI: http://webplantmedia.com/starter-themes/wordpresscanvas/features/sho
|
|
5 |
Description: A family of shortcodes to enhance site functionality.
|
6 |
Author: Chris Baldelomar
|
7 |
Author URI: http://webplantmedia.com/
|
8 |
-
Version: 1.
|
9 |
License: GPLv2 or later
|
10 |
*/
|
11 |
|
12 |
-
define( 'WC_SHORTCODES_VERSION', '1.
|
13 |
define( 'WC_SHORTCODES_PREFIX', 'wc_shortcodes_' );
|
14 |
define( '_WC_SHORTCODES_PREFIX', '_wc_shortcodes_' );
|
15 |
define( 'WC_SHORTCODES_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
5 |
Description: A family of shortcodes to enhance site functionality.
|
6 |
Author: Chris Baldelomar
|
7 |
Author URI: http://webplantmedia.com/
|
8 |
+
Version: 1.74
|
9 |
License: GPLv2 or later
|
10 |
*/
|
11 |
|
12 |
+
define( 'WC_SHORTCODES_VERSION', '1.74' );
|
13 |
define( 'WC_SHORTCODES_PREFIX', 'wc_shortcodes_' );
|
14 |
define( '_WC_SHORTCODES_PREFIX', '_wc_shortcodes_' );
|
15 |
define( 'WC_SHORTCODES_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|