Version Description
Download this release
Release Info
Developer | cbaldelomar |
Plugin | Shortcodes by Angie Makes |
Version | 3.28 |
Comparing to | |
See all releases |
Code changes from version 3.27 to 3.28
- README.md +4 -0
- public/assets/css/style.css +9 -0
- public/class-register.php +1 -0
- public/class-sanitize.php +20 -2
- public/class-vars.php +2 -1
- public/class-widget-options.php +7 -0
- public/widgets/widget-image-links.php +8 -0
- readme.txt +4 -0
- wc-shortcodes.php +1 -1
README.md
CHANGED
@@ -106,6 +106,10 @@ See our help article on [how to manually upload a plugin](http://knowledgebase.a
|
|
106 |
|
107 |
## Changelog ##
|
108 |
|
|
|
|
|
|
|
|
|
109 |
### Version 3.27 ###
|
110 |
|
111 |
* Added color options for image links
|
106 |
|
107 |
## Changelog ##
|
108 |
|
109 |
+
### Version 3.28 ###
|
110 |
+
|
111 |
+
* Added style format for image links
|
112 |
+
|
113 |
### Version 3.27 ###
|
114 |
|
115 |
* Added color options for image links
|
public/assets/css/style.css
CHANGED
@@ -2079,6 +2079,15 @@ pre.pre-wrap {
|
|
2079 |
.wc-shortcodes-image-link-columns-4 .wc-shortcodes-image-link {
|
2080 |
width: 25%;
|
2081 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2082 |
.wc-shortcodes-image-link-background-wrapper {
|
2083 |
margin-right: 2em;
|
2084 |
}
|
2079 |
.wc-shortcodes-image-link-columns-4 .wc-shortcodes-image-link {
|
2080 |
width: 25%;
|
2081 |
}
|
2082 |
+
#wc-shortcodes-image-links.wc-shortcodes-image-link-style-format-column .wc-shortcodes-image-link {
|
2083 |
+
width: 100%;
|
2084 |
+
}
|
2085 |
+
#wc-shortcodes-image-links.wc-shortcodes-image-link-style-format-column .wc-shortcodes-image-link-background-wrapper {
|
2086 |
+
margin-bottom: 2em;
|
2087 |
+
}
|
2088 |
+
#wc-shortcodes-image-links.wc-shortcodes-image-link-style-format-column .wc-shortcodes-image-link:last-child .wc-shortcodes-image-link-background-wrapper {
|
2089 |
+
margin-bottom: 0;
|
2090 |
+
}
|
2091 |
.wc-shortcodes-image-link-background-wrapper {
|
2092 |
margin-right: 2em;
|
2093 |
}
|
public/class-register.php
CHANGED
@@ -1590,6 +1590,7 @@ class WPC_Shortcodes_Register extends WPC_Shortcodes_Vars {
|
|
1590 |
if ( ! empty( $html ) ) {
|
1591 |
$classes = array();
|
1592 |
$classes[] = 'wc-shortcodes-image-links-wrapper';
|
|
|
1593 |
$classes[] = 'wc-shortcodes-image-link-text-position-'.$atts['text_position'];
|
1594 |
$classes[] = 'wc-shortcodes-image-link-columns-' . $columns;
|
1595 |
if ( ! empty( $atts['class'] ) ) {
|
1590 |
if ( ! empty( $html ) ) {
|
1591 |
$classes = array();
|
1592 |
$classes[] = 'wc-shortcodes-image-links-wrapper';
|
1593 |
+
$classes[] = 'wc-shortcodes-image-link-style-format-'.$atts['style_format'];
|
1594 |
$classes[] = 'wc-shortcodes-image-link-text-position-'.$atts['text_position'];
|
1595 |
$classes[] = 'wc-shortcodes-image-link-columns-' . $columns;
|
1596 |
if ( ! empty( $atts['class'] ) ) {
|
public/class-sanitize.php
CHANGED
@@ -362,7 +362,16 @@ class WPC_Shortcodes_Sanitize {
|
|
362 |
return $default;
|
363 |
}
|
364 |
|
365 |
-
public static function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
366 |
$whitelist = WPC_Shortcodes_Widget_Options::image_link_text_position_values();
|
367 |
|
368 |
if ( array_key_exists( $value, $whitelist ) )
|
@@ -838,7 +847,7 @@ class WPC_Shortcodes_Sanitize {
|
|
838 |
break;
|
839 |
// Settings
|
840 |
case 'text_position' :
|
841 |
-
$atts[ $key ] = self::
|
842 |
break;
|
843 |
case 'height' :
|
844 |
$atts[ $key ] = self::css_unit( $value );
|
@@ -852,6 +861,9 @@ class WPC_Shortcodes_Sanitize {
|
|
852 |
case 'background_color' :
|
853 |
$atts[ $key ] = self::hex_color( $value );
|
854 |
break;
|
|
|
|
|
|
|
855 |
case 'class' :
|
856 |
$atts[ $key ] = self::html_classes( $value );
|
857 |
break;
|
@@ -1355,6 +1367,12 @@ class WPC_Shortcodes_Sanitize {
|
|
1355 |
$atts['heading_type'] = strtolower( $atts['heading_type'] );
|
1356 |
$valid_headings = WPC_Shortcodes_Widget_Options::heading_tags();
|
1357 |
$atts['heading_type'] = in_array( $atts['heading_type'], $valid_headings ) ? $atts['heading_type'] : 'h2';
|
|
|
|
|
|
|
|
|
|
|
|
|
1358 |
|
1359 |
// sanitize inputs
|
1360 |
$atts['title'] = sanitize_text_field( $atts['title'] );
|
362 |
return $default;
|
363 |
}
|
364 |
|
365 |
+
public static function image_links_style_format( $value, $default = '' ) {
|
366 |
+
$whitelist = WPC_Shortcodes_Widget_Options::image_links_style_format_values();
|
367 |
+
|
368 |
+
if ( array_key_exists( $value, $whitelist ) )
|
369 |
+
return $value;
|
370 |
+
|
371 |
+
return $default;
|
372 |
+
}
|
373 |
+
|
374 |
+
public static function image_link_text_position( $value, $default = '' ) {
|
375 |
$whitelist = WPC_Shortcodes_Widget_Options::image_link_text_position_values();
|
376 |
|
377 |
if ( array_key_exists( $value, $whitelist ) )
|
847 |
break;
|
848 |
// Settings
|
849 |
case 'text_position' :
|
850 |
+
$atts[ $key ] = self::image_link_text_position( $value );
|
851 |
break;
|
852 |
case 'height' :
|
853 |
$atts[ $key ] = self::css_unit( $value );
|
861 |
case 'background_color' :
|
862 |
$atts[ $key ] = self::hex_color( $value );
|
863 |
break;
|
864 |
+
case 'style_format' :
|
865 |
+
$atts[ $key ] = self::image_links_style_format( $value );
|
866 |
+
break;
|
867 |
case 'class' :
|
868 |
$atts[ $key ] = self::html_classes( $value );
|
869 |
break;
|
1367 |
$atts['heading_type'] = strtolower( $atts['heading_type'] );
|
1368 |
$valid_headings = WPC_Shortcodes_Widget_Options::heading_tags();
|
1369 |
$atts['heading_type'] = in_array( $atts['heading_type'], $valid_headings ) ? $atts['heading_type'] : 'h2';
|
1370 |
+
$valid_orders = WPC_Shortcodes_Widget_Options::order_fields();
|
1371 |
+
$atts['order'] = strtoupper( $atts['order'] );
|
1372 |
+
if ( ! in_array( $atts['order'], $valid_orders ) ) {
|
1373 |
+
$atts['order'] = 'DESC';
|
1374 |
+
}
|
1375 |
+
|
1376 |
|
1377 |
// sanitize inputs
|
1378 |
$atts['title'] = sanitize_text_field( $atts['title'] );
|
public/class-vars.php
CHANGED
@@ -8,7 +8,7 @@ class WPC_Shortcodes_Vars {
|
|
8 |
*
|
9 |
* @var string
|
10 |
*/
|
11 |
-
const VERSION = '3.
|
12 |
const DB_VERSION = '1.0';
|
13 |
|
14 |
/**
|
@@ -346,6 +346,7 @@ class WPC_Shortcodes_Vars {
|
|
346 |
'text_color' => '',
|
347 |
'background_color' => '',
|
348 |
'height' => '250px',
|
|
|
349 |
'class' => '',
|
350 |
);
|
351 |
self::$attr->countdown = array(
|
8 |
*
|
9 |
* @var string
|
10 |
*/
|
11 |
+
const VERSION = '3.28';
|
12 |
const DB_VERSION = '1.0';
|
13 |
|
14 |
/**
|
346 |
'text_color' => '',
|
347 |
'background_color' => '',
|
348 |
'height' => '250px',
|
349 |
+
'style_format' => 'row',
|
350 |
'class' => '',
|
351 |
);
|
352 |
self::$attr->countdown = array(
|
public/class-widget-options.php
CHANGED
@@ -55,6 +55,13 @@ class WPC_Shortcodes_Widget_Options {
|
|
55 |
);
|
56 |
}
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
public static function featured_post_layouts() {
|
59 |
return array(
|
60 |
'thumbnail' => 'Thumbnail',
|
55 |
);
|
56 |
}
|
57 |
|
58 |
+
public static function image_links_style_format_values() {
|
59 |
+
return array(
|
60 |
+
'row' => 'Row',
|
61 |
+
'column' => 'Column',
|
62 |
+
);
|
63 |
+
}
|
64 |
+
|
65 |
public static function featured_post_layouts() {
|
66 |
return array(
|
67 |
'thumbnail' => 'Thumbnail',
|
public/widgets/widget-image-links.php
CHANGED
@@ -105,6 +105,14 @@ class WPC_Shortcodes_Widget_Image_Links extends WP_Widget {
|
|
105 |
<input type="text" class="wc-shortcodes-widget-option widefat" id="<?php echo $this->get_field_id('height'); ?>" name="<?php echo $this->get_field_name('height'); ?>" value="<?php echo $o['height']; ?>" />
|
106 |
<span class="wcs-description">Enter CSS unit value.</span>
|
107 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
<p>
|
109 |
<label for="<?php echo $this->get_field_id('class'); ?>"><?php _e('Class:') ?></label>
|
110 |
<input type="text" class="wc-shortcodes-widget-option widefat" id="<?php echo $this->get_field_id('class'); ?>" name="<?php echo $this->get_field_name('class'); ?>" value="<?php echo $o['class']; ?>" />
|
105 |
<input type="text" class="wc-shortcodes-widget-option widefat" id="<?php echo $this->get_field_id('height'); ?>" name="<?php echo $this->get_field_name('height'); ?>" value="<?php echo $o['height']; ?>" />
|
106 |
<span class="wcs-description">Enter CSS unit value.</span>
|
107 |
</p>
|
108 |
+
<p>
|
109 |
+
<label for="<?php echo $this->get_field_id('style_format'); ?>"><?php _e('Style Format:'); ?></label>
|
110 |
+
<select class="wc-shortcodes-widget-option" id="<?php echo $this->get_field_id('style_format'); ?>" name="<?php echo $this->get_field_name('style_format'); ?>">
|
111 |
+
<?php foreach ( WPC_Shortcodes_Widget_Options::image_links_style_format_values() as $key => $value ) : ?>
|
112 |
+
<option value="<?php echo $key; ?>"<?php selected( $o['style_format'], $key ); ?>><?php echo $value; ?></option>';
|
113 |
+
<?php endforeach; ?>
|
114 |
+
</select>
|
115 |
+
</p>
|
116 |
<p>
|
117 |
<label for="<?php echo $this->get_field_id('class'); ?>"><?php _e('Class:') ?></label>
|
118 |
<input type="text" class="wc-shortcodes-widget-option widefat" id="<?php echo $this->get_field_id('class'); ?>" name="<?php echo $this->get_field_name('class'); ?>" value="<?php echo $o['class']; ?>" />
|
readme.txt
CHANGED
@@ -113,6 +113,10 @@ See our help article on [how to manually upload a plugin](http://knowledgebase.a
|
|
113 |
|
114 |
== Changelog ==
|
115 |
|
|
|
|
|
|
|
|
|
116 |
= Version 3.27 =
|
117 |
|
118 |
* Added color options for image links
|
113 |
|
114 |
== Changelog ==
|
115 |
|
116 |
+
= Version 3.28 =
|
117 |
+
|
118 |
+
* Added style format for image links
|
119 |
+
|
120 |
= Version 3.27 =
|
121 |
|
122 |
* Added color options for image links
|
wc-shortcodes.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://angiemakes.com/feminine-wordpress-blog-themes-women/
|
|
5 |
Description: A plugin that adds a useful family of shortcodes to your WordPress theme.
|
6 |
Author: Chris Baldelomar
|
7 |
Author URI: http://angiemakes.com/
|
8 |
-
Version: 3.
|
9 |
License: GPLv2 or later
|
10 |
*/
|
11 |
|
5 |
Description: A plugin that adds a useful family of shortcodes to your WordPress theme.
|
6 |
Author: Chris Baldelomar
|
7 |
Author URI: http://angiemakes.com/
|
8 |
+
Version: 3.28
|
9 |
License: GPLv2 or later
|
10 |
*/
|
11 |
|