Accordion Shortcodes - Version 2.2.2

Version Description

Download this release

Release Info

Developer philbuchanan
Plugin Icon 128x128 Accordion Shortcodes
Version 2.2.2
Comparing to
See all releases

Code changes from version 2.2.1 to 2.2.2

accordion-shortcodes.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Accordion Shortcodes
4
  * Description: Shortcodes for creating responsive accordion drop-downs.
5
- * Version: 2.2.1
6
  * Author: Phil Buchanan
7
  * Author URI: http://philbuchanan.com
8
  */
@@ -17,7 +17,7 @@ class Accordion_Shortcodes {
17
  /**
18
  * Current plugin version number
19
  */
20
- private $plugin_version = '2.2.1';
21
 
22
 
23
 
2
  /**
3
  * Plugin Name: Accordion Shortcodes
4
  * Description: Shortcodes for creating responsive accordion drop-downs.
5
+ * Version: 2.2.2
6
  * Author: Phil Buchanan
7
  * Author URI: http://philbuchanan.com
8
  */
17
  /**
18
  * Current plugin version number
19
  */
20
+ private $plugin_version = '2.2.2';
21
 
22
 
23
 
languages/default.po CHANGED
@@ -1,102 +1,25 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Accordion Shortcodes\n"
4
- "POT-Creation-Date: 2015-01-01 12:50-0500\n"
5
- "PO-Revision-Date: 2015-01-01 12:50-0500\n"
6
  "Last-Translator: Phil Buchanan <info@philbuchanan.com>\n"
7
  "Language-Team: \n"
8
  "Language: en_CA\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.7.1\n"
13
  "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c\n"
14
  "X-Poedit-Basepath: .\n"
15
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
16
  "X-Poedit-SearchPath-0: ..\n"
17
 
18
- #: ../accordion-shortcodes.php:225
19
  msgid "Please enter a title attribute"
20
  msgstr ""
21
 
22
- #: ../accordion-shortcodes.php:242
23
  msgctxt "link to documentation on wordpress.org site"
24
  msgid "Documentation"
25
  msgstr ""
26
-
27
- #: ../accordion-shortcodes.php:258
28
- msgid ""
29
- "It is recommended that you use the accordion group and accordion item "
30
- "shortcode buttons to insert pre-formatted shortcodes. Your [accordion-items] "
31
- "should be nested inside an [accordion]...[/accordion] block."
32
- msgstr ""
33
-
34
- #: ../accordion-shortcodes.php:259
35
- msgid ""
36
- "You can set custom accordion settings on the opening [accordion] shortcode "
37
- "to change the behaviour of your accordion. Some of the settings you can add "
38
- "are: autoclose, openfirst, openall, clicktoclose, and scroll (set each equal "
39
- "to \"true\" or \"false\"). You can also change the default HTML tag for the "
40
- "accordion titles or add a custom CSS classname."
41
- msgstr ""
42
-
43
- #: ../accordion-shortcodes.php:260
44
- msgid "View the full accordion shortcodes plugin documentation"
45
- msgstr ""
46
-
47
- #: ../accordion-shortcodes.php:264
48
- msgctxt "plugin title, displays in admin help tab"
49
- msgid "Accordion Shortcodes"
50
- msgstr ""
51
-
52
- #: ../tinymce/tinymce.php:67
53
- msgid "Add an accordion group"
54
- msgstr ""
55
-
56
- #: ../tinymce/tinymce.php:68
57
- msgid "Insert Accordion Shortcode"
58
- msgstr ""
59
-
60
- #: ../tinymce/tinymce.php:69
61
- msgid "Auto Close Accordions"
62
- msgstr ""
63
-
64
- #: ../tinymce/tinymce.php:70
65
- msgid "Open First Accordion"
66
- msgstr ""
67
-
68
- #: ../tinymce/tinymce.php:71
69
- msgid "Open All Accordions"
70
- msgstr ""
71
-
72
- #: ../tinymce/tinymce.php:72
73
- msgid "Click to Close Accordions"
74
- msgstr ""
75
-
76
- #: ../tinymce/tinymce.php:73
77
- msgid "Scroll to Top of Accordion"
78
- msgstr ""
79
-
80
- #: ../tinymce/tinymce.php:74
81
- msgid "HTML Tag for Title"
82
- msgstr ""
83
-
84
- #: ../tinymce/tinymce.php:75
85
- msgid "Add an accordion item"
86
- msgstr ""
87
-
88
- #: ../tinymce/tinymce.php:76
89
- msgid "Insert Accordion Item Shortcode"
90
- msgstr ""
91
-
92
- #: ../tinymce/tinymce.php:77
93
- msgid "Accordion Item Title"
94
- msgstr ""
95
-
96
- #: ../tinymce/tinymce.php:78
97
- msgid "ID (optional)"
98
- msgstr ""
99
-
100
- #: ../tinymce/tinymce.php:79
101
- msgid "Each ID on a single page must be unique and cannot contain spaces."
102
- msgstr ""
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Accordion Shortcodes\n"
4
+ "POT-Creation-Date: 2015-05-09 09:37-0500\n"
5
+ "PO-Revision-Date: 2015-05-09 09:37-0500\n"
6
  "Last-Translator: Phil Buchanan <info@philbuchanan.com>\n"
7
  "Language-Team: \n"
8
  "Language: en_CA\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.7.6\n"
13
  "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c\n"
14
  "X-Poedit-Basepath: .\n"
15
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
16
  "X-Poedit-SearchPath-0: ..\n"
17
 
18
+ #: ../accordion-shortcodes.php:294
19
  msgid "Please enter a title attribute"
20
  msgstr ""
21
 
22
+ #: ../accordion-shortcodes.php:318
23
  msgctxt "link to documentation on wordpress.org site"
24
  msgid "Documentation"
25
  msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate Link: http://philbuchanan.com/
5
  Tags: accordion, accordions, shortcodes, responsive accordions, accordions plugin, jquery accordions, accordions short-code, accordions plugin wordpress, accordions plugin jquery
6
  Requires at least: 3.3
7
  Tested up to: 4.2
8
- Stable tag: 2.2.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -15,7 +15,7 @@ Shortcodes for creating responsive accordion drop-downs.
15
 
16
  Accordion Shortcodes is a simple plugin that adds a few shortcodes for adding accordion drop-downs to your pages.
17
 
18
- The accordions should blend seemlessly with your theme. However, you may want to be able to edit your themes main stylesheet in order to [add some custom styling (CSS)](http://wordpress.org/plugins/accordion-shortcodes/other_notes/#Other-Notes).
19
 
20
  = Features =
21
 
5
  Tags: accordion, accordions, shortcodes, responsive accordions, accordions plugin, jquery accordions, accordions short-code, accordions plugin wordpress, accordions plugin jquery
6
  Requires at least: 3.3
7
  Tested up to: 4.2
8
+ Stable tag: 2.2.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
15
 
16
  Accordion Shortcodes is a simple plugin that adds a few shortcodes for adding accordion drop-downs to your pages.
17
 
18
+ The accordions should blend seamlessly with your theme. However, you may want to be able to edit your themes main stylesheet in order to [add some custom styling (CSS)](http://wordpress.org/plugins/accordion-shortcodes/other_notes/#Other-Notes).
19
 
20
  = Features =
21
 
tinymce/tinymce-plugin.js CHANGED
@@ -3,45 +3,48 @@
3
 
4
  tinymce.create('tinymce.plugins.accordionShortcodesExtensions', {
5
  init: function(editor, url) {
 
 
 
6
 
7
  // Accordion group
8
  editor.addButton('AccordionShortcode', {
9
- title: accordionShortcodesTranslations.group_button_label,
10
  image: url + '/images/accordion.gif',
11
  onclick: function() {
12
  editor.windowManager.open({
13
- title: accordionShortcodesTranslations.group_window_title,
14
  body: [
15
  {
16
  type: 'checkbox',
17
  name: 'autoclose',
18
- label: accordionShortcodesTranslations.group_auto_close_label,
19
  checked: true
20
  },
21
  {
22
  type: 'checkbox',
23
  name: 'openfirst',
24
- label: accordionShortcodesTranslations.group_open_first_label
25
  },
26
  {
27
  type: 'checkbox',
28
  name: 'openall',
29
- label: accordionShortcodesTranslations.group_open_all_label
30
  },
31
  {
32
  type: 'checkbox',
33
  name: 'clicktoclose',
34
- label: accordionShortcodesTranslations.group_click_to_close_label
35
  },
36
  {
37
  type: 'checkbox',
38
  name: 'scroll',
39
- label: accordionShortcodesTranslations.group_scroll_label
40
  },
41
  {
42
  type: 'listbox',
43
  name: 'tag',
44
- label: accordionShortcodesTranslations.group_html_tag_label,
45
  minWidth: 75,
46
  values: [
47
  {text: '---', value: null},
@@ -88,27 +91,27 @@
88
 
89
  // Accordion item
90
  editor.addButton('AccordionItemShortcode', {
91
- title: accordionShortcodesTranslations.item_button_label,
92
  image: url + '/images/accordion-item.gif',
93
  onclick: function() {
94
  editor.windowManager.open({
95
- title: accordionShortcodesTranslations.item_window_title,
96
  body: [
97
  {
98
  type: 'textbox',
99
  name: 'title',
100
- label: accordionShortcodesTranslations.item_title_label,
101
  minWidth: 300
102
  },
103
  {
104
  type: 'textbox',
105
  name: 'id',
106
- label: accordionShortcodesTranslations.item_id_label,
107
  minWidth: 300
108
  },
109
  {
110
  type: 'container',
111
- html: accordionShortcodesTranslations.item_notes
112
  }
113
  ],
114
  onsubmit: function(e) {
3
 
4
  tinymce.create('tinymce.plugins.accordionShortcodesExtensions', {
5
  init: function(editor, url) {
6
+ if (accordionShortcodesPrefix == undefined) {
7
+ var accordionShortcodesPrefix = '';
8
+ }
9
 
10
  // Accordion group
11
  editor.addButton('AccordionShortcode', {
12
+ title: 'Add an accordion group',
13
  image: url + '/images/accordion.gif',
14
  onclick: function() {
15
  editor.windowManager.open({
16
+ title: 'Insert Accordion Shortcode',
17
  body: [
18
  {
19
  type: 'checkbox',
20
  name: 'autoclose',
21
+ label: 'Auto Close Accordions',
22
  checked: true
23
  },
24
  {
25
  type: 'checkbox',
26
  name: 'openfirst',
27
+ label: 'Open First Accordion'
28
  },
29
  {
30
  type: 'checkbox',
31
  name: 'openall',
32
+ label: 'Open All Accordions'
33
  },
34
  {
35
  type: 'checkbox',
36
  name: 'clicktoclose',
37
+ label: 'Click to Close Accordions'
38
  },
39
  {
40
  type: 'checkbox',
41
  name: 'scroll',
42
+ label: 'Scroll to Top of Accordion'
43
  },
44
  {
45
  type: 'listbox',
46
  name: 'tag',
47
+ label: 'HTML Tag for Title',
48
  minWidth: 75,
49
  values: [
50
  {text: '---', value: null},
91
 
92
  // Accordion item
93
  editor.addButton('AccordionItemShortcode', {
94
+ title: 'Add an accordion item',
95
  image: url + '/images/accordion-item.gif',
96
  onclick: function() {
97
  editor.windowManager.open({
98
+ title: 'Insert Accordion Item Shortcode',
99
  body: [
100
  {
101
  type: 'textbox',
102
  name: 'title',
103
+ label: 'Accordion Item Title',
104
  minWidth: 300
105
  },
106
  {
107
  type: 'textbox',
108
  name: 'id',
109
+ label: 'ID (optional)',
110
  minWidth: 300
111
  },
112
  {
113
  type: 'container',
114
+ html: 'Each ID on a single page must be unique and cannot contain spaces.'
115
  }
116
  ],
117
  onsubmit: function(e) {
tinymce/tinymce.php CHANGED
@@ -11,10 +11,7 @@ class Accordion_Shortcode_Tinymce_Extensions {
11
  */
12
  function __construct() {
13
  add_action('admin_init', array($this, 'button_hooks'));
14
-
15
- foreach(array('post.php','post-new.php') as $hook) {
16
- add_action("admin_head-$hook", array($this, 'admin_head'));
17
- }
18
  }
19
 
20
 
@@ -63,26 +60,6 @@ class Accordion_Shortcode_Tinymce_Extensions {
63
  * Localize MCE buttons and labels
64
  */
65
  public function admin_head() {
66
- $translations_arr = array(
67
- 'group_button_label' => __('Add an accordion group', 'accordion_shortcodes'),
68
- 'group_window_title' => __('Insert Accordion Shortcode', 'accordion_shortcodes'),
69
- 'group_auto_close_label' => __('Auto Close Accordions', 'accordion_shortcodes'),
70
- 'group_open_first_label' => __('Open First Accordion', 'accordion_shortcodes'),
71
- 'group_open_all_label' => __('Open All Accordions', 'accordion_shortcodes'),
72
- 'group_click_to_close_label' => __('Click to Close Accordions', 'accordion_shortcodes'),
73
- 'group_scroll_label' => __('Scroll to Top of Accordion', 'accordion_shortcodes'),
74
- 'group_html_tag_label' => __('HTML Tag for Title', 'accordion_shortcodes'),
75
- 'item_button_label' => __('Add an accordion item', 'accordion_shortcodes'),
76
- 'item_window_title' => __('Insert Accordion Item Shortcode', 'accordion_shortcodes'),
77
- 'item_title_label' => __('Accordion Item Title', 'accordion_shortcodes'),
78
- 'item_id_label' => __('ID (optional)', 'accordion_shortcodes'),
79
- 'item_notes' => __('Each ID on a single page must be unique and cannot contain spaces.', 'accordion_shortcodes')
80
- );
81
-
82
- foreach($translations_arr as $key => $value) {
83
- $translations[] = "'$key': '$value'";
84
- }
85
-
86
  if (defined('AS_COMPATIBILITY') && AS_COMPATIBILITY) {
87
  $prefix = 'as-';
88
  }
@@ -91,10 +68,7 @@ class Accordion_Shortcode_Tinymce_Extensions {
91
  } ?>
92
 
93
  <script type="text/javascript">
94
- var accordionShortcodesTranslations = {
95
- <?php echo implode(',', $translations); ?>
96
- },
97
- accordionShortcodesPrefix = '<?php echo $prefix; ?>';
98
  </script>
99
  <?php }
100
 
11
  */
12
  function __construct() {
13
  add_action('admin_init', array($this, 'button_hooks'));
14
+ add_action('admin_head', array($this, 'admin_head'));
 
 
 
15
  }
16
 
17
 
60
  * Localize MCE buttons and labels
61
  */
62
  public function admin_head() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  if (defined('AS_COMPATIBILITY') && AS_COMPATIBILITY) {
64
  $prefix = 'as-';
65
  }
68
  } ?>
69
 
70
  <script type="text/javascript">
71
+ var accordionShortcodesPrefix = '<?php echo $prefix; ?>';
 
 
 
72
  </script>
73
  <?php }
74