Shortcodes Ultimate - Version 5.0.4

Version Description

  • Fixed: added missing FontAwesome icons
  • Fixed: is_plugin_active call removed on frontend
  • Fixed: nested shortcodes
  • Fixed: issue with spoiler loaded through ajax
  • Fixed: [scheduler] shortcode logic
Download this release

Release Info

Developer gn_themes
Plugin Icon 128x128 Shortcodes Ultimate
Version 5.0.4
Comparing to
See all releases

Code changes from version 5.0.3 to 5.0.4

Files changed (154) hide show
  1. admin/class-shortcodes-ultimate-admin-addons.php +3 -3
  2. admin/class-shortcodes-ultimate-admin-settings.php +4 -4
  3. admin/class-shortcodes-ultimate-admin-shortcodes.php +6 -6
  4. admin/class-shortcodes-ultimate-admin-top-level.php +0 -0
  5. admin/class-shortcodes-ultimate-admin.php +57 -116
  6. admin/class-shortcodes-ultimate-notice-rate.php +0 -0
  7. admin/class-shortcodes-ultimate-notice.php +0 -0
  8. admin/css/admin.css +2 -1
  9. admin/css/admin.css.map +1 -0
  10. admin/images/shortcodes/_default.svg +1 -1
  11. admin/images/shortcodes/accordion.svg +0 -0
  12. admin/images/shortcodes/animate.svg +0 -0
  13. admin/images/shortcodes/audio.svg +0 -0
  14. admin/images/shortcodes/box.svg +0 -0
  15. admin/images/shortcodes/button.svg +0 -0
  16. admin/images/shortcodes/carousel.svg +0 -0
  17. admin/images/shortcodes/custom_gallery.svg +0 -0
  18. admin/images/shortcodes/dailymotion.svg +0 -0
  19. admin/images/shortcodes/divider.svg +0 -0
  20. admin/images/shortcodes/document.svg +0 -0
  21. admin/images/shortcodes/dropcap.svg +0 -0
  22. admin/images/shortcodes/dummy_image.svg +0 -0
  23. admin/images/shortcodes/dummy_text.svg +0 -0
  24. admin/images/shortcodes/expand.svg +0 -0
  25. admin/images/shortcodes/feed.svg +0 -0
  26. admin/images/shortcodes/gmap.svg +0 -0
  27. admin/images/shortcodes/guests.svg +0 -0
  28. admin/images/shortcodes/heading.svg +0 -0
  29. admin/images/shortcodes/highlight.svg +0 -0
  30. admin/images/shortcodes/label.svg +0 -0
  31. admin/images/shortcodes/lightbox.svg +0 -0
  32. admin/images/shortcodes/lightbox_content.svg +0 -0
  33. admin/images/shortcodes/list.svg +0 -0
  34. admin/images/shortcodes/members.svg +0 -0
  35. admin/images/shortcodes/menu.svg +0 -0
  36. admin/images/shortcodes/meta.svg +0 -0
  37. admin/images/shortcodes/note.svg +0 -0
  38. admin/images/shortcodes/permalink.svg +0 -0
  39. admin/images/shortcodes/post.svg +0 -0
  40. admin/images/shortcodes/posts.svg +0 -0
  41. admin/images/shortcodes/private.svg +0 -0
  42. admin/images/shortcodes/pullquote.svg +0 -0
  43. admin/images/shortcodes/qrcode.svg +0 -0
  44. admin/images/shortcodes/quote.svg +0 -0
  45. admin/images/shortcodes/row.svg +0 -0
  46. admin/images/shortcodes/scheduler.svg +0 -0
  47. admin/images/shortcodes/service.svg +0 -0
  48. admin/images/shortcodes/siblings.svg +0 -0
  49. admin/images/shortcodes/slider.svg +0 -0
  50. admin/images/shortcodes/spacer.svg +0 -0
  51. admin/images/shortcodes/spoiler.svg +0 -0
  52. admin/images/shortcodes/subpages.svg +0 -0
  53. admin/images/shortcodes/table.svg +0 -0
  54. admin/images/shortcodes/tabs.svg +0 -0
  55. admin/images/shortcodes/template.svg +0 -0
  56. admin/images/shortcodes/tooltip.svg +0 -0
  57. admin/images/shortcodes/user.svg +0 -0
  58. admin/images/shortcodes/video.svg +0 -0
  59. admin/images/shortcodes/vimeo.svg +0 -0
  60. admin/images/shortcodes/youtube.svg +0 -0
  61. admin/images/shortcodes/youtube_advanced.svg +0 -0
  62. admin/partials/help/addons.php +0 -0
  63. admin/partials/help/settings.php +0 -0
  64. admin/partials/help/shortcodes.php +0 -0
  65. admin/partials/help/sidebar.php +0 -0
  66. admin/partials/notices/rate.php +0 -0
  67. admin/partials/pages/addons.php +0 -0
  68. admin/partials/pages/settings.php +0 -0
  69. admin/partials/pages/shortcodes-list.php +0 -0
  70. admin/partials/pages/shortcodes-single.php +0 -0
  71. admin/partials/pages/shortcodes.php +2 -2
  72. admin/partials/settings/fields/checkbox.php +0 -0
  73. admin/partials/settings/fields/css.php +1 -1
  74. admin/partials/settings/fields/text.php +0 -0
  75. admin/partials/settings/sections/general.php +0 -0
  76. admin/partials/tabs.php +0 -0
  77. admin/scss/admin.scss +224 -0
  78. admin/stylus/admin.styl +0 -186
  79. assets/css/animate.css +0 -0
  80. assets/css/box-shortcodes.css +0 -0
  81. assets/css/cheatsheet.css +0 -0
  82. assets/css/content-shortcodes.css +0 -0
  83. assets/css/galleries-shortcodes.css +0 -0
  84. assets/css/generator.css +0 -0
  85. assets/css/magnific-popup.css +0 -0
  86. assets/css/media-shortcodes.css +0 -0
  87. assets/css/options-page.css +0 -0
  88. assets/css/other-shortcodes.css +0 -0
  89. assets/css/players-shortcodes.css +0 -0
  90. assets/css/qtip.css +0 -0
  91. assets/css/rtl-admin.css +0 -0
  92. assets/css/rtl-shortcodes.css +0 -0
  93. assets/css/simpleslider.css +0 -0
  94. assets/css/sunrise.css +0 -0
  95. assets/css/tinymce.css +0 -0
  96. assets/images/grabbing.png +0 -0
  97. assets/images/icon.png +0 -0
  98. assets/images/loading.gif +0 -0
  99. assets/images/player/button.png +0 -0
  100. assets/images/player/default-start.png +0 -0
  101. assets/images/player/default.png +0 -0
  102. assets/images/player/metro-start.png +0 -0
  103. assets/images/player/metro.png +0 -0
  104. assets/images/player/minimal.png +0 -0
  105. assets/images/quote.png +0 -0
  106. assets/images/search.png +0 -0
  107. assets/images/service.png +0 -0
  108. assets/images/spinner.gif +0 -0
  109. assets/images/spoiler.png +0 -0
  110. assets/images/styles/style-bubbles.png +0 -0
  111. assets/images/styles/style-glass.png +0 -0
  112. assets/images/styles/style-noise.png +0 -0
  113. assets/images/styles/style-soft.png +0 -0
  114. assets/images/swiper/default.png +0 -0
  115. assets/images/swiper/loading.gif +0 -0
  116. assets/js/chart.js +0 -0
  117. assets/js/form.js +0 -0
  118. assets/js/galleries-shortcodes.js +0 -0
  119. assets/js/generator.js +0 -0
  120. assets/js/jplayer.js +0 -0
  121. assets/js/jquery.inview.js +0 -0
  122. assets/js/jsrender.js +0 -0
  123. assets/js/magnific-popup.js +0 -0
  124. assets/js/options-page.js +0 -0
  125. assets/js/other-shortcodes.js +0 -1
  126. assets/js/players-shortcodes.js +0 -0
  127. assets/js/qtip.js +0 -0
  128. assets/js/simpleslider.js +0 -0
  129. assets/js/sunrise.js +0 -0
  130. assets/js/swiper.js +0 -0
  131. assets/js/tinymce.js +0 -0
  132. assets/other/Jplayer.swf +0 -0
  133. inc/core/assets.php +0 -1
  134. inc/core/counters.php +0 -0
  135. inc/core/data.php +1 -1
  136. inc/core/generator-views.php +0 -23
  137. inc/core/generator.php +0 -0
  138. inc/core/load.php +0 -7
  139. inc/core/requirements.php +0 -0
  140. inc/core/shortcodes.php +94 -65
  141. inc/core/tools.php +92 -77
  142. inc/core/widget.php +0 -0
  143. includes/class-shortcodes-ultimate-activator.php +0 -0
  144. includes/class-shortcodes-ultimate-upgrade.php +0 -0
  145. includes/class-shortcodes-ultimate.php +97 -28
  146. includes/filters.php +52 -0
  147. languages/readme.txt +0 -0
  148. license.txt +0 -0
  149. readme.txt +7 -0
  150. shortcodes-ultimate.php +9 -9
  151. templates/default-loop.php +0 -0
  152. templates/list-loop.php +0 -0
  153. templates/single-post.php +0 -0
  154. templates/teaser-loop.php +0 -0
admin/class-shortcodes-ultimate-admin-addons.php CHANGED
@@ -72,10 +72,10 @@ final class Shortcodes_Ultimate_Admin_Addons extends Shortcodes_Ultimate_Admin {
72
  $screen->add_help_tab( array(
73
  'id' => 'shortcodes-ultimate-addons',
74
  'title' => __( 'Add-ons', 'shortcodes-ultimate' ),
75
- 'content' => $this->get_template( 'help/addons' ),
76
  ) );
77
 
78
- $screen->set_help_sidebar( $this->get_template( 'help/sidebar' ) );
79
 
80
  }
81
 
@@ -91,7 +91,7 @@ final class Shortcodes_Ultimate_Admin_Addons extends Shortcodes_Ultimate_Admin {
91
  return;
92
  }
93
 
94
- wp_enqueue_style( 'shortcodes-ultimate-admin', $this->get_plugin_url() . 'admin/css/admin.css', array(), $this->get_plugin_version() );
95
 
96
  }
97
 
72
  $screen->add_help_tab( array(
73
  'id' => 'shortcodes-ultimate-addons',
74
  'title' => __( 'Add-ons', 'shortcodes-ultimate' ),
75
+ 'content' => $this->get_template( 'admin/partials/help/addons' ),
76
  ) );
77
 
78
+ $screen->set_help_sidebar( $this->get_template( 'admin/partials/help/sidebar' ) );
79
 
80
  }
81
 
91
  return;
92
  }
93
 
94
+ wp_enqueue_style( 'shortcodes-ultimate-admin', $this->plugin_url . 'admin/css/admin.css', array(), $this->plugin_version );
95
 
96
  }
97
 
admin/class-shortcodes-ultimate-admin-settings.php CHANGED
@@ -129,7 +129,7 @@ final class Shortcodes_Ultimate_Admin_Settings extends Shortcodes_Ultimate_Admin
129
 
130
  $section = str_replace( 'shortcodes-ultimate-', '', $args['id'] );
131
 
132
- $this->the_template( 'settings/sections/' . $section, $args );
133
 
134
  }
135
 
@@ -140,7 +140,7 @@ final class Shortcodes_Ultimate_Admin_Settings extends Shortcodes_Ultimate_Admin
140
  * @since 5.0.0
141
  */
142
  public function display_settings_field( $args ) {
143
- $this->the_template( 'settings/fields/' . $args['type'], $args );
144
  }
145
 
146
  /**
@@ -158,10 +158,10 @@ final class Shortcodes_Ultimate_Admin_Settings extends Shortcodes_Ultimate_Admin
158
  $screen->add_help_tab( array(
159
  'id' => 'shortcodes-ultimate-general',
160
  'title' => __( 'General settings', 'shortcodes-ultimate' ),
161
- 'content' => $this->get_template( 'help/settings' ),
162
  ) );
163
 
164
- $screen->set_help_sidebar( $this->get_template( 'help/sidebar' ) );
165
 
166
  }
167
 
129
 
130
  $section = str_replace( 'shortcodes-ultimate-', '', $args['id'] );
131
 
132
+ $this->the_template( 'admin/partials/settings/sections/' . $section, $args );
133
 
134
  }
135
 
140
  * @since 5.0.0
141
  */
142
  public function display_settings_field( $args ) {
143
+ $this->the_template( 'admin/partials/settings/fields/' . $args['type'], $args );
144
  }
145
 
146
  /**
158
  $screen->add_help_tab( array(
159
  'id' => 'shortcodes-ultimate-general',
160
  'title' => __( 'General settings', 'shortcodes-ultimate' ),
161
+ 'content' => $this->get_template( 'admin/partials/help/settings' ),
162
  ) );
163
 
164
+ $screen->set_help_sidebar( $this->get_template( 'admin/partials/help/sidebar' ) );
165
 
166
  }
167
 
admin/class-shortcodes-ultimate-admin-shortcodes.php CHANGED
@@ -51,17 +51,17 @@ final class Shortcodes_Ultimate_Admin_Shortcodes extends Shortcodes_Ultimate_Adm
51
  */
52
  public function add_help_tab( $screen ) {
53
 
54
- if ( !$this->is_component_page() ) {
55
  return;
56
  }
57
 
58
  $screen->add_help_tab( array(
59
  'id' => 'shortcodes-ultimate-shortcodes',
60
  'title' => __( 'Shortcodes Ultimate', 'shortcodes-ultimate' ),
61
- 'content' => $this->get_template( 'help/shortcodes' ),
62
  ) );
63
 
64
- $screen->set_help_sidebar( $this->get_template( 'help/sidebar' ) );
65
 
66
  }
67
 
@@ -76,7 +76,7 @@ final class Shortcodes_Ultimate_Admin_Shortcodes extends Shortcodes_Ultimate_Adm
76
  return;
77
  }
78
 
79
- wp_enqueue_style( 'shortcodes-ultimate-admin', $this->get_plugin_url() . 'admin/css/admin.css', array( 'font-awesome' ), $this->get_plugin_version() );
80
 
81
  }
82
 
@@ -332,7 +332,7 @@ final class Shortcodes_Ultimate_Admin_Shortcodes extends Shortcodes_Ultimate_Adm
332
  $options = array();
333
  $shortcode = $this->get_single_shortcode();
334
 
335
- if ( !$shortcode || !isset( $shortcode['atts'] ) ) {
336
  return $options;
337
  }
338
 
@@ -454,7 +454,7 @@ final class Shortcodes_Ultimate_Admin_Shortcodes extends Shortcodes_Ultimate_Adm
454
  $image = $shortcode['icon'];
455
  }
456
  else {
457
- $image = $this->get_plugin_url() . 'admin/images/shortcodes/_default.svg';
458
  }
459
 
460
  $font_size = $size - 20;
51
  */
52
  public function add_help_tab( $screen ) {
53
 
54
+ if ( ! $this->is_component_page() ) {
55
  return;
56
  }
57
 
58
  $screen->add_help_tab( array(
59
  'id' => 'shortcodes-ultimate-shortcodes',
60
  'title' => __( 'Shortcodes Ultimate', 'shortcodes-ultimate' ),
61
+ 'content' => $this->get_template( 'admin/partials/help/shortcodes' ),
62
  ) );
63
 
64
+ $screen->set_help_sidebar( $this->get_template( 'admin/partials/help/sidebar' ) );
65
 
66
  }
67
 
76
  return;
77
  }
78
 
79
+ wp_enqueue_style( 'shortcodes-ultimate-admin', $this->plugin_url . 'admin/css/admin.css', array( 'font-awesome' ), $this->plugin_version );
80
 
81
  }
82
 
332
  $options = array();
333
  $shortcode = $this->get_single_shortcode();
334
 
335
+ if ( ! $shortcode || ! isset( $shortcode['atts'] ) ) {
336
  return $options;
337
  }
338
 
454
  $image = $shortcode['icon'];
455
  }
456
  else {
457
+ $image = $this->plugin_url . 'admin/images/shortcodes/_default.svg';
458
  }
459
 
460
  $font_size = $size - 20;
admin/class-shortcodes-ultimate-admin-top-level.php CHANGED
File without changes
admin/class-shortcodes-ultimate-admin.php CHANGED
@@ -37,6 +37,15 @@ abstract class Shortcodes_Ultimate_Admin {
37
  */
38
  protected $plugin_url;
39
 
 
 
 
 
 
 
 
 
 
40
  /**
41
  * User capability required to access admin pages.
42
  *
@@ -82,7 +91,6 @@ abstract class Shortcodes_Ultimate_Admin {
82
  */
83
  protected $component_tabs;
84
 
85
-
86
  /**
87
  * Initialize the class and set its properties.
88
  *
@@ -96,6 +104,7 @@ abstract class Shortcodes_Ultimate_Admin {
96
  $this->plugin_file = $plugin_file;
97
  $this->plugin_version = $plugin_version;
98
  $this->plugin_url = plugin_dir_url( $plugin_file );
 
99
  $this->capability = 'manage_options';
100
  $this->component_url = null;
101
  $this->component_hook_suffix = null;
@@ -104,7 +113,6 @@ abstract class Shortcodes_Ultimate_Admin {
104
 
105
  }
106
 
107
-
108
  /**
109
  * Add menu page
110
  *
@@ -112,7 +120,6 @@ abstract class Shortcodes_Ultimate_Admin {
112
  */
113
  public function admin_menu() {}
114
 
115
-
116
  /**
117
  * Enqueue JavaScript(s) and Stylesheet(s) for the component.
118
  *
@@ -120,7 +127,6 @@ abstract class Shortcodes_Ultimate_Admin {
120
  */
121
  public function enqueue_scripts() {}
122
 
123
-
124
  /**
125
  * Add a top-level menu page.
126
  *
@@ -146,7 +152,6 @@ abstract class Shortcodes_Ultimate_Admin {
146
 
147
  }
148
 
149
-
150
  /**
151
  * Add a submenu page.
152
  *
@@ -171,11 +176,10 @@ abstract class Shortcodes_Ultimate_Admin {
171
 
172
  }
173
 
174
-
175
  /**
176
  * Common callback for all menu pages.
177
  *
178
- * This method retrieves current page slug from $_GET and loads approriate
179
  * template.
180
  *
181
  * @since 5.0.0
@@ -194,59 +198,10 @@ abstract class Shortcodes_Ultimate_Admin {
194
  $page = 'shortcodes';
195
  }
196
 
197
- $this->the_template( 'pages/' . $page );
198
 
199
  }
200
 
201
-
202
- /**
203
- * Utility function to get specified template by it's name.
204
- *
205
- * @since 5.0.0
206
- * @access protected
207
- * @param string $name Template name (without extension).
208
- * @param mixed $data Template data to be passed to the template.
209
- * @return string Template content.
210
- */
211
- protected function get_template( $name, $data = null ) {
212
-
213
- // Sanitize name
214
- $name = preg_replace( '/[^A-Za-z0-9\/_-]/', '', $name );
215
-
216
- // Trim slashes
217
- $name = trim( $name, '/' );
218
-
219
- // The full template path
220
- $template = $this->get_plugin_path() . 'admin/partials/' . $name . '.php';
221
-
222
- // Look for a specified file
223
- if ( file_exists( $template ) ) {
224
-
225
- ob_start();
226
- include $template;
227
- $output = ob_get_contents();
228
- ob_end_clean();
229
-
230
- }
231
-
232
- return ( isset( $output ) ) ? $output : '';
233
-
234
- }
235
-
236
-
237
- /**
238
- * Utility function to display specified template by it's name.
239
- *
240
- * @since 5.0.0
241
- * @access protected
242
- * @param string $name Template name (without extension).
243
- * @param mixed $data Template data to be passed to the template.
244
- */
245
- protected function the_template( $name, $data = null ) {
246
- echo $this->get_template( $name, $data );
247
- }
248
-
249
-
250
  /**
251
  * Helper function to check component's menu page hook_suffix
252
  *
@@ -261,7 +216,6 @@ abstract class Shortcodes_Ultimate_Admin {
261
 
262
  }
263
 
264
-
265
  /**
266
  * Retrieve the title of the current admin screen.
267
  *
@@ -279,7 +233,6 @@ abstract class Shortcodes_Ultimate_Admin {
279
 
280
  }
281
 
282
-
283
  /**
284
  * Display the title of the current admin screen.
285
  *
@@ -290,7 +243,6 @@ abstract class Shortcodes_Ultimate_Admin {
290
  echo $this->get_page_title();
291
  }
292
 
293
-
294
  /**
295
  * Retrieve tabs collection.
296
  *
@@ -301,7 +253,6 @@ abstract class Shortcodes_Ultimate_Admin {
301
  return $this->component_tabs;
302
  }
303
 
304
-
305
  /**
306
  * Retrieve the current tab ID
307
  *
@@ -322,7 +273,6 @@ abstract class Shortcodes_Ultimate_Admin {
322
 
323
  }
324
 
325
-
326
  /**
327
  * Retrieve the ID of the first tab.
328
  *
@@ -331,13 +281,12 @@ abstract class Shortcodes_Ultimate_Admin {
331
  */
332
  protected function get_first_tab() {
333
 
334
- foreach( $this->get_tabs() as $tab_id => $tab_title ) {
335
  return $tab_id;
336
  }
337
 
338
  }
339
 
340
-
341
  /**
342
  * Retrieve the tab URL by ID
343
  *
@@ -352,55 +301,6 @@ abstract class Shortcodes_Ultimate_Admin {
352
 
353
  }
354
 
355
-
356
- /**
357
- * Retrieve the path of the main plugin file.
358
- *
359
- * @since 5.0.0
360
- * @access protected
361
- * @return string The path of the main plugin file.
362
- */
363
- protected function get_plugin_file() {
364
- return $this->plugin_file;
365
- }
366
-
367
-
368
- /**
369
- * Retrieve the path of the plugin.
370
- *
371
- * @since 5.0.0
372
- * @access protected
373
- * @return string The path of the plugin.
374
- */
375
- protected function get_plugin_path() {
376
- return plugin_dir_path( $this->plugin_file );
377
- }
378
-
379
-
380
- /**
381
- * Retrieve the current version of the plugin.
382
- *
383
- * @since 5.0.0
384
- * @access protected
385
- * @return string The current version of the plugin.
386
- */
387
- protected function get_plugin_version() {
388
- return $this->plugin_version;
389
- }
390
-
391
-
392
- /**
393
- * Retrieve the URL of the plugin folder.
394
- *
395
- * @since 5.0.0
396
- * @access protected
397
- * @return string The URL of the plugin folder.
398
- */
399
- protected function get_plugin_url() {
400
- return $this->plugin_url;
401
- }
402
-
403
-
404
  /**
405
  * Retrieve user capability required to access admin pages.
406
  *
@@ -412,7 +312,6 @@ abstract class Shortcodes_Ultimate_Admin {
412
  return apply_filters( 'su/admin/capability', $this->capability );
413
  }
414
 
415
-
416
  /**
417
  * Retrieve the plugin menu pages.
418
  *
@@ -424,7 +323,6 @@ abstract class Shortcodes_Ultimate_Admin {
424
  return self::$plugin_menu_pages;
425
  }
426
 
427
-
428
  /**
429
  * Retrieve the hook_suffix of the component menu page.
430
  *
@@ -435,7 +333,6 @@ abstract class Shortcodes_Ultimate_Admin {
435
  return $this->component_hook_suffix;
436
  }
437
 
438
-
439
  /**
440
  * Retrieve the URL of the component menu page.
441
  *
@@ -447,4 +344,48 @@ abstract class Shortcodes_Ultimate_Admin {
447
  return $this->component_url;
448
  }
449
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
450
  }
37
  */
38
  protected $plugin_url;
39
 
40
+ /**
41
+ * The path to the plugin folder.
42
+ *
43
+ * @since 5.1.0
44
+ * @access private
45
+ * @var string $plugin_path The path to the plugin folder.
46
+ */
47
+ private $plugin_path;
48
+
49
  /**
50
  * User capability required to access admin pages.
51
  *
91
  */
92
  protected $component_tabs;
93
 
 
94
  /**
95
  * Initialize the class and set its properties.
96
  *
104
  $this->plugin_file = $plugin_file;
105
  $this->plugin_version = $plugin_version;
106
  $this->plugin_url = plugin_dir_url( $plugin_file );
107
+ $this->plugin_path = plugin_dir_path( $plugin_file );
108
  $this->capability = 'manage_options';
109
  $this->component_url = null;
110
  $this->component_hook_suffix = null;
113
 
114
  }
115
 
 
116
  /**
117
  * Add menu page
118
  *
120
  */
121
  public function admin_menu() {}
122
 
 
123
  /**
124
  * Enqueue JavaScript(s) and Stylesheet(s) for the component.
125
  *
127
  */
128
  public function enqueue_scripts() {}
129
 
 
130
  /**
131
  * Add a top-level menu page.
132
  *
152
 
153
  }
154
 
 
155
  /**
156
  * Add a submenu page.
157
  *
176
 
177
  }
178
 
 
179
  /**
180
  * Common callback for all menu pages.
181
  *
182
+ * This method retrieves current page slug from $_GET and loads appropriate
183
  * template.
184
  *
185
  * @since 5.0.0
198
  $page = 'shortcodes';
199
  }
200
 
201
+ $this->the_template( 'admin/partials/pages/' . $page );
202
 
203
  }
204
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
205
  /**
206
  * Helper function to check component's menu page hook_suffix
207
  *
216
 
217
  }
218
 
 
219
  /**
220
  * Retrieve the title of the current admin screen.
221
  *
233
 
234
  }
235
 
 
236
  /**
237
  * Display the title of the current admin screen.
238
  *
243
  echo $this->get_page_title();
244
  }
245
 
 
246
  /**
247
  * Retrieve tabs collection.
248
  *
253
  return $this->component_tabs;
254
  }
255
 
 
256
  /**
257
  * Retrieve the current tab ID
258
  *
273
 
274
  }
275
 
 
276
  /**
277
  * Retrieve the ID of the first tab.
278
  *
281
  */
282
  protected function get_first_tab() {
283
 
284
+ foreach ( $this->get_tabs() as $tab_id => $tab_title ) {
285
  return $tab_id;
286
  }
287
 
288
  }
289
 
 
290
  /**
291
  * Retrieve the tab URL by ID
292
  *
301
 
302
  }
303
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
304
  /**
305
  * Retrieve user capability required to access admin pages.
306
  *
312
  return apply_filters( 'su/admin/capability', $this->capability );
313
  }
314
 
 
315
  /**
316
  * Retrieve the plugin menu pages.
317
  *
323
  return self::$plugin_menu_pages;
324
  }
325
 
 
326
  /**
327
  * Retrieve the hook_suffix of the component menu page.
328
  *
333
  return $this->component_hook_suffix;
334
  }
335
 
 
336
  /**
337
  * Retrieve the URL of the component menu page.
338
  *
344
  return $this->component_url;
345
  }
346
 
347
+ /**
348
+ * Utility function to get specified template by it's name.
349
+ *
350
+ * @since 5.0.0
351
+ * @param string $name Template name without extension.
352
+ * @param mixed $data Data to be available from within template.
353
+ * @return string Template content. Returns empty string if template name is invalid or template file wasn't found.
354
+ */
355
+ public function get_template( $name = '', $data = array() ) {
356
+
357
+ // Validate template name
358
+ if ( preg_match( "/^(?!-)[a-z0-9-_]+(?<!-)(\/(?!-)[a-z0-9-_]+(?<!-))*$/", $name ) !== 1 ) {
359
+ return '';
360
+ }
361
+
362
+ // The full path to template file
363
+ $file = $this->plugin_path . $name . '.php';
364
+
365
+ // Look for a specified file
366
+ if ( file_exists( $file ) ) {
367
+
368
+ ob_start();
369
+ include $file;
370
+ $template = ob_get_contents();
371
+ ob_end_clean();
372
+
373
+ }
374
+
375
+ return isset( $template ) ? $template : '';
376
+
377
+ }
378
+
379
+
380
+ /**
381
+ * Utility function to display specified template by it's name.
382
+ *
383
+ * @since 5.0.0
384
+ * @param string $name Template name (without extension).
385
+ * @param mixed $data Template data to be passed to the template.
386
+ */
387
+ public function the_template( $name, $data = null ) {
388
+ echo $this->get_template( $name, $data );
389
+ }
390
+
391
  }
admin/class-shortcodes-ultimate-notice-rate.php CHANGED
File without changes
admin/class-shortcodes-ultimate-notice.php CHANGED
File without changes
admin/css/admin.css CHANGED
@@ -1 +1,2 @@
1
- .su-admin-tabs{margin-bottom:22px}.su-admin-shortcodes .wp-filter{padding-left:20px}.su-admin-shortcodes-list-not-found{margin:0;padding:100px 0;text-align:center;color:#666;font-size:18px;font-style:normal}.su-admin-shortcodes-list-item{float:left;width:150px;margin:0 22px 22px 0;text-decoration:none;}.su-admin-shortcodes-list-item-image{display:block;width:120px;height:120px;padding:15px;background:#fff;transition:box-shadow .2s ease}.su-admin-shortcodes-list-item:hover .su-admin-shortcodes-list-item-image{box-shadow:0 0 0 4px rgba(0,150,221,0.2),0 0 0 1px #0096dd}.su-admin-shortcodes-list-item-title{display:block;height:18px;margin:8px 0;line-height:18px;overflow:hidden;text-align:center;text-transform:capitalize}.su-admin-shortcodes-single{padding-top:20px;}.su-admin-shortcodes-single-section{max-width:840px;margin-bottom:30px}.su-admin-shortcodes-single-back span{font-size:1.25em;margin-right:.3em;vertical-align:middle}.su-admin-shortcodes-single-description{overflow:hidden;}.su-admin-shortcodes-single-description > span{float:left;display:block;width:60px;height:60px;margin:0 1.3em 0 0;padding:10px;background:#fff}.su-admin-shortcodes-single-description h2{height:20px;margin:5px 0 10px;font-size:1.3em;line-height:20px}.su-admin-shortcodes-single-description p{display:block;height:40px;margin:0;overflow:hidden;font-size:13px;line-height:20px}.su-admin-shortcodes-single-preview-content{background:#fff;padding:2em;}.su-admin-shortcodes-single-preview-content :first-child{margin-top:0 !important}.su-admin-shortcodes-single-preview-content :last-child{margin-bottom:0 !important}.su-admin-shortcodes-single-preview .su-column{outline:1px dotted #ccc}.su-admin-shortcodes-single-code pre code{display:block;padding:1em}.su-admin-shortcodes-single-options-table + .su-admin-shortcodes-single-options-table{margin-top:20px}.su-admin-addons-list{padding-top:12px}.su-admin-addons-item{float:left;width:280px;margin:0 22px 22px 0;background:#fff;background:linear-gradient(to bottom,#f5f5f5,#fff 20%,#fff 80%,#f5f5f5);overflow:hidden;border-radius:5px;text-decoration:none;box-shadow:0 1px 2px rgba(0,0,0,0.1);transition:all .2s ease;}.su-admin-addons-item:hover{box-shadow:0 0 12px rgba(0,0,0,0.15);transform:scale(1.03)}.su-admin-addons-item-image{display:block;width:280px;height:120px;margin:0;padding:0;border:none;border-top-right-radius:4px;border-top-left-radius:4px}.su-admin-addons-item-info,.su-admin-addons-item-title,.su-admin-addons-item-description{display:block}.su-admin-addons-item-info{padding:20px}.su-admin-addons-item-title{height:16px;margin-bottom:16px;line-height:16px;font-size:16px;color:#0073aa}.su-admin-addons-item-description{height:60px;margin-bottom:16px;line-height:20px;overflow:hidden;font-size:12px;color:#777}.su-admin-addons-item-button{font-size:12px}
 
1
+ .su-admin-tabs{margin-bottom:22px}.su-admin-shortcodes .wp-filter{padding-left:20px}.su-admin-shortcodes-list-not-found{margin:0;padding:100px 0;text-align:center;color:#666;font-size:18px;font-style:normal}.su-admin-shortcodes-list-item{float:left;width:150px;margin:0 22px 22px 0;text-decoration:none}.su-admin-shortcodes-list-item-image{display:block;width:120px;height:120px;padding:15px;background:#fff;-webkit-transition:-webkit-box-shadow .2s ease;transition:-webkit-box-shadow .2s ease;transition:box-shadow .2s ease;transition:box-shadow .2s ease, -webkit-box-shadow .2s ease}.su-admin-shortcodes-list-item:hover .su-admin-shortcodes-list-item-image{-webkit-box-shadow:0 0 0 4px rgba(0,150,221,0.2),0 0 0 1px #0096dd;box-shadow:0 0 0 4px rgba(0,150,221,0.2),0 0 0 1px #0096dd}.su-admin-shortcodes-list-item-title{display:block;height:18px;margin:8px 0;line-height:18px;overflow:hidden;text-align:center;text-transform:capitalize}.su-admin-shortcodes-single{padding-top:20px}.su-admin-shortcodes-single-section{max-width:840px;margin-bottom:30px}.su-admin-shortcodes-single-back span{font-size:1.25em;margin-right:.3em;vertical-align:middle}.su-admin-shortcodes-single-description{overflow:hidden}.su-admin-shortcodes-single-description>span{float:left;display:block;width:60px;height:60px;margin:0 1.3em 0 0;padding:10px;background:#fff}.su-admin-shortcodes-single-description h2{height:20px;margin:5px 0 10px;font-size:1.3em;line-height:20px}.su-admin-shortcodes-single-description p{display:block;height:40px;margin:0;overflow:hidden;font-size:13px;line-height:20px}.su-admin-shortcodes-single-preview-content{background:#fff;padding:2em}.su-admin-shortcodes-single-preview-content :first-child{margin-top:0 !important}.su-admin-shortcodes-single-preview-content :last-child{margin-bottom:0 !important}.su-admin-shortcodes-single-preview .su-column{outline:1px dotted #ccc}.su-admin-shortcodes-single-code pre code{display:block;padding:1em}.su-admin-shortcodes-single-options-table+.su-admin-shortcodes-single-options-table{margin-top:20px}.su-admin-addons-list{padding-top:12px}.su-admin-addons-item{float:left;width:280px;margin:0 22px 22px 0;background:#fff;background:-webkit-gradient(linear, left top, left bottom, from(#f5f5f5), color-stop(20%, #fff), color-stop(80%, #fff), to(#f5f5f5));background:linear-gradient(to bottom, #f5f5f5, #fff 20%, #fff 80%, #f5f5f5);overflow:hidden;border-radius:5px;text-decoration:none;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.1);box-shadow:0 1px 2px rgba(0,0,0,0.1);-webkit-transition:all .2s ease;transition:all .2s ease}.su-admin-addons-item:hover{-webkit-box-shadow:0 0 12px rgba(0,0,0,0.15);box-shadow:0 0 12px rgba(0,0,0,0.15);-webkit-transform:scale(1.03);transform:scale(1.03)}.su-admin-addons-item-image{display:block;width:280px;height:120px;margin:0;padding:0;border:none;border-top-right-radius:4px;border-top-left-radius:4px}.su-admin-addons-item-info,.su-admin-addons-item-title,.su-admin-addons-item-description{display:block}.su-admin-addons-item-info{padding:20px}.su-admin-addons-item-title{height:16px;margin-bottom:16px;line-height:16px;font-size:16px;color:#0073aa}.su-admin-addons-item-description{height:60px;margin-bottom:16px;line-height:20px;overflow:hidden;font-size:12px;color:#777}.su-admin-addons-item-button{font-size:12px}
2
+ /*# sourceMappingURL=admin.css.map */
admin/css/admin.css.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"sources":["../scss/admin.scss"],"names":[],"mappings":"AAYA,eACC,kBAAmB,CACnB,gCAUC,iBAAkB,CAClB,oCAKC,SACA,gBACA,kBACA,WACA,eACA,iBAAkB,CAClB,+BAGA,WACA,YACA,qBACA,oBAAqB,CAErB,qCACC,cACA,YACA,aACA,aACA,gBACA,+CAA+B,AAA/B,uCAA+B,AAA/B,+BAA+B,AAA/B,2DAA+B,CAZjC,0EAgBE,mEAjDyB,AAiDzB,0DAjDyB,CAkDzB,qCAGA,cACA,YACA,aACA,iBACA,gBACA,kBACA,yBAA0B,CAC1B,4BAOF,gBAAiB,CAEjB,oCACC,gBACA,kBAAmB,CACnB,sCAGA,iBACA,kBACA,qBAAsB,CACtB,wCAGA,eAAgB,CADjB,6CAIE,WACA,cACA,WACA,YACA,mBACA,aACA,eAAgB,CAVlB,2CAcE,YACA,kBACA,gBACA,gBAAiB,CAjBnB,0CAqBE,cACA,YACA,SACA,gBACA,eACA,gBAAiB,CACjB,4CAOA,gBACA,WAAY,CAFb,yDAKE,uBAAwB,CAL1B,wDASE,0BAA2B,CAX9B,+CAiBE,uBAAwB,CACxB,0CAKD,cACA,WAAY,CACZ,oFAGA,eAAgB,CAChB,sBAcD,gBAAiB,CACjB,sBAGA,WACA,YACA,qBACA,gBACA,qIACA,AADA,4EACA,gBACA,kBACA,qBACA,6CACA,AADA,qCACA,gCAAwB,AAAxB,uBAAwB,CAVzB,4BAaE,6CACA,AADA,qCACA,8BAAsB,AAAtB,qBAAsB,CACtB,4BAGA,cACA,YACA,aACA,SACA,UACA,YACA,4BACA,0BAA2B,CAC3B,yFAKA,aAAc,CACd,2BAGA,YAAa,CACb,4BAGA,YACA,mBACA,iBACA,eACA,aAAc,CACd,kCAGA,YACA,mBACA,iBACA,gBACA,eACA,UAAW,CACX,6BAGA,cAAe,CACf","file":"admin.css"}
admin/images/shortcodes/_default.svg CHANGED
@@ -1 +1 @@
1
- <svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.41421" viewBox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"><g fill="#e0e5e6"><path d="m78 100h32v7h-32z"/><path d="m103 20h7v80h-7z"/><path d="m78 13h32v7h-32z"/><path d="m10 100h32v7h-32z"/><path d="m10 20h7v80h-7z"/><path d="m10 13h32v7h-32z"/></g></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414" clip-rule="evenodd" viewBox="0 0 120 120"><path fill="#e0e5e6" d="M78 100h32v7H78zm25-80h7v80h-7zm-25-7h32v7H78zm-68 87h32v7H10zm0-80h7v80h-7zm0-7h32v7H10z"/></svg>
admin/images/shortcodes/accordion.svg CHANGED
File without changes
admin/images/shortcodes/animate.svg CHANGED
File without changes
admin/images/shortcodes/audio.svg CHANGED
File without changes
admin/images/shortcodes/box.svg CHANGED
File without changes
admin/images/shortcodes/button.svg CHANGED
File without changes
admin/images/shortcodes/carousel.svg CHANGED
File without changes
admin/images/shortcodes/custom_gallery.svg CHANGED
File without changes
admin/images/shortcodes/dailymotion.svg CHANGED
File without changes
admin/images/shortcodes/divider.svg CHANGED
File without changes
admin/images/shortcodes/document.svg CHANGED
File without changes
admin/images/shortcodes/dropcap.svg CHANGED
File without changes
admin/images/shortcodes/dummy_image.svg CHANGED
File without changes
admin/images/shortcodes/dummy_text.svg CHANGED
File without changes
admin/images/shortcodes/expand.svg CHANGED
File without changes
admin/images/shortcodes/feed.svg CHANGED
File without changes
admin/images/shortcodes/gmap.svg CHANGED
File without changes
admin/images/shortcodes/guests.svg CHANGED
File without changes
admin/images/shortcodes/heading.svg CHANGED
File without changes
admin/images/shortcodes/highlight.svg CHANGED
File without changes
admin/images/shortcodes/label.svg CHANGED
File without changes
admin/images/shortcodes/lightbox.svg CHANGED
File without changes
admin/images/shortcodes/lightbox_content.svg CHANGED
File without changes
admin/images/shortcodes/list.svg CHANGED
File without changes
admin/images/shortcodes/members.svg CHANGED
File without changes
admin/images/shortcodes/menu.svg CHANGED
File without changes
admin/images/shortcodes/meta.svg CHANGED
File without changes
admin/images/shortcodes/note.svg CHANGED
File without changes
admin/images/shortcodes/permalink.svg CHANGED
File without changes
admin/images/shortcodes/post.svg CHANGED
File without changes
admin/images/shortcodes/posts.svg CHANGED
File without changes
admin/images/shortcodes/private.svg CHANGED
File without changes
admin/images/shortcodes/pullquote.svg CHANGED
File without changes
admin/images/shortcodes/qrcode.svg CHANGED
File without changes
admin/images/shortcodes/quote.svg CHANGED
File without changes
admin/images/shortcodes/row.svg CHANGED
File without changes
admin/images/shortcodes/scheduler.svg CHANGED
File without changes
admin/images/shortcodes/service.svg CHANGED
File without changes
admin/images/shortcodes/siblings.svg CHANGED
File without changes
admin/images/shortcodes/slider.svg CHANGED
File without changes
admin/images/shortcodes/spacer.svg CHANGED
File without changes
admin/images/shortcodes/spoiler.svg CHANGED
File without changes
admin/images/shortcodes/subpages.svg CHANGED
File without changes
admin/images/shortcodes/table.svg CHANGED
File without changes
admin/images/shortcodes/tabs.svg CHANGED
File without changes
admin/images/shortcodes/template.svg CHANGED
File without changes
admin/images/shortcodes/tooltip.svg CHANGED
File without changes
admin/images/shortcodes/user.svg CHANGED
File without changes
admin/images/shortcodes/video.svg CHANGED
File without changes
admin/images/shortcodes/vimeo.svg CHANGED
File without changes
admin/images/shortcodes/youtube.svg CHANGED
File without changes
admin/images/shortcodes/youtube_advanced.svg CHANGED
File without changes
admin/partials/help/addons.php CHANGED
File without changes
admin/partials/help/settings.php CHANGED
File without changes
admin/partials/help/shortcodes.php CHANGED
File without changes
admin/partials/help/sidebar.php CHANGED
File without changes
admin/partials/notices/rate.php CHANGED
File without changes
admin/partials/pages/addons.php CHANGED
File without changes
admin/partials/pages/settings.php CHANGED
File without changes
admin/partials/pages/shortcodes-list.php CHANGED
File without changes
admin/partials/pages/shortcodes-single.php CHANGED
File without changes
admin/partials/pages/shortcodes.php CHANGED
@@ -3,9 +3,9 @@
3
  <div id="su_admin_shortcodes" class="wrap su-admin-shortcodes">
4
 
5
  <?php if ( ! $this->is_single_shortcode_page() ) : ?>
6
- <?php $this->the_template( 'pages/shortcodes-list' ); ?>
7
  <?php else : ?>
8
- <?php $this->the_template( 'pages/shortcodes-single' ); ?>
9
  <?php endif; ?>
10
 
11
  </div>
3
  <div id="su_admin_shortcodes" class="wrap su-admin-shortcodes">
4
 
5
  <?php if ( ! $this->is_single_shortcode_page() ) : ?>
6
+ <?php $this->the_template( 'admin/partials/pages/shortcodes-list' ); ?>
7
  <?php else : ?>
8
+ <?php $this->the_template( 'admin/partials/pages/shortcodes-single' ); ?>
9
  <?php endif; ?>
10
 
11
  </div>
admin/partials/settings/fields/checkbox.php CHANGED
File without changes
admin/partials/settings/fields/css.php CHANGED
@@ -15,5 +15,5 @@
15
 
16
  <ul class="ul-disc">
17
  <li><?php _e( 'See help tab at the top right corner of this page for more information.', 'shortcodes-ultimate' ); ?></li>
18
- <li><?php printf( __( 'Open %s file to see default styles.', 'shortcodes-ultimate' ), '<a href="' . $this->get_plugin_url() . 'public/css/shortcodes.css" target="_blank">shortcodes.css</a>' ); ?></li>
19
  </ul>
15
 
16
  <ul class="ul-disc">
17
  <li><?php _e( 'See help tab at the top right corner of this page for more information.', 'shortcodes-ultimate' ); ?></li>
18
+ <li><?php printf( __( 'Open %s file to see default styles.', 'shortcodes-ultimate' ), '<a href="' . $this->plugin_url . 'public/css/shortcodes.css" target="_blank">shortcodes.css</a>' ); ?></li>
19
  </ul>
admin/partials/settings/fields/text.php CHANGED
File without changes
admin/partials/settings/sections/general.php CHANGED
File without changes
admin/partials/tabs.php CHANGED
File without changes
admin/scss/admin.scss ADDED
@@ -0,0 +1,224 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // ==================================================================
2
+ // Variables
3
+ // ==================================================================
4
+
5
+ $color-wp-link: #0073aa;
6
+ $color-wp-link-hover: #0096dd;
7
+
8
+
9
+ // ==================================================================
10
+ // Admin pages tabs
11
+ // ==================================================================
12
+
13
+ .su-admin-tabs {
14
+ margin-bottom: 22px;
15
+ }
16
+
17
+
18
+ // ==================================================================
19
+ // Available shortcodes screen
20
+ // ==================================================================
21
+
22
+ .su-admin-shortcodes {
23
+
24
+ .wp-filter {
25
+ padding-left: 20px;
26
+ }
27
+
28
+ &-list {
29
+
30
+ &-not-found {
31
+ margin: 0;
32
+ padding: 100px 0;
33
+ text-align: center;
34
+ color: #666;
35
+ font-size: 18px;
36
+ font-style: normal;
37
+ }
38
+
39
+ &-item {
40
+ float: left;
41
+ width: 150px;
42
+ margin: 0 22px 22px 0;
43
+ text-decoration: none;
44
+
45
+ &-image {
46
+ display: block;
47
+ width: 120px;
48
+ height: 120px;
49
+ padding: 15px;
50
+ background: #fff;
51
+ transition: box-shadow .2s ease;
52
+ }
53
+
54
+ &:hover .su-admin-shortcodes-list-item-image {
55
+ box-shadow: 0 0 0 4px rgba($color-wp-link-hover, .2), 0 0 0 1px $color-wp-link-hover;
56
+ }
57
+
58
+ &-title {
59
+ display: block;
60
+ height: 18px;
61
+ margin: 8px 0;
62
+ line-height: 18px;
63
+ overflow: hidden;
64
+ text-align: center;
65
+ text-transform: capitalize;
66
+ }
67
+
68
+ }
69
+
70
+ }
71
+
72
+ &-single {
73
+ padding-top: 20px;
74
+
75
+ &-section {
76
+ max-width: 840px;
77
+ margin-bottom: 30px;
78
+ }
79
+
80
+ &-back span {
81
+ font-size: 1.25em;
82
+ margin-right: .3em;
83
+ vertical-align: middle;
84
+ }
85
+
86
+ &-description {
87
+ overflow: hidden;
88
+
89
+ & > span {
90
+ float: left;
91
+ display: block;
92
+ width: 60px;
93
+ height: 60px;
94
+ margin: 0 1.3em 0 0;
95
+ padding: 10px;
96
+ background: #fff;
97
+ }
98
+
99
+ h2 {
100
+ height: 20px;
101
+ margin: 5px 0 10px;
102
+ font-size: 1.3em;
103
+ line-height: 20px;
104
+ }
105
+
106
+ p {
107
+ display: block;
108
+ height: 40px;
109
+ margin: 0;
110
+ overflow: hidden;
111
+ font-size: 13px;
112
+ line-height: 20px;
113
+ }
114
+
115
+ }
116
+
117
+ &-preview {
118
+
119
+ &-content {
120
+ background: #fff;
121
+ padding: 2em;
122
+
123
+ & :first-child {
124
+ margin-top: 0 !important;
125
+ }
126
+
127
+ & :last-child {
128
+ margin-bottom: 0 !important;
129
+ }
130
+
131
+ }
132
+
133
+ .su-column {
134
+ outline: 1px dotted #ccc;
135
+ }
136
+
137
+ }
138
+
139
+ &-code pre code {
140
+ display: block;
141
+ padding: 1em;
142
+ }
143
+
144
+ &-options-table + &-options-table {
145
+ margin-top: 20px;
146
+ }
147
+
148
+ }
149
+
150
+ }
151
+
152
+
153
+ // ==================================================================
154
+ // Add-ons screen
155
+ // ==================================================================
156
+
157
+ .su-admin-addons {
158
+
159
+ &-list {
160
+ padding-top: 12px;
161
+ }
162
+
163
+ &-item {
164
+ float: left;
165
+ width: 280px;
166
+ margin: 0 22px 22px 0;
167
+ background: #fff;
168
+ background: linear-gradient(to bottom, #f5f5f5, #fff 20%, #fff 80%, #f5f5f5);
169
+ overflow: hidden;
170
+ border-radius: 5px;
171
+ text-decoration: none;
172
+ box-shadow: 0 1px 2px rgba(0, 0, 0, .1);
173
+ transition: all .2s ease;
174
+
175
+ &:hover {
176
+ box-shadow: 0 0 12px rgba(0, 0, 0, .15);
177
+ transform: scale(1.03);
178
+ }
179
+
180
+ &-image {
181
+ display: block;
182
+ width: 280px;
183
+ height: 120px;
184
+ margin: 0;
185
+ padding: 0;
186
+ border: none;
187
+ border-top-right-radius: 4px;
188
+ border-top-left-radius: 4px;
189
+ }
190
+
191
+ &-info,
192
+ &-title,
193
+ &-description {
194
+ display: block;
195
+ }
196
+
197
+ &-info {
198
+ padding: 20px;
199
+ }
200
+
201
+ &-title {
202
+ height: 16px;
203
+ margin-bottom: 16px;
204
+ line-height: 16px;
205
+ font-size: 16px;
206
+ color: #0073aa;
207
+ }
208
+
209
+ &-description {
210
+ height: 60px;
211
+ margin-bottom: 16px;
212
+ line-height: 20px;
213
+ overflow: hidden;
214
+ font-size: 12px;
215
+ color: #777;
216
+ }
217
+
218
+ &-button {
219
+ font-size: 12px;
220
+ }
221
+
222
+ }
223
+
224
+ }
admin/stylus/admin.styl DELETED
@@ -1,186 +0,0 @@
1
- // ==================================================================
2
- // Variables
3
- // ==================================================================
4
-
5
- color-wp-link = #0073aa
6
- color-wp-link-hover = #0096dd
7
-
8
-
9
- // ==================================================================
10
- // Admin pages tabs
11
- // ==================================================================
12
-
13
- .su-admin-tabs
14
- margin-bottom 22px
15
-
16
-
17
- // ==================================================================
18
- // Available shortcodes screen
19
- // ==================================================================
20
-
21
- .su-admin-shortcodes
22
-
23
- .wp-filter
24
- padding-left 20px
25
-
26
- &-list
27
-
28
- &-not-found
29
- margin 0
30
- padding 100px 0
31
- text-align center
32
- color #666
33
- font-size 18px
34
- font-style normal
35
-
36
- &-item
37
- float left
38
- width 150px
39
- margin 0 22px 22px 0
40
- text-decoration none
41
-
42
- &-image
43
- display block
44
- width 120px
45
- height 120px
46
- padding 15px
47
- background white
48
- transition box-shadow .2s ease
49
-
50
- &:hover
51
- .su-admin-shortcodes-list-item-image
52
- box-shadow 0 0 0 4px rgba(color-wp-link-hover, 20%), 0 0 0 1px color-wp-link-hover
53
-
54
- &-title
55
- display block
56
- height 18px
57
- margin 8px 0
58
- line-height 18px
59
- overflow hidden
60
- text-align center
61
- text-transform capitalize
62
-
63
- &-single
64
- padding-top 20px
65
-
66
- &-section
67
- max-width 840px
68
- margin-bottom 30px
69
-
70
- &-back span
71
- font-size 1.25em
72
- margin-right .3em
73
- vertical-align middle
74
-
75
- &-description
76
- overflow hidden
77
-
78
- > span
79
- float left
80
- display block
81
- width 60px
82
- height 60px
83
- margin 0 1.3em 0 0
84
- padding 10px
85
- background white
86
-
87
- h2
88
- height 20px
89
- margin 5px 0 10px
90
- font-size 1.3em
91
- line-height 20px
92
-
93
- p
94
- display block
95
- height 40px
96
- margin 0
97
- overflow hidden
98
- font-size 13px
99
- line-height 20px
100
-
101
- &-preview
102
-
103
- &-content
104
- background white
105
- padding 2em
106
-
107
- & :first-child
108
- margin-top 0 !important
109
- & :last-child
110
- margin-bottom 0 !important
111
-
112
- .su-column
113
- outline 1px dotted #ccc
114
-
115
- &-code
116
-
117
- pre code
118
- display block
119
- padding 1em
120
-
121
- &-options
122
- &-table + &-table
123
- margin-top 20px
124
-
125
-
126
- // ==================================================================
127
- // Add-ons screen
128
- // ==================================================================
129
-
130
- .su-admin-addons
131
-
132
- &-list
133
- padding-top 12px
134
-
135
- &-item
136
- float left
137
- width 280px
138
- margin 0 22px 22px 0
139
- background white
140
- background linear-gradient(to bottom, #f5f5f5, white 20%, white 80%, #f5f5f5)
141
- overflow hidden
142
- border-radius 5px
143
- text-decoration none
144
- box-shadow 0 1px 2px rgba(0, 0, 0, .1)
145
- transition all .2s ease
146
-
147
- &:hover
148
- box-shadow 0 0 12px rgba(0, 0, 0, .15)
149
- transform scale(1.03)
150
-
151
- &-image
152
- display block
153
- width 280px
154
- height 120px
155
- margin 0
156
- padding 0
157
- border none
158
- border-top-right-radius 4px
159
- border-top-left-radius 4px
160
-
161
- &-info
162
- &-title
163
- &-description
164
- display block
165
-
166
- &-info
167
- padding 20px
168
-
169
- &-title
170
- height 16px
171
- margin-bottom 16px
172
- line-height 16px
173
- font-size 16px
174
- color #0073aa
175
-
176
- &-description
177
- height 60px
178
- margin-bottom 16px
179
- line-height 20px
180
- overflow hidden
181
- font-size 12px
182
- color #777
183
-
184
- &-button
185
- font-size 12px
186
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/css/animate.css CHANGED
File without changes
assets/css/box-shortcodes.css CHANGED
File without changes
assets/css/cheatsheet.css CHANGED
File without changes
assets/css/content-shortcodes.css CHANGED
File without changes
assets/css/galleries-shortcodes.css CHANGED
File without changes
assets/css/generator.css CHANGED
File without changes
assets/css/magnific-popup.css CHANGED
File without changes
assets/css/media-shortcodes.css CHANGED
File without changes
assets/css/options-page.css CHANGED
File without changes
assets/css/other-shortcodes.css CHANGED
File without changes
assets/css/players-shortcodes.css CHANGED
File without changes
assets/css/qtip.css CHANGED
File without changes
assets/css/rtl-admin.css CHANGED
File without changes
assets/css/rtl-shortcodes.css CHANGED
File without changes
assets/css/simpleslider.css CHANGED
File without changes
assets/css/sunrise.css CHANGED
File without changes
assets/css/tinymce.css CHANGED
File without changes
assets/images/grabbing.png CHANGED
File without changes
assets/images/icon.png CHANGED
File without changes
assets/images/loading.gif CHANGED
File without changes
assets/images/player/button.png CHANGED
File without changes
assets/images/player/default-start.png CHANGED
File without changes
assets/images/player/default.png CHANGED
File without changes
assets/images/player/metro-start.png CHANGED
File without changes
assets/images/player/metro.png CHANGED
File without changes
assets/images/player/minimal.png CHANGED
File without changes
assets/images/quote.png CHANGED
File without changes
assets/images/search.png CHANGED
File without changes
assets/images/service.png CHANGED
File without changes
assets/images/spinner.gif CHANGED
File without changes
assets/images/spoiler.png CHANGED
File without changes
assets/images/styles/style-bubbles.png CHANGED
File without changes
assets/images/styles/style-glass.png CHANGED
File without changes
assets/images/styles/style-noise.png CHANGED
File without changes
assets/images/styles/style-soft.png CHANGED
File without changes
assets/images/swiper/default.png CHANGED
File without changes
assets/images/swiper/loading.gif CHANGED
File without changes
assets/js/chart.js CHANGED
File without changes
assets/js/form.js CHANGED
File without changes
assets/js/galleries-shortcodes.js CHANGED
File without changes
assets/js/generator.js CHANGED
File without changes
assets/js/jplayer.js CHANGED
File without changes
assets/js/jquery.inview.js CHANGED
File without changes
assets/js/jsrender.js CHANGED
File without changes
assets/js/magnific-popup.js CHANGED
File without changes
assets/js/options-page.js CHANGED
File without changes
assets/js/other-shortcodes.js CHANGED
@@ -13,7 +13,6 @@ jQuery(document).ready(function($) {
13
  if ($(window).scrollTop() > $title.offset().top) $(window).scrollTop($title.offset().top - $title.height() - bar);
14
  e.preventDefault();
15
  });
16
- $('.su-spoiler-content').removeAttr('style');
17
  // Tabs
18
  $('body:not(.su-other-shortcodes-loaded)').on('click', '.su-tabs-nav span', function(e) {
19
  var $tab = $(this),
13
  if ($(window).scrollTop() > $title.offset().top) $(window).scrollTop($title.offset().top - $title.height() - bar);
14
  e.preventDefault();
15
  });
 
16
  // Tabs
17
  $('body:not(.su-other-shortcodes-loaded)').on('click', '.su-tabs-nav span', function(e) {
18
  var $tab = $(this),
assets/js/players-shortcodes.js CHANGED
File without changes
assets/js/qtip.js CHANGED
File without changes
assets/js/simpleslider.js CHANGED
File without changes
assets/js/sunrise.js CHANGED
File without changes
assets/js/swiper.js CHANGED
File without changes
assets/js/tinymce.js CHANGED
File without changes
assets/other/Jplayer.swf CHANGED
File without changes
inc/core/assets.php CHANGED
@@ -251,7 +251,6 @@ class Su_Assets {
251
  * Helper to get full URL of a skin file
252
  */
253
  public static function skin_url( $file = '' ) {
254
- $shult = shortcodes_ultimate();
255
  $skin = get_option( 'su_option_skin' );
256
  $uploads = wp_upload_dir(); $uploads = $uploads['baseurl'];
257
  // Prepare url to skin directory
251
  * Helper to get full URL of a skin file
252
  */
253
  public static function skin_url( $file = '' ) {
 
254
  $skin = get_option( 'su_option_skin' );
255
  $uploads = wp_upload_dir(); $uploads = $uploads['baseurl'];
256
  // Prepare url to skin directory
inc/core/counters.php CHANGED
File without changes
inc/core/data.php CHANGED
@@ -43,7 +43,7 @@ class Su_Data {
43
  * Font-Awesome icons
44
  */
45
  public static function icons() {
46
- return apply_filters( 'su/data/icons', array( 'address-book', 'address-book-o', 'address-card', 'address-card-o', 'bandcamp', 'bath', 'bathtub', 'drivers-license', 'drivers-license-o', 'eercast', 'envelope-open', 'envelope-open-o', 'etsy', 'free-code-camp', 'grav', 'handshake-o', 'id-badge', 'id-card', 'id-card-o', 'imdb', 'linode', 'meetup', 'microchip', 'podcast', 'quora', 'ravelry', 's15', 'shower', 'snowflake-o', 'superpowers', 'telegram', 'thermometer', 'thermometer-0', 'thermometer-1', 'thermometer-2', 'thermometer-3', 'thermometer-4', 'thermometer-empty', 'thermometer-full', 'thermometer-half', 'thermometer-quarter', 'thermometer-three-quarters', 'times-rectangle', 'times-rectangle-o', 'user-circle', 'user-circle-o', 'user-o', 'vcard', 'vcard-o', 'window-close', 'window-close-o', 'window-maximize', 'window-minimize', 'window-restore', 'wpexplorer', 'adjust', 'american-sign-language-interpreting', 'anchor', 'archive', 'area-chart', 'arrows', 'arrows-h', 'arrows-v', 'asl-interpreting', 'assistive-listening-systems', 'asterisk', 'at', 'audio-description', 'automobile', 'balance-scale', 'ban', 'bank', 'bar-chart', 'bar-chart-o', 'barcode', 'bars', 'battery', 'battery-0', 'battery-1', 'battery-2', 'battery-3', 'battery-4', 'battery-empty', 'battery-full', 'battery-half', 'battery-quarter', 'battery-three-quarters', 'bed', 'beer', 'bell', 'bell-o', 'bell-slash', 'bell-slash-o', 'bicycle', 'binoculars', 'birthday-cake', 'blind', 'bluetooth', 'bluetooth-b', 'bolt', 'bomb', 'book', 'bookmark', 'bookmark-o', 'braille', 'briefcase', 'bug', 'building', 'building-o', 'bullhorn', 'bullseye', 'bus', 'cab', 'calculator', 'calendar', 'calendar-check-o', 'calendar-minus-o', 'calendar-o', 'calendar-plus-o', 'calendar-times-o', 'camera', 'camera-retro', 'car', 'caret-square-o-down', 'caret-square-o-left', 'caret-square-o-right', 'caret-square-o-up', 'cart-arrow-down', 'cart-plus', 'cc', 'certificate', 'check', 'check-circle', 'check-circle-o', 'check-square', 'check-square-o', 'child', 'circle', 'circle-o', 'circle-o-notch', 'circle-thin', 'clock-o', 'clone', 'close', 'cloud', 'cloud-download', 'cloud-upload', 'code', 'code-fork', 'coffee', 'cog', 'cogs', 'comment', 'comment-o', 'commenting', 'commenting-o', 'comments', 'comments-o', 'compass', 'copyright', 'creative-commons', 'credit-card', 'credit-card-alt', 'crop', 'crosshairs', 'cube', 'cubes', 'cutlery', 'dashboard', 'database', 'deaf', 'deafness', 'desktop', 'diamond', 'dot-circle-o', 'download', 'edit', 'ellipsis-h', 'ellipsis-v', 'envelope', 'envelope-o', 'envelope-square', 'eraser', 'exchange', 'exclamation', 'exclamation-circle', 'exclamation-triangle', 'external-link', 'external-link-square', 'eye', 'eye-slash', 'eyedropper', 'fax', 'feed', 'female', 'fighter-jet', 'file-archive-o', 'file-audio-o', 'file-code-o', 'file-excel-o', 'file-image-o', 'file-movie-o', 'file-pdf-o', 'file-photo-o', 'file-picture-o', 'file-powerpoint-o', 'file-sound-o', 'file-video-o', 'file-word-o', 'file-zip-o', 'film', 'filter', 'fire', 'fire-extinguisher', 'flag', 'flag-checkered', 'flag-o', 'flash', 'flask', 'folder', 'folder-o', 'folder-open', 'folder-open-o', 'frown-o', 'futbol-o', 'gamepad', 'gavel', 'gear', 'gears', 'gift', 'glass', 'globe', 'graduation-cap', 'group', 'hand-grab-o', 'hand-lizard-o', 'hand-paper-o', 'hand-peace-o', 'hand-pointer-o', 'hand-rock-o', 'hand-scissors-o', 'hand-spock-o', 'hand-stop-o', 'hard-of-hearing', 'hashtag', 'hdd-o', 'headphones', 'heart', 'heart-o', 'heartbeat', 'history', 'home', 'hotel', 'hourglass', 'hourglass-1', 'hourglass-2', 'hourglass-3', 'hourglass-end', 'hourglass-half', 'hourglass-o', 'hourglass-start', 'i-cursor', 'image', 'inbox', 'industry', 'info', 'info-circle', 'institution', 'key', 'keyboard-o', 'language', 'laptop', 'leaf', 'legal', 'lemon-o', 'level-down', 'level-up', 'life-bouy', 'life-buoy', 'life-ring', 'life-saver', 'lightbulb-o', 'line-chart', 'location-arrow', 'lock', 'low-vision', 'magic', 'magnet', 'mail-forward', 'mail-reply', 'mail-reply-all', 'male', 'map', 'map-marker', 'map-o', 'map-pin', 'map-signs', 'meh-o', 'microphone', 'microphone-slash', 'minus', 'minus-circle', 'minus-square', 'minus-square-o', 'mobile', 'mobile-phone', 'money', 'moon-o', 'mortar-board', 'motorcycle', 'mouse-pointer', 'music', 'navicon', 'newspaper-o', 'object-group', 'object-ungroup', 'paint-brush', 'paper-plane', 'paper-plane-o', 'paw', 'pencil', 'pencil-square', 'pencil-square-o', 'percent', 'phone', 'phone-square', 'photo', 'picture-o', 'pie-chart', 'plane', 'plug', 'plus', 'plus-circle', 'plus-square', 'plus-square-o', 'power-off', 'print', 'puzzle-piece', 'qrcode', 'question', 'question-circle', 'question-circle-o', 'quote-left', 'quote-right', 'random', 'recycle', 'refresh', 'registered', 'remove', 'reorder', 'reply', 'reply-all', 'retweet', 'road', 'rocket', 'rss', 'rss-square', 'search', 'search-minus', 'search-plus', 'send', 'send-o', 'server', 'share', 'share-alt', 'share-alt-square', 'share-square', 'share-square-o', 'shield', 'ship', 'shopping-bag', 'shopping-basket', 'shopping-cart', 'sign-in', 'sign-language', 'sign-out', 'signal', 'signing', 'sitemap', 'sliders', 'smile-o', 'soccer-ball-o', 'sort', 'sort-alpha-asc', 'sort-alpha-desc', 'sort-amount-asc', 'sort-amount-desc', 'sort-asc', 'sort-desc', 'sort-down', 'sort-numeric-asc', 'sort-numeric-desc', 'sort-up', 'space-shuttle', 'spinner', 'spoon', 'square', 'square-o', 'star', 'star-half', 'star-half-empty', 'star-half-full', 'star-half-o', 'star-o', 'sticky-note', 'sticky-note-o', 'street-view', 'suitcase', 'sun-o', 'support', 'tablet', 'tachometer', 'tag', 'tags', 'tasks', 'taxi', 'television', 'terminal', 'thumb-tack', 'thumbs-down', 'thumbs-o-down', 'thumbs-o-up', 'thumbs-up', 'ticket', 'times', 'times-circle', 'times-circle-o', 'tint', 'toggle-down', 'toggle-left', 'toggle-off', 'toggle-on', 'toggle-right', 'toggle-up', 'trademark', 'trash', 'trash-o', 'tree', 'trophy', 'truck', 'tty', 'tv', 'umbrella', 'universal-access', 'university', 'unlock', 'unlock-alt', 'unsorted', 'upload', 'user', 'user-plus', 'user-secret', 'user-times', 'users', 'video-camera', 'volume-control-phone', 'volume-down', 'volume-off', 'volume-up', 'warning', 'wheelchair', 'wheelchair-alt', 'wifi', 'wrench', 'hand-o-down', 'hand-o-left', 'hand-o-right', 'hand-o-up', 'ambulance', 'subway', 'train', 'genderless', 'intersex', 'mars', 'mars-double', 'mars-stroke', 'mars-stroke-h', 'mars-stroke-v', 'mercury', 'neuter', 'transgender', 'transgender-alt', 'venus', 'venus-double', 'venus-mars', 'file', 'file-o', 'file-text', 'file-text-o' ) );
47
  }
48
 
49
  /**
43
  * Font-Awesome icons
44
  */
45
  public static function icons() {
46
+ return apply_filters( 'su/data/icons', array( 'address-book', 'address-book-o', 'address-card', 'address-card-o', 'bandcamp', 'bath', 'bathtub', 'drivers-license', 'drivers-license-o', 'eercast', 'envelope-open', 'envelope-open-o', 'etsy', 'free-code-camp', 'grav', 'handshake-o', 'id-badge', 'id-card', 'id-card-o', 'imdb', 'linode', 'meetup', 'microchip', 'podcast', 'quora', 'ravelry', 's15', 'shower', 'snowflake-o', 'superpowers', 'telegram', 'thermometer', 'thermometer-0', 'thermometer-1', 'thermometer-2', 'thermometer-3', 'thermometer-4', 'thermometer-empty', 'thermometer-full', 'thermometer-half', 'thermometer-quarter', 'thermometer-three-quarters', 'times-rectangle', 'times-rectangle-o', 'user-circle', 'user-circle-o', 'user-o', 'vcard', 'vcard-o', 'window-close', 'window-close-o', 'window-maximize', 'window-minimize', 'window-restore', 'wpexplorer', 'adjust', 'american-sign-language-interpreting', 'anchor', 'archive', 'area-chart', 'arrows', 'arrows-h', 'arrows-v', 'asl-interpreting', 'assistive-listening-systems', 'asterisk', 'at', 'audio-description', 'automobile', 'balance-scale', 'ban', 'bank', 'bar-chart', 'bar-chart-o', 'barcode', 'bars', 'battery', 'battery-0', 'battery-1', 'battery-2', 'battery-3', 'battery-4', 'battery-empty', 'battery-full', 'battery-half', 'battery-quarter', 'battery-three-quarters', 'bed', 'beer', 'bell', 'bell-o', 'bell-slash', 'bell-slash-o', 'bicycle', 'binoculars', 'birthday-cake', 'blind', 'bluetooth', 'bluetooth-b', 'bolt', 'bomb', 'book', 'bookmark', 'bookmark-o', 'braille', 'briefcase', 'bug', 'building', 'building-o', 'bullhorn', 'bullseye', 'bus', 'cab', 'calculator', 'calendar', 'calendar-check-o', 'calendar-minus-o', 'calendar-o', 'calendar-plus-o', 'calendar-times-o', 'camera', 'camera-retro', 'car', 'caret-square-o-down', 'caret-square-o-left', 'caret-square-o-right', 'caret-square-o-up', 'cart-arrow-down', 'cart-plus', 'cc', 'certificate', 'check', 'check-circle', 'check-circle-o', 'check-square', 'check-square-o', 'child', 'circle', 'circle-o', 'circle-o-notch', 'circle-thin', 'clock-o', 'clone', 'close', 'cloud', 'cloud-download', 'cloud-upload', 'code', 'code-fork', 'coffee', 'cog', 'cogs', 'comment', 'comment-o', 'commenting', 'commenting-o', 'comments', 'comments-o', 'compass', 'copyright', 'creative-commons', 'credit-card', 'credit-card-alt', 'crop', 'crosshairs', 'cube', 'cubes', 'cutlery', 'dashboard', 'database', 'deaf', 'deafness', 'desktop', 'diamond', 'dot-circle-o', 'download', 'edit', 'ellipsis-h', 'ellipsis-v', 'envelope', 'envelope-o', 'envelope-square', 'eraser', 'exchange', 'exclamation', 'exclamation-circle', 'exclamation-triangle', 'external-link', 'external-link-square', 'eye', 'eye-slash', 'eyedropper', 'fax', 'feed', 'female', 'fighter-jet', 'file-archive-o', 'file-audio-o', 'file-code-o', 'file-excel-o', 'file-image-o', 'file-movie-o', 'file-pdf-o', 'file-photo-o', 'file-picture-o', 'file-powerpoint-o', 'file-sound-o', 'file-video-o', 'file-word-o', 'file-zip-o', 'film', 'filter', 'fire', 'fire-extinguisher', 'flag', 'flag-checkered', 'flag-o', 'flash', 'flask', 'folder', 'folder-o', 'folder-open', 'folder-open-o', 'frown-o', 'futbol-o', 'gamepad', 'gavel', 'gear', 'gears', 'gift', 'glass', 'globe', 'graduation-cap', 'group', 'hand-grab-o', 'hand-lizard-o', 'hand-paper-o', 'hand-peace-o', 'hand-pointer-o', 'hand-rock-o', 'hand-scissors-o', 'hand-spock-o', 'hand-stop-o', 'hard-of-hearing', 'hashtag', 'hdd-o', 'headphones', 'heart', 'heart-o', 'heartbeat', 'history', 'home', 'hotel', 'hourglass', 'hourglass-1', 'hourglass-2', 'hourglass-3', 'hourglass-end', 'hourglass-half', 'hourglass-o', 'hourglass-start', 'i-cursor', 'image', 'inbox', 'industry', 'info', 'info-circle', 'institution', 'key', 'keyboard-o', 'language', 'laptop', 'leaf', 'legal', 'lemon-o', 'level-down', 'level-up', 'life-bouy', 'life-buoy', 'life-ring', 'life-saver', 'lightbulb-o', 'line-chart', 'location-arrow', 'lock', 'low-vision', 'magic', 'magnet', 'mail-forward', 'mail-reply', 'mail-reply-all', 'male', 'map', 'map-marker', 'map-o', 'map-pin', 'map-signs', 'meh-o', 'microphone', 'microphone-slash', 'minus', 'minus-circle', 'minus-square', 'minus-square-o', 'mobile', 'mobile-phone', 'money', 'moon-o', 'mortar-board', 'motorcycle', 'mouse-pointer', 'music', 'navicon', 'newspaper-o', 'object-group', 'object-ungroup', 'paint-brush', 'paper-plane', 'paper-plane-o', 'paw', 'pencil', 'pencil-square', 'pencil-square-o', 'percent', 'phone', 'phone-square', 'photo', 'picture-o', 'pie-chart', 'plane', 'plug', 'plus', 'plus-circle', 'plus-square', 'plus-square-o', 'power-off', 'print', 'puzzle-piece', 'qrcode', 'question', 'question-circle', 'question-circle-o', 'quote-left', 'quote-right', 'random', 'recycle', 'refresh', 'registered', 'remove', 'reorder', 'reply', 'reply-all', 'retweet', 'road', 'rocket', 'rss', 'rss-square', 'search', 'search-minus', 'search-plus', 'send', 'send-o', 'server', 'share', 'share-alt', 'share-alt-square', 'share-square', 'share-square-o', 'shield', 'ship', 'shopping-bag', 'shopping-basket', 'shopping-cart', 'sign-in', 'sign-language', 'sign-out', 'signal', 'signing', 'sitemap', 'sliders', 'smile-o', 'soccer-ball-o', 'sort', 'sort-alpha-asc', 'sort-alpha-desc', 'sort-amount-asc', 'sort-amount-desc', 'sort-asc', 'sort-desc', 'sort-down', 'sort-numeric-asc', 'sort-numeric-desc', 'sort-up', 'space-shuttle', 'spinner', 'spoon', 'square', 'square-o', 'star', 'star-half', 'star-half-empty', 'star-half-full', 'star-half-o', 'star-o', 'sticky-note', 'sticky-note-o', 'street-view', 'suitcase', 'sun-o', 'support', 'tablet', 'tachometer', 'tag', 'tags', 'tasks', 'taxi', 'television', 'terminal', 'thumb-tack', 'thumbs-down', 'thumbs-o-down', 'thumbs-o-up', 'thumbs-up', 'ticket', 'times', 'times-circle', 'times-circle-o', 'tint', 'toggle-down', 'toggle-left', 'toggle-off', 'toggle-on', 'toggle-right', 'toggle-up', 'trademark', 'trash', 'trash-o', 'tree', 'trophy', 'truck', 'tty', 'tv', 'umbrella', 'universal-access', 'university', 'unlock', 'unlock-alt', 'unsorted', 'upload', 'user', 'user-plus', 'user-secret', 'user-times', 'users', 'video-camera', 'volume-control-phone', 'volume-down', 'volume-off', 'volume-up', 'warning', 'wheelchair', 'wheelchair-alt', 'wifi', 'wrench', 'hand-o-down', 'hand-o-left', 'hand-o-right', 'hand-o-up', 'ambulance', 'subway', 'train', 'genderless', 'intersex', 'mars', 'mars-double', 'mars-stroke', 'mars-stroke-h', 'mars-stroke-v', 'mercury', 'neuter', 'transgender', 'transgender-alt', 'venus', 'venus-double', 'venus-mars', 'file', 'file-o', 'file-text', 'file-text-o', 'cc-amex', 'cc-diners-club', 'cc-discover', 'cc-jcb', 'cc-mastercard', 'cc-paypal', 'cc-stripe', 'cc-visa', 'google-wallet', 'paypal', 'bitcoin', 'btc', 'cny', 'dollar', 'eur', 'euro', 'gbp', 'gg', 'gg-circle', 'ils', 'inr', 'jpy', 'krw', 'rmb', 'rouble', 'rub', 'ruble', 'rupee', 'shekel', 'sheqel', 'try', 'turkish-lira', 'usd', 'viacoin', 'won', 'yen', 'align-center', 'align-justify', 'align-left', 'align-right', 'bold', 'chain', 'chain-broken', 'clipboard', 'columns', 'copy', 'cut', 'dedent', 'files-o', 'floppy-o', 'font', 'header', 'indent', 'italic', 'link', 'list', 'list-alt', 'list-ol', 'list-ul', 'outdent', 'paperclip', 'paragraph', 'paste', 'repeat', 'rotate-left', 'rotate-right', 'save', 'scissors', 'strikethrough', 'subscript', 'superscript', 'table', 'text-height', 'text-width', 'th', 'th-large', 'th-list', 'underline', 'undo', 'unlink', 'angle-double-down', 'angle-double-left', 'angle-double-right', 'angle-double-up', 'angle-down', 'angle-left', 'angle-right', 'angle-up', 'arrow-circle-down', 'arrow-circle-left', 'arrow-circle-o-down', 'arrow-circle-o-left', 'arrow-circle-o-right', 'arrow-circle-o-up', 'arrow-circle-right', 'arrow-circle-up', 'arrow-down', 'arrow-left', 'arrow-right', 'arrow-up', 'arrows-alt', 'caret-down', 'caret-left', 'caret-right', 'caret-up', 'chevron-circle-down', 'chevron-circle-left', 'chevron-circle-right', 'chevron-circle-up', 'chevron-down', 'chevron-left', 'chevron-right', 'chevron-up', 'long-arrow-down', 'long-arrow-left', 'long-arrow-right', 'long-arrow-up', 'backward', 'compress', 'eject', 'expand', 'fast-backward', 'fast-forward', 'forward', 'pause', 'pause-circle', 'pause-circle-o', 'play', 'play-circle', 'play-circle-o', 'step-backward', 'step-forward', 'stop', 'stop-circle', 'stop-circle-o', 'youtube-play', '500px', 'adn', 'amazon', 'android', 'angellist', 'apple', 'behance', 'behance-square', 'bitbucket', 'bitbucket-square', 'black-tie', 'buysellads', 'chrome', 'codepen', 'codiepie', 'connectdevelop', 'contao', 'css3', 'dashcube', 'delicious', 'deviantart', 'digg', 'dribbble', 'dropbox', 'drupal', 'edge', 'empire', 'envira', 'expeditedssl', 'fa', 'facebook', 'facebook-f', 'facebook-official', 'facebook-square', 'firefox', 'first-order', 'flickr', 'font-awesome', 'fonticons', 'fort-awesome', 'forumbee', 'foursquare', 'ge', 'get-pocket', 'git', 'git-square', 'github', 'github-alt', 'github-square', 'gitlab', 'gittip', 'glide', 'glide-g', 'google', 'google-plus', 'google-plus-circle', 'google-plus-official', 'google-plus-square', 'gratipay', 'hacker-news', 'houzz', 'html5', 'instagram', 'internet-explorer', 'ioxhost', 'joomla', 'jsfiddle', 'lastfm', 'lastfm-square', 'leanpub', 'linkedin', 'linkedin-square', 'linux', 'maxcdn', 'meanpath', 'medium', 'mixcloud', 'modx', 'odnoklassniki', 'odnoklassniki-square', 'opencart', 'openid', 'opera', 'optin-monster', 'pagelines', 'pied-piper', 'pied-piper-alt', 'pied-piper-pp', 'pinterest', 'pinterest-p', 'pinterest-square', 'product-hunt', 'qq', 'ra', 'rebel', 'reddit', 'reddit-alien', 'reddit-square', 'renren', 'resistance', 'safari', 'scribd', 'sellsy', 'shirtsinbulk', 'simplybuilt', 'skyatlas', 'skype', 'slack', 'slideshare', 'snapchat', 'snapchat-ghost', 'snapchat-square', 'soundcloud', 'spotify', 'stack-exchange', 'stack-overflow', 'steam', 'steam-square', 'stumbleupon', 'stumbleupon-circle', 'tencent-weibo', 'themeisle', 'trello', 'tripadvisor', 'tumblr', 'tumblr-square', 'twitch', 'twitter', 'twitter-square', 'usb', 'viadeo', 'viadeo-square', 'vimeo', 'vimeo-square', 'vine', 'vk', 'wechat', 'weibo', 'weixin', 'whatsapp', 'wikipedia-w', 'windows', 'wordpress', 'wpbeginner', 'wpforms', 'xing', 'xing-square', 'y-combinator', 'y-combinator-square', 'yahoo', 'yc', 'yc-square', 'yelp', 'yoast', 'youtube', 'youtube-square', 'h-square', 'hospital-o', 'medkit', 'stethoscope', 'user-md', ) );
47
  }
48
 
49
  /**
inc/core/generator-views.php CHANGED
@@ -109,29 +109,6 @@ class Su_Generator_Views {
109
  return $return;
110
  }
111
 
112
- public static function gallery( $id, $field ) {
113
- $shult = shortcodes_ultimate();
114
- // Prepare galleries list
115
- $galleries = $shult->get_option( 'galleries' );
116
- $created = ( is_array( $galleries ) && count( $galleries ) ) ? true : false;
117
- $return = '<select name="' . $id . '" id="su-generator-attr-' . $id . '" class="su-generator-attr" data-loading="' . __( 'Please wait', 'shortcodes-ultimate' ) . '">';
118
- // Check that galleries is set
119
- if ( $created ) // Create options
120
- foreach ( $galleries as $g_id => $gallery ) {
121
- // Is this option selected
122
- $selected = ( $g_id == 0 ) ? ' selected="selected"' : '';
123
- // Prepare title
124
- $gallery['name'] = ( $gallery['name'] == '' ) ? __( 'Untitled gallery', 'shortcodes-ultimate' ) : stripslashes( $gallery['name'] );
125
- // Create option
126
- $return .= '<option value="' . ( $g_id + 1 ) . '"' . $selected . '>' . $gallery['name'] . '</option>';
127
- }
128
- // Galleries not created
129
- else
130
- $return .= '<option value="0" selected>' . __( 'Galleries not found', 'shortcodes-ultimate' ) . '</option>';
131
- $return .= '</select><small class="description"><a href="' . $shult->admin_url . '#tab-3" target="_blank">' . __( 'Manage galleries', 'shortcodes-ultimate' ) . '</a>&nbsp;&nbsp;&nbsp;<a href="javascript:;" class="su-generator-reload-galleries">' . __( 'Reload galleries', 'shortcodes-ultimate' ) . '</a></small>';
132
- return $return;
133
- }
134
-
135
  public static function number( $id, $field ) {
136
  $return = '<input type="number" name="' . $id . '" value="' . esc_attr( $field['default'] ) . '" id="su-generator-attr-' . $id . '" min="' . $field['min'] . '" max="' . $field['max'] . '" step="' . $field['step'] . '" class="su-generator-attr" />';
137
  return $return;
109
  return $return;
110
  }
111
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
  public static function number( $id, $field ) {
113
  $return = '<input type="number" name="' . $id . '" value="' . esc_attr( $field['default'] ) . '" id="su-generator-attr-' . $id . '" min="' . $field['min'] . '" max="' . $field['max'] . '" step="' . $field['step'] . '" class="su-generator-attr" />';
114
  return $return;
inc/core/generator.php CHANGED
File without changes
inc/core/load.php CHANGED
@@ -55,11 +55,4 @@ class Shortcodes_Ultimate_Load {
55
 
56
  }
57
 
58
- /**
59
- * Register plugin function to perform checks that plugin is installed
60
- */
61
- function shortcodes_ultimate() {
62
- return true;
63
- }
64
-
65
  new Shortcodes_Ultimate_Load;
55
 
56
  }
57
 
 
 
 
 
 
 
 
58
  new Shortcodes_Ultimate_Load;
inc/core/requirements.php CHANGED
File without changes
inc/core/shortcodes.php CHANGED
@@ -88,7 +88,7 @@ class Su_Shortcodes {
88
  su_query_asset( 'js', 'jquery' );
89
  su_query_asset( 'js', 'su-other-shortcodes' );
90
  do_action( 'su/shortcode/spoiler', $atts );
91
- return '<div class="su-spoiler su-spoiler-style-' . $atts['style'] . ' su-spoiler-icon-' . $atts['icon'] . su_ecssc( $atts ) . '"' . $atts['anchor'] . '><div class="su-spoiler-title"><span class="su-spoiler-icon"></span>' . su_scattr( $atts['title'] ) . '</div><div class="su-spoiler-content su-clearfix" style="display:none">' . su_do_shortcode( $content, 's' ) . '</div></div>';
92
  }
93
 
94
  public static function accordion( $atts = null, $content = null ) {
@@ -197,7 +197,7 @@ class Su_Shortcodes {
197
 
198
  public static function row( $atts = null, $content = null ) {
199
  $atts = shortcode_atts( array( 'class' => '' ), $atts );
200
- return '<div class="su-row' . su_ecssc( $atts ) . '">' . su_do_shortcode( $content, 'r' ) . '</div>';
201
  }
202
 
203
  public static function column( $atts = null, $content = null ) {
@@ -210,7 +210,7 @@ class Su_Shortcodes {
210
  if ( $atts['last'] !== null && $atts['last'] == '1' ) $atts['class'] .= ' su-column-last';
211
  if ( $atts['center'] === 'yes' ) $atts['class'] .= ' su-column-centered';
212
  su_query_asset( 'css', 'su-box-shortcodes' );
213
- return '<div class="su-column su-column-size-' . str_replace( '/', '-', $atts['size'] ) . su_ecssc( $atts ) . '"><div class="su-column-inner su-clearfix">' . su_do_shortcode( $content, 'c' ) . '</div></div>';
214
  }
215
 
216
  public static function su_list( $atts = null, $content = null ) {
@@ -291,7 +291,7 @@ class Su_Shortcodes {
291
  }
292
  else $atts['icon'] = '<img src="' . $atts['icon'] . '" alt="" />';
293
  su_query_asset( 'css', 'su-content-shortcodes' );
294
- return '<div class="su-list su-list-style-' . $atts['style'] . su_ecssc( $atts ) . '">' . str_replace( '<li>', '<li>' . $atts['icon'] . ' ', su_do_shortcode( $content, 'l' ) ) . '</div>';
295
  }
296
 
297
  public static function button( $atts = null, $content = null ) {
@@ -499,7 +499,7 @@ class Su_Shortcodes {
499
  $atts['title_color'],
500
  $atts['inner_radius'],
501
  su_scattr( $atts['title'] ),
502
- su_do_shortcode( $content, 'b' )
503
  );
504
 
505
  }
@@ -518,7 +518,7 @@ class Su_Shortcodes {
518
  // Prepare border-radius
519
  $radius = ( $atts['radius'] != '0' ) ? 'border-radius:' . $atts['radius'] . 'px;-moz-border-radius:' . $atts['radius'] . 'px;-webkit-border-radius:' . $atts['radius'] . 'px;' : '';
520
  su_query_asset( 'css', 'su-box-shortcodes' );
521
- return '<div class="su-note' . su_ecssc( $atts ) . '" style="border-color:' . su_hex_shift( $atts['note_color'], 'darker', 10 ) . ';' . $radius . '"><div class="su-note-inner su-clearfix" style="background-color:' . $atts['note_color'] . ';border-color:' . su_hex_shift( $atts['note_color'], 'lighter', 80 ) . ';color:' . $atts['text_color'] . ';' . $radius . '">' . su_do_shortcode( $content, 'n' ) . '</div></div>';
522
  }
523
 
524
  public static function expand( $atts = null, $content = null ) {
@@ -1568,6 +1568,7 @@ class Su_Shortcodes {
1568
  }
1569
 
1570
  public static function scheduler( $atts = null, $content = null ) {
 
1571
  $atts = shortcode_atts( array(
1572
  'time' => 'all',
1573
  'days_week' => 'all',
@@ -1576,74 +1577,102 @@ class Su_Shortcodes {
1576
  'years' => 'all',
1577
  'alt' => ''
1578
  ), $atts, 'scheduler' );
1579
- // Check time
1580
- if ( $atts['time'] !== 'all' ) {
1581
- // Get current time
1582
- $now = current_time( 'timestamp', 0 );
1583
- // Sanitize
1584
- $atts['time'] = preg_replace( "/[^0-9-,:]/", '', $atts['time'] );
1585
- // Loop time ranges
1586
- foreach ( explode( ',', $atts['time'] ) as $range ) {
1587
- // Check for range symbol
1588
- if ( strpos( $range, '-' ) === false ) return Su_Tools::error( __FUNCTION__, sprintf( __( 'Incorrect time range (%s). Please use - (minus) symbol to specify time range. Example: 14:00 - 18:00', 'shortcodes-ultimate' ), $range ) );
1589
- // Split begin/end time
1590
- $time = explode( '-', $range );
1591
- // Add minutes
1592
- if ( strpos( $time[0], ':' ) === false ) $time[0] .= ':00';
1593
- if ( strpos( $time[1], ':' ) === false ) $time[1] .= ':00';
1594
- // Parse begin/end time
1595
- $time[0] = strtotime( $time[0] );
1596
- $time[1] = strtotime( $time[1] );
1597
- // Check time
1598
- if ( $now < $time[0] || $now > $time[1] ) return $atts['alt'];
1599
  }
 
1600
  }
1601
- // Check day of the week
1602
- if ( $atts['days_week'] !== 'all' ) {
1603
- // Get current day of the week
1604
- $today = date( 'w', current_time( 'timestamp', 0 ) );
1605
- // Sanitize input
1606
- $atts['days_week'] = preg_replace( "/[^0-9-,]/", '', $atts['days_week'] );
1607
- // Parse days range
1608
- $days = Su_Tools::range( $atts['days_week'] );
1609
- // Check current day
1610
- if ( !in_array( $today, $days ) ) return $atts['alt'];
 
1611
  }
1612
- // Check day of the month
1613
  if ( $atts['days_month'] !== 'all' ) {
1614
- // Get current day of the month
1615
- $today = date( 'j', current_time( 'timestamp', 0 ) );
1616
- // Sanitize input
1617
  $atts['days_month'] = preg_replace( "/[^0-9-,]/", '', $atts['days_month'] );
1618
- // Parse days range
1619
- $days = Su_Tools::range( $atts['days_month'] );
1620
- // Check current day
1621
- if ( !in_array( $today, $days ) ) return $atts['alt'];
 
 
 
1622
  }
1623
- // Check month
1624
- if ( $atts['months'] !== 'all' ) {
1625
- // Get current month
1626
- $now = date( 'n', current_time( 'timestamp', 0 ) );
1627
- // Sanitize input
1628
- $atts['months'] = preg_replace( "/[^0-9-,]/", '', $atts['months'] );
1629
- // Parse months range
1630
- $months = Su_Tools::range( $atts['months'] );
1631
- // Check current month
1632
- if ( !in_array( $now, $months ) ) return $atts['alt'];
 
1633
  }
1634
- // Check year
1635
- if ( $atts['years'] !== 'all' ) {
1636
- // Get current year
1637
- $now = date( 'Y', current_time( 'timestamp', 0 ) );
1638
- // Sanitize input
1639
- $atts['years'] = preg_replace( "/[^0-9-,]/", '', $atts['years'] );
1640
- // Parse years range
1641
- $years = Su_Tools::range( $atts['years'] );
1642
- // Check current year
1643
- if ( !in_array( $now, $years ) ) return $atts['alt'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1644
  }
1645
- // Return result (all check passed)
1646
  return do_shortcode( $content );
 
1647
  }
1648
 
1649
  }
88
  su_query_asset( 'js', 'jquery' );
89
  su_query_asset( 'js', 'su-other-shortcodes' );
90
  do_action( 'su/shortcode/spoiler', $atts );
91
+ return '<div class="su-spoiler su-spoiler-style-' . $atts['style'] . ' su-spoiler-icon-' . $atts['icon'] . su_ecssc( $atts ) . '"' . $atts['anchor'] . '><div class="su-spoiler-title"><span class="su-spoiler-icon"></span>' . su_scattr( $atts['title'] ) . '</div><div class="su-spoiler-content su-clearfix">' . su_do_nested_shortcodes( $content, 'spoiler' ) . '</div></div>';
92
  }
93
 
94
  public static function accordion( $atts = null, $content = null ) {
197
 
198
  public static function row( $atts = null, $content = null ) {
199
  $atts = shortcode_atts( array( 'class' => '' ), $atts );
200
+ return '<div class="su-row' . su_ecssc( $atts ) . '">' . su_do_nested_shortcodes( $content, 'row' ) . '</div>';
201
  }
202
 
203
  public static function column( $atts = null, $content = null ) {
210
  if ( $atts['last'] !== null && $atts['last'] == '1' ) $atts['class'] .= ' su-column-last';
211
  if ( $atts['center'] === 'yes' ) $atts['class'] .= ' su-column-centered';
212
  su_query_asset( 'css', 'su-box-shortcodes' );
213
+ return '<div class="su-column su-column-size-' . str_replace( '/', '-', $atts['size'] ) . su_ecssc( $atts ) . '"><div class="su-column-inner su-clearfix">' . su_do_nested_shortcodes( $content, 'column' ) . '</div></div>';
214
  }
215
 
216
  public static function su_list( $atts = null, $content = null ) {
291
  }
292
  else $atts['icon'] = '<img src="' . $atts['icon'] . '" alt="" />';
293
  su_query_asset( 'css', 'su-content-shortcodes' );
294
+ return '<div class="su-list su-list-style-' . $atts['style'] . su_ecssc( $atts ) . '">' . str_replace( '<li>', '<li>' . $atts['icon'] . ' ', su_do_nested_shortcodes( $content, 'list' ) ) . '</div>';
295
  }
296
 
297
  public static function button( $atts = null, $content = null ) {
499
  $atts['title_color'],
500
  $atts['inner_radius'],
501
  su_scattr( $atts['title'] ),
502
+ su_do_nested_shortcodes( $content, 'box' )
503
  );
504
 
505
  }
518
  // Prepare border-radius
519
  $radius = ( $atts['radius'] != '0' ) ? 'border-radius:' . $atts['radius'] . 'px;-moz-border-radius:' . $atts['radius'] . 'px;-webkit-border-radius:' . $atts['radius'] . 'px;' : '';
520
  su_query_asset( 'css', 'su-box-shortcodes' );
521
+ return '<div class="su-note' . su_ecssc( $atts ) . '" style="border-color:' . su_hex_shift( $atts['note_color'], 'darker', 10 ) . ';' . $radius . '"><div class="su-note-inner su-clearfix" style="background-color:' . $atts['note_color'] . ';border-color:' . su_hex_shift( $atts['note_color'], 'lighter', 80 ) . ';color:' . $atts['text_color'] . ';' . $radius . '">' . su_do_nested_shortcodes( $content, 'note' ) . '</div></div>';
522
  }
523
 
524
  public static function expand( $atts = null, $content = null ) {
1568
  }
1569
 
1570
  public static function scheduler( $atts = null, $content = null ) {
1571
+
1572
  $atts = shortcode_atts( array(
1573
  'time' => 'all',
1574
  'days_week' => 'all',
1577
  'years' => 'all',
1578
  'alt' => ''
1579
  ), $atts, 'scheduler' );
1580
+
1581
+ $timestamp = current_time( 'timestamp', 0 );
1582
+ $now = array(
1583
+ 'time' => $timestamp,
1584
+ 'day_week' => date( 'w', $timestamp ),
1585
+ 'day_month' => date( 'j', $timestamp ),
1586
+ 'month' => date( 'n', $timestamp ),
1587
+ 'year' => date( 'Y', $timestamp ),
1588
+ );
1589
+
1590
+ if ( $atts['years'] !== 'all' ) {
1591
+
1592
+ $atts['years'] = preg_replace( "/[^0-9-,]/", '', $atts['years'] );
1593
+
1594
+ $selected_years = Su_Tools::range( $atts['years'] );
1595
+
1596
+ if ( ! in_array( $now['year'], $selected_years ) ) {
1597
+ return su_scattr( $atts['alt'] );
 
 
1598
  }
1599
+
1600
  }
1601
+
1602
+ if ( $atts['months'] !== 'all' ) {
1603
+
1604
+ $atts['months'] = preg_replace( "/[^0-9-,]/", '', $atts['months'] );
1605
+
1606
+ $selected_months = Su_Tools::range( $atts['months'] );
1607
+
1608
+ if ( ! in_array( $now['month'], $selected_months ) ) {
1609
+ return su_scattr( $atts['alt'] );
1610
+ }
1611
+
1612
  }
1613
+
1614
  if ( $atts['days_month'] !== 'all' ) {
1615
+
 
 
1616
  $atts['days_month'] = preg_replace( "/[^0-9-,]/", '', $atts['days_month'] );
1617
+
1618
+ $selected_days_month = Su_Tools::range( $atts['days_month'] );
1619
+
1620
+ if ( ! in_array( $now['day_month'], $selected_days_month ) ) {
1621
+ return su_scattr( $atts['alt'] );
1622
+ }
1623
+
1624
  }
1625
+
1626
+ if ( $atts['days_week'] !== 'all' ) {
1627
+
1628
+ $atts['days_week'] = preg_replace( "/[^0-9-,]/", '', $atts['days_week'] );
1629
+
1630
+ $selected_days_week = Su_Tools::range( $atts['days_week'] );
1631
+
1632
+ if ( ! in_array( $now['day_week'], $selected_days_week ) ) {
1633
+ return su_scattr( $atts['alt'] );
1634
+ }
1635
+
1636
  }
1637
+
1638
+ if ( $atts['time'] !== 'all' ) {
1639
+
1640
+ $valid_time = false;
1641
+ $atts['time'] = preg_replace( "/[^0-9-,:]/", '', $atts['time'] );
1642
+
1643
+ foreach ( explode( ',', $atts['time'] ) as $range ) {
1644
+
1645
+ $range = explode( '-', $range );
1646
+
1647
+ if ( ! isset( $range[1] ) ) {
1648
+ $range[1] = $range[0] . ':59:59';
1649
+ }
1650
+
1651
+ if ( strpos( $range[0], ':' ) === false ) {
1652
+ $range[0] .= ':00:00';
1653
+ }
1654
+ if ( strpos( $range[1], ':' ) === false ) {
1655
+ $range[1] .= ':00:00';
1656
+ }
1657
+
1658
+ if (
1659
+ $now['time'] >= strtotime( $range[0], $now['time'] ) &&
1660
+ $now['time'] <= strtotime( $range[1], $now['time'] )
1661
+ ) {
1662
+ $valid_time = true;
1663
+ break;
1664
+ }
1665
+
1666
+ }
1667
+
1668
+ if ( ! $valid_time ) {
1669
+ return su_scattr( $atts['alt'] );
1670
+ }
1671
+
1672
  }
1673
+
1674
  return do_shortcode( $content );
1675
+
1676
  }
1677
 
1678
  }
inc/core/tools.php CHANGED
@@ -159,51 +159,57 @@ function su_hex2rgb( $colour, $delimiter = '-' ) {
159
  }
160
 
161
  /**
162
- * Apply all custom formatting options of plugin
 
 
 
 
 
163
  */
164
- function su_apply_formatting() {
165
- // Enable shortcodes in text widgets
166
- add_filter( 'widget_text', 'do_shortcode' );
167
- // Enable shortcodes in category descriptions
168
- add_filter( 'category_description', 'do_shortcode' );
169
- // Enable custom formatting
170
- if ( get_option( 'su_option_custom-formatting' ) === 'on' ) {
171
- // Apply custom formatter function
172
- add_filter( 'the_content', 'su_clean_shortcodes' );
173
  }
174
- }
175
 
176
- add_action( 'init', 'su_apply_formatting' );
177
 
178
- /**
179
- * Custom formatter function
180
- *
181
- * @param string $content
182
- *
183
- * @return string Formatted content with clean shortcodes content
184
- */
185
- function su_clean_shortcodes( $content ) {
186
- $p = su_cmpt();
187
- $array = array (
188
- '<p>[' => '[',
189
- ']</p>' => ']',
190
- ']<br />' => ']'
191
- );
192
- $content = strtr( $content, $array );
193
- return $content;
194
  }
195
 
196
  /**
197
- * Custom do_shortcode function for nested shortcodes
198
  *
199
- * @param string $content Shortcode content
200
- * @param string $pre First shortcode letter
201
- *
202
- * @return string Formatted content
203
  */
204
- function su_do_shortcode( $content, $pre ) {
205
- if ( strpos( $content, '[_' ) !== false ) $content = preg_replace( '@(\[_*)_(' . $pre . '|/)@', "$1$2", $content );
206
- return do_shortcode( $content );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
207
  }
208
 
209
  /**
@@ -239,19 +245,28 @@ function su_ecssc( $atts ) {
239
  * @return bool
240
  */
241
  function su_addon_active( $addons ) {
 
 
 
 
 
242
  // Prepare add-ons paths
243
  $paths = array(
244
  'maker' => 'shortcodes-ultimate-maker/shortcodes-ultimate-maker.php',
245
  'skins' => 'shortcodes-ultimate-skins/shortcodes-ultimate-skins.php',
246
  'extra' => 'shortcodes-ultimate-extra/shortcodes-ultimate-extra.php',
247
  );
 
248
  // Convert string into array
249
  if ( is_string( $addons ) ) $addons = array( $addons );
 
250
  // Loop addons
251
  foreach ( $addons as $addon ) {
252
- if ( !is_plugin_active( $paths[$addon] ) ) return false;
253
  }
 
254
  return true;
 
255
  }
256
 
257
  function su_skins_link() {
@@ -763,46 +778,46 @@ class Su_Tools {
763
  }
764
 
765
  // public static function example() {
766
- // // Check authentication
767
- // self::access();
768
- // // Check nonce
769
- // if ( !isset( $_REQUEST['nonce'] ) || !wp_verify_nonce( $_REQUEST['nonce'], 'su_examples_nonce' ) ) return;
770
- // // Check incoming data
771
- // if ( !isset( $_REQUEST['code'] ) || !isset( $_REQUEST['id'] ) ) return;
772
- // // Check for cache
773
- // $output = get_transient( 'su/examples/render/' . sanitize_key( $_REQUEST['id'] ) );
774
- // if ( $output && SU_ENABLE_CACHE ) echo $output;
775
- // // Cache not found
776
- // else {
777
- // ob_start();
778
- // // Prepare data
779
- // $code = file_get_contents( sanitize_text_field( $_REQUEST['code'] ) );
780
- // // Check for code
781
- // if ( !$code ) die( '<p class="su-examples-error">' . __( 'Example code does not found, please check it later', 'shortcodes-ultimate' ) . '</p>' );
782
- // // Clean-up the code
783
- // $code = str_replace( array( "\t", '%su_' ), array( ' ', su_cmpt() ), $code );
784
- // // Split code
785
- // $chunks = explode( '-----', $code );
786
- // // Show snippets
787
- // do_action( 'su/examples/preview/before' );
788
- // foreach ( $chunks as $chunk ) {
789
- // // Clean-up new lines
790
- // $chunk = trim( $chunk, "\n\r" );
791
- // // Calc textarea rows
792
- // $rows = substr_count( $chunk, "\n" );
793
- // $rows = ( $rows < 4 ) ? '4' : (string) ( $rows + 1 );
794
- // $rows = ( $rows > 20 ) ? '20' : (string) ( $rows + 1 );
795
- // echo wpautop( do_shortcode( $chunk ) );
796
- // echo '<div style="clear:both"></div>';
797
- // echo '<div class="su-examples-code"><span class="su-examples-get-code button"><i class="fa fa-code"></i>&nbsp;&nbsp;' . __( 'Get the code', 'shortcodes-ultimate' ) . '</span><textarea rows="' . $rows . '">' . esc_textarea( $chunk ) . '</textarea></div>';
798
- // }
799
- // do_action( 'su/examples/preview/after' );
800
- // $output = ob_get_contents();
801
- // ob_end_clean();
802
- // set_transient( 'su/examples/render/' . sanitize_key( $_REQUEST['id'] ), $output );
803
- // echo $output;
804
- // }
805
- // die();
806
  // }
807
 
808
  public static function reset_examples() {
159
  }
160
 
161
  /**
162
+ * Custom do_shortcode function for nested shortcodes
163
+ *
164
+ * @param string $content Shortcode content
165
+ * @param string $pre First shortcode letter
166
+ *
167
+ * @return string Formatted content
168
  */
169
+ function su_do_nested_shortcodes_alt( $content, $pre ) {
170
+
171
+ if ( strpos( $content, '[_' ) !== false ) {
172
+ $content = preg_replace( '@(\[_*)_(' . $pre . '|/)@', "$1$2", $content );
 
 
 
 
 
173
  }
 
174
 
175
+ return do_shortcode( $content );
176
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
  }
178
 
179
  /**
180
+ * Remove underscores from nested shortcodes.
181
  *
182
+ * @since 5.0.4
183
+ * @param string $content String with nested shortcodes.
184
+ * @param string $shortcode Shortcode tag name (without prefix).
185
+ * @return string Parsed string.
186
  */
187
+ function su_do_nested_shortcodes( $content, $shortcode ) {
188
+
189
+ if ( get_option( 'su_option_do_nested_shortcodes_alt' ) ) {
190
+ return su_do_nested_shortcodes_alt( $content, substr( $shortcode, 0, 1 ) );
191
+ }
192
+
193
+ $prefix = su_cmpt();
194
+
195
+ if ( strpos( $content, '[_' . $prefix . $shortcode ) !== false ) {
196
+
197
+ $content = str_replace(
198
+ array( '[_' . $prefix . $shortcode, '[_/' . $prefix . $shortcode, ),
199
+ array( '[' . $prefix . $shortcode, '[/' . $prefix . $shortcode, ),
200
+ $content
201
+ );
202
+
203
+ }
204
+
205
+ else {
206
+ $content = wptexturize( $content );
207
+ }
208
+
209
+ $content = do_shortcode( $content );
210
+
211
+ return $content;
212
+
213
  }
214
 
215
  /**
245
  * @return bool
246
  */
247
  function su_addon_active( $addons ) {
248
+
249
+ if ( ! function_exists( 'is_plugin_active' ) ) {
250
+ return true;
251
+ }
252
+
253
  // Prepare add-ons paths
254
  $paths = array(
255
  'maker' => 'shortcodes-ultimate-maker/shortcodes-ultimate-maker.php',
256
  'skins' => 'shortcodes-ultimate-skins/shortcodes-ultimate-skins.php',
257
  'extra' => 'shortcodes-ultimate-extra/shortcodes-ultimate-extra.php',
258
  );
259
+
260
  // Convert string into array
261
  if ( is_string( $addons ) ) $addons = array( $addons );
262
+
263
  // Loop addons
264
  foreach ( $addons as $addon ) {
265
+ if ( ! is_plugin_active( $paths[$addon] ) ) return false;
266
  }
267
+
268
  return true;
269
+
270
  }
271
 
272
  function su_skins_link() {
778
  }
779
 
780
  // public static function example() {
781
+ // // Check authentication
782
+ // self::access();
783
+ // // Check nonce
784
+ // if ( !isset( $_REQUEST['nonce'] ) || !wp_verify_nonce( $_REQUEST['nonce'], 'su_examples_nonce' ) ) return;
785
+ // // Check incoming data
786
+ // if ( !isset( $_REQUEST['code'] ) || !isset( $_REQUEST['id'] ) ) return;
787
+ // // Check for cache
788
+ // $output = get_transient( 'su/examples/render/' . sanitize_key( $_REQUEST['id'] ) );
789
+ // if ( $output && SU_ENABLE_CACHE ) echo $output;
790
+ // // Cache not found
791
+ // else {
792
+ // ob_start();
793
+ // // Prepare data
794
+ // $code = file_get_contents( sanitize_text_field( $_REQUEST['code'] ) );
795
+ // // Check for code
796
+ // if ( !$code ) die( '<p class="su-examples-error">' . __( 'Example code does not found, please check it later', 'shortcodes-ultimate' ) . '</p>' );
797
+ // // Clean-up the code
798
+ // $code = str_replace( array( "\t", '%su_' ), array( ' ', su_cmpt() ), $code );
799
+ // // Split code
800
+ // $chunks = explode( '-----', $code );
801
+ // // Show snippets
802
+ // do_action( 'su/examples/preview/before' );
803
+ // foreach ( $chunks as $chunk ) {
804
+ // // Clean-up new lines
805
+ // $chunk = trim( $chunk, "\n\r" );
806
+ // // Calc textarea rows
807
+ // $rows = substr_count( $chunk, "\n" );
808
+ // $rows = ( $rows < 4 ) ? '4' : (string) ( $rows + 1 );
809
+ // $rows = ( $rows > 20 ) ? '20' : (string) ( $rows + 1 );
810
+ // echo wpautop( do_shortcode( $chunk ) );
811
+ // echo '<div style="clear:both"></div>';
812
+ // echo '<div class="su-examples-code"><span class="su-examples-get-code button"><i class="fa fa-code"></i>&nbsp;&nbsp;' . __( 'Get the code', 'shortcodes-ultimate' ) . '</span><textarea rows="' . $rows . '">' . esc_textarea( $chunk ) . '</textarea></div>';
813
+ // }
814
+ // do_action( 'su/examples/preview/after' );
815
+ // $output = ob_get_contents();
816
+ // ob_end_clean();
817
+ // set_transient( 'su/examples/render/' . sanitize_key( $_REQUEST['id'] ), $output );
818
+ // echo $output;
819
+ // }
820
+ // die();
821
  // }
822
 
823
  public static function reset_examples() {
inc/core/widget.php CHANGED
File without changes
includes/class-shortcodes-ultimate-activator.php CHANGED
File without changes
includes/class-shortcodes-ultimate-upgrade.php CHANGED
File without changes
includes/class-shortcodes-ultimate.php CHANGED
@@ -39,14 +39,48 @@ class Shortcodes_Ultimate {
39
  private $plugin_path;
40
 
41
  /**
42
- * The plugin text domain.
43
  *
44
- * @since 5.0.0
45
- * @access private
46
- * @var string $textdomain The plugin text domain.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  */
48
- private $textdomain;
 
 
 
49
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
 
51
  /**
52
  * Define the core functionality of the plugin.
@@ -60,22 +94,28 @@ class Shortcodes_Ultimate {
60
  $this->plugin_file = $plugin_file;
61
  $this->plugin_version = $plugin_version;
62
  $this->plugin_path = plugin_dir_path( $plugin_file );
63
- $this->textdomain = 'shortcodes-ultimate';
64
 
65
  $this->load_dependencies();
66
  $this->define_admin_hooks();
 
 
 
67
 
68
  }
69
 
70
  /**
71
  * Load the required dependencies for the plugin.
72
  *
73
- *
74
  * @since 5.0.0
75
  * @access private
76
  */
77
  private function load_dependencies() {
78
 
 
 
 
 
 
79
  /**
80
  * The class responsible for plugin upgrades.
81
  */
@@ -108,63 +148,92 @@ class Shortcodes_Ultimate {
108
  private function define_admin_hooks() {
109
 
110
  /**
111
- * Run upgrades.
112
  */
113
- $upgrade = new Shortcodes_Ultimate_Upgrade( $this->plugin_file, $this->plugin_version );
114
 
115
- add_action( 'admin_init', array( $upgrade, 'maybe_upgrade' ) );
116
 
117
 
118
  /**
119
  * Top-level menu: Shortcodes
120
  * admin.php?page=shortcodes-ultimate
121
  */
122
- $top_level = new Shortcodes_Ultimate_Admin_Top_Level( $this->plugin_file, $this->plugin_version );
123
 
124
- add_action( 'admin_menu', array( $top_level, 'admin_menu' ), 5 );
125
 
126
 
127
  /**
128
  * Submenu: Available shortcodes
129
  * admin.php?page=shortcodes-ultimate
130
  */
131
- $shortcodes = new Shortcodes_Ultimate_Admin_Shortcodes( $this->plugin_file, $this->plugin_version );
132
 
133
- add_action( 'admin_menu', array( $shortcodes, 'admin_menu' ), 5 );
134
- add_action( 'current_screen', array( $shortcodes, 'add_help_tab' ) );
135
- add_action( 'admin_enqueue_scripts', array( $shortcodes, 'enqueue_scripts' ) );
136
 
137
 
138
  /**
139
  * Submenu: Settings
140
  * admin.php?page=shortcodes-ultimate-settings
141
  */
142
- $settings = new Shortcodes_Ultimate_Admin_Settings( $this->plugin_file, $this->plugin_version );
143
 
144
- add_action( 'admin_menu', array( $settings, 'admin_menu' ), 20 );
145
- add_action( 'admin_init', array( $settings, 'register_settings' ) );
146
- add_action( 'current_screen', array( $settings, 'add_help_tab' ) );
147
 
148
 
149
  /**
150
  * Submenu: Add-ons
151
  * admin.php?page=shortcodes-ultimate-addons
152
  */
153
- $addons = new Shortcodes_Ultimate_Admin_Addons( $this->plugin_file, $this->plugin_version );
154
 
155
- add_action( 'admin_menu', array( $addons, 'admin_menu' ), 30 );
156
- add_action( 'admin_enqueue_scripts', array( $addons, 'enqueue_scripts' ) );
157
- add_action( 'current_screen', array( $addons, 'add_help_tab' ) );
158
 
159
 
160
  /**
161
  * Notice: Rate plugin
162
  */
163
- $rate = new Shortcodes_Ultimate_Notice_Rate( 'rate', $this->plugin_path . 'admin/partials/notices/rate.php' );
 
 
 
 
 
 
164
 
165
- add_action( 'load-plugins.php', array( $rate, 'defer_first_time' ) );
166
- add_action( 'admin_notices', array( $rate, 'display_notice' ) );
167
- add_action( 'admin_post_su_dismiss_notice', array( $rate, 'dismiss_notice' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
168
 
169
  }
170
 
39
  private $plugin_path;
40
 
41
  /**
42
+ * Class instance.
43
  *
44
+ * @since 5.1.0
45
+ * @access private
46
+ * @var null The single class instance.
47
+ */
48
+ private static $instance;
49
+
50
+ /**
51
+ * Upgrader class instance.
52
+ *
53
+ * @since 5.1.0
54
+ * @var Shortcodes_Ultimate_Upgrade Upgrader class instance.
55
+ */
56
+ public $upgrade;
57
+
58
+ /**
59
+ * Menu classes instances.
60
+ *
61
+ * @since 5.1.0
62
  */
63
+ public $top_level_menu;
64
+ public $shortcodes_menu;
65
+ public $settings_menu;
66
+ public $addons_menu;
67
 
68
+ /**
69
+ * Notices classes instances.
70
+ *
71
+ * @since 5.1.0
72
+ */
73
+ public $rate_notice;
74
+
75
+ /**
76
+ * Get class instance.
77
+ *
78
+ * @since 5.1.0
79
+ * @return Shortcodes_Ultimate
80
+ */
81
+ public static function get_instance() {
82
+ return self::$instance;
83
+ }
84
 
85
  /**
86
  * Define the core functionality of the plugin.
94
  $this->plugin_file = $plugin_file;
95
  $this->plugin_version = $plugin_version;
96
  $this->plugin_path = plugin_dir_path( $plugin_file );
 
97
 
98
  $this->load_dependencies();
99
  $this->define_admin_hooks();
100
+ $this->define_common_hooks();
101
+
102
+ self::$instance = $this;
103
 
104
  }
105
 
106
  /**
107
  * Load the required dependencies for the plugin.
108
  *
 
109
  * @since 5.0.0
110
  * @access private
111
  */
112
  private function load_dependencies() {
113
 
114
+ /**
115
+ * Various filters.
116
+ */
117
+ require_once $this->plugin_path . 'includes/filters.php';
118
+
119
  /**
120
  * The class responsible for plugin upgrades.
121
  */
148
  private function define_admin_hooks() {
149
 
150
  /**
151
+ * Upgrades.
152
  */
153
+ $this->upgrade = new Shortcodes_Ultimate_Upgrade( $this->plugin_file, $this->plugin_version );
154
 
155
+ add_action( 'admin_init', array( $this->upgrade, 'maybe_upgrade' ) );
156
 
157
 
158
  /**
159
  * Top-level menu: Shortcodes
160
  * admin.php?page=shortcodes-ultimate
161
  */
162
+ $this->top_level_menu = new Shortcodes_Ultimate_Admin_Top_Level( $this->plugin_file, $this->plugin_version );
163
 
164
+ add_action( 'admin_menu', array( $this->top_level_menu, 'admin_menu' ), 5 );
165
 
166
 
167
  /**
168
  * Submenu: Available shortcodes
169
  * admin.php?page=shortcodes-ultimate
170
  */
171
+ $this->shortcodes_menu = new Shortcodes_Ultimate_Admin_Shortcodes( $this->plugin_file, $this->plugin_version );
172
 
173
+ add_action( 'admin_menu', array( $this->shortcodes_menu, 'admin_menu' ), 5 );
174
+ add_action( 'current_screen', array( $this->shortcodes_menu, 'add_help_tab' ) );
175
+ add_action( 'admin_enqueue_scripts', array( $this->shortcodes_menu, 'enqueue_scripts' ) );
176
 
177
 
178
  /**
179
  * Submenu: Settings
180
  * admin.php?page=shortcodes-ultimate-settings
181
  */
182
+ $this->settings_menu = new Shortcodes_Ultimate_Admin_Settings( $this->plugin_file, $this->plugin_version );
183
 
184
+ add_action( 'admin_menu', array( $this->settings_menu, 'admin_menu' ), 20 );
185
+ add_action( 'admin_init', array( $this->settings_menu, 'register_settings' ) );
186
+ add_action( 'current_screen', array( $this->settings_menu, 'add_help_tab' ) );
187
 
188
 
189
  /**
190
  * Submenu: Add-ons
191
  * admin.php?page=shortcodes-ultimate-addons
192
  */
193
+ $this->addons_menu = new Shortcodes_Ultimate_Admin_Addons( $this->plugin_file, $this->plugin_version );
194
 
195
+ add_action( 'admin_menu', array( $this->addons_menu, 'admin_menu' ), 30 );
196
+ add_action( 'admin_enqueue_scripts', array( $this->addons_menu, 'enqueue_scripts' ) );
197
+ add_action( 'current_screen', array( $this->addons_menu, 'add_help_tab' ) );
198
 
199
 
200
  /**
201
  * Notice: Rate plugin
202
  */
203
+ $this->rate_notice = new Shortcodes_Ultimate_Notice_Rate( 'rate', $this->plugin_path . 'admin/partials/notices/rate.php' );
204
+
205
+ add_action( 'load-plugins.php', array( $this->rate_notice, 'defer_first_time' ) );
206
+ add_action( 'admin_notices', array( $this->rate_notice, 'display_notice' ) );
207
+ add_action( 'admin_post_su_dismiss_notice', array( $this->rate_notice, 'dismiss_notice' ) );
208
+
209
+ }
210
 
211
+ /**
212
+ * Register all of the hooks related to both admin area and public part
213
+ * functionality of the plugin.
214
+ *
215
+ * @since 5.0.4
216
+ * @access private
217
+ */
218
+ private function define_common_hooks() {
219
+
220
+ /**
221
+ * Disable wptexturize filter for nestable shortcodes.
222
+ */
223
+ add_filter( 'no_texturize_shortcodes', 'su_filter_disable_wptexturize', 10 );
224
+
225
+ /**
226
+ * Enable shortcodes in text widgets and category descriptions.
227
+ */
228
+ add_filter( 'widget_text', 'do_shortcode' );
229
+ add_filter( 'category_description', 'do_shortcode' );
230
+
231
+ /**
232
+ * Enable custom formatting.
233
+ */
234
+ if ( get_option( 'su_option_custom-formatting' ) === 'on' ) {
235
+ add_filter( 'the_content', 'su_filter_custom_formatting' );
236
+ }
237
 
238
  }
239
 
includes/filters.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Filters.
5
+ *
6
+ * @since 5.0.4
7
+ * @package Shortcodes_Ultimate
8
+ * @subpackage Shortcodes_Ultimate/filters
9
+ */
10
+
11
+ /**
12
+ * Disable wptexturize filter for nestable shortcodes.
13
+ *
14
+ * @since 5.0.4
15
+ * @param array $shortcodes Shortcodes to not texturize.
16
+ * @return array Shortcodes to not texturize.
17
+ */
18
+ function su_filter_disable_wptexturize( $shortcodes ) {
19
+
20
+ $prefix = su_cmpt();
21
+
22
+ $exclude = array(
23
+ $prefix . 'spoiler',
24
+ $prefix . 'row',
25
+ $prefix . 'column',
26
+ $prefix . 'list',
27
+ $prefix . 'note',
28
+ $prefix . 'box',
29
+ );
30
+
31
+ return array_merge( $shortcodes, $exclude );
32
+
33
+ }
34
+
35
+ /**
36
+ * Custom formatting filter.
37
+ *
38
+ * @since 5.0.4
39
+ * @param string $content
40
+ * @return string Formatted content with clean shortcodes content.
41
+ */
42
+ function su_filter_custom_formatting( $content ) {
43
+
44
+ $replacements = array (
45
+ '<p>[' => '[',
46
+ ']</p>' => ']',
47
+ ']<br />' => ']',
48
+ );
49
+
50
+ return strtr( $content, $replacements );
51
+
52
+ }
languages/readme.txt CHANGED
File without changes
license.txt CHANGED
File without changes
readme.txt CHANGED
@@ -105,6 +105,13 @@ For help with premium add-ons, please [open new support ticket](https://getshort
105
 
106
  == Changelog ==
107
 
 
 
 
 
 
 
 
108
  = 5.0.3 =
109
  * Changed: Inview.js library replaced with [jQuery.Inview](https://github.com/protonet/jquery.inview)
110
  * Fixed: caching issue with [su_dummy_text]
105
 
106
  == Changelog ==
107
 
108
+ = 5.0.4 =
109
+ * Fixed: added missing FontAwesome icons
110
+ * Fixed: is_plugin_active call removed on frontend
111
+ * Fixed: nested shortcodes
112
+ * Fixed: issue with spoiler loaded through ajax
113
+ * Fixed: [scheduler] shortcode logic
114
+
115
  = 5.0.3 =
116
  * Changed: Inview.js library replaced with [jQuery.Inview](https://github.com/protonet/jquery.inview)
117
  * Fixed: caching issue with [su_dummy_text]
shortcodes-ultimate.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Shortcodes Ultimate
4
  * Plugin URI: https://getshortcodes.com/
5
- * Version: 5.0.3
6
  * Author: Vladimir Anokhin
7
  * Author URI: https://vanokhin.com/
8
  * Description: A comprehensive collection of visual components for WordPress
@@ -15,7 +15,7 @@
15
  * Define plugin constants.
16
  */
17
  define( 'SU_PLUGIN_FILE', __FILE__ );
18
- define( 'SU_PLUGIN_VERSION', '5.0.3' );
19
  define( 'SU_ENABLE_CACHE', false );
20
 
21
  /**
@@ -54,19 +54,19 @@ function run_shortcodes_ultimate() {
54
 
55
  require_once plugin_dir_path( __FILE__ ) . 'includes/class-shortcodes-ultimate.php';
56
 
57
- $plugin = new Shortcodes_Ultimate( __FILE__, '5.0.3' );
 
 
58
 
59
  }
60
 
61
  run_shortcodes_ultimate();
62
 
63
  /**
64
- * Finishes execution of the plugin.
65
  *
66
- * @since 5.0.2
67
  */
68
- function shutdown_shortcodes_ultimate() {
69
- do_action( 'su/ready' );
70
  }
71
-
72
- add_action( 'plugins_loaded', 'shutdown_shortcodes_ultimate' );
2
  /**
3
  * Plugin Name: Shortcodes Ultimate
4
  * Plugin URI: https://getshortcodes.com/
5
+ * Version: 5.0.4
6
  * Author: Vladimir Anokhin
7
  * Author URI: https://vanokhin.com/
8
  * Description: A comprehensive collection of visual components for WordPress
15
  * Define plugin constants.
16
  */
17
  define( 'SU_PLUGIN_FILE', __FILE__ );
18
+ define( 'SU_PLUGIN_VERSION', '5.0.4' );
19
  define( 'SU_ENABLE_CACHE', false );
20
 
21
  /**
54
 
55
  require_once plugin_dir_path( __FILE__ ) . 'includes/class-shortcodes-ultimate.php';
56
 
57
+ $plugin = new Shortcodes_Ultimate( __FILE__, '5.0.4' );
58
+
59
+ do_action( 'su/ready' );
60
 
61
  }
62
 
63
  run_shortcodes_ultimate();
64
 
65
  /**
66
+ * Retrieves instance of the main plugin class.
67
  *
68
+ * @since 5.0.4
69
  */
70
+ function shortcodes_ultimate() {
71
+ return Shortcodes_Ultimate::get_instance();
72
  }
 
 
templates/default-loop.php CHANGED
File without changes
templates/list-loop.php CHANGED
File without changes
templates/single-post.php CHANGED
File without changes
templates/teaser-loop.php CHANGED
File without changes