Version Description
(02/09/2013) = * Add Filter Hook for custom button, see issue #9 * Small check for undefined var on settings page
Download this release
Release Info
Developer | Bueltge |
Plugin | AddQuicktag |
Version | 2.2.2 |
Comparing to | |
See all releases |
Code changes from version 2.2.1 to 2.2.2
- addquicktag.php +20 -8
- inc/class-imexport.php +4 -4
- inc/class-settings.php +13 -11
- inc/class-tinymce.php +2 -2
- js/add-quicktags.dev.js +1 -1
- readme.md +0 -0
- readme.txt +98 -39
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- screenshot-4.png +0 -0
addquicktag.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Text Domain: addquicktag
|
6 |
* Domain Path: /languages
|
7 |
* Description: Allows you to easily add custom Quicktags to the html- and visual-editor.
|
8 |
-
* Version: 2.2.
|
9 |
* Author: Frank Bültge
|
10 |
* Author URI: http://bueltge.de
|
11 |
* License: GPLv3
|
@@ -14,7 +14,7 @@
|
|
14 |
*
|
15 |
License:
|
16 |
==============================================================================
|
17 |
-
Copyright 2011 Frank Bültge (email : frank@bueltge.de)
|
18 |
|
19 |
This program is free software; you can redistribute it and/or modify
|
20 |
it under the terms of the GNU General Public License as published by
|
@@ -42,7 +42,7 @@ This plugin requires WordPress >= 3.3 and tested with PHP Interpreter >= 5.3
|
|
42 |
*/
|
43 |
class Add_Quicktag {
|
44 |
|
45 |
-
static
|
46 |
|
47 |
static private $option_string = 'rmnlQuicktagSettings';
|
48 |
// use filter 'addquicktag_pages' for add custom pages
|
@@ -100,7 +100,7 @@ class Add_Quicktag {
|
|
100 |
require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'inc/class-tinymce.php';
|
101 |
|
102 |
foreach ( $this->get_admin_pages_for_js() as $page ) {
|
103 |
-
add_action( 'admin_print_scripts-' . $page, array( $this, '
|
104 |
add_action( 'admin_print_scripts-' . $page, array( $this, 'admin_enqueue_scripts') );
|
105 |
}
|
106 |
}
|
@@ -123,7 +123,7 @@ class Add_Quicktag {
|
|
123 |
* @since 2.0.0
|
124 |
* @return void
|
125 |
*/
|
126 |
-
public function
|
127 |
global $current_screen;
|
128 |
|
129 |
if ( isset( $current_screen->id ) &&
|
@@ -139,6 +139,11 @@ class Add_Quicktag {
|
|
139 |
else
|
140 |
$options = get_option( self :: $option_string );
|
141 |
|
|
|
|
|
|
|
|
|
|
|
142 |
if ( ! $options )
|
143 |
return NULL;
|
144 |
|
@@ -153,6 +158,7 @@ class Add_Quicktag {
|
|
153 |
}
|
154 |
array_multisort( $tmp, SORT_ASC, $options['buttons'] );
|
155 |
}
|
|
|
156 |
?>
|
157 |
<script type="text/javascript">
|
158 |
var addquicktag_tags = <?php echo json_encode( $options ); ?>,
|
@@ -211,7 +217,7 @@ class Add_Quicktag {
|
|
211 |
* @access public
|
212 |
* @return $classobj
|
213 |
*/
|
214 |
-
public function get_object() {
|
215 |
|
216 |
if ( NULL === self :: $classobj ) {
|
217 |
self :: $classobj = new self;
|
@@ -239,18 +245,24 @@ class Add_Quicktag {
|
|
239 |
* @since 2.0.0
|
240 |
* @access public
|
241 |
* @param $value string, default = 'TextDomain'
|
242 |
-
*
|
243 |
* @return string
|
244 |
*/
|
245 |
public function get_plugin_data( $value = 'TextDomain' ) {
|
246 |
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
if ( ! function_exists( 'get_plugin_data' ) )
|
248 |
require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
|
249 |
|
250 |
$plugin_data = get_plugin_data( __FILE__ );
|
251 |
$plugin_value = $plugin_data[$value];
|
252 |
|
253 |
-
return $
|
254 |
}
|
255 |
|
256 |
/**
|
5 |
* Text Domain: addquicktag
|
6 |
* Domain Path: /languages
|
7 |
* Description: Allows you to easily add custom Quicktags to the html- and visual-editor.
|
8 |
+
* Version: 2.2.2
|
9 |
* Author: Frank Bültge
|
10 |
* Author URI: http://bueltge.de
|
11 |
* License: GPLv3
|
14 |
*
|
15 |
License:
|
16 |
==============================================================================
|
17 |
+
Copyright 2011 - 2013 Frank Bültge (email : frank@bueltge.de)
|
18 |
|
19 |
This program is free software; you can redistribute it and/or modify
|
20 |
it under the terms of the GNU General Public License as published by
|
42 |
*/
|
43 |
class Add_Quicktag {
|
44 |
|
45 |
+
protected static $classobj;
|
46 |
|
47 |
static private $option_string = 'rmnlQuicktagSettings';
|
48 |
// use filter 'addquicktag_pages' for add custom pages
|
100 |
require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'inc/class-tinymce.php';
|
101 |
|
102 |
foreach ( $this->get_admin_pages_for_js() as $page ) {
|
103 |
+
add_action( 'admin_print_scripts-' . $page, array( $this, 'get_json' ) );
|
104 |
add_action( 'admin_print_scripts-' . $page, array( $this, 'admin_enqueue_scripts') );
|
105 |
}
|
106 |
}
|
123 |
* @since 2.0.0
|
124 |
* @return void
|
125 |
*/
|
126 |
+
public function get_json() {
|
127 |
global $current_screen;
|
128 |
|
129 |
if ( isset( $current_screen->id ) &&
|
139 |
else
|
140 |
$options = get_option( self :: $option_string );
|
141 |
|
142 |
+
// allow change or enhance buttons array
|
143 |
+
$options['buttons'] = apply_filters( 'addquicktag_buttons', $options['buttons'] );
|
144 |
+
// hook for filter options
|
145 |
+
$options = apply_filters( 'addquicktag_options', $options );
|
146 |
+
|
147 |
if ( ! $options )
|
148 |
return NULL;
|
149 |
|
158 |
}
|
159 |
array_multisort( $tmp, SORT_ASC, $options['buttons'] );
|
160 |
}
|
161 |
+
|
162 |
?>
|
163 |
<script type="text/javascript">
|
164 |
var addquicktag_tags = <?php echo json_encode( $options ); ?>,
|
217 |
* @access public
|
218 |
* @return $classobj
|
219 |
*/
|
220 |
+
public static function get_object() {
|
221 |
|
222 |
if ( NULL === self :: $classobj ) {
|
223 |
self :: $classobj = new self;
|
245 |
* @since 2.0.0
|
246 |
* @access public
|
247 |
* @param $value string, default = 'TextDomain'
|
248 |
+
* Name, PluginURI, Version, Description, Author, AuthorURI, TextDomain, DomainPath, Network, Title
|
249 |
* @return string
|
250 |
*/
|
251 |
public function get_plugin_data( $value = 'TextDomain' ) {
|
252 |
|
253 |
+
static $plugin_data = array ();
|
254 |
+
|
255 |
+
// fetch the data just once.
|
256 |
+
if ( isset( $plugin_data[ $value ] ) )
|
257 |
+
return $plugin_data[ $value ];
|
258 |
+
|
259 |
if ( ! function_exists( 'get_plugin_data' ) )
|
260 |
require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
|
261 |
|
262 |
$plugin_data = get_plugin_data( __FILE__ );
|
263 |
$plugin_value = $plugin_data[$value];
|
264 |
|
265 |
+
return empty ( $plugin_data[ $value ] ) ? '' : $plugin_data[ $value ];
|
266 |
}
|
267 |
|
268 |
/**
|
inc/class-imexport.php
CHANGED
@@ -15,9 +15,9 @@ if ( ! function_exists( 'add_action' ) ) {
|
|
15 |
|
16 |
class Add_Quicktag_Im_Export extends Add_Quicktag_Settings {
|
17 |
|
18 |
-
static
|
19 |
// post types for the settings
|
20 |
-
static
|
21 |
|
22 |
/**
|
23 |
* Handler for the action 'init'. Instantiates this class.
|
@@ -26,7 +26,7 @@ class Add_Quicktag_Im_Export extends Add_Quicktag_Settings {
|
|
26 |
* @since 2.0.0
|
27 |
* @return $classobj
|
28 |
*/
|
29 |
-
public function get_object() {
|
30 |
|
31 |
if ( NULL === self :: $classobj ) {
|
32 |
self :: $classobj = new self;
|
@@ -45,7 +45,7 @@ class Add_Quicktag_Im_Export extends Add_Quicktag_Settings {
|
|
45 |
*/
|
46 |
public function __construct() {
|
47 |
|
48 |
-
|
49 |
|
50 |
if ( isset( $_GET['addquicktag_download'] ) && check_admin_referer( parent :: $nonce_string ) )
|
51 |
$this->get_export_file();
|
15 |
|
16 |
class Add_Quicktag_Im_Export extends Add_Quicktag_Settings {
|
17 |
|
18 |
+
protected static $classobj = NULL;
|
19 |
// post types for the settings
|
20 |
+
private static $post_types_for_js;
|
21 |
|
22 |
/**
|
23 |
* Handler for the action 'init'. Instantiates this class.
|
26 |
* @since 2.0.0
|
27 |
* @return $classobj
|
28 |
*/
|
29 |
+
public static function get_object() {
|
30 |
|
31 |
if ( NULL === self :: $classobj ) {
|
32 |
self :: $classobj = new self;
|
45 |
*/
|
46 |
public function __construct() {
|
47 |
|
48 |
+
self::$post_types_for_js = parent::get_post_types_for_js();
|
49 |
|
50 |
if ( isset( $_GET['addquicktag_download'] ) && check_admin_referer( parent :: $nonce_string ) )
|
51 |
$this->get_export_file();
|
inc/class-settings.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* @package AddQuicktag
|
7 |
* @subpackage AddQuicktag Settings
|
8 |
* @author Frank Bueltge <frank@bueltge.de>
|
9 |
-
* @version
|
10 |
* @since 2.0.0
|
11 |
*/
|
12 |
|
@@ -17,19 +17,19 @@ if ( ! function_exists( 'add_action' ) ) {
|
|
17 |
|
18 |
class Add_Quicktag_Settings extends Add_Quicktag {
|
19 |
|
20 |
-
static
|
21 |
// string for translation
|
22 |
-
static public
|
23 |
// string for options in table options
|
24 |
-
static private
|
25 |
// string for plugin file
|
26 |
-
static private
|
27 |
// post types for the settings
|
28 |
-
static private
|
29 |
// string for nonce fields
|
30 |
-
static public
|
31 |
|
32 |
-
protected
|
33 |
|
34 |
/**
|
35 |
* Handler for the action 'init'. Instantiates this class.
|
@@ -38,7 +38,7 @@ class Add_Quicktag_Settings extends Add_Quicktag {
|
|
38 |
* @since 2.0.0
|
39 |
* @return $classobj
|
40 |
*/
|
41 |
-
public function get_object() {
|
42 |
|
43 |
if ( NULL === self :: $classobj ) {
|
44 |
self :: $classobj = new self;
|
@@ -261,9 +261,11 @@ class Add_Quicktag_Settings extends Add_Quicktag {
|
|
261 |
$class = ( ' class="alternate"' == $class ) ? '' : ' class="alternate"';
|
262 |
$b = $options['buttons'][$i];
|
263 |
$b['text'] = htmlentities( stripslashes($b['text']), ENT_COMPAT, get_option('blog_charset') );
|
264 |
-
|
|
|
265 |
$b['start'] = htmlentities( $b['start'], ENT_COMPAT, get_option('blog_charset') );
|
266 |
-
|
|
|
267 |
if ( ! isset( $b['access'] ) )
|
268 |
$b['access'] = '';
|
269 |
$b['access'] = htmlentities( $b['access'], ENT_COMPAT, get_option('blog_charset') );
|
6 |
* @package AddQuicktag
|
7 |
* @subpackage AddQuicktag Settings
|
8 |
* @author Frank Bueltge <frank@bueltge.de>
|
9 |
+
* @version 02/09/2013
|
10 |
* @since 2.0.0
|
11 |
*/
|
12 |
|
17 |
|
18 |
class Add_Quicktag_Settings extends Add_Quicktag {
|
19 |
|
20 |
+
protected static $classobj = NULL;
|
21 |
// string for translation
|
22 |
+
static public $textdomain;
|
23 |
// string for options in table options
|
24 |
+
static private $option_string;
|
25 |
// string for plugin file
|
26 |
+
static private $plugin;
|
27 |
// post types for the settings
|
28 |
+
static private $post_types_for_js;
|
29 |
// string for nonce fields
|
30 |
+
static public $nonce_string;
|
31 |
|
32 |
+
protected $page_hook;
|
33 |
|
34 |
/**
|
35 |
* Handler for the action 'init'. Instantiates this class.
|
38 |
* @since 2.0.0
|
39 |
* @return $classobj
|
40 |
*/
|
41 |
+
public static function get_object() {
|
42 |
|
43 |
if ( NULL === self :: $classobj ) {
|
44 |
self :: $classobj = new self;
|
261 |
$class = ( ' class="alternate"' == $class ) ? '' : ' class="alternate"';
|
262 |
$b = $options['buttons'][$i];
|
263 |
$b['text'] = htmlentities( stripslashes($b['text']), ENT_COMPAT, get_option('blog_charset') );
|
264 |
+
if ( isset( $b['title'] ) )
|
265 |
+
$b['title'] = htmlentities( stripslashes($b['title']), ENT_COMPAT, get_option('blog_charset') );
|
266 |
$b['start'] = htmlentities( $b['start'], ENT_COMPAT, get_option('blog_charset') );
|
267 |
+
if ( isset( $b['end'] ) )
|
268 |
+
$b['end'] = htmlentities( $b['end'], ENT_COMPAT, get_option('blog_charset') );
|
269 |
if ( ! isset( $b['access'] ) )
|
270 |
$b['access'] = '';
|
271 |
$b['access'] = htmlentities( $b['access'], ENT_COMPAT, get_option('blog_charset') );
|
inc/class-tinymce.php
CHANGED
@@ -15,7 +15,7 @@ if ( ! function_exists( 'add_action' ) ) {
|
|
15 |
|
16 |
class Add_Quicktag_2_TinyMce extends Add_Quicktag {
|
17 |
|
18 |
-
static
|
19 |
|
20 |
static private $option_string = 'rmnlQuicktagSettings_tmce';
|
21 |
|
@@ -26,7 +26,7 @@ class Add_Quicktag_2_TinyMce extends Add_Quicktag {
|
|
26 |
* @since 2.0.0
|
27 |
* @return $classobj
|
28 |
*/
|
29 |
-
public function get_object() {
|
30 |
|
31 |
if ( NULL === self :: $classobj ) {
|
32 |
self :: $classobj = new self;
|
15 |
|
16 |
class Add_Quicktag_2_TinyMce extends Add_Quicktag {
|
17 |
|
18 |
+
protected static $classobj = NULL;
|
19 |
|
20 |
static private $option_string = 'rmnlQuicktagSettings_tmce';
|
21 |
|
26 |
* @since 2.0.0
|
27 |
* @return $classobj
|
28 |
*/
|
29 |
+
public static function get_object() {
|
30 |
|
31 |
if ( NULL === self :: $classobj ) {
|
32 |
self :: $classobj = new self;
|
js/add-quicktags.dev.js
CHANGED
@@ -41,7 +41,7 @@ jQuery( document ).ready( function( $ ) {
|
|
41 |
* @param access_key string optional Access key for the button.
|
42 |
* @param title string optional Button's title="..."
|
43 |
* @param priority int optional Number representing the desired position of the button in the toolbar. 1 - 9 = first, 11 - 19 = second, 21 - 29 = third, etc.
|
44 |
-
* @param instance string optional Limit the button to a
|
45 |
*/
|
46 |
QTags.addButton(
|
47 |
tags[i].text.toLowerCase(),
|
41 |
* @param access_key string optional Access key for the button.
|
42 |
* @param title string optional Button's title="..."
|
43 |
* @param priority int optional Number representing the desired position of the button in the toolbar. 1 - 9 = first, 11 - 19 = second, 21 - 29 = third, etc.
|
44 |
+
* @param instance string optional Limit the button to a specific instance of Quicktags, add to all instances if not present.
|
45 |
*/
|
46 |
QTags.addButton(
|
47 |
tags[i].text.toLowerCase(),
|
readme.md
CHANGED
Binary file
|
readme.txt
CHANGED
@@ -3,16 +3,63 @@ Contributors: Bueltge, inpsyde
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6069955
|
4 |
Tags: quicktag, editor, tinymce, add buttons, button, buttons, visual editor
|
5 |
Requires at least: 3.0
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag: 2.2.
|
8 |
|
9 |
This plugin make it easy, Quicktags add to the html - and visual-editor.
|
10 |
|
11 |
== Description ==
|
|
|
|
|
|
|
|
|
12 |
This plugin make it easy, Quicktags add to the html - and visual-editor.. It is possible to ex- and import your Quicktags.
|
13 |
|
14 |
WP-AddQuicktag for WordPress is in originally by [Roel Meurders](http://roel.meurders.nl/ "Roel Meurders"). The versions of the Repo to AddQuicktag are newer versions, completly rewrite with version 2.0.0 and more functionalities.
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
The plugin add the quicktag on default to post types/ID `post`, `page` and `comment`. If you will also the plugin for other post types you can use a filter; see the follow example or an example plugin in the [Gist 1595155](https://gist.github.com/1595155).
|
17 |
|
18 |
// add custom function to filter hook 'addquicktag_post_types'
|
@@ -30,6 +77,8 @@ The plugin add the quicktag on default to post types/ID `post`, `page` and `comm
|
|
30 |
return $post_types;
|
31 |
}
|
32 |
|
|
|
|
|
33 |
Also it is possible to filter the pages inside the backend. On default was the scripts include the pages `post.php`, `comment.php`. The follow example change this for an another page.
|
34 |
|
35 |
add_filter( 'addquicktag_pages', 'my_addquicktag_pages' );
|
@@ -49,45 +98,51 @@ Also it is possible to filter the pages inside the backend. On default was the s
|
|
49 |
See this Gist als example for add the Quicktags to the editor of comments: [Gist: 3076698](https://gist.github.com/3076698).
|
50 |
If you need the functionality, that the Quicktags of this plugin works on the Quickedit of comments as well, remove the `.example`-part of `addquicktag_quickedit_comment.php.example` filename. The file is a stand alone helper plugin for Add Quicktag and you'll need to activate this file (plugin) separately in 'Manage Plugins'.
|
51 |
|
52 |
-
= Bugs, technical hints or contribute =
|
53 |
-
Please give me feedback, contribute and file technical bugs on [GitHub Repo](https://github.com/bueltge/AddQuicktag).
|
54 |
-
|
55 |
-
**Made by [Inpsyde](http://inpsyde.com) · We love WordPress**
|
56 |
-
|
57 |
-
Have a look at the premium plugins in our [market](http://marketpress.com).
|
58 |
-
|
59 |
-
== Installation ==
|
60 |
-
= Requirements =
|
61 |
-
* WordPress version 3.0 and later (tested at 3.5-Alpha (nightly build))
|
62 |
-
|
63 |
-
= Installation =
|
64 |
-
1. Unpack the download-package
|
65 |
-
1. Upload the files to the `/wp-content/plugins/` directory
|
66 |
-
1. Activate the plugin through the 'Plugins' menu in WordPress or for the Network, if you will use in Multisite for all Sites
|
67 |
-
1. Got to 'Settings' menu and configure the plugin
|
68 |
-
|
69 |
-
**Version before WordPress smaller 3.0**
|
70 |
-
|
71 |
-
If you will use this plugin with an older version of WordPress, please use an older version of this plugin, smaller version 2.0.0 - you find it in the [repo](http://wordpress.org/extend/plugins/addquicktag/download/). But i will not support this version. The version 2.0.0 and higher was rewrite with all new posibilties of the WordPress Core.
|
72 |
-
|
73 |
-
|
74 |
-
== Screenshots ==
|
75 |
-
1. Settings area in WordPress 3.3
|
76 |
-
2. Settings area in WordPress Network of an Multisite install 3.3
|
77 |
-
3. HTML Editor with new Quicktags
|
78 |
-
4. Visual editor with new Quicktags
|
79 |
-
|
80 |
|
81 |
-
|
82 |
-
|
83 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
|
85 |
-
* German Translation by [myself](http://bueltge.de) ;)
|
86 |
-
* French translation by [Jean-Michel MEYER](http://www.li-an.fr/blog)
|
87 |
-
* Japanese translation by [Yuuichi](http://www.u-1.net/2011/12/29/2498/)
|
88 |
-
* Slovak translation by [Branco](http://webhostinggeeks.com/user-reviews/)
|
89 |
|
90 |
-
=
|
91 |
Good news, this plugin is free for everyone! Since it's released under the GPL, you can use it free of charge on your personal or commercial blog. But if you enjoy this plugin, you can thank me and leave a [small donation](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6069955 "Paypal Donate link") for the time I've spent writing and supporting this plugin. And I really don't want to know how many hours of my life this plugin has already eaten ;)
|
92 |
|
93 |
= Translations =
|
@@ -95,7 +150,11 @@ The plugin comes with various translations, please refer to the [WordPress Codex
|
|
95 |
|
96 |
|
97 |
== Changelog ==
|
98 |
-
= 2.2.
|
|
|
|
|
|
|
|
|
99 |
* Fix for im/export
|
100 |
* Add toggle checkboxes for each type
|
101 |
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6069955
|
4 |
Tags: quicktag, editor, tinymce, add buttons, button, buttons, visual editor
|
5 |
Requires at least: 3.0
|
6 |
+
Tested up to: 3.8.3
|
7 |
+
Stable tag: 2.2.2
|
8 |
|
9 |
This plugin make it easy, Quicktags add to the html - and visual-editor.
|
10 |
|
11 |
== Description ==
|
12 |
+
|
13 |
+
= WordPress 3.9 Hint =
|
14 |
+
*Currently don't work the plugin with WordPress 3.9 and the visual editor. See this [thread](http://wordpress.org/support/topic/not-working-in-wordpress-39?replies=2#post-5466033) for more information.*
|
15 |
+
|
16 |
This plugin make it easy, Quicktags add to the html - and visual-editor.. It is possible to ex- and import your Quicktags.
|
17 |
|
18 |
WP-AddQuicktag for WordPress is in originally by [Roel Meurders](http://roel.meurders.nl/ "Roel Meurders"). The versions of the Repo to AddQuicktag are newer versions, completly rewrite with version 2.0.0 and more functionalities.
|
19 |
|
20 |
+
The plugin add the quicktag on default to post types/ID `post`, `page` and `comment`.
|
21 |
+
If you will also the plugin for other post types you can use a filter hook, also for custom buttons and custom pages, there have a editor.
|
22 |
+
See the examples and hint inside the tab "[Other Notes](http://wordpress.org/extend/plugins/addquicktag/other_notes/)".
|
23 |
+
|
24 |
+
= Bugs, technical hints or contribute =
|
25 |
+
Please give me feedback, contribute and file technical bugs on [GitHub Repo](https://github.com/bueltge/AddQuicktag).
|
26 |
+
|
27 |
+
**Made by [Inpsyde](http://inpsyde.com) · We love WordPress**
|
28 |
+
|
29 |
+
Have a look at the premium plugins in our [market](http://marketpress.com).
|
30 |
+
|
31 |
+
== Installation ==
|
32 |
+
= Requirements =
|
33 |
+
* WordPress version 3.0 and later (tested at 3.6-alpha (nightly build))
|
34 |
+
|
35 |
+
= Installation =
|
36 |
+
1. Unpack the download-package
|
37 |
+
1. Upload the files to the `/wp-content/plugins/` directory
|
38 |
+
1. Activate the plugin through the 'Plugins' menu in WordPress or for the Network, if you will use in Multisite for all Sites
|
39 |
+
1. Got to 'Settings' menu and configure the plugin
|
40 |
+
|
41 |
+
**Version before WordPress smaller 3.0**
|
42 |
+
|
43 |
+
If you will use this plugin with an older version of WordPress, please use an older version of this plugin, smaller version 2.0.0 - you find it in the [repo](http://wordpress.org/extend/plugins/addquicktag/download/). But i will not support this version. The version 2.0.0 and higher was rewrite with all new posibilties of the WordPress Core.
|
44 |
+
|
45 |
+
|
46 |
+
== Screenshots ==
|
47 |
+
1. Settings area in WordPress 3.3
|
48 |
+
2. Settings area in WordPress Network of an Multisite install 3.3
|
49 |
+
3. HTML Editor with new Quicktags
|
50 |
+
4. Visual editor with new Quicktags
|
51 |
+
|
52 |
+
|
53 |
+
== Other Notes ==
|
54 |
+
= Acknowledgements =
|
55 |
+
**Thanks to**
|
56 |
+
|
57 |
+
* German Translation by [myself](http://bueltge.de) ;)
|
58 |
+
* French translation by [Jean-Michel MEYER](http://www.li-an.fr/blog)
|
59 |
+
* Japanese translation by [Yuuichi](http://www.u-1.net/2011/12/29/2498/)
|
60 |
+
* Slovak translation by [Branco](http://webhostinggeeks.com/user-reviews/)
|
61 |
+
|
62 |
+
= Hook for custom post types =
|
63 |
The plugin add the quicktag on default to post types/ID `post`, `page` and `comment`. If you will also the plugin for other post types you can use a filter; see the follow example or an example plugin in the [Gist 1595155](https://gist.github.com/1595155).
|
64 |
|
65 |
// add custom function to filter hook 'addquicktag_post_types'
|
77 |
return $post_types;
|
78 |
}
|
79 |
|
80 |
+
|
81 |
+
= Hook for custom pages =
|
82 |
Also it is possible to filter the pages inside the backend. On default was the scripts include the pages `post.php`, `comment.php`. The follow example change this for an another page.
|
83 |
|
84 |
add_filter( 'addquicktag_pages', 'my_addquicktag_pages' );
|
98 |
See this Gist als example for add the Quicktags to the editor of comments: [Gist: 3076698](https://gist.github.com/3076698).
|
99 |
If you need the functionality, that the Quicktags of this plugin works on the Quickedit of comments as well, remove the `.example`-part of `addquicktag_quickedit_comment.php.example` filename. The file is a stand alone helper plugin for Add Quicktag and you'll need to activate this file (plugin) separately in 'Manage Plugins'.
|
100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
|
102 |
+
= Hook for custom buttons =
|
103 |
+
It is possible to add custom buttons to the editor, if the plugin is active.
|
104 |
+
Is usefull to easier add buttons about the solution of this plugin.
|
105 |
+
|
106 |
+
See the follow example to add buttons. The params inside the array is the same as in the settings of the plugin.
|
107 |
+
|
108 |
+
if ( class_exists( 'Add_Quicktag' ) ) :
|
109 |
+
add_filter( 'addquicktag_buttons', 'my_addquicktag_buttons' );
|
110 |
+
|
111 |
+
function my_addquicktag_buttons( $buttons ) {
|
112 |
+
|
113 |
+
$buttons[] = array(
|
114 |
+
'text' => 'Permalink',
|
115 |
+
'title' => '',
|
116 |
+
'start' => '[permalink]',
|
117 |
+
'end' => '[/permalink]',
|
118 |
+
'access' => '',
|
119 |
+
'order' => 1,
|
120 |
+
'visual' => 1,
|
121 |
+
'post' => 0,
|
122 |
+
'page' => 1,
|
123 |
+
'comment' => 0,
|
124 |
+
'edit-comments' => 0
|
125 |
+
);
|
126 |
+
$buttons[] = array(
|
127 |
+
'text' => 'Button',
|
128 |
+
'title' => '',
|
129 |
+
'start' => '<span class="border blue">',
|
130 |
+
'end' => '</span>',
|
131 |
+
'access' => '',
|
132 |
+
'order' => 2,
|
133 |
+
'visual' => 1,
|
134 |
+
'post' => 0,
|
135 |
+
'page' => 1,
|
136 |
+
'comment' => 0,
|
137 |
+
'edit-comments' => 0
|
138 |
+
);
|
139 |
+
|
140 |
+
return $buttons;
|
141 |
+
}
|
142 |
+
endif;
|
143 |
|
|
|
|
|
|
|
|
|
144 |
|
145 |
+
= License =
|
146 |
Good news, this plugin is free for everyone! Since it's released under the GPL, you can use it free of charge on your personal or commercial blog. But if you enjoy this plugin, you can thank me and leave a [small donation](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6069955 "Paypal Donate link") for the time I've spent writing and supporting this plugin. And I really don't want to know how many hours of my life this plugin has already eaten ;)
|
147 |
|
148 |
= Translations =
|
150 |
|
151 |
|
152 |
== Changelog ==
|
153 |
+
= 2.2.2 (02/09/2013) =
|
154 |
+
* Add Filter Hook for custom button, see [issue #9](https://github.com/bueltge/AddQuicktag/issues/9)
|
155 |
+
* Small check for undefined var on settings page
|
156 |
+
|
157 |
+
= 2.2.1 (13/11/2012) =
|
158 |
* Fix for im/export
|
159 |
* Add toggle checkboxes for each type
|
160 |
|
screenshot-1.png
DELETED
Binary file
|
screenshot-2.png
DELETED
Binary file
|
screenshot-3.png
DELETED
Binary file
|
screenshot-4.png
DELETED
Binary file
|