Version Description
Download this release
Release Info
Developer | cbaldelomar |
Plugin | Shortcodes by Angie Makes |
Version | 1.90 |
Comparing to | |
See all releases |
Code changes from version 1.89 to 1.90
- README.md +4 -0
- includes/functions.php +13 -2
- includes/options.php +8 -0
- readme.txt +4 -0
- wc-shortcodes.php +3 -2
README.md
CHANGED
@@ -66,6 +66,10 @@ Use the shortcode manager in the TinyMCE text editor
|
|
66 |
|
67 |
## Changelog ##
|
68 |
|
|
|
|
|
|
|
|
|
69 |
### Version 1.89
|
70 |
|
71 |
* removed paginate text span element
|
66 |
|
67 |
## Changelog ##
|
68 |
|
69 |
+
### Version 1.90
|
70 |
+
|
71 |
+
* added option for share buttons on woocommerce product page
|
72 |
+
|
73 |
### Version 1.89
|
74 |
|
75 |
* removed paginate text span element
|
includes/functions.php
CHANGED
@@ -367,6 +367,13 @@ function wc_shortcodes_wp_trim_excerpt($text = '') {
|
|
367 |
return apply_filters( 'wp_trim_excerpt', $text, $raw_excerpt );
|
368 |
}
|
369 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
370 |
function wc_shortcodes_display_share_buttons( $content ) {
|
371 |
$display = false;
|
372 |
|
@@ -392,11 +399,10 @@ function wc_shortcodes_display_share_buttons( $content ) {
|
|
392 |
return apply_filters( 'wc_shortcodes_display_share_buttons', $content );
|
393 |
}
|
394 |
function wc_shortcodes_share_buttons_filters() {
|
395 |
-
global $wc_shortcodes_theme_support;
|
396 |
-
|
397 |
$share_buttons_on_post_page = get_option( WC_SHORTCODES_PREFIX . 'share_buttons_on_post_page' );
|
398 |
$share_buttons_on_blog_page = get_option( WC_SHORTCODES_PREFIX . 'share_buttons_on_blog_page' );
|
399 |
$share_buttons_on_archive_page = get_option( WC_SHORTCODES_PREFIX . 'share_buttons_on_archive_page' );
|
|
|
400 |
|
401 |
if ( $share_buttons_on_post_page ) {
|
402 |
if ( is_single() && 'post' == get_post_type() ) {
|
@@ -417,6 +423,11 @@ function wc_shortcodes_share_buttons_filters() {
|
|
417 |
add_filter( 'the_excerpt', 'wc_shortcodes_display_share_buttons', 38, 1 );
|
418 |
}
|
419 |
}
|
|
|
|
|
|
|
|
|
|
|
420 |
}
|
421 |
add_action( 'wp', 'wc_shortcodes_share_buttons_filters', 11 );
|
422 |
|
367 |
return apply_filters( 'wp_trim_excerpt', $text, $raw_excerpt );
|
368 |
}
|
369 |
|
370 |
+
function wc_shortcodes_echo_share_buttons() {
|
371 |
+
$share = do_shortcode( '[wc_share_buttons]' );
|
372 |
+
|
373 |
+
if ( ! empty( $share ) ) {
|
374 |
+
echo $share;
|
375 |
+
}
|
376 |
+
}
|
377 |
function wc_shortcodes_display_share_buttons( $content ) {
|
378 |
$display = false;
|
379 |
|
399 |
return apply_filters( 'wc_shortcodes_display_share_buttons', $content );
|
400 |
}
|
401 |
function wc_shortcodes_share_buttons_filters() {
|
|
|
|
|
402 |
$share_buttons_on_post_page = get_option( WC_SHORTCODES_PREFIX . 'share_buttons_on_post_page' );
|
403 |
$share_buttons_on_blog_page = get_option( WC_SHORTCODES_PREFIX . 'share_buttons_on_blog_page' );
|
404 |
$share_buttons_on_archive_page = get_option( WC_SHORTCODES_PREFIX . 'share_buttons_on_archive_page' );
|
405 |
+
$share_buttons_on_product_page = get_option( WC_SHORTCODES_PREFIX . 'share_buttons_on_product_page' );
|
406 |
|
407 |
if ( $share_buttons_on_post_page ) {
|
408 |
if ( is_single() && 'post' == get_post_type() ) {
|
423 |
add_filter( 'the_excerpt', 'wc_shortcodes_display_share_buttons', 38, 1 );
|
424 |
}
|
425 |
}
|
426 |
+
|
427 |
+
if ( $share_buttons_on_product_page ) {
|
428 |
+
add_action( 'woocommerce_single_product_summary', 'wc_shortcodes_echo_share_buttons', 99 );
|
429 |
+
}
|
430 |
+
|
431 |
}
|
432 |
add_action( 'wp', 'wc_shortcodes_share_buttons_filters', 11 );
|
433 |
|
includes/options.php
CHANGED
@@ -112,6 +112,14 @@ function wc_shortcodes_options( $options ) {
|
|
112 |
'label' => 'Add share buttons to the bottom of your posts in your category, tag, date, and author archive pages.',
|
113 |
'type' => 'checkbox',
|
114 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
),
|
116 |
),
|
117 |
array(
|
112 |
'label' => 'Add share buttons to the bottom of your posts in your category, tag, date, and author archive pages.',
|
113 |
'type' => 'checkbox',
|
114 |
),
|
115 |
+
array(
|
116 |
+
'option_name' => 'share_buttons_on_product_page',
|
117 |
+
'title' => 'Product Page',
|
118 |
+
'default' => $wc_shortcodes_theme_support['share_buttons_on_product_page'],
|
119 |
+
'description' => '',
|
120 |
+
'label' => 'Add share buttons to the bottom of your WooCommerce product page.',
|
121 |
+
'type' => 'checkbox',
|
122 |
+
),
|
123 |
),
|
124 |
),
|
125 |
array(
|
readme.txt
CHANGED
@@ -88,6 +88,10 @@ Use the shortcode manager in the TinyMCE text editor
|
|
88 |
|
89 |
== Changelog ==
|
90 |
|
|
|
|
|
|
|
|
|
91 |
= Version 1.89 =
|
92 |
|
93 |
* removed paginate text span element
|
88 |
|
89 |
== Changelog ==
|
90 |
|
91 |
+
= Version 1.90 =
|
92 |
+
|
93 |
+
* added option for share buttons on woocommerce product page
|
94 |
+
|
95 |
= Version 1.89 =
|
96 |
|
97 |
* removed paginate text span element
|
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__ ) );
|
@@ -54,6 +54,7 @@ $wc_shortcodes_theme_support = array(
|
|
54 |
'share_buttons_on_post_page' => false,
|
55 |
'share_buttons_on_blog_page' => false,
|
56 |
'share_buttons_on_archive_page' => false,
|
|
|
57 |
'facebook_font_icon' => 'fa-facebook',
|
58 |
'facebook_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/facebook.png',
|
59 |
'twitter_font_icon' => 'fa-twitter',
|
5 |
Description: A family of shortcodes to enhance site functionality.
|
6 |
Author: Chris Baldelomar
|
7 |
Author URI: http://webplantmedia.com/
|
8 |
+
Version: 1.90
|
9 |
License: GPLv2 or later
|
10 |
*/
|
11 |
|
12 |
+
define( 'WC_SHORTCODES_VERSION', '1.90' );
|
13 |
define( 'WC_SHORTCODES_PREFIX', 'wc_shortcodes_' );
|
14 |
define( '_WC_SHORTCODES_PREFIX', '_wc_shortcodes_' );
|
15 |
define( 'WC_SHORTCODES_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
54 |
'share_buttons_on_post_page' => false,
|
55 |
'share_buttons_on_blog_page' => false,
|
56 |
'share_buttons_on_archive_page' => false,
|
57 |
+
'share_buttons_on_product_page' => false,
|
58 |
'facebook_font_icon' => 'fa-facebook',
|
59 |
'facebook_social_icon' => WC_SHORTCODES_PLUGIN_URL . 'includes/img/facebook.png',
|
60 |
'twitter_font_icon' => 'fa-twitter',
|