Magee Shortcodes - Version 1.5.6

Version Description

  • 06/06/2016 =
  • Fix - Fixed image uploader issue
  • Fix - Fixed vimeo/youtube shortcodes issue
Download this release

Release Info

Developer magictheme
Plugin Icon 128x128 Magee Shortcodes
Version 1.5.6
Comparing to
See all releases

Code changes from version 1.5.5 to 1.5.6

Magee.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Magee Shortcodes
4
  Plugin URI: http://www.mageewp.com/magee-shortcode.html
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: 1.5.5
7
  Author: MageeWP
8
  Author URI: http://www.mageewp.com
9
  Text Domain: magee-shortcodes
@@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) return;
14
  if(!class_exists('Magee_Core') && !defined( 'MAGEE_SHORTCODE_LIB_DIR') ):
15
  define( 'MAGEE_SHORTCODES_PATH', __FILE__ );
16
  define( 'MAGEE_SHORTCODES_DIR_PATH', plugin_dir_path( __FILE__ ));
17
- define( 'MAGEE_SHORTCODES_VER', '1.5.5' );
18
 
19
  require_once 'inc/core.php';
20
  //require_once 'inc/options.php';
3
  Plugin Name: Magee Shortcodes
4
  Plugin URI: http://www.mageewp.com/magee-shortcode.html
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: 1.5.6
7
  Author: MageeWP
8
  Author URI: http://www.mageewp.com
9
  Text Domain: magee-shortcodes
14
  if(!class_exists('Magee_Core') && !defined( 'MAGEE_SHORTCODE_LIB_DIR') ):
15
  define( 'MAGEE_SHORTCODES_PATH', __FILE__ );
16
  define( 'MAGEE_SHORTCODES_DIR_PATH', plugin_dir_path( __FILE__ ));
17
+ define( 'MAGEE_SHORTCODES_VER', '1.5.6' );
18
 
19
  require_once 'inc/core.php';
20
  //require_once 'inc/options.php';
assets/css/shortcode.css CHANGED
@@ -1110,6 +1110,7 @@ a.magee-btn-normal:hover {
1110
  .magee-panel {
1111
  border-radius: 0;
1112
  box-shadow: none;
 
1113
  }
1114
 
1115
  .panel-primary {
1110
  .magee-panel {
1111
  border-radius: 0;
1112
  box-shadow: none;
1113
+ overflow:hidden;
1114
  }
1115
 
1116
  .panel-primary {
assets/js/admin.js CHANGED
@@ -40,8 +40,18 @@ $(document).on("click",'a.magee_shortcode_item',function(){
40
  form.find("#magee-shortcodes-settings .current_shortcode").text(shortcode);
41
  form.find("#magee-shortcodes-settings #magee-shortcode").val(shortcode);
42
  form.find("#magee-shortcodes-settings-inner").html(data);
43
- //ADD clone source
44
  $(".magee-shortcodes-settings-inner-clone").html(form.find(".column-shortcode-inner").html());
 
 
 
 
 
 
 
 
 
 
45
  var myOptions = {
46
  change: function(event, ui){
47
  $('.magee_shortcodes_container .wp-color-picker-field').each(function(){
@@ -397,15 +407,24 @@ tb_remove();
397
 
398
  });
399
  // ADD control
400
- $(document).on('click',"a.child-shortcode-add",function(){
 
401
  var html = '<div class="param-item"><a id="child-shortcode-remove" href="#" class="child-clone-row-remove magee-shortcodes-button ">Remove</a></div>';
402
  $clone = $(this).parents("#magee_shortcodes_container").find(".magee-shortcodes-settings-inner-clone").html();
403
- //$clone.find('.wp-color-picker-field').wpColorPicker();
404
- //$clone.removeClass("magee-shortcodes-settings-inner-clone hidden");
405
- //$clone.addClass("column-shortcode-inner");
406
  var count = $('.column-shortcode-inner').length;
407
  var wraptext = '<div class="column-shortcode-inner">'+$clone+html+'</div>';
408
  $(".shortcode-add").before(wraptext);
 
 
 
 
 
 
 
 
 
 
 
409
  var myclone_Options = {
410
  change: function(event, ui){
411
  $('.magee_shortcodes_container .column-shortcode-inner').eq(count).find('.wp-color-picker-field').each(function(){
40
  form.find("#magee-shortcodes-settings .current_shortcode").text(shortcode);
41
  form.find("#magee-shortcodes-settings #magee-shortcode").val(shortcode);
42
  form.find("#magee-shortcodes-settings-inner").html(data);
43
+ //iconpicker upload load
44
  $(".magee-shortcodes-settings-inner-clone").html(form.find(".column-shortcode-inner").html());
45
+ if($(".magee-shortcodes-settings-inner-clone").find('.magee-upload-button').length>0){
46
+ var number = $(".magee-shortcodes-settings-inner-clone").find('.magee-upload-button').length;
47
+ var k = 9;
48
+ for(var i=0;i<number;i++){
49
+ var value =$(".magee-shortcodes-settings-inner-clone").find('.magee-upload-button').eq(i).attr('data-upid');
50
+ $(".magee-shortcodes-settings-inner-clone").find('.magee-upload-button').eq(i).attr('data-upid',value+k);
51
+ }
52
+
53
+ }
54
+ // colorpicker load
55
  var myOptions = {
56
  change: function(event, ui){
57
  $('.magee_shortcodes_container .wp-color-picker-field').each(function(){
407
 
408
  });
409
  // ADD control
410
+ var k = 9;
411
+ $(document).on('click',"a.child-shortcode-add",function(){
412
  var html = '<div class="param-item"><a id="child-shortcode-remove" href="#" class="child-clone-row-remove magee-shortcodes-button ">Remove</a></div>';
413
  $clone = $(this).parents("#magee_shortcodes_container").find(".magee-shortcodes-settings-inner-clone").html();
 
 
 
414
  var count = $('.column-shortcode-inner').length;
415
  var wraptext = '<div class="column-shortcode-inner">'+$clone+html+'</div>';
416
  $(".shortcode-add").before(wraptext);
417
+ //add iconpicker data-unqid
418
+ $source = $('.column-shortcode-inner').eq(count);
419
+ if($source.find('.magee-upload-button').length>0){
420
+ var number = $source.find('.magee-upload-button').length;
421
+
422
+ for(var i=0;i<number;i++){
423
+ var value = $source.find('.magee-upload-button').eq(i).attr('data-upid');
424
+ $source.find('.magee-upload-button').eq(i).attr('data-upid',value+k);
425
+ }
426
+ };
427
+ k++;
428
  var myclone_Options = {
429
  change: function(event, ui){
430
  $('.magee_shortcodes_container .column-shortcode-inner').eq(count).find('.wp-color-picker-field').each(function(){
inc/core.php CHANGED
@@ -949,6 +949,12 @@ function get_sidebars() {
949
 
950
  $output_child .= $row_end;
951
 
 
 
 
 
 
 
952
  case 'size' :
953
 
954
  // prepare
949
 
950
  $output_child .= $row_end;
951
 
952
+ // append
953
+ $output .= $output_child;
954
+ $this->append_output( $output );
955
+
956
+ break;
957
+
958
  case 'size' :
959
 
960
  // prepare
inc/options.php CHANGED
@@ -95,18 +95,44 @@ $magee_shortcodes['accordion'] = array(
95
  '1' => __( 'Type 1', 'magee-shortcodes' ),
96
  '2' => __( 'Type 2', 'magee-shortcodes' ),
97
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  ),
99
  'content' => array(
100
- 'std' => "[ms_accordion_item title='Accordion Item 1' icon='fa-flag' status='open']Accordion Item Content 1[/ms_accordion_item]\r\n[ms_accordion_item title='Accordion Item 2' icon='fa-star' status='close']Accordion Item Content 2[/ms_accordion_item]\r\n[ms_accordion_item title='Accordion Item 3' icon='fa-music' status='close']Accordion Item Content 3[/ms_accordion_item]\r\n",
101
  'type' => 'textarea',
102
- 'label' => __( 'Accordion Items', 'magee-shortcodes' ),
103
- 'desc' => __( 'Insert accordion items shortcode.', 'magee-shortcodes' ),
104
  ),
105
-
 
 
 
 
 
106
  ),
107
- 'shortcode' => "[ms_accordion style=\"{{style}}\" type=\"{{type}}\" class=\"{{class}}\" id=\"{{id}}\"]\r\n{{content}}[/ms_accordion]",
108
- 'popup_title' => __( 'Accordion Shortcode', 'magee-shortcodes' ),
109
- 'name' => __('accordions-shortcode/','magee-shortocdes'),
 
 
 
110
 
111
  );
112
 
@@ -2117,7 +2143,7 @@ $magee_shortcodes['label'] = array(
2117
  'desc' => ''
2118
  ),
2119
  ),
2120
- 'shortcode' => '[ms_list icon="{{icon}}" icon_color="{{icon_color}}" icon_boxed="{{icon_boxed}}" background_color="{{background_color}}" boxed_shape="{{boxed_shape}}" item_border="{{item_border}}" item_size="{{item_size}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_list]',
2121
  'popup_title' => __( 'List Shortcode', 'magee-shortcodes' ),
2122
  'name' => __('list-shortcode/','magee-shortcodes'),
2123
  );
95
  '1' => __( 'Type 1', 'magee-shortcodes' ),
96
  '2' => __( 'Type 2', 'magee-shortcodes' ),
97
  )
98
+ )
99
+ ),
100
+ 'shortcode' => "[ms_accordion style=\"{{style}}\" type=\"{{type}}\" class=\"{{class}}\" id=\"{{id}}\"]\r\n{{child_shortcode}}[/ms_accordion]",
101
+ 'popup_title' => __( 'Accordion Shortcode', 'magee-shortcodes' ),
102
+ 'child_shortcode' => array(
103
+ 'params' => array(
104
+
105
+ 'title' => array(
106
+ 'std' => 'Title',
107
+ 'type' => 'text',
108
+ 'label' => __( 'Title', 'magee-shortcodes'),
109
+ 'desc' => __( 'Insert the title for the accordion item.', 'magee-shortcodes'),
110
+ ),
111
+ 'icon' => array(
112
+ 'type' => 'iconpicker',
113
+ 'label' => __( 'Select Icon', 'magee-shortcodes'),
114
+ 'desc' => __( 'Click an icon to select, click again to deselect', 'magee-shortcodes'),
115
+ 'options' => $icons
116
  ),
117
  'content' => array(
118
+ 'std' => 'Your Content Goes Here',
119
  'type' => 'textarea',
120
+ 'label' => __( 'Text', 'magee-shortcodes'),
121
+ 'desc' => __( 'Insert the content for the accordion item.', 'magee-shortcodes'),
122
  ),
123
+ 'status' => array(
124
+ 'std' => 'close',
125
+ 'type' => 'select',
126
+ 'label' => __( 'Status', 'magee-shortcodes'),
127
+ 'desc' => __( 'Choose to have the accordion open or close when page loads.', 'magee-shortcodes'),
128
+ 'options' => array("close"=>"Close","open"=>"Open")
129
  ),
130
+
131
+
132
+ ),
133
+ 'shortcode' => "[ms_accordion_item title=\"{{title}}\" icon=\"{{icon}}\" status=\"{{status}}\"]{{content}}[/ms_accordion_item]\r\n",
134
+ ),
135
+ 'name' => __('accordions-shortcode','magee-shortocdes'),
136
 
137
  );
138
 
2143
  'desc' => ''
2144
  ),
2145
  ),
2146
+ 'shortcode' => "[ms_list icon=\"{{icon}}\" icon_color=\"{{icon_color}}\" icon_boxed=\"{{icon_boxed}}\" background_color=\"{{background_color}}\" boxed_shape=\"{{boxed_shape}}\" item_border=\"{{item_border}}\" item_size=\"{{item_size}}\" class=\"{{class}}\" id=\"{{id}}\"]\r\n{{content}}[/ms_list]",
2147
  'popup_title' => __( 'List Shortcode', 'magee-shortcodes' ),
2148
  'name' => __('list-shortcode/','magee-shortcodes'),
2149
  );
readme.txt CHANGED
@@ -1,7 +1,7 @@
1
  === Magee Shortcodes ===
2
  Contributors: magictheme
3
  Donate link: http://www.mageewp.com/
4
- 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, chart
5
  Requires at least: 4.0
6
  Tested up to: 4.5
7
  Stable tag: 4.5
@@ -37,7 +37,7 @@ Magee Shortcodes is WordPress plugin that provides a pack of shortcodes. It is b
37
 
38
  ### Shortcode List
39
 
40
- Accordion, Alert, Audio, Button, Column, Custom Box, Countdowns, Counter, Divider, Dropcap, Document, Dummy Text, Dummy Image, Dailymotion, Expand, Feature Box, Flip Box, Highlight, Heading, Icon, Image Frame, Image Compare, List, Label, Modal, Menu, Popover, Person, Promo Box, Piechart, Panel, Progress, Pullquote, QR Code, Quote, Slider, RSS Feed, Social, Section, Scheduled, Tooltip, Tab, Testimonial, Timeline, Targeted, Video, Vimeo, Youtube, Chart Bar, Chart Doughnut, Chart Line, Chart Pie
41
 
42
 
43
  == Installation ==
@@ -68,6 +68,10 @@ Activate plugin at "Plugins" administration page.
68
 
69
  == Changelog ==
70
 
 
 
 
 
71
  = 1.5.5 - 03/06/2016 =
72
  * Added: New shortcode -- Chart Bar
73
  * Added: New shortcode -- Chart Doughnut
1
  === Magee Shortcodes ===
2
  Contributors: magictheme
3
  Donate link: http://www.mageewp.com/
4
+ 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
5
  Requires at least: 4.0
6
  Tested up to: 4.5
7
  Stable tag: 4.5
37
 
38
  ### Shortcode List
39
 
40
+ Accordion, Alert, Audio, Button, Column, Custom Box, Countdowns, Counter, Divider, Dropcap, Document, Dummy Text, Dummy Image, Dailymotion, Expand, Feature Box, Flip Box, Highlight, Heading, Icon, Image Frame, Image Compare, List, Label, Modal, Menu, Popover, Person, Promo Box, Piechart, Panel, Progress, Pullquote, QR Code, Quote, Slider, RSS Feed, Social, Section, Scheduled, Tooltip, Tab, Testimonial, Timeline, Targeted, Video, Vimeo, Youtube
41
 
42
 
43
  == Installation ==
68
 
69
  == Changelog ==
70
 
71
+ = 1.5.6 - 06/06/2016 =
72
+ * Fix - Fixed image uploader issue
73
+ * Fix - Fixed vimeo/youtube shortcodes issue
74
+
75
  = 1.5.5 - 03/06/2016 =
76
  * Added: New shortcode -- Chart Bar
77
  * Added: New shortcode -- Chart Doughnut
shortcodes/class-accordion.php CHANGED
@@ -45,7 +45,6 @@ class Magee_Accordion {
45
  $html .= '<script>
46
  jQuery(function($) {
47
  if($("#magee-sc-form-preview").length>0){
48
- if($("#magee-sc-form-preview").contents().find(".panel-heading").length>1){
49
  num = $("#magee-sc-form-preview").contents().find(".panel-heading").length ;
50
  for($i=0;$i<num;$i++){
51
  $("#magee-sc-form-preview").contents().find(".panel-heading").eq($i).on("click",function(e){
@@ -64,7 +63,6 @@ class Magee_Accordion {
64
  }
65
  });
66
  };
67
- }
68
  }
69
  });
70
  </script>';
@@ -102,14 +100,20 @@ class Magee_Accordion {
102
  $expanded = "false";
103
  $collapse = "collapsed";
104
  }
105
-
 
 
 
 
 
 
106
  $itemId = 'collapse'.$this->id."-".$this->num;
107
 
108
  $html = '<div class="panel panel-default">
109
  <div class="panel-heading" role="tab" id="heading'.$itemId.'">
110
  <a class="accordion-toggle '.$collapse.'" data-toggle="collapse" data-parent="#'.$this->id.'" href="#'.$itemId.'" aria-expanded="'.$expanded.'" aria-controls="'.$itemId.'">
111
  <h4 class="panel-title">
112
- <i class="fa '.$icon.'"></i> '.esc_attr($title).'
113
  </h4>
114
  </a>
115
  </div>
45
  $html .= '<script>
46
  jQuery(function($) {
47
  if($("#magee-sc-form-preview").length>0){
 
48
  num = $("#magee-sc-form-preview").contents().find(".panel-heading").length ;
49
  for($i=0;$i<num;$i++){
50
  $("#magee-sc-form-preview").contents().find(".panel-heading").eq($i).on("click",function(e){
63
  }
64
  });
65
  };
 
66
  }
67
  });
68
  </script>';
100
  $expanded = "false";
101
  $collapse = "collapsed";
102
  }
103
+
104
+ if( stristr($icon,'fa-')):
105
+ $icon_str = '<i class="fa '.esc_attr($icon).'"></i>';
106
+ else:
107
+ $icon_str = '<img class="image-instead" src="'.esc_attr($icon).'"/>';
108
+ endif;
109
+
110
  $itemId = 'collapse'.$this->id."-".$this->num;
111
 
112
  $html = '<div class="panel panel-default">
113
  <div class="panel-heading" role="tab" id="heading'.$itemId.'">
114
  <a class="accordion-toggle '.$collapse.'" data-toggle="collapse" data-parent="#'.$this->id.'" href="#'.$itemId.'" aria-expanded="'.$expanded.'" aria-controls="'.$itemId.'">
115
  <h4 class="panel-title">
116
+ '.$icon_str.esc_attr($title).'
117
  </h4>
118
  </a>
119
  </div>
shortcodes/class-vimeo.php CHANGED
@@ -66,9 +66,12 @@ class Magee_Vimeo {
66
  else:
67
  $mute = '0';
68
  endif;
 
 
69
  if($link !== ''){
70
- preg_match( '/[0-9]+/',$link,$match);
71
- $sid = $match[0];
 
72
  }
73
  $out = "<div id=\"vimeo\" class=\"vimeo-video " .$position . "\">";
74
  if ($mute == 1) {
66
  else:
67
  $mute = '0';
68
  endif;
69
+
70
+ $sid = '';
71
  if($link !== ''){
72
+ if(preg_match( '/(https?:\/\/)?(www\.)?(player\.)?vimeo\.com\/([a-z]*\/)*([0-9]{6,11})[?]?.*/',$link,$match)){
73
+ $sid = $match[5];
74
+ };
75
  }
76
  $out = "<div id=\"vimeo\" class=\"vimeo-video " .$position . "\">";
77
  if ($mute == 1) {
shortcodes/class-youtube.php CHANGED
@@ -66,10 +66,11 @@ class Magee_Youtube {
66
  $mute = '0';
67
  endif;
68
  $out = '';
69
-
70
- // $aaa = parse_url($link='https://vimeo.com/channels/staffpicks/153773597');
71
- // print_r($aaa);
72
- $sid = substr($link,32,11);
 
73
  if( $width == '100%' || $height == '100%' && $width == '' || $height == ''):
74
  $out .= "<div id=\"youtube\" class=\"youtube-video " .$position . "\"><iframe id=\"player_".$sid."\" class=\"".$class."\" src=\"//www.youtube.com/embed/" . $sid . "?rel=0&controls=".$controls."&loop=".$loop."&playlist=".$sid."&autoplay=".$autoplay."&enablejsapi=".$mute."\" frameborder=\"0\" allowfullscreen></iframe>";
75
 
66
  $mute = '0';
67
  endif;
68
  $out = '';
69
+ $sid = '';
70
+ if(preg_match('#(?<=v=)[a-zA-Z0-9-]+(?=&)|(?<=v\/)[^&\n]+|(?<=v=)[^&\n]+|(?<=youtu.be/)[^&\n]+#', $link, $matches) ){
71
+ $sid = $matches[0];
72
+ };
73
+
74
  if( $width == '100%' || $height == '100%' && $width == '' || $height == ''):
75
  $out .= "<div id=\"youtube\" class=\"youtube-video " .$position . "\"><iframe id=\"player_".$sid."\" class=\"".$class."\" src=\"//www.youtube.com/embed/" . $sid . "?rel=0&controls=".$controls."&loop=".$loop."&playlist=".$sid."&autoplay=".$autoplay."&enablejsapi=".$mute."\" frameborder=\"0\" allowfullscreen></iframe>";
76