Magee Shortcodes - Version 2.0.9

Version Description

  • Fix: security issue
Download this release

Release Info

Developer hoosoft
Plugin Icon 128x128 Magee Shortcodes
Version 2.0.9
Comparing to
See all releases

Code changes from version 2.0.8 to 2.0.9

Files changed (3) hide show
  1. Includes/Classes/Helper.class.php +15 -13
  2. Magee.php +1 -1
  3. readme.txt +4 -1
Includes/Classes/Helper.class.php CHANGED
@@ -180,16 +180,17 @@ class Helper{
180
  $magee_shortcodes = Config::shortcodes();
181
  $target = isset($_GET['target']) ? $_GET['target'] : 'content';
182
  ?>
183
- <div class="white-popup magee_shortcodes_container" data-target="<?php echo $target;?>" id="magee_shortcodes_container">
184
  <input type="text" class="magee-form-text magee-input" placeholder="<?php _e( 'Search', 'magee-shortcodes' );?>" name="magee_shortcode_search" id="magee_shortcode_search" value="">
185
  <form>
186
  <div class="magee_shortcodes_header_container">
187
  <ul class="magee_shortcodes_list row">
188
  <?php if (is_array($magee_shortcodes )):foreach ($magee_shortcodes as $key => $val) {
189
  if ( is_array( $val ) && isset($val['popup_title']) && $val['popup_title']!='' ):
 
190
  ?>
191
  <li class="col-md-3">
192
- <a class='magee_shortcode_item <?php //echo $key;?>' title='<?php echo $val['popup_title'];?>' data-shortcode="<?php echo $key;?>" href="javascript:;"> <?php if ( isset($val['icon']) ) {?><i class="fa <?php echo $val['icon'];?>"></i> <?php }?> <?php echo str_replace(' Shortcode', '', $val['popup_title']);?></a> </li>
193
  <?php endif;?>
194
  <?php } ?>
195
  <?php endif;?>
@@ -253,34 +254,35 @@ class Helper{
253
 
254
  public function shortcode_form() {
255
  $magee_shortcodes = Config::shortcodes();
256
- $this->popup = $_POST['shortcode'];
257
- $currentEditor = $_POST['currentEditor'];
 
258
  $remark = '';
259
  if ('dummy_image'==$this->popup)
260
  $remark = __( '( http only, https sites are not supported. )', 'magee-shortcodes' );
261
 
262
- if ( isset($_POST['shortcode']) && isset($magee_shortcodes[$_POST['shortcode']]) ) {
263
- if ( isset($magee_shortcodes[$_POST['shortcode']]['child_shortcode'])) {
264
- echo '<h2 class="shortcode-name">'.$magee_shortcodes[$_POST['shortcode']]['popup_title'].'</h2>';
265
 
266
- if (isset($magee_shortcodes[$_POST['shortcode']]['name'])) {
267
  echo '<div class="example-list">'.sprintf(__('Want to know more about this shortcode? Check <a class="example-link" target="_blank" href="%1$s"> Examples of use</a>. %2$s', 'magee-shortcodes' ), 'https://www.hoosoft.com/plugins/magee-shortcodes/'.$magee_shortcodes[$_POST['shortcode']]['name'], $remark).'</div>';
268
  }
269
- $this->popup = $_POST['shortcode'];
270
  echo $this->formate_shortcode();
271
  echo '<div class="column-shortcode-inner">'.$this->formate_children_shortcode().'</div>';
272
  echo '<div class="shortcode-add"><a href="#" class="child-shortcode-add">add</a></div>';
273
 
274
  } else {
275
- echo '<h2 class="shortcode-name">'.$magee_shortcodes[$_POST['shortcode']]['popup_title'].'</h2>';
276
- if (isset($magee_shortcodes[$_POST['shortcode']]['name'])) {
277
  echo '<div class="example-list">'.sprintf(__('Want to know more about this shortcode? Check <a class="example-link" target="_blank" href="%1$s"> Examples of use</a>. %2$s', 'magee-shortcodes' ), 'https://www.hoosoft.com/plugins/magee-shortcodes/'.$magee_shortcodes[$_POST['shortcode']]['name'], $remark).'</div>';
278
  }
279
- $this->popup = $_POST['shortcode'];
280
  echo $this->formate_shortcode();
281
  }
282
  echo '<input type="hidden" id="currentEditor" value="'.$currentEditor.'" />';
283
- echo '<input type="hidden" id="no_preview" value="'.$magee_shortcodes[$_POST['shortcode']]['no_preview'].'" />';
284
  }
285
 
286
  exit(0);
180
  $magee_shortcodes = Config::shortcodes();
181
  $target = isset($_GET['target']) ? $_GET['target'] : 'content';
182
  ?>
183
+ <div class="white-popup magee_shortcodes_container" data-target="<?php echo esc_attr($target);?>" id="magee_shortcodes_container">
184
  <input type="text" class="magee-form-text magee-input" placeholder="<?php _e( 'Search', 'magee-shortcodes' );?>" name="magee_shortcode_search" id="magee_shortcode_search" value="">
185
  <form>
186
  <div class="magee_shortcodes_header_container">
187
  <ul class="magee_shortcodes_list row">
188
  <?php if (is_array($magee_shortcodes )):foreach ($magee_shortcodes as $key => $val) {
189
  if ( is_array( $val ) && isset($val['popup_title']) && $val['popup_title']!='' ):
190
+ $popup_title = esc_attr($val['popup_title']);
191
  ?>
192
  <li class="col-md-3">
193
+ <a class='magee_shortcode_item <?php //echo $key;?>' title='<?php echo $popup_title;?>' data-shortcode="<?php echo esc_attr($key);?>" href="javascript:;"> <?php if ( isset($val['icon']) ) {?><i class="fa <?php echo esc_attr($val['icon']);?>"></i> <?php }?> <?php echo str_replace(' Shortcode', '', $popup_title);?></a> </li>
194
  <?php endif;?>
195
  <?php } ?>
196
  <?php endif;?>
254
 
255
  public function shortcode_form() {
256
  $magee_shortcodes = Config::shortcodes();
257
+ $this->popup = esc_attr($_POST['shortcode']);
258
+ $shortcode = $this->popup;
259
+ $currentEditor = esc_attr($_POST['currentEditor']);
260
  $remark = '';
261
  if ('dummy_image'==$this->popup)
262
  $remark = __( '( http only, https sites are not supported. )', 'magee-shortcodes' );
263
 
264
+ if ( $shortcode && isset($magee_shortcodes[$shortcode]) ) {
265
+ if ( isset($magee_shortcodes[$shortcode]['child_shortcode'])) {
266
+ echo '<h2 class="shortcode-name">'.$magee_shortcodes[$shortcode]['popup_title'].'</h2>';
267
 
268
+ if (isset($magee_shortcodes[$shortcode]['name'])) {
269
  echo '<div class="example-list">'.sprintf(__('Want to know more about this shortcode? Check <a class="example-link" target="_blank" href="%1$s"> Examples of use</a>. %2$s', 'magee-shortcodes' ), 'https://www.hoosoft.com/plugins/magee-shortcodes/'.$magee_shortcodes[$_POST['shortcode']]['name'], $remark).'</div>';
270
  }
271
+
272
  echo $this->formate_shortcode();
273
  echo '<div class="column-shortcode-inner">'.$this->formate_children_shortcode().'</div>';
274
  echo '<div class="shortcode-add"><a href="#" class="child-shortcode-add">add</a></div>';
275
 
276
  } else {
277
+ echo '<h2 class="shortcode-name">'.$magee_shortcodes[$shortcode]['popup_title'].'</h2>';
278
+ if (isset($magee_shortcodes[$shortcode]['name'])) {
279
  echo '<div class="example-list">'.sprintf(__('Want to know more about this shortcode? Check <a class="example-link" target="_blank" href="%1$s"> Examples of use</a>. %2$s', 'magee-shortcodes' ), 'https://www.hoosoft.com/plugins/magee-shortcodes/'.$magee_shortcodes[$_POST['shortcode']]['name'], $remark).'</div>';
280
  }
281
+
282
  echo $this->formate_shortcode();
283
  }
284
  echo '<input type="hidden" id="currentEditor" value="'.$currentEditor.'" />';
285
+ echo '<input type="hidden" id="no_preview" value="'.$magee_shortcodes[$shortcode]['no_preview'].'" />';
286
  }
287
 
288
  exit(0);
Magee.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Magee Shortcodes
4
  Plugin URI: https://www.hoosoft.com/plugins/magee-shortcodes/
5
  Description: Magee Shortcodes is WordPress plugin that provides a pack of shortcodes. With Magee Shortcodes, you can easily create accordion, buttons, boxes, columns, social and much more. They allow you to create so many different page layouts. You could quickly and easily built your own custom pages using all the various shortcodes that Magee Shortcodes includes.
6
- Version: 2.0.8
7
  Author: Hoosoft
8
  Author URI: http://www.hoosoft.com
9
  Text Domain: magee-shortcodes
3
  Plugin Name: Magee Shortcodes
4
  Plugin URI: https://www.hoosoft.com/plugins/magee-shortcodes/
5
  Description: Magee Shortcodes is WordPress plugin that provides a pack of shortcodes. With Magee Shortcodes, you can easily create accordion, buttons, boxes, columns, social and much more. They allow you to create so many different page layouts. You could quickly and easily built your own custom pages using all the various shortcodes that Magee Shortcodes includes.
6
+ Version: 2.0.9
7
  Author: Hoosoft
8
  Author URI: http://www.hoosoft.com
9
  Text Domain: magee-shortcodes
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: hoosoft
3
  Tags: shortcodes, shortcode, accordion, alert, button, column, custom box, countdowns, counter, divider, dropcap, feature box, flip box, highlight, list, modal, popover, tooltip, person, promo box, scocial, tab, testimonial, progress, piechart, timeline, panel, section, slider
4
  Requires at least: 5.0
5
  Tested up to: 5.8
6
- Stable tag: 2.0.8
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -126,6 +126,9 @@ Activate plugin at "Plugins" administration page.
126
 
127
  == Changelog ==
128
 
 
 
 
129
  = 2.0.8 =
130
  * Fix: Compatible with php5
131
 
3
  Tags: shortcodes, shortcode, accordion, alert, button, column, custom box, countdowns, counter, divider, dropcap, feature box, flip box, highlight, list, modal, popover, tooltip, person, promo box, scocial, tab, testimonial, progress, piechart, timeline, panel, section, slider
4
  Requires at least: 5.0
5
  Tested up to: 5.8
6
+ Stable tag: 2.0.9
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
126
 
127
  == Changelog ==
128
 
129
+ = 2.0.9 =
130
+ * Fix: security issue
131
+
132
  = 2.0.8 =
133
  * Fix: Compatible with php5
134