AddQuicktag - Version 2.3.0

Version Description

(06/19/2014) = * Allow Quicktags on edit-comment and quick-edit screen on default * Add possibilty to remove core quicktags from each post type * Add possibility to add enhanced code buttons to mask code and format * Rewrite the Im-Export function (now works simple with json) * Rewrite the german language file

Download this release

Release Info

Developer Bueltge
Plugin Icon wp plugin AddQuicktag
Version 2.3.0
Comparing to
See all releases

Code changes from version 2.3.0-RC1 to 2.3.0

addquicktag.php CHANGED
@@ -6,7 +6,7 @@
6
  * Text Domain: addquicktag
7
  * Domain Path: /languages
8
  * Description: Allows you to easily add custom Quicktags to the html- and visual-editor.
9
- * Version: 2.3.0-RC1
10
  * Author: Frank Bültge
11
  * Author URI: http://bueltge.de
12
  * License: GPLv2+
@@ -68,7 +68,7 @@ class Add_Quicktag {
68
  *
69
  * @var array
70
  */
71
- static private $post_types_for_js = array( 'widgets' );
72
 
73
  /**
74
  * @var string
@@ -150,17 +150,17 @@ class Add_Quicktag {
150
  *
151
  * @since 08/15/2013
152
  *
153
- * @param array $qtInit the Buttons
154
  *
155
  * @type string id
156
  * @type array buttons, default: 'strong,em,link,block,del,ins,img,ul,ol,li,code,more,close,fullscreen'
157
- * @return array $qtInit the Buttons
158
  */
159
- public function remove_quicktags( $qtInit ) {
160
 
161
  // No core buttons, not necessary to filter
162
- if ( empty( $qtInit[ 'buttons' ] ) ) {
163
- return $qtInit;
164
  }
165
 
166
  if ( is_multisite() && is_plugin_active_for_network( self::$plugin ) ) {
@@ -171,26 +171,33 @@ class Add_Quicktag {
171
 
172
  // No settings, not necessary to filter
173
  if ( empty( $options[ 'core_buttons' ] ) ) {
174
- return $qtInit;
175
  }
176
 
177
- // get only the keys
178
- $remove_these = array_keys( $options[ 'core_buttons' ] );
179
 
180
- // Convert string to array
181
- $buttons = explode( ',', $qtInit[ 'buttons' ] );
182
- // Loop over items to remove and unset them from the buttons
183
- for ( $i = 0; $i < count( $remove_these ); $i ++ ) {
184
- if ( FALSE !== ( $key = array_search( $remove_these[ $i ], $buttons ) ) ) {
185
- unset( $buttons[ $key ] );
 
 
 
 
 
 
 
186
  }
187
  }
188
 
189
  // Convert new buttons array back into a comma-separated string
190
- $qtInit[ 'buttons' ] = implode( ',', $buttons );
191
- $qtInit[ 'buttons' ] = apply_filters( 'addquicktag_remove_buttons', $qtInit[ 'buttons' ] );
192
 
193
- return $qtInit;
194
  }
195
 
196
  /**
@@ -211,14 +218,13 @@ class Add_Quicktag {
211
  * @return void
212
  */
213
  public function get_json() {
214
-
215
  global $current_screen;
216
 
217
- if ( isset( $current_screen->id ) &&
218
- ! in_array(
219
- $current_screen->id,
220
- $this->get_post_types_for_js()
221
- )
222
  ) {
223
  return NULL;
224
  }
@@ -267,21 +273,21 @@ class Add_Quicktag {
267
  /**
268
  * Enqueue Scripts for plugin
269
  *
270
- * @param $where string
271
  *
272
- * @since 2.0.0
273
- * @access public
274
  * @return void
275
  */
276
- public function admin_enqueue_scripts( $where ) {
277
 
278
  global $current_screen;
279
 
280
- if ( isset( $current_screen->id ) &&
281
- ! in_array(
282
- $current_screen->id,
283
- $this->get_post_types_for_js()
284
- )
285
  ) {
286
  return NULL;
287
  }
6
  * Text Domain: addquicktag
7
  * Domain Path: /languages
8
  * Description: Allows you to easily add custom Quicktags to the html- and visual-editor.
9
+ * Version: 2.3.0
10
  * Author: Frank Bültge
11
  * Author URI: http://bueltge.de
12
  * License: GPLv2+
68
  *
69
  * @var array
70
  */
71
+ static private $post_types_for_js = array( 'comment', 'edit-comments', 'widgets' );
72
 
73
  /**
74
  * @var string
150
  *
151
  * @since 08/15/2013
152
  *
153
+ * @param array $qtags_init the Buttons
154
  *
155
  * @type string id
156
  * @type array buttons, default: 'strong,em,link,block,del,ins,img,ul,ol,li,code,more,close,fullscreen'
157
+ * @return array $qtags_init the Buttons
158
  */
159
+ public function remove_quicktags( $qtags_init ) {
160
 
161
  // No core buttons, not necessary to filter
162
+ if ( empty( $qtags_init[ 'buttons' ] ) ) {
163
+ return $qtags_init;
164
  }
165
 
166
  if ( is_multisite() && is_plugin_active_for_network( self::$plugin ) ) {
171
 
172
  // No settings, not necessary to filter
173
  if ( empty( $options[ 'core_buttons' ] ) ) {
174
+ return $qtags_init;
175
  }
176
 
177
+ // get current screen, post type
178
+ $screen = get_current_screen();
179
 
180
+ // Convert string to array from default core buttons
181
+ $buttons = explode( ',', $qtags_init[ 'buttons' ] );
182
+
183
+ // loop about the options to check for each post type
184
+ foreach ( $options[ 'core_buttons' ] as $button => $post_type ) {
185
+
186
+ // if the post type is inside the settings array active, the remove qtags
187
+ if ( array_key_exists( $screen->id, $post_type ) ) {
188
+
189
+ // If settings have key inside, then unset this button
190
+ if ( FALSE !== ( $key = array_search( $button, $buttons ) ) ) {
191
+ unset( $buttons[ $key ] );
192
+ }
193
  }
194
  }
195
 
196
  // Convert new buttons array back into a comma-separated string
197
+ $qtags_init[ 'buttons' ] = implode( ',', $buttons );
198
+ $qtags_init[ 'buttons' ] = apply_filters( 'addquicktag_remove_buttons', $qtags_init[ 'buttons' ] );
199
 
200
+ return $qtags_init;
201
  }
202
 
203
  /**
218
  * @return void
219
  */
220
  public function get_json() {
 
221
  global $current_screen;
222
 
223
+ if ( ! in_array(
224
+ $current_screen->id,
225
+ $this->get_post_types_for_js()
226
+ ) &&
227
+ isset( $current_screen->id )
228
  ) {
229
  return NULL;
230
  }
273
  /**
274
  * Enqueue Scripts for plugin
275
  *
276
+ * @internal param string $where
277
  *
278
+ * @since 2.0.0
279
+ * @access public
280
  * @return void
281
  */
282
+ public function admin_enqueue_scripts() {
283
 
284
  global $current_screen;
285
 
286
+ if ( ! in_array(
287
+ $current_screen->id,
288
+ $this->get_post_types_for_js()
289
+ ) &&
290
+ isset( $current_screen->id )
291
  ) {
292
  return NULL;
293
  }
assets/screenshot-1.png ADDED
Binary file
assets/screenshot-2.png ADDED
Binary file
assets/screenshot-3.png ADDED
Binary file
assets/screenshot-4.png ADDED
Binary file
css/settings.css CHANGED
@@ -3,8 +3,8 @@
3
  *
4
  * @package AddQuicktag Plugin
5
  * @author Frank Bueltge <frank@bueltge.de>
6
- * @version 03/27/2014
7
  * @since 2.02.3
8
  */
9
 
10
- .rmnlQuicktagSettings .rmnlqsheader{height:10em;vertical-align:bottom}.hover,table tr:hover{background-color:#ccc}.rmnlQuicktagSettings th{vertical-align:bottom!important;text-align:center}.rmnlQuicktagSettings .rotate{padding:0!important;margin:0 auto;width:1.2em;vertical-align:bottom!important}.rmnlQuicktagSettings .rotate span{display:block;padding:0!important;margin:0 auto;width:1.2em;vertical-align:middle!important;white-space:nowrap;writing-mode:tb-rl;-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)"}.rmnlQuicktagSettings input[type=text]{height:3.5em;width:99%;margin:0 0 .5em}.rmnlQuicktagSettings textarea{height:3.5em;width:99%;margin:0 0 .2em}
3
  *
4
  * @package AddQuicktag Plugin
5
  * @author Frank Bueltge <frank@bueltge.de>
6
+ * @version 06/19/2014
7
  * @since 2.02.3
8
  */
9
 
10
+ .rmnlQuicktagSettings .rmnlqsheader{height:10em;vertical-align:bottom}.hover,table tr:hover{background-color:#ccc}.rmnlCodeQuicktagSettings th,.rmnlCoreQuicktagSettings th,.rmnlQuicktagSettings th{vertical-align:bottom!important;text-align:center}.rmnlQuicktagSettings .rotate{padding:0!important;margin:0 auto;width:1.2em;vertical-align:bottom!important}.rmnlQuicktagSettings .rotate span{display:block;padding:0!important;margin:0 auto;width:1.2em;vertical-align:middle!important;white-space:nowrap;writing-mode:tb-rl;-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)"}.rmnlQuicktagSettings input[type=text]{height:3.5em;width:99%;margin:0 0 .5em}.rmnlQuicktagSettings textarea{height:3.5em;width:99%;margin:0 0 .2em}
css/settings.dev.css CHANGED
@@ -3,7 +3,7 @@
3
  *
4
  * @package AddQuicktag Plugin
5
  * @author Frank Bueltge <frank@bueltge.de>
6
- * @version 03/27/2014
7
  * @since 2.02.3
8
  */
9
 
@@ -16,22 +16,24 @@
16
  background-color: #ccc;
17
  }
18
 
19
- .rmnlQuicktagSettings th {
20
- vertical-align: bottom !important;
21
- text-align: center;
 
 
22
  }
23
 
24
  .rmnlQuicktagSettings .rotate {
25
- padding: 0 !important;
26
- margin: 0 auto;
27
- width: 1.2em;
28
- vertical-align: bottom !important;
29
  }
30
 
31
  .rmnlQuicktagSettings .rotate span {
32
  display: block;
33
  padding: 0 !important;
34
- margin: 0 auto;
35
  width: 1.2em;
36
  vertical-align: middle !important;
37
  white-space: nowrap;
@@ -50,12 +52,12 @@
50
 
51
  .rmnlQuicktagSettings input[type='text'] {
52
  height: 3.5em;
53
- width: 99%;
54
  margin: 0 0 .5em 0;
55
  }
56
 
57
  .rmnlQuicktagSettings textarea {
58
  height: 3.5em;
59
- width: 99%;
60
  margin: 0 0 .2em 0;
61
  }
3
  *
4
  * @package AddQuicktag Plugin
5
  * @author Frank Bueltge <frank@bueltge.de>
6
+ * @version 06/19/2014
7
  * @since 2.02.3
8
  */
9
 
16
  background-color: #ccc;
17
  }
18
 
19
+ .rmnlQuicktagSettings th,
20
+ .rmnlCoreQuicktagSettings th,
21
+ .rmnlCodeQuicktagSettings th{
22
+ vertical-align: bottom !important;
23
+ text-align: center;
24
  }
25
 
26
  .rmnlQuicktagSettings .rotate {
27
+ padding: 0 !important;
28
+ margin: 0 auto;
29
+ width: 1.2em;
30
+ vertical-align: bottom !important;
31
  }
32
 
33
  .rmnlQuicktagSettings .rotate span {
34
  display: block;
35
  padding: 0 !important;
36
+ margin: 0 auto;
37
  width: 1.2em;
38
  vertical-align: middle !important;
39
  white-space: nowrap;
52
 
53
  .rmnlQuicktagSettings input[type='text'] {
54
  height: 3.5em;
55
+ width: 99%;
56
  margin: 0 0 .5em 0;
57
  }
58
 
59
  .rmnlQuicktagSettings textarea {
60
  height: 3.5em;
61
+ width: 99%;
62
  margin: 0 0 .2em 0;
63
  }
inc/class-code-quicktags.php CHANGED
@@ -7,6 +7,7 @@
7
  * @subpackage AddQuicktag Settings
8
  * @author Frank Bueltge <frank@bueltge.de>
9
  * @since 01/26/2014
 
10
  */
11
 
12
  if ( ! function_exists( 'add_action' ) ) {
@@ -24,7 +25,7 @@ class Add_Quicktag_Code_Quicktags extends Add_Quicktag_Settings {
24
  *
25
  * @var
26
  */
27
- private static $post_types_for_js;
28
 
29
  /**
30
  * Static var for textdomain
@@ -73,47 +74,74 @@ class Add_Quicktag_Code_Quicktags extends Add_Quicktag_Settings {
73
  */
74
  public function get_code_quicktag_area( $options ) {
75
 
76
- if ( ! isset( $options['code_buttons'] ) ) {
77
- $options['code_buttons'] = array();
78
- }
79
-
80
- $checked_enhanced_code = $checked_ende_coding = '';
81
- if ( array_key_exists( 'enhanced_code', $options['code_buttons'] ) ) {
82
- $checked_enhanced_code = ' checked="checked"';
83
- }
84
- if ( array_key_exists( 'ende_coding', $options['code_buttons'] ) ) {
85
- $checked_ende_coding = ' checked="checked"';
86
  }
87
  ?>
88
  <h3><?php _e( 'Enhanced Code Quicktag buttons', self::$textdomain ); ?></h3>
89
  <p><?php _e( 'Select the checkbox below to add enhanced code buttons.', $this->get_textdomain() ); ?></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
 
91
- <table class="widefat">
92
  <tr>
93
- <th class="row-title num" style="width:3%;">&#x2714;</th>
94
  <th class="row-title"><?php _e( 'Button', self::$textdomain ); ?></th>
 
 
95
  </tr>
96
 
97
- <tr>
98
- <td class="num">
99
- <?php echo '<input type="checkbox" name="' . parent::get_option_string()
100
- . '[code_buttons][enhanced_code]" value="1" '
101
- . $checked_enhanced_code . ' />';
102
- ?>
103
- </td>
104
- <td>
105
- <?php _e( 'Enhanced Code buttons.<br />Add a pull down menu for different languages before the default code button and include this as class inside the code tag. Also add a pre button for preformatted text.', self::$textdomain ); ?>
106
- </td>
107
- <td>
108
- <tr>
109
- <td class="num">
110
- <?php echo '<input type="checkbox" name="' . parent::get_option_string()
111
- . '[code_buttons][ende_coding]" value="1" '
112
- . $checked_ende_coding . ' />';
113
- ?>
114
- </td>
115
- <td><?php _e( 'Add buttons to do the inconvient HTML encoding/decoding, like &lt; to &amp;lt; and back.', self::$textdomain ); ?></td>
116
- </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  </table>
118
  <?php
119
  }
7
  * @subpackage AddQuicktag Settings
8
  * @author Frank Bueltge <frank@bueltge.de>
9
  * @since 01/26/2014
10
+ * @version 06/19/2014
11
  */
12
 
13
  if ( ! function_exists( 'add_action' ) ) {
25
  *
26
  * @var
27
  */
28
+ private static $code_quicktags = array( 'enhanced_code' => 'pre', 'en_de_coding' => 'htmlentities' );
29
 
30
  /**
31
  * Static var for textdomain
74
  */
75
  public function get_code_quicktag_area( $options ) {
76
 
77
+ if ( ! isset( $options[ 'code_buttons' ] ) ) {
78
+ $options[ 'code_buttons' ] = array();
 
 
 
 
 
 
 
 
79
  }
80
  ?>
81
  <h3><?php _e( 'Enhanced Code Quicktag buttons', self::$textdomain ); ?></h3>
82
  <p><?php _e( 'Select the checkbox below to add enhanced code buttons.', $this->get_textdomain() ); ?></p>
83
+ <h4><?php _e( 'pre: Enhanced Code buttons', self::$textdomain ); ?></h4>
84
+ <p><?php _e( 'Enhanced the default Code buttons. Add a pull down menu for different languages before the default code button and include this as class inside the code tag. Also add a pre button for preformatted text.', self::$textdomain ); ?></p>
85
+ <h4><?php _e( 'htmlentities: HTML Entities, HTML Decode', self::$textdomain ); ?></h4>
86
+ <p><?php _e( 'Add buttons to do the inconvient HTML encoding/decoding, like &lt; to &amp;lt; and back.', self::$textdomain ); ?></p>
87
+
88
+ <?php
89
+ // loop about the post types, create html an values for title in table
90
+ $pt_title = '';
91
+ $pt_colgroup = '';
92
+ foreach ( $this->get_post_types_for_js() as $post_type ) {
93
+ $pt_title .= '<th class="row-title rotate" title="Post Type"><span><code>' . $post_type . '</code></span></th>' . "\n";
94
+ $pt_colgroup .= '<colgroup></colgroup>' . "\n";
95
+ }
96
+ ?>
97
+
98
+ <table class="widefat form-table rmnlCodeQuicktagSettings">
99
+ <colgroup></colgroup>
100
+ <?php echo $pt_colgroup; ?>
101
+ <colgroup></colgroup>
102
 
 
103
  <tr>
 
104
  <th class="row-title"><?php _e( 'Button', self::$textdomain ); ?></th>
105
+ <?php echo $pt_title; ?>
106
+ <th class="row-title num" style="width:3%;">&#x2714;</th>
107
  </tr>
108
 
109
+ <?php
110
+ // Convert string to array
111
+ //$code_buttons = explode( ',', self::$code_quicktags );
112
+ // Loop over items to remove and unset them from the buttons
113
+ $i = 9999;
114
+ foreach ( self::$code_quicktags as $key => $value ) {
115
+
116
+ echo '<tr id="rmqtb' . $i . '">' . "\n";
117
+ echo '<td><input type="button" class="ed_button" title="" value="' . $value . '"></td>';
118
+
119
+ // loop about the post types, create html an values
120
+ $pt_checkboxes = '';
121
+ foreach ( $this->get_post_types_for_js() as $post_type ) {
122
+
123
+ $pt_checked = '';
124
+ if ( isset( $options[ 'code_buttons' ][ $value ][ $post_type ] ) && 1 == $options[ 'code_buttons' ][ $value ][ $post_type ] ) {
125
+ $pt_checked = ' checked="checked"';
126
+ }
127
+
128
+ $pt_checkboxes .= '<td class="num"><input type="checkbox" name="' .
129
+ parent :: get_option_string() . '[code_buttons][' .
130
+ $value . '][' . $post_type . ']" value="1"' .
131
+ $pt_checked . '/></td>' . "\n";
132
+ }
133
+ echo $pt_checkboxes;
134
+
135
+ echo '<td class="num"><input type="checkbox" class="toggle" id="select_all_' . $i . '" value="' . $i . '" /></td>' . "\n";
136
+
137
+ echo '</tr>' . "\n";
138
+ $i ++;
139
+ }
140
+
141
+ // Convert new buttons array back into a comma-separated string
142
+ //$code_qt = implode( ',', $code_buttons );
143
+ ?>
144
+
145
  </table>
146
  <?php
147
  }
inc/class-imexport.php CHANGED
@@ -6,6 +6,7 @@
6
  * @package AddQuicktag
7
  * @subpackage AddQuicktag Settings
8
  * @author Frank Bueltge <frank@bueltge.de>
 
9
  */
10
 
11
  if ( ! function_exists( 'add_action' ) ) {
@@ -18,6 +19,24 @@ if ( ! function_exists( 'add_action' ) ) {
18
  */
19
  class Add_Quicktag_Im_Export extends Add_Quicktag_Settings {
20
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  /**
22
  * Post types for the settings
23
  *
@@ -53,14 +72,18 @@ class Add_Quicktag_Im_Export extends Add_Quicktag_Settings {
53
  */
54
  private function __construct() {
55
 
 
 
 
 
56
  self::$post_types_for_js = parent::get_post_types_for_js();
57
 
58
- if ( isset( $_GET['addquicktag_download'] ) && check_admin_referer( parent :: $nonce_string ) ) {
59
  $this->get_export_file();
60
  }
61
  //add_action( 'init', array( $this, 'get_export_file' ) );
62
 
63
- if ( isset( $_POST['addquicktag_import'] ) && check_admin_referer( parent :: $nonce_string ) ) {
64
  $this->import_file();
65
  }
66
  //add_action( 'init', array( $this, 'import_file' ) );
@@ -103,12 +126,12 @@ class Add_Quicktag_Im_Export extends Add_Quicktag_Settings {
103
  <h3><span><?php _e( 'Import', parent :: get_textdomain() ); ?></span></h3>
104
 
105
  <div class="inside">
106
- <p><?php _e( 'If you have quicktags from other installs, the plugin can import those into this site. To get started, choose a file to import.', parent :: get_textdomain() ); ?></p>
107
 
108
  <form method="post" action="" enctype="multipart/form-data">
109
  <?php wp_nonce_field( parent :: $nonce_string ); ?>
110
  <p class="submit">
111
- <input type="file" name="xml" />
112
  <input type="submit" name="submit" value="<?php _e( 'Upload file and import', parent :: get_textdomain() ); ?> &raquo;" />
113
  <input type="hidden" name="addquicktag_import" value="true" />
114
  </p>
@@ -118,123 +141,96 @@ class Add_Quicktag_Im_Export extends Add_Quicktag_Settings {
118
  <?php
119
  }
120
 
121
- /*
122
- * Build export file, xml
123
- *
124
  * @access public
125
  * @since 2.0.0
126
- * @uses is_plugin_active_for_network, get_site_option, get_option
127
- * @return string $xml
128
  */
129
  public function get_export_file() {
130
 
131
- $options = get_site_option( parent :: get_option_string() );
132
-
133
- if ( $options['buttons'] ) {
134
-
135
- $xml = '<?xml version="1.0" encoding="UTF-8"?>';
136
- $xml .= "\n" . '<buttons>' . "\n";
137
-
138
- for( $i = 0; $i < count( $options['buttons'] ); $i ++ ) {
139
- $xml .= "\t" . '<quicktag>' . "\n";
140
- foreach( $options['buttons'][ $i ] as $name => $value ) {
141
-
142
- $value = stripslashes( $value );
143
 
144
- if ( empty( $value ) ) {
145
- $xml .= "\t\t" . '<' . $name . '/>' . "\n";
146
- } elseif ( preg_match( '/^[0-9]*$/', $value ) ) {
147
- $xml .= "\t\t" . '<' . $name . '>' . $value . '</' . $name . '>' . "\n";
148
- } else {
149
- $xml .= "\t\t" . '<' . $name . '><![CDATA[' . $value . ']]></' . $name . '>' . "\n";
150
- }
151
- }
152
- $xml .= "\t" . '</quicktag>' . "\n";
153
- }
154
- $xml .= '</buttons>';
155
 
 
 
156
  } else {
157
- $xml = 'We dont find settings in database';
158
  }
159
 
160
- $filename = urlencode( 'addquicktag.' . date( 'Y-m-d' ) . '.xml' );
161
- $filesize = strlen( $xml );
162
 
163
- $this ->export_xml( $filename, $filesize, $filetype = 'text/xml' );
164
- echo $xml;
165
- exit;
166
- }
167
 
168
- /**
169
- * Create download file
170
- *
171
- * @access public
172
- * @since 2.0.0
173
- *
174
- * @param string $filename
175
- * @param string $filesize
176
- * @param string $filetype
177
- *
178
- * @uses get_option
179
- * @return void
180
- */
181
- public function export_xml( $filename, $filesize, $filetype ) {
182
-
183
- header( 'Content-Description: File Transfer' );
184
- header( 'Content-Disposition: attachment; filename=' . $filename );
185
- header( 'Content-Length: ' . $filesize );
186
- header( 'Content-type: ' . $filetype . '; charset=' . get_option( 'blog_charset' ), TRUE );
187
- flush();
188
  }
189
 
190
  /**
191
- * Import XML and update settings
192
  *
193
- * @access public
194
- * @since 2.0.0
195
  *
196
- * @param bool|string $filename
197
  *
198
- * @uses current_user_can, wp_die, is_plugin_active_for_network, update_site_option, update_option
199
  * @return void
200
  */
201
- public function import_file( $filename = FALSE ) {
202
 
203
  if ( ! current_user_can( 'manage_options' ) ) {
204
  wp_die( __( 'Options not update - you don&lsquo;t have the privilidges to do this!', parent::get_textdomain() ) );
205
  }
206
 
207
- // use tmp file
208
- if ( ! $filename ) {
209
- $filename = $_FILES['xml']['tmp_name'];
210
- }
211
 
212
- $filename = preg_replace( "/\<\!\[CDATA\[(.*?)\]\]\>/ies", "'[CDATA]' . base64_encode('$1') . '[/CDATA]'", $filename );
213
- $filename = utf8_encode( $filename );
214
- $matches = simplexml_load_file( $filename );
215
 
216
- $buttons = '';
217
- // create array from xml
218
- $button = array();
219
- /**
220
- * @var $matches stdClass
221
- */
222
- foreach( $matches->quicktag as $key ) {
223
 
224
- foreach( $key as $value ) {
225
- /* @var $value stdClass */
226
- $buttons[ $value->getName() ] = $value;
227
- }
228
 
229
- $button[] = $buttons;
 
230
  }
231
- $options['buttons'] = $button;
232
 
233
- // validate the values from xml
234
- $options = parent::validate_settings( $options );
235
 
236
- // update settings in database
237
- update_site_option( parent::get_option_string(), $options );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
238
  }
239
 
240
  } // end class
6
  * @package AddQuicktag
7
  * @subpackage AddQuicktag Settings
8
  * @author Frank Bueltge <frank@bueltge.de>
9
+ * @version 06/19/2014
10
  */
11
 
12
  if ( ! function_exists( 'add_action' ) ) {
19
  */
20
  class Add_Quicktag_Im_Export extends Add_Quicktag_Settings {
21
 
22
+ /**
23
+ * string for translation
24
+ * @var string
25
+ */
26
+ static public $textdomain;
27
+
28
+ /**
29
+ * string for options in table options
30
+ * @var string
31
+ */
32
+ static private $option_string;
33
+
34
+ /**
35
+ * string for plugin file
36
+ * @var string
37
+ */
38
+ static private $plugin;
39
+
40
  /**
41
  * Post types for the settings
42
  *
72
  */
73
  private function __construct() {
74
 
75
+ // textdomain from parent class
76
+ self::$textdomain = parent::get_textdomain();
77
+ self::$option_string = parent::get_option_string();
78
+ self::$plugin = parent::get_plugin_string();
79
  self::$post_types_for_js = parent::get_post_types_for_js();
80
 
81
+ if ( isset( $_GET[ 'addquicktag_download' ] ) && check_admin_referer( parent :: $nonce_string ) ) {
82
  $this->get_export_file();
83
  }
84
  //add_action( 'init', array( $this, 'get_export_file' ) );
85
 
86
+ if ( isset( $_POST[ 'addquicktag_import' ] ) && check_admin_referer( parent :: $nonce_string ) ) {
87
  $this->import_file();
88
  }
89
  //add_action( 'init', array( $this, 'import_file' ) );
126
  <h3><span><?php _e( 'Import', parent :: get_textdomain() ); ?></span></h3>
127
 
128
  <div class="inside">
129
+ <p><?php _e( 'If you have quicktags from other installs, the plugin can import those into this site. To get started, choose a file to import. (json-Format)', parent :: get_textdomain() ); ?></p>
130
 
131
  <form method="post" action="" enctype="multipart/form-data">
132
  <?php wp_nonce_field( parent :: $nonce_string ); ?>
133
  <p class="submit">
134
+ <input type="file" name="import_file" />
135
  <input type="submit" name="submit" value="<?php _e( 'Upload file and import', parent :: get_textdomain() ); ?> &raquo;" />
136
  <input type="hidden" name="addquicktag_import" value="true" />
137
  </p>
141
  <?php
142
  }
143
 
144
+ /**
145
+ * Build export file, json
146
+ *
147
  * @access public
148
  * @since 2.0.0
 
 
149
  */
150
  public function get_export_file() {
151
 
152
+ if ( ! current_user_can( 'manage_options' ) ) {
153
+ return;
154
+ }
 
 
 
 
 
 
 
 
 
155
 
156
+ check_admin_referer( parent :: $nonce_string );
 
 
 
 
 
 
 
 
 
 
157
 
158
+ if ( is_multisite() && is_plugin_active_for_network( self::$plugin ) ) {
159
+ $options = get_site_option( self::$option_string );
160
  } else {
161
+ $options = get_option( self::$option_string );
162
  }
163
 
164
+ ignore_user_abort( TRUE );
 
165
 
166
+ nocache_headers();
167
+ header( 'Content-Type: application/json; charset=utf-8' );
168
+ header( 'Content-Disposition: attachment; filename=addquicktag.-' . date( 'm-d-Y' ) . '.json' );
169
+ header( "Expires: 0" );
170
 
171
+ echo json_encode( $options );
172
+ exit;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
  }
174
 
175
  /**
176
+ * Import json and update settings
177
  *
178
+ * @access public
179
+ * @since 2.0.0
180
  *
181
+ * @internal param bool|string $filename
182
  *
183
+ * @uses current_user_can, wp_die, is_plugin_active_for_network, update_site_option, update_option
184
  * @return void
185
  */
186
+ public function import_file() {
187
 
188
  if ( ! current_user_can( 'manage_options' ) ) {
189
  wp_die( __( 'Options not update - you don&lsquo;t have the privilidges to do this!', parent::get_textdomain() ) );
190
  }
191
 
192
+ check_admin_referer( parent :: $nonce_string );
 
 
 
193
 
194
+ $extension = explode( '.', $_FILES[ 'import_file' ][ 'name' ] );
195
+ $extension = end( $extension );
 
196
 
197
+ if ( $extension != 'json' ) {
198
+ wp_die( __( 'Please upload a valid .json file', parent::get_textdomain() ) );
199
+ }
 
 
 
 
200
 
201
+ $import_file = $_FILES[ 'import_file' ][ 'tmp_name' ];
 
 
 
202
 
203
+ if ( empty( $import_file ) ) {
204
+ wp_die( __( 'Please upload a file to import.', parent::get_textdomain() ) );
205
  }
 
206
 
207
+ // Retrieve the settings from the file and convert the json object to an array.
208
+ $options = (array) json_decode( file_get_contents( $import_file ), TRUE );
209
 
210
+ if ( is_multisite() && is_plugin_active_for_network( self::$plugin ) ) {
211
+ update_site_option( self::$option_string, $options );
212
+ } else {
213
+ update_option( self::$option_string, $options );
214
+ }
215
+
216
+ // redirect to settings page in network
217
+ if ( is_multisite() && is_plugin_active_for_network( self::$plugin ) ) {
218
+ wp_redirect(
219
+ add_query_arg(
220
+ array( 'page' => self::$plugin, 'updated' => 'true' ),
221
+ network_admin_url( 'settings.php' )
222
+ )
223
+ );
224
+ } else {
225
+ $page = str_replace( basename( __FILE__ ), 'class-settings.php', plugin_basename( __FILE__ ) );
226
+ wp_redirect(
227
+ add_query_arg(
228
+ array( 'page' => $page, 'updated' => 'true' ),
229
+ admin_url( 'options-general.php' )
230
+ )
231
+ );
232
+ }
233
+ exit;
234
  }
235
 
236
  } // end class
inc/class-remove-quicktags.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package AddQuicktag
6
  * @subpackage AddQuicktag Settings
7
  * @author Frank Bueltge <frank@bueltge.de>
8
- * @version 05/22/2014
9
  */
10
 
11
  if ( ! function_exists( 'add_action' ) ) {
@@ -13,17 +13,14 @@ if ( ! function_exists( 'add_action' ) ) {
13
  exit;
14
  }
15
 
 
 
 
16
  class Add_Quicktag_Remove_Quicktags extends Add_Quicktag_Settings {
17
 
18
- // post types for the settings
19
- private static $post_types_for_js;
20
-
21
  // default buttons from WP Core
22
  private static $core_quicktags = 'strong,em,link,block,del,ins,img,ul,ol,li,code,more,close,fullscreen';
23
 
24
- // Transient string
25
- private static $addquicktag_core_quicktags = 'addquicktag_core_quicktags';
26
-
27
  /**
28
  * Handler for the action 'init'. Instantiates this class.
29
  *
@@ -62,31 +59,40 @@ class Add_Quicktag_Remove_Quicktags extends Add_Quicktag_Settings {
62
  */
63
  public function get_remove_quicktag_area( $options ) {
64
 
65
- if ( ! isset( $options['core_buttons'] ) ) {
66
- $options['core_buttons'] = array();
67
  }
68
  ?>
69
  <h3><?php _e( 'Remove Core Quicktag buttons', parent::get_textdomain() ); ?></h3>
70
- <p><?php _e( 'Select the checkbox below to remove a core quicktags in all editors.', $this->get_textdomain() ); ?></p>
71
- <p><?php _e( '<strong>Currently a Beta option</strong>, to validate and only usable global on each post type. Please give me hints, feedback via the support possibilities, like <a href="https://github.com/bueltge/AddQuicktag/issues">Github Issues</a> or <a href="http://wordpress.org/support/plugin/addquicktag">WP Support Forum</a>.', $this->get_textdomain() ); ?></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
 
73
- <table class="widefat">
74
  <tr>
75
- <th class="row-title num" style="width:3%;">&#x2714;</th>
76
  <th class="row-title"><?php _e( 'Button', parent::get_textdomain() ); ?></th>
 
 
77
  </tr>
78
 
79
  <?php
80
  // Convert string to array
81
  $core_buttons = explode( ',', self::$core_quicktags );
82
  // Loop over items to remove and unset them from the buttons
83
- foreach( $core_buttons as $key => $value ) {
84
-
85
- if ( array_key_exists( $value, $options['core_buttons'] ) ) {
86
- $checked = ' checked="checked"';
87
- } else {
88
- $checked = '';
89
- }
90
 
91
  // same style as in editor
92
  if ( 'strong' === $value ) {
@@ -109,10 +115,29 @@ class Add_Quicktag_Remove_Quicktags extends Add_Quicktag_Settings {
109
  $style = '';
110
  }
111
 
112
- echo '<tr><td class="num"><input type="checkbox" name="' . parent :: get_option_string()
113
- . '[core_buttons][' . $value . ']" value="1" '
114
- . $checked . ' /></td><td>';
115
- echo '<input type="button" class="ed_button" title="" value="' . $text . '"' . $style . '> <code>' . $value . '</code></td></tr>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
  }
117
 
118
  // Convert new buttons array back into a comma-separated string
5
  * @package AddQuicktag
6
  * @subpackage AddQuicktag Settings
7
  * @author Frank Bueltge <frank@bueltge.de>
8
+ * @version 06/19/2014
9
  */
10
 
11
  if ( ! function_exists( 'add_action' ) ) {
13
  exit;
14
  }
15
 
16
+ /**
17
+ * Class Add_Quicktag_Remove_Quicktags
18
+ */
19
  class Add_Quicktag_Remove_Quicktags extends Add_Quicktag_Settings {
20
 
 
 
 
21
  // default buttons from WP Core
22
  private static $core_quicktags = 'strong,em,link,block,del,ins,img,ul,ol,li,code,more,close,fullscreen';
23
 
 
 
 
24
  /**
25
  * Handler for the action 'init'. Instantiates this class.
26
  *
59
  */
60
  public function get_remove_quicktag_area( $options ) {
61
 
62
+ if ( ! isset( $options[ 'core_buttons' ] ) ) {
63
+ $options[ 'core_buttons' ] = array();
64
  }
65
  ?>
66
  <h3><?php _e( 'Remove Core Quicktag buttons', parent::get_textdomain() ); ?></h3>
67
+ <p><?php _e( 'Select the checkbox below to remove a core quicktags in the editors of the respective post type.', $this->get_textdomain() ); ?></p>
68
+
69
+ <?php
70
+ // loop about the post types, create html an values for title in table
71
+ $pt_title = '';
72
+ $pt_colgroup = '';
73
+ foreach ( $this->get_post_types_for_js() as $post_type ) {
74
+ $pt_title .= '<th class="row-title rotate" title="Post Type"><span><code>' . $post_type . '</code></span></th>' . "\n";
75
+ $pt_colgroup .= '<colgroup></colgroup>' . "\n";
76
+ }
77
+ ?>
78
+
79
+ <table class="widefat form-table rmnlCoreQuicktagSettings">
80
+ <colgroup></colgroup>
81
+ <?php echo $pt_colgroup; ?>
82
+ <colgroup></colgroup>
83
 
 
84
  <tr>
 
85
  <th class="row-title"><?php _e( 'Button', parent::get_textdomain() ); ?></th>
86
+ <?php echo $pt_title; ?>
87
+ <th class="row-title num" style="width:3%;">&#x2714;</th>
88
  </tr>
89
 
90
  <?php
91
  // Convert string to array
92
  $core_buttons = explode( ',', self::$core_quicktags );
93
  // Loop over items to remove and unset them from the buttons
94
+ $i = 999;
95
+ foreach ( $core_buttons as $key => $value ) {
 
 
 
 
 
96
 
97
  // same style as in editor
98
  if ( 'strong' === $value ) {
115
  $style = '';
116
  }
117
 
118
+ echo '<tr id="rmqtb' . $i . '">' . "\n";
119
+ echo '<td><input type="button" class="ed_button" title="" value="' . $text . '"' . $style . '> <code>' . $value . '</code></td>';
120
+
121
+ // loop about the post types, create html an values
122
+ $pt_checkboxes = '';
123
+ foreach ( $this->get_post_types_for_js() as $post_type ) {
124
+
125
+ $pt_checked = '';
126
+ if ( isset( $options[ 'core_buttons' ][ $value ][ $post_type ] ) && 1 == $options[ 'core_buttons' ][ $value ][ $post_type ] ) {
127
+ $pt_checked = ' checked="checked"';
128
+ }
129
+
130
+ $pt_checkboxes .= '<td class="num"><input type="checkbox" name="' .
131
+ parent :: get_option_string() . '[core_buttons][' .
132
+ $value . '][' . $post_type . ']" value="1"' .
133
+ $pt_checked . '/></td>' . "\n";
134
+ }
135
+ echo $pt_checkboxes;
136
+
137
+ echo '<td class="num"><input type="checkbox" class="toggle" id="select_all_' . $i . '" value="' . $i . '" /></td>' . "\n";
138
+
139
+ echo '</tr>' . "\n";
140
+ $i ++;
141
  }
142
 
143
  // Convert new buttons array back into a comma-separated string
inc/class-settings.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package AddQuicktag
6
  * @subpackage AddQuicktag Settings
7
  * @author Frank Bueltge <frank@bueltge.de>
8
- * @version 05/22/2014
9
  * @since 2.0.0
10
  */
11
 
@@ -14,6 +14,9 @@ if ( ! function_exists( 'add_action' ) ) {
14
  exit;
15
  }
16
 
 
 
 
17
  class Add_Quicktag_Settings extends Add_Quicktag {
18
 
19
  /**
@@ -125,7 +128,7 @@ class Add_Quicktag_Settings extends Add_Quicktag {
125
  require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'class-remove-quicktags.php';
126
  // include class for add enhanced code quicktags
127
  // @TODO Solution for special code tags in quicktags
128
- //require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'class-code-quicktags.php';
129
  // include class for im/export
130
  require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'class-imexport.php';
131
  }
@@ -440,7 +443,7 @@ class Add_Quicktag_Settings extends Add_Quicktag {
440
 
441
  <div id="post-body">
442
  <div id="post-body-content">
443
- <?php do_action( 'addquicktag_settings_page' ); ?>
444
  </div>
445
  <!-- #post-body-content -->
446
  </div>
@@ -670,24 +673,51 @@ class Add_Quicktag_Settings extends Add_Quicktag {
670
  // reorder the array
671
  $value[ 'buttons' ] = array_values( $value[ 'buttons' ] );
672
 
673
- // Add core buttons to array of options
674
  if ( ! empty( $core_buttons ) ) {
675
 
 
 
 
 
 
 
 
 
 
 
676
  foreach ( $core_buttons as $key => $var ) {
677
- $core_buttons[ $key ] = (int) $var;
 
 
 
 
 
 
 
678
  }
679
 
680
- $value[ 'core_buttons' ] = $core_buttons;
 
681
  }
682
 
683
- // Add code buttons to array of options
684
  if ( ! empty( $code_buttons ) ) {
685
 
 
686
  foreach ( $code_buttons as $key => $var ) {
687
- $code_buttons[ $key ] = (int) $var;
 
 
 
 
 
 
 
688
  }
689
 
690
- $value[ 'code_buttons' ] = $code_buttons;
 
691
  }
692
 
693
  return $value;
@@ -720,11 +750,11 @@ class Add_Quicktag_Settings extends Add_Quicktag {
720
 
721
  /**
722
  * Enqueue scripts and stylesheets
723
- * @since 0.0.2
724
  *
725
- * @param $where
726
  */
727
- public function print_scripts( $where ) {
728
 
729
  $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '.dev' : '';
730
 
5
  * @package AddQuicktag
6
  * @subpackage AddQuicktag Settings
7
  * @author Frank Bueltge <frank@bueltge.de>
8
+ * @version 06/19/2014
9
  * @since 2.0.0
10
  */
11
 
14
  exit;
15
  }
16
 
17
+ /**
18
+ * Class Add_Quicktag_Settings
19
+ */
20
  class Add_Quicktag_Settings extends Add_Quicktag {
21
 
22
  /**
128
  require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'class-remove-quicktags.php';
129
  // include class for add enhanced code quicktags
130
  // @TODO Solution for special code tags in quicktags
131
+ require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'class-code-quicktags.php';
132
  // include class for im/export
133
  require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'class-imexport.php';
134
  }
443
 
444
  <div id="post-body">
445
  <div id="post-body-content">
446
+ <?php do_action( 'addquicktag_settings_page', $options ); ?>
447
  </div>
448
  <!-- #post-body-content -->
449
  </div>
673
  // reorder the array
674
  $value[ 'buttons' ] = array_values( $value[ 'buttons' ] );
675
 
676
+ // Filter core button values, strings and convert to integer
677
  if ( ! empty( $core_buttons ) ) {
678
 
679
+ /**
680
+ * $key is core-string
681
+ * 'core_buttons' =>
682
+ array (size=1)
683
+ 'strong' =>
684
+ array (size=2)
685
+ 'post' => string '1' (length=1)
686
+ 'page' => string '1' (length=1)
687
+ */
688
+ $filtered_core_buttons = array();
689
  foreach ( $core_buttons as $key => $var ) {
690
+
691
+ $core_button = array();
692
+ foreach ( $var as $post_type => $val ) {
693
+ $core_button[ $post_type ] = intval( $val );
694
+ }
695
+
696
+ $filtered_core_buttons[ $key ] = $core_button;
697
+
698
  }
699
 
700
+ $value[ 'core_buttons' ] = $filtered_core_buttons;
701
+
702
  }
703
 
704
+ // Filter code button values, strings and convert to integer
705
  if ( ! empty( $code_buttons ) ) {
706
 
707
+ $filtered_code_buttons = array();
708
  foreach ( $code_buttons as $key => $var ) {
709
+
710
+ $code_button = array();
711
+ foreach ( $var as $post_type => $val ) {
712
+ $code_button[ $post_type ] = intval( $val );
713
+ }
714
+
715
+ $filtered_code_buttons[ $key ] = $code_button;
716
+
717
  }
718
 
719
+ $value[ 'code_buttons' ] = $filtered_code_buttons;
720
+
721
  }
722
 
723
  return $value;
750
 
751
  /**
752
  * Enqueue scripts and stylesheets
753
+ * @since 0.0.2
754
  *
755
+ * @internal param $where
756
  */
757
+ public function print_scripts() {
758
 
759
  $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '.dev' : '';
760
 
js/add-quicktags.dev.js CHANGED
@@ -3,7 +3,7 @@
3
  *
4
  * @package AddQuicktag Plugin
5
  * @author Frank Bueltge <frank@bueltge.de>
6
- * @version 05/22/2014
7
  * @since 2.0.0
8
  */
9
 
@@ -22,7 +22,7 @@ jQuery(document).ready(function ($) {
22
  if (typeof tags == 'undefined')
23
  return;
24
 
25
- // window for input
26
  function qt_callback_input_window(e, c, ed) {
27
 
28
  var prmt = prompt('Enter Tag Name');
@@ -46,11 +46,11 @@ jQuery(document).ready(function ($) {
46
  }
47
 
48
  // check post type
49
- if ($.inArray("addquicktag_post_type", addquicktag_pt_for_js)) {
50
 
51
- for (var i = 0; i < tags.length; i++) {
52
  // check for active on this post type
53
- if (1 === parseInt(tags[i][addquicktag_post_type])) {
54
 
55
  if (typeof tags[i].title == 'undefined') tags[i].title = ' ';
56
  if (typeof tags[i].end == 'undefined') tags[i].end = '';
@@ -75,40 +75,55 @@ jQuery(document).ready(function ($) {
75
  tags[i].title
76
  );
77
 
78
- // @TODO Solution for special code tags in quicktags
79
- /**
80
- * ideas for code buttons and optional window with input possibility
81
- *
82
- *
83
- // @see http://bililite.com/blog/2012/08/20/custom-buttons-in-the-wordpress-html-editor/
84
- QTags.addButton('toHTML', 'HTML Entities', function(el, canvas){
85
- QTags.insertContent(get_selected_text(canvas).replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;'));
86
- }, 'Encode HTML Entities');
87
- QTags.addButton('fromHTML', 'Decode HTML', function(el, canvas){
88
- QTags.insertContent(get_selected_text(canvas).replace(/&amp;/g,'&').replace(/&lt;/g,'<').replace(/&gt;/g,'>'));
89
- }, 'Decode HTML Entities');
90
-
91
- var code_languages = ['html', 'javascript', 'css', 'bash', 'php', 'vb'];
92
- // Insert before the code button
93
- edButtons[109] = {
94
- html: function( id_prefix ) {
95
- return '<select id="' + id_prefix + 'code_language" class="language-select">' +
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  '<option>blank</option>' + // include a blank option
97
- '<option>' + code_languages.join( '</option><option>' ) + '</option>' +
98
  '</select>';
99
- }
100
- };
101
- $('body').on('change', 'select.language-select', function() {
102
- var lang = $(this).val();
103
- // 110 is the code qt-tag from core, wp-includes/js/quicktags.js
104
- edButtons[110].tagStart = lang ? '<code class="language-' + lang + '">' : '<code>';
105
-
106
- });
107
-
108
-
109
- // Add pre button for preformatted text
110
- QTags.addButton( 'qt_pre', 'pre', '<pre>', '</pre>', '', 'Preformatted text', '108' );
111
- */
112
 
113
  /**
114
  * @TODO New idea for multible edit windows
3
  *
4
  * @package AddQuicktag Plugin
5
  * @author Frank Bueltge <frank@bueltge.de>
6
+ * @version 06/19/2014
7
  * @since 2.0.0
8
  */
9
 
22
  if (typeof tags == 'undefined')
23
  return;
24
 
25
+ // window for input; currently not in use; maybe later
26
  function qt_callback_input_window(e, c, ed) {
27
 
28
  var prmt = prompt('Enter Tag Name');
46
  }
47
 
48
  // check post type
49
+ if ( $.inArray( "addquicktag_post_type", addquicktag_pt_for_js ) ) {
50
 
51
+ for ( var i = 0; i < tags.length; i++ ) {
52
  // check for active on this post type
53
+ if ( 1 === parseInt(tags[i][addquicktag_post_type] ) ) {
54
 
55
  if (typeof tags[i].title == 'undefined') tags[i].title = ' ';
56
  if (typeof tags[i].end == 'undefined') tags[i].end = '';
75
  tags[i].title
76
  );
77
 
78
+ // Check the Code buttons, if inside the json
79
+ var code_buttons = addquicktag_tags['code_buttons'];
80
+
81
+ // Vallback, if WP core don't set the var
82
+ if ( typeof typenow == 'undefined' )
83
+ typenow = '';
84
+
85
+
86
+ // if the htmlentities settings is active for each post type (var typenow from WP core)
87
+ if ( code_buttons.htmlentities[typenow] === 1 ) {
88
+ /**
89
+ * ideas for code buttons and optional window with input possibility
90
+ *
91
+ * @see @see http://bililite.com/blog/2012/08/20/custom-buttons-in-the-wordpress-html-editor/
92
+ */
93
+ QTags.addButton('toHTML', 'HTML Entities', function (el, canvas) {
94
+ QTags.insertContent(
95
+ get_selected_text(canvas).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;')
96
+ );
97
+ }, 'Encode HTML Entities');
98
+
99
+ QTags.addButton('fromHTML', 'Decode HTML', function (el, canvas) {
100
+ QTags.insertContent(
101
+ get_selected_text(canvas).replace(/&amp;/g, '&').replace(/&lt;/g, '<').replace(/&gt;/g, '>')
102
+ );
103
+ }, 'Decode HTML Entities');
104
+ }
105
+
106
+ // if the pre settings is active for each post type (var typenow from WP core)
107
+ if ( code_buttons.pre[typenow] === 1 ) {
108
+ var code_languages = ['html', 'javascript', 'css', 'bash', 'php', 'vb'];
109
+ // Insert before the code button
110
+ edButtons[109] = {
111
+ html: function (id_prefix) {
112
+ return '<select id="' + id_prefix + 'code_language" class="language-select">' +
113
  '<option>blank</option>' + // include a blank option
114
+ '<option>' + code_languages.join('</option><option>') + '</option>' +
115
  '</select>';
116
+ }
117
+ };
118
+ $('body').on('change', 'select.language-select', function () {
119
+ var lang = $(this).val();
120
+ // 110 is the code qt-tag from core, wp-includes/js/quicktags.js
121
+ edButtons[110].tagStart = lang ? '<code class="language-' + lang + '">' : '<code>';
122
+ });
123
+
124
+ // Add pre button for preformatted text
125
+ QTags.addButton('qt_pre', 'pre', '<pre>', '</pre>', '', 'Preformatted text', '108');
126
+ }
 
 
127
 
128
  /**
129
  * @TODO New idea for multible edit windows
js/add-quicktags.js CHANGED
@@ -3,8 +3,8 @@
3
  *
4
  * @package AddQuicktag Plugin
5
  * @author Frank Bueltge <frank@bueltge.de>
6
- * @version 05/22/2014
7
  * @since 2.0.0
8
  */
9
 
10
- jQuery(document).ready(function(t){if("undefined"!=typeof addquicktag_tags&&"undefined"!=typeof addquicktag_post_type&&"undefined"!=typeof addquicktag_pt_for_js){var e=addquicktag_tags.buttons;if("undefined"!=typeof e&&t.inArray("addquicktag_post_type",addquicktag_pt_for_js))for(var d=0;d<e.length;d++)1===parseInt(e[d][addquicktag_post_type])&&("undefined"==typeof e[d].title&&(e[d].title=" "),"undefined"==typeof e[d].end&&(e[d].end=""),"undefined"==typeof e[d].access&&(e[d].access=""),QTags.addButton(e[d].text.toLowerCase(),e[d].text,e[d].start,e[d].end,e[d].access,e[d].title))}});
3
  *
4
  * @package AddQuicktag Plugin
5
  * @author Frank Bueltge <frank@bueltge.de>
6
+ * @version 06/19/2014
7
  * @since 2.0.0
8
  */
9
 
10
+ jQuery(document).ready(function(t){function e(t){return t.focus(),document.selection?document.selection.createRange().text:t.value.substring(t.selectionStart,t.selectionEnd)}if("undefined"!=typeof addquicktag_tags&&"undefined"!=typeof addquicktag_post_type&&"undefined"!=typeof addquicktag_pt_for_js){var n=addquicktag_tags.buttons;if("undefined"!=typeof n&&t.inArray("addquicktag_post_type",addquicktag_pt_for_js))for(var a=0;a<n.length;a++)if(1===parseInt(n[a][addquicktag_post_type])){"undefined"==typeof n[a].title&&(n[a].title=" "),"undefined"==typeof n[a].end&&(n[a].end=""),"undefined"==typeof n[a].access&&(n[a].access=""),QTags.addButton(n[a].text.toLowerCase(),n[a].text,n[a].start,n[a].end,n[a].access,n[a].title);var o=addquicktag_tags.code_buttons;if("undefined"==typeof typenow&&(typenow=""),1===o.htmlentities[typenow]&&(QTags.addButton("toHTML","HTML Entities",function(t,n){QTags.insertContent(e(n).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"))},"Encode HTML Entities"),QTags.addButton("fromHTML","Decode HTML",function(t,n){QTags.insertContent(e(n).replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">"))},"Decode HTML Entities")),1===o.pre[typenow]){var d=["html","javascript","css","bash","php","vb"];edButtons[109]={html:function(t){return'<select id="'+t+'code_language" class="language-select"><option>blank</option><option>'+d.join("</option><option>")+"</option></select>"}},t("body").on("change","select.language-select",function(){var e=t(this).val();edButtons[110].tagStart=e?'<code class="language-'+e+'">':"<code>"}),QTags.addButton("qt_pre","pre","<pre>","</pre>","","Preformatted text","108")}}}});
js/settings.dev.js CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * AddQuicktag Script settings page of the plugin
3
- * @since 05/22/2014
4
  * @package AddQuicktag Plugin
5
  */
6
 
@@ -28,10 +28,34 @@ jQuery( document ).ready( function( $ ) {
28
 
29
  if ( e.type == 'mouseover' ) {
30
  $( this ).parent().addClass( hover );
31
- $( 'colgroup' ).eq( $( this ).index() ).addClass( hover );
32
  } else {
33
  $( this ).parent().removeClass( hover );
34
- $( 'colgroup' ).eq( $( this ).index() ).removeClass( hover );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  }
36
  } );
37
 
1
  /**
2
  * AddQuicktag Script settings page of the plugin
3
+ * @since 06/19/2014
4
  * @package AddQuicktag Plugin
5
  */
6
 
28
 
29
  if ( e.type == 'mouseover' ) {
30
  $( this ).parent().addClass( hover );
31
+ $( 'table.rmnlQuicktagSettings colgroup' ).eq( $( this ).index() ).addClass( hover );
32
  } else {
33
  $( this ).parent().removeClass( hover );
34
+ $( 'table.rmnlQuicktagSettings colgroup' ).eq( $( this ).index() ).removeClass( hover );
35
+ }
36
+ } );
37
+
38
+ $( 'table.rmnlCoreQuicktagSettings' ).delegate( 'td','mouseover mouseout', function(e) {
39
+ var hover = 'hover';
40
+
41
+ if ( e.type == 'mouseover' ) {
42
+ $( this ).parent().addClass( hover );
43
+ $( 'table.rmnlCoreQuicktagSettings colgroup' ).eq( $( this ).index() ).addClass( hover );
44
+ } else {
45
+ $( this ).parent().removeClass( hover );
46
+ $( 'table.rmnlCoreQuicktagSettings colgroup' ).eq( $( this ).index() ).removeClass( hover );
47
+ }
48
+ } );
49
+
50
+ $( 'table.rmnlCodeQuicktagSettings' ).delegate( 'td','mouseover mouseout', function(e) {
51
+ var hover = 'hover';
52
+
53
+ if ( e.type == 'mouseover' ) {
54
+ $( this ).parent().addClass( hover );
55
+ $( 'table.rmnlCodeQuicktagSettings colgroup' ).eq( $( this ).index() ).addClass( hover );
56
+ } else {
57
+ $( this ).parent().removeClass( hover );
58
+ $( 'table.rmnlCodeQuicktagSettings colgroup' ).eq( $( this ).index() ).removeClass( hover );
59
  }
60
  } );
61
 
js/settings.js CHANGED
@@ -1,7 +1,7 @@
1
  /**
2
  * AddQuicktag Script settings page of the plugin
3
- * @since 05/22/2014
4
  * @package AddQuicktag Plugin
5
  */
6
 
7
- jQuery(document).ready(function(e){e("input:checkbox.toggle").click(function(){var t=e(this).attr("value"),c="#rmqtb"+t+" input:checkbox";e(c).each(this.checked?function(){this.checked=!0}:function(){this.checked=!1})}),e("table.rmnlQuicktagSettings").delegate("td","mouseover mouseout",function(t){var c="hover";"mouseover"==t.type?(e(this).parent().addClass(c),e("colgroup").eq(e(this).index()).addClass(c)):(e(this).parent().removeClass(c),e("colgroup").eq(e(this).index()).removeClass(c))})});
1
  /**
2
  * AddQuicktag Script settings page of the plugin
3
+ * @since 06/19/2014
4
  * @package AddQuicktag Plugin
5
  */
6
 
7
+ jQuery(document).ready(function(e){e("input:checkbox.toggle").click(function(){var t=e(this).attr("value"),s="#rmqtb"+t+" input:checkbox";e(s).each(this.checked?function(){this.checked=!0}:function(){this.checked=!1})}),e("table.rmnlQuicktagSettings").delegate("td","mouseover mouseout",function(t){var s="hover";"mouseover"==t.type?(e(this).parent().addClass(s),e("table.rmnlQuicktagSettings colgroup").eq(e(this).index()).addClass(s)):(e(this).parent().removeClass(s),e("table.rmnlQuicktagSettings colgroup").eq(e(this).index()).removeClass(s))}),e("table.rmnlCoreQuicktagSettings").delegate("td","mouseover mouseout",function(t){var s="hover";"mouseover"==t.type?(e(this).parent().addClass(s),e("table.rmnlCoreQuicktagSettings colgroup").eq(e(this).index()).addClass(s)):(e(this).parent().removeClass(s),e("table.rmnlCoreQuicktagSettings colgroup").eq(e(this).index()).removeClass(s))}),e("table.rmnlCodeQuicktagSettings").delegate("td","mouseover mouseout",function(t){var s="hover";"mouseover"==t.type?(e(this).parent().addClass(s),e("table.rmnlCodeQuicktagSettings colgroup").eq(e(this).index()).addClass(s)):(e(this).parent().removeClass(s),e("table.rmnlCodeQuicktagSettings colgroup").eq(e(this).index()).removeClass(s))})});
languages/addquicktag-de_DE.mo CHANGED
Binary file
languages/addquicktag-de_DE.po CHANGED
@@ -1,254 +1,316 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: AddQuicktag v2.2.0\n"
4
  "Report-Msgid-Bugs-To: \n"
5
  "POT-Creation-Date: \n"
6
- "PO-Revision-Date: 2014-01-15 13:17+0100\n"
7
  "Last-Translator: Frank Bueltge <frank@bueltge.de>\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
- "X-Poedit-SourceCharset: utf-8\n"
14
- "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
15
- "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
16
- "X-Textdomain-Support: yes\n"
17
- "Language: de_DE\n"
18
  "X-Generator: Poedit 1.6.3\n"
 
 
 
 
 
 
19
  "X-Poedit-SearchPath-0: .\n"
 
20
 
21
- # @ addquicktag
22
  #. translators: plugin header field 'Name'
23
  #: addquicktag.php:0
 
24
  msgid "AddQuicktag"
25
  msgstr "AddQuicktag"
26
 
27
- # @ addquicktag
28
  #. translators: plugin header field 'PluginURI'
29
  #: addquicktag.php:0
 
30
  msgid "http://bueltge.de/wp-addquicktags-de-plugin/120/"
31
  msgstr ""
32
 
33
- # @ addquicktag
34
  #. translators: plugin header field 'Author'
35
  #: addquicktag.php:0
 
36
  msgid "Frank Bültge"
37
  msgstr ""
38
 
39
- # @ addquicktag
40
  #. translators: plugin header field 'AuthorURI'
41
  #: addquicktag.php:0
 
42
  msgid "http://bueltge.de"
43
  msgstr ""
44
 
45
- # @ default
46
- # @ addquicktag
47
- #: inc/class-settings.php:128 inc/class-settings.php:145
48
- #: inc/class-settings.php:163 inc/class-settings.php:171
 
 
49
  msgid "Settings"
50
  msgstr "Einstellungen"
51
 
52
- # @ addquicktag
53
- #: inc/class-settings.php:196
54
  msgid "Add or delete Quicktag buttons"
55
  msgstr "Ergänze oder lösche Quicktag Buttons"
56
 
57
- # @ addquicktag
58
- #: inc/class-settings.php:237
59
  msgid "Button Label*"
60
  msgstr "Button Name*"
61
 
62
- # @ addquicktag
63
- #: inc/class-settings.php:238
 
64
  msgid "Title Attribute"
65
  msgstr "Title Attribut"
66
 
67
- # @ addquicktag
68
- #: inc/class-settings.php:239
69
  msgid "Start Tag(s)*"
70
  msgstr "Start Tag(s)*"
71
 
72
- # @ addquicktag
73
- #: inc/class-settings.php:240
 
74
  msgid "End Tag(s)"
75
  msgstr "Ende Tag(s)"
76
 
77
- # @ addquicktag
78
- #: inc/class-settings.php:241
79
  msgid "Access Key"
80
  msgstr "Zugriffstaste"
81
 
82
- # @ addquicktag
83
- #: inc/class-settings.php:341
84
- msgid ""
85
- "Fill in the fields above to add or edit the quicktags. Fields with * are "
86
- "required. To delete a tag simply empty all fields."
87
- msgstr ""
88
- "Ergänze neue Buttons, in dem die oberen Felder ausgefüllt werden. Felder mit "
89
- "* sind Pflichtfelder, müssen ausgefüllt werden. Um einen Button zu löschen, "
90
- "einfach die Felder des Buttons leeren und speichern."
91
-
92
- # @ default
93
- #: inc/class-settings.php:343
94
  msgid "Save Changes"
95
  msgstr "Änderungen speichern"
96
 
97
- # @ addquicktag
98
- #: inc/class-settings.php:378
99
  msgid "Like this plugin?"
100
  msgstr "Du magst das Plugin?"
101
 
102
- # @ addquicktag
103
- #: inc/class-settings.php:380
104
  msgid "Here's how you can give back:"
105
  msgstr "Über folgende Möglichkeiten kannst du etwas zurück geben:"
106
 
107
- # @ addquicktag
108
- #: inc/class-settings.php:382
109
  msgid "The Plugin on the WordPress plugin repository"
110
  msgstr "Das Plugin im offiziellen WordPress Repository"
111
 
112
- # @ addquicktag
113
- #: inc/class-settings.php:382
114
  msgid "Give the plugin a good rating."
115
  msgstr "Gib dem Plugin eine gute Wertung"
116
 
117
- # @ addquicktag
118
- #: inc/class-settings.php:383
119
  msgid "Donate via PayPal"
120
  msgstr "Spende via Paypal"
121
 
122
- # @ addquicktag
123
- #: inc/class-settings.php:383
124
  msgid "Donate a few euros."
125
  msgstr "Spende einige Euros"
126
 
127
- # @ addquicktag
128
- #: inc/class-settings.php:384
129
  msgid "Frank Bültge's Amazon Wish List"
130
  msgstr "Frank Bültge's Amazon Wunschliste"
131
 
132
- # @ addquicktag
133
- #: inc/class-settings.php:384
134
  msgid "Get me something from my wish list."
135
  msgstr "Suche dir was aus und lass mir ein Objekt meiner Wunschliste zukommen."
136
 
137
- # @ addquicktag
138
- #: inc/class-settings.php:404
139
  msgid "About this plugin"
140
  msgstr "Über das Plugin"
141
 
142
- # @ addquicktag
143
- #: inc/class-settings.php:407
144
  msgid "Version:"
145
  msgstr "Version:"
146
 
147
- # @ addquicktag
148
- #: inc/class-settings.php:411
149
  msgid "Description:"
150
  msgstr "Beschreibung:"
151
 
152
- # @ addquicktag
153
- #: inc/class-settings.php:242
 
154
  msgid "Order"
155
  msgstr "Reihenfolge"
156
 
157
- # @ addquicktag
158
- #: inc/class-settings.php:243
159
  msgid "Visual"
160
  msgstr "Visuell"
161
 
162
- # @ addquicktag
163
  #. translators: plugin header field 'Description'
164
  #: addquicktag.php:0
165
- msgid ""
166
- "Allows you to easily add custom Quicktags to the html- and visual-editor."
167
- msgstr ""
168
- "Erlaubt das einfache Hinzufügen von Quicktags zum html- und visuellen Editor."
169
 
170
- # @ addquicktag
171
- #: inc/class-imexport.php:70
172
  msgid "Export"
173
  msgstr "Exportieren"
174
 
175
- # @ addquicktag
176
- #: inc/class-imexport.php:72
177
- msgid ""
178
- "When you click the button below the plugin will create an XML file for you "
179
- "to save to your computer."
180
- msgstr ""
181
- "Wenn du unten auf Export-Datei herunterladen klickst, wird das Plugin eine "
182
- "XML-Datei für dich erstellen, die du auf deinem Computer speichern kannst."
183
 
184
- # @ addquicktag
185
- #: inc/class-imexport.php:73
186
  msgid "This format, a custom XML, will contain your options from quicktags."
187
- msgstr ""
188
- "Dieses Format, ein benutzerdefniertes XML, beinhaltet Einstellungen der "
189
- "Quicktags."
190
 
191
- # @ addquicktag
192
- #: inc/class-imexport.php:74
193
- msgid ""
194
- "Once you’ve saved the download file, you can use the Import function in "
195
- "another WordPress installation to import this site."
196
- msgstr ""
197
- "Nachdem die heruntergeladene Datei gespeichert wurde, kannst du die Import-"
198
- "Funktion in einer anderen WordPress Installation nutzen."
199
 
200
- # @ addquicktag
201
- #: inc/class-imexport.php:78
202
  msgid "Download Export File"
203
  msgstr "Export-Datei herunterladen"
204
 
205
- # @ addquicktag
206
- #: inc/class-imexport.php:86
207
  msgid "Import"
208
  msgstr "Importieren"
209
 
210
- # @ addquicktag
211
- #: inc/class-imexport.php:88
212
- msgid ""
213
- "If you have quicktags from other installs, the plugin can import those into "
214
- "this site. To get started, choose a file to import."
215
- msgstr ""
216
- "Wenn du Quicktags von einer anderen WordPress Installation hast, dann kann "
217
- "das Plugin diese Einstellungen importieren. Zum Starten des Imports wähle "
218
- "eine Datei und klicke auf Datei aktualisieren und importieren."
219
-
220
- # @ addquicktag
221
- #: inc/class-imexport.php:93
222
  msgid "Upload file and import"
223
  msgstr "Datei aktualisieren und importieren"
224
 
225
- # @ addquicktag
226
- #: inc/class-imexport.php:184
227
  msgid "Options not update - you don&lsquo;t have the privilidges to do this!"
228
- msgstr ""
229
- "Einstellungen wurden nicht aktualisiert - du hast keine ausreichenden Rechte "
230
- "um dies zu tun!"
231
 
232
- # @ addquicktag
233
- #: inc/class-settings.php:456
234
  msgid "Options saved."
235
  msgstr "Einstellungen gespeichert."
236
 
237
- # @ addquicktag
 
 
 
 
 
 
 
 
 
238
  #. translators: plugin header field 'Version'
239
  #: addquicktag.php:0
240
- msgid "2.2.0"
 
241
  msgstr ""
242
 
243
- # @ addquicktag
244
- #: inc/class-settings.php:385
245
- msgid ""
246
- "Please give me feedback, contribute and file technical bugs on this GitHub "
247
- "Repo, use Issues."
248
- msgstr ""
249
- "Bitte gib Feedback, Erweiterungen und Hinweis im Github Repo, nutze Issues."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
250
 
251
- # @ addquicktag
252
- #: inc/class-settings.php:385
253
- msgid "Github Repo for Contribute, Issues & Bugs"
254
- msgstr "Github Repo für Erweiterungen, Hinweise & Fehler"
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: AddQuicktag v2.3.0\n"
4
  "Report-Msgid-Bugs-To: \n"
5
  "POT-Creation-Date: \n"
6
+ "PO-Revision-Date: 2014-06-19 14:41:12+0000\n"
7
  "Last-Translator: Frank Bueltge <frank@bueltge.de>\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
 
 
 
 
 
13
  "X-Generator: Poedit 1.6.3\n"
14
+ "X-Poedit-Language: \n"
15
+ "X-Poedit-Country: \n"
16
+ "X-Poedit-SourceCharset: utf-8\n"
17
+ "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
18
+ "X-Poedit-Basepath: \n"
19
+ "X-Poedit-Bookmarks: \n"
20
  "X-Poedit-SearchPath-0: .\n"
21
+ "X-Textdomain-Support: yes"
22
 
 
23
  #. translators: plugin header field 'Name'
24
  #: addquicktag.php:0
25
+ #@ addquicktag
26
  msgid "AddQuicktag"
27
  msgstr "AddQuicktag"
28
 
 
29
  #. translators: plugin header field 'PluginURI'
30
  #: addquicktag.php:0
31
+ #@ addquicktag
32
  msgid "http://bueltge.de/wp-addquicktags-de-plugin/120/"
33
  msgstr ""
34
 
 
35
  #. translators: plugin header field 'Author'
36
  #: addquicktag.php:0
37
+ #@ addquicktag
38
  msgid "Frank Bültge"
39
  msgstr ""
40
 
 
41
  #. translators: plugin header field 'AuthorURI'
42
  #: addquicktag.php:0
43
+ #@ addquicktag
44
  msgid "http://bueltge.de"
45
  msgstr ""
46
 
47
+ #: inc/class-settings.php:172
48
+ #: inc/class-settings.php:192
49
+ #: inc/class-settings.php:210
50
+ #: inc/class-settings.php:218
51
+ #@ default
52
+ #@ addquicktag
53
  msgid "Settings"
54
  msgstr "Einstellungen"
55
 
56
+ #: inc/class-settings.php:241
57
+ #@ addquicktag
58
  msgid "Add or delete Quicktag buttons"
59
  msgstr "Ergänze oder lösche Quicktag Buttons"
60
 
61
+ #: inc/class-settings.php:408
62
+ #@ addquicktag
63
  msgid "Button Label*"
64
  msgstr "Button Name*"
65
 
66
+ #: inc/class-settings.php:300
67
+ #: inc/class-settings.php:409
68
+ #@ addquicktag
69
  msgid "Title Attribute"
70
  msgstr "Title Attribut"
71
 
72
+ #: inc/class-settings.php:412
73
+ #@ addquicktag
74
  msgid "Start Tag(s)*"
75
  msgstr "Start Tag(s)*"
76
 
77
+ #: inc/class-settings.php:302
78
+ #: inc/class-settings.php:413
79
+ #@ addquicktag
80
  msgid "End Tag(s)"
81
  msgstr "Ende Tag(s)"
82
 
83
+ #: inc/class-settings.php:416
84
+ #@ addquicktag
85
  msgid "Access Key"
86
  msgstr "Zugriffstaste"
87
 
88
+ #: inc/class-settings.php:432
89
+ #@ default
 
 
 
 
 
 
 
 
 
 
90
  msgid "Save Changes"
91
  msgstr "Änderungen speichern"
92
 
93
+ #: inc/class-settings.php:472
94
+ #@ addquicktag
95
  msgid "Like this plugin?"
96
  msgstr "Du magst das Plugin?"
97
 
98
+ #: inc/class-settings.php:475
99
+ #@ addquicktag
100
  msgid "Here's how you can give back:"
101
  msgstr "Über folgende Möglichkeiten kannst du etwas zurück geben:"
102
 
103
+ #: inc/class-settings.php:478
104
+ #@ addquicktag
105
  msgid "The Plugin on the WordPress plugin repository"
106
  msgstr "Das Plugin im offiziellen WordPress Repository"
107
 
108
+ #: inc/class-settings.php:478
109
+ #@ addquicktag
110
  msgid "Give the plugin a good rating."
111
  msgstr "Gib dem Plugin eine gute Wertung"
112
 
113
+ #: inc/class-settings.php:484
114
+ #@ addquicktag
115
  msgid "Donate via PayPal"
116
  msgstr "Spende via Paypal"
117
 
118
+ #: inc/class-settings.php:484
119
+ #@ addquicktag
120
  msgid "Donate a few euros."
121
  msgstr "Spende einige Euros"
122
 
123
+ #: inc/class-settings.php:487
124
+ #@ addquicktag
125
  msgid "Frank Bültge's Amazon Wish List"
126
  msgstr "Frank Bültge's Amazon Wunschliste"
127
 
128
+ #: inc/class-settings.php:487
129
+ #@ addquicktag
130
  msgid "Get me something from my wish list."
131
  msgstr "Suche dir was aus und lass mir ein Objekt meiner Wunschliste zukommen."
132
 
133
+ #: inc/class-settings.php:511
134
+ #@ addquicktag
135
  msgid "About this plugin"
136
  msgstr "Über das Plugin"
137
 
138
+ #: inc/class-settings.php:515
139
+ #@ addquicktag
140
  msgid "Version:"
141
  msgstr "Version:"
142
 
143
+ #: inc/class-settings.php:520
144
+ #@ addquicktag
145
  msgid "Description:"
146
  msgstr "Beschreibung:"
147
 
148
+ #: inc/class-settings.php:304
149
+ #: inc/class-settings.php:417
150
+ #@ addquicktag
151
  msgid "Order"
152
  msgstr "Reihenfolge"
153
 
154
+ #: inc/class-settings.php:305
155
+ #@ addquicktag
156
  msgid "Visual"
157
  msgstr "Visuell"
158
 
 
159
  #. translators: plugin header field 'Description'
160
  #: addquicktag.php:0
161
+ #@ addquicktag
162
+ msgid "Allows you to easily add custom Quicktags to the html- and visual-editor."
163
+ msgstr "Erlaubt das einfache Hinzufügen von Quicktags zum html- und visuellen Editor."
 
164
 
165
+ #: inc/class-imexport.php:106
166
+ #@ addquicktag
167
  msgid "Export"
168
  msgstr "Exportieren"
169
 
170
+ #: inc/class-imexport.php:109
171
+ #@ addquicktag
172
+ msgid "When you click the button below the plugin will create an XML file for you to save to your computer."
173
+ msgstr "Wenn du unten auf Export-Datei herunterladen klickst, wird das Plugin eine XML-Datei für dich erstellen, die du auf deinem Computer speichern kannst."
 
 
 
 
174
 
175
+ #: inc/class-imexport.php:111
176
+ #@ addquicktag
177
  msgid "This format, a custom XML, will contain your options from quicktags."
178
+ msgstr "Dieses Format, ein benutzerdefniertes XML, beinhaltet Einstellungen der Quicktags."
 
 
179
 
180
+ #: inc/class-imexport.php:113
181
+ #@ addquicktag
182
+ msgid "Once you’ve saved the download file, you can use the Import function in another WordPress installation to import this site."
183
+ msgstr "Nachdem die heruntergeladene Datei gespeichert wurde, kannst du die Import-Funktion in einer anderen WordPress Installation nutzen."
 
 
 
 
184
 
185
+ #: inc/class-imexport.php:118
186
+ #@ addquicktag
187
  msgid "Download Export File"
188
  msgstr "Export-Datei herunterladen"
189
 
190
+ #: inc/class-imexport.php:126
191
+ #@ addquicktag
192
  msgid "Import"
193
  msgstr "Importieren"
194
 
195
+ #: inc/class-imexport.php:135
196
+ #@ addquicktag
 
 
 
 
 
 
 
 
 
 
197
  msgid "Upload file and import"
198
  msgstr "Datei aktualisieren und importieren"
199
 
200
+ #: inc/class-imexport.php:189
201
+ #@ addquicktag
202
  msgid "Options not update - you don&lsquo;t have the privilidges to do this!"
203
+ msgstr "Einstellungen wurden nicht aktualisiert - du hast keine ausreichenden Rechte um dies zu tun!"
 
 
204
 
205
+ #: inc/class-settings.php:572
206
+ #@ addquicktag
207
  msgid "Options saved."
208
  msgstr "Einstellungen gespeichert."
209
 
210
+ #: inc/class-settings.php:490
211
+ #@ addquicktag
212
+ msgid "Please give me feedback, contribute and file technical bugs on this GitHub Repo, use Issues."
213
+ msgstr "Bitte gib Feedback, Erweiterungen und Hinweis im Github Repo, nutze Issues."
214
+
215
+ #: inc/class-settings.php:490
216
+ #@ addquicktag
217
+ msgid "Github Repo for Contribute, Issues & Bugs"
218
+ msgstr "Github Repo für Erweiterungen, Hinweise & Fehler"
219
+
220
  #. translators: plugin header field 'Version'
221
  #: addquicktag.php:0
222
+ #@ addquicktag
223
+ msgid "2.3.0"
224
  msgstr ""
225
 
226
+ #: inc/class-code-quicktags.php:81
227
+ #@ addquicktag
228
+ msgid "Enhanced Code Quicktag buttons"
229
+ msgstr "Erweiterte Code Quicktag Buttons"
230
+
231
+ #: inc/class-code-quicktags.php:82
232
+ #@ addquicktag
233
+ msgid "Select the checkbox below to add enhanced code buttons."
234
+ msgstr "Wähle die jeweilige Checkbox für die Erweiterung um diese Buttons"
235
+
236
+ #: inc/class-code-quicktags.php:83
237
+ #@ addquicktag
238
+ msgid "pre: Enhanced Code buttons"
239
+ msgstr "pre: Erweiterte Code Buttons"
240
+
241
+ #: inc/class-code-quicktags.php:84
242
+ #@ addquicktag
243
+ msgid "Enhanced the default Code buttons. Add a pull down menu for different languages before the default code button and include this as class inside the code tag. Also add a pre button for preformatted text."
244
+ msgstr "Erweitert die Standard Code Buttons. Es wird ein Pull Down Menu für verschiedene Sprachen zum Standard Code Button hinzugefügt. Dieser enthält diese Sprachen als Attribut class. Außerdem wird ein pre Button für formatierten Text ergänzt. "
245
+
246
+ #: inc/class-code-quicktags.php:85
247
+ #@ addquicktag
248
+ msgid "htmlentities: HTML Entities, HTML Decode"
249
+ msgstr "htmlentities: HTML Entities, HTML Decode"
250
+
251
+ #: inc/class-code-quicktags.php:86
252
+ #@ addquicktag
253
+ msgid "Add buttons to do the inconvient HTML encoding/decoding, like &lt; to &amp;lt; and back."
254
+ msgstr "Ergänzt zwei Quicktag Buttons zum de- und encodieren von HTML, bspw. &lt; zu &amp;lt; und zurück."
255
+
256
+ #: inc/class-code-quicktags.php:104
257
+ #: inc/class-remove-quicktags.php:85
258
+ #@ addquicktag
259
+ msgid "Button"
260
+ msgstr "Button"
261
+
262
+ #: inc/class-imexport.php:129
263
+ #@ addquicktag
264
+ msgid "If you have quicktags from other installs, the plugin can import those into this site. To get started, choose a file to import. (json-Format)"
265
+ msgstr "Wenn du Quicktags von anderen Installationen hast, dann kannst du diese hier importieren. Wähle dazu die Datei und importiere sie. (json-Format)"
266
+
267
+ #: inc/class-imexport.php:198
268
+ #@ addquicktag
269
+ msgid "Please upload a valid .json file"
270
+ msgstr "Bitte lade eine valide .json Datei. "
271
+
272
+ #: inc/class-imexport.php:204
273
+ #@ addquicktag
274
+ msgid "Please upload a file to import."
275
+ msgstr "Bitte lade eine Datei zum Import."
276
+
277
+ #: inc/class-remove-quicktags.php:66
278
+ #@ addquicktag
279
+ msgid "Remove Core Quicktag buttons"
280
+ msgstr "Entferne Core Quicktag Buttons"
281
+
282
+ #: inc/class-remove-quicktags.php:67
283
+ #@ addquicktag
284
+ msgid "Select the checkbox below to remove a core quicktags in the editors of the respective post type."
285
+ msgstr "Wähle die jeweilige Checkbox zum Entfernen von Core Quicktags innerhalb des jeweiligen Editors zum Post Type."
286
+
287
+ #: inc/class-settings.php:243
288
+ #@ addquicktag
289
+ msgid "Fill in the fields below to add or edit the quicktags. Fields with * are required. To delete a tag simply empty all fields."
290
+ msgstr "Ergänze die Felder um einen Quicktag zu erzeugen. Felder mit * sind Pflichtfelder. Zum Entfernen von Quicktags lösche die Einträge aller Felder eines Quicktags."
291
+
292
+ #: inc/class-settings.php:299
293
+ #@ addquicktag
294
+ msgid "Button Label* and"
295
+ msgstr "Button Label* und"
296
+
297
+ #: inc/class-settings.php:301
298
+ #@ addquicktag
299
+ msgid "Start Tag(s)* and"
300
+ msgstr "Start Tag(s)* und"
301
+
302
+ #: inc/class-settings.php:303
303
+ #@ addquicktag
304
+ msgid "Access Key and"
305
+ msgstr "Zugangstaste und"
306
+
307
+ #: inc/class-settings.php:481
308
+ #@ addquicktag
309
+ msgid "Help inside the community other useres and write answer to this plugin questions."
310
+ msgstr "Hilf in der Community anderen Nutzern und schreibe eine Antwort zur jeweiligen Frage."
311
+
312
+ #: inc/class-settings.php:481
313
+ #@ addquicktag
314
+ msgid "Help other users in the Support Forum."
315
+ msgstr "Hilf anderen Anwendern im Support Forum zum Plugin."
316
 
 
 
 
 
languages/addquicktag-fr_FR.mo CHANGED
Binary file
languages/addquicktag-fr_FR.po CHANGED
@@ -1,174 +1,316 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: AddQuicktag v1.5.7\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2012-07-19 09:41+0100\n"
6
- "PO-Revision-Date: 2012-07-19 09:44+0100\n"
7
  "Last-Translator: Li-An <lian00@gmail.com>\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
- "X-Poedit-Language: French\n"
14
- "X-Poedit-Country: FRANCE\n"
 
15
  "X-Poedit-SourceCharset: utf-8\n"
16
- "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
17
  "X-Poedit-Basepath: ../\n"
18
- "X-Textdomain-Support: yes\n"
19
  "X-Poedit-SearchPath-0: .\n"
20
-
21
- # @ addquicktag
22
- #: inc/class-imexport.php:70
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  msgid "Export"
24
  msgstr "Exporter"
25
 
26
- # @ addquicktag
27
- #: inc/class-imexport.php:72
28
  msgid "When you click the button below the plugin will create an XML file for you to save to your computer."
29
  msgstr "Quand vous cliquez sur le bouton ci-dessous, le plugin va créer un fichier XML à sauvegarder sur votre ordinateur."
30
 
31
- # @ addquicktag
32
- #: inc/class-imexport.php:73
33
  msgid "This format, a custom XML, will contain your options from quicktags."
34
  msgstr "Ce format, un XML personnalisé, contiendra vos options de quicktags."
35
 
36
- # @ addquicktag
37
- #: inc/class-imexport.php:74
38
  msgid "Once you’ve saved the download file, you can use the Import function in another WordPress installation to import this site."
39
  msgstr "Une fois le fichier téléchargé, vous pouvez utiliser la fonction d'importation dans une autre installation Wordpress pour importer ces réglages."
40
 
41
- # @ addquicktag
42
- #: inc/class-imexport.php:78
43
  msgid "Download Export File"
44
  msgstr "Télécharger le fichier d'exportation"
45
 
46
- # @ addquicktag
47
- #: inc/class-imexport.php:86
48
  msgid "Import"
49
  msgstr "Importer"
50
 
51
- # @ addquicktag
52
- #: inc/class-imexport.php:88
53
- msgid "If you have quicktags from other installs, the plugin can import those into this site. To get started, choose a file to import."
54
- msgstr "Si vous avez des quicktags d'autres installations, le plugin peut les importer dans ce site. Pour commencer, veuillez choisir un fichier à importer."
55
-
56
- # @ addquicktag
57
- #: inc/class-imexport.php:93
58
  msgid "Upload file and import"
59
  msgstr "Uploader et importer fichier"
60
 
61
- # @ secure_wp
62
- #: inc/class-imexport.php:184
63
  msgid "Options not update - you don&lsquo;t have the privilidges to do this!"
64
  msgstr "Options pas mises à jour - vous n'avez pas les droits pour réaliser cette action !"
65
 
66
- #: inc/class-settings.php:128
67
- #: inc/class-settings.php:145
68
- #: inc/class-settings.php:163
69
- #: inc/class-settings.php:171
 
 
 
 
 
 
 
70
  msgid "Settings"
71
  msgstr "Réglages"
72
 
73
- # @ addquicktag
74
- #: inc/class-settings.php:196
75
  msgid "Add or delete Quicktag buttons"
76
  msgstr "Ajouter ou supprimer des boutons Quicktag"
77
 
78
- # @ addquicktag
79
- #: inc/class-settings.php:238
80
- msgid "Button Label*"
81
- msgstr "Label du bouton*"
 
 
 
 
 
82
 
83
- # @ addquicktag
84
- #: inc/class-settings.php:239
 
85
  msgid "Title Attribute"
86
  msgstr "Attribut de titre"
87
 
88
- # @ addquicktag
89
- #: inc/class-settings.php:240
90
- msgid "Start Tag(s)*"
91
- msgstr "Début du/des tag(s)*"
92
 
93
- # @ addquicktag
94
- #: inc/class-settings.php:241
 
95
  msgid "End Tag(s)"
96
  msgstr "Fin du(des) tag(s)"
97
 
98
- # @ addquicktag
99
- #: inc/class-settings.php:242
100
- msgid "Access Key"
101
- msgstr "Clef d'accès"
102
 
103
- # @ addquicktag
104
- #: inc/class-settings.php:243
 
105
  msgid "Order"
106
  msgstr "Ordre"
107
 
108
- # @ addquicktag
109
- #: inc/class-settings.php:244
110
  msgid "Visual"
111
  msgstr "Visuel"
112
 
113
- # @ addquicktag
114
- #: inc/class-settings.php:342
115
- msgid "Fill in the fields below to add or edit the quicktags. Fields with * are required. To delete a tag simply empty all fields."
116
- msgstr "Remplissez les champs ci-dessous ou éditez les quicktags. Les champs marqués d'un * sont obligatoires. Pour effacer un tag, videz simplement tous les champs."
117
 
118
- # @ default
119
- #: inc/class-settings.php:344
 
 
 
 
 
 
 
 
 
 
120
  msgid "Save Changes"
121
  msgstr "Sauvegarder les modifications"
122
 
123
- # @ addquicktag
124
- #: inc/class-settings.php:379
125
  msgid "Like this plugin?"
126
  msgstr "Vous aimez ce plugin ?"
127
 
128
- # @ addquicktag
129
- #: inc/class-settings.php:381
130
  msgid "Here's how you can give back:"
131
  msgstr "Voici comment le soutenir:"
132
 
133
- # @ addquicktag
134
- #: inc/class-settings.php:383
135
- msgid "Give the plugin a good rating."
136
- msgstr "Donner au plugin une bonne note."
137
-
138
- # @ addquicktag
139
- #: inc/class-settings.php:384
140
- msgid "Donate a few euros."
141
- msgstr "Donner quelques euros."
142
-
143
- # @ addquicktag
144
- #: inc/class-settings.php:385
145
- msgid "Get me something from my wish list."
146
- msgstr "Offrez moi quelque chose de ma liste d'envies."
147
-
148
- #: inc/class-settings.php:386
149
- msgid "Please give me feedback, contribute and file technical bugs on this GitHub Repo, use Issues."
150
- msgstr "Veuillez m'envoyer un retour, contribuer et trouver les bugs sur le site de dépôt GitHub, et utilisez Issues."
151
-
152
- #: inc/class-settings.php:386
153
- msgid "Github Repo for Contribute, Issues & Bugs"
154
- msgstr "Dépôt Github pour contribuer, soumettre bugs et problèmes"
155
-
156
- # @ addquicktag
157
- #: inc/class-settings.php:405
158
  msgid "About this plugin"
159
  msgstr "À propos de ce plugin"
160
 
161
- #: inc/class-settings.php:408
 
162
  msgid "Version:"
163
  msgstr "Version:"
164
 
165
- # @ addquicktag
166
- #: inc/class-settings.php:412
167
  msgid "Description:"
168
  msgstr "Description:"
169
 
170
- # @ addquicktag
171
- #: inc/class-settings.php:463
172
  msgid "Options saved."
173
  msgstr "Options sauvegardées."
174
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: AddQuicktag v2.3.0\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2014-05-25 10:40+0100\n"
6
+ "PO-Revision-Date: 2014-06-19 14:28:04+0000\n"
7
  "Last-Translator: Li-An <lian00@gmail.com>\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "Plural-Forms: nplurals=2; plural=n>1;\n"
13
+ "X-Generator: Poedit 1.6.5\n"
14
+ "X-Poedit-Language: \n"
15
+ "X-Poedit-Country: \n"
16
  "X-Poedit-SourceCharset: utf-8\n"
17
+ "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
18
  "X-Poedit-Basepath: ../\n"
19
+ "X-Poedit-Bookmarks: \n"
20
  "X-Poedit-SearchPath-0: .\n"
21
+ "X-Textdomain-Support: yes"
22
+
23
+ #: inc/class-code-quicktags.php:81
24
+ #@ addquicktag
25
+ msgid "Enhanced Code Quicktag buttons"
26
+ msgstr "Bouton de code Quicktag améliorés"
27
+
28
+ #: inc/class-code-quicktags.php:82
29
+ #@ addquicktag
30
+ msgid "Select the checkbox below to add enhanced code buttons."
31
+ msgstr "Cochez les cases ci-dessous pour ajouter des boutons de code."
32
+
33
+ #: inc/class-code-quicktags.php:104
34
+ #: inc/class-remove-quicktags.php:85
35
+ #@ addquicktag
36
+ msgid "Button"
37
+ msgstr "Bouton"
38
+
39
+ #: inc/class-code-quicktags.php:86
40
+ #@ addquicktag
41
+ msgid "Add buttons to do the inconvient HTML encoding/decoding, like &lt; to &amp;lt; and back."
42
+ msgstr "Ajoute des boutons pour réaliser l'encodage/décodage HTML peu pratique comme &lt; vers &amp;lt; et en arrière."
43
+
44
+ #: inc/class-imexport.php:106
45
+ #@ addquicktag
46
  msgid "Export"
47
  msgstr "Exporter"
48
 
49
+ #: inc/class-imexport.php:109
50
+ #@ addquicktag
51
  msgid "When you click the button below the plugin will create an XML file for you to save to your computer."
52
  msgstr "Quand vous cliquez sur le bouton ci-dessous, le plugin va créer un fichier XML à sauvegarder sur votre ordinateur."
53
 
54
+ #: inc/class-imexport.php:111
55
+ #@ addquicktag
56
  msgid "This format, a custom XML, will contain your options from quicktags."
57
  msgstr "Ce format, un XML personnalisé, contiendra vos options de quicktags."
58
 
59
+ #: inc/class-imexport.php:113
60
+ #@ addquicktag
61
  msgid "Once you’ve saved the download file, you can use the Import function in another WordPress installation to import this site."
62
  msgstr "Une fois le fichier téléchargé, vous pouvez utiliser la fonction d'importation dans une autre installation Wordpress pour importer ces réglages."
63
 
64
+ #: inc/class-imexport.php:118
65
+ #@ addquicktag
66
  msgid "Download Export File"
67
  msgstr "Télécharger le fichier d'exportation"
68
 
69
+ #: inc/class-imexport.php:126
70
+ #@ addquicktag
71
  msgid "Import"
72
  msgstr "Importer"
73
 
74
+ #: inc/class-imexport.php:135
75
+ #@ addquicktag