WordPress.org

Ready to get started?Download WordPress

Plugin Directory

AddQuicktag

This plugin make it easy, Quicktags add to the html - and visual-editor.

Other Notes

Acknowledgements

Thanks to

Hook for custom post types

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.

// add custom function to filter hook 'addquicktag_post_types'
add_filter( 'addquicktag_post_types', 'my_addquicktag_post_types' );
/**
 * Return array $post_types with custom post types
 *
 * @param   $post_type Array
 * @return  $post_type Array
 */
function my_addquicktag_post_types( $post_types ) {

    $post_types[] = 'edit-comments';

    return $post_types;
}

Hook for custom pages

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.

add_filter( 'addquicktag_pages', 'my_addquicktag_pages' );
/**
 * Return array $page with custom page strings
 *
 * @param   $page Array
 * @return  $page Array
 */
function my_addquicktag_pages( $page ) {

    $page[] = 'edit-comments.php';

    return $page;
}

See this Gist als example for add the Quicktags to the editor of comments: Gist: 3076698. 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'.

Hook for custom buttons

It is possible to add custom buttons to the editor, if the plugin is active. Is usefull to easier add buttons about the solution of this plugin.

See the follow example to add buttons. The params inside the array is the same as in the settings of the plugin.

if ( class_exists( 'Add_Quicktag' ) ) :
add_filter( 'addquicktag_buttons', 'my_addquicktag_buttons' );

function my_addquicktag_buttons( $buttons ) {

    $buttons[] = array(
        'text'          => 'Permalink',
        'title'         => '',
        'start'         => '[permalink]',
        'end'           => '[/permalink]',
        'access'        => '',
        'order'         => 1,
        'visual'        => 1,
        'post'          => 0,
        'page'          => 1,
        'comment'       => 0,
        'edit-comments' => 0
    );
    $buttons[] = array(
        'text'          => 'Button',
        'title'         => '',
        'start'         => '<span class="border blue">',
        'end'           => '</span>',
        'access'        => '',
        'order'         => 2,
        'visual'        => 1,
        'post'          => 0,
        'page'          => 1,
        'comment'       => 0,
        'edit-comments' => 0
    );

    return $buttons;
}
endif;

License

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 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 ;)

Translations

The plugin comes with various translations, please refer to the WordPress Codex for more information about activating the translation. If you want to help to translate the plugin to your language, please have a look at the .pot file which contains all defintions and may be used with a gettext editor like Poedit (Windows) or the plugin Localization for WordPress.

Requires: 3.0 or higher
Compatible up to: 4.0-alpha
Last Updated: 2014-6-27
Downloads: 225,580

Ratings

4 stars
4.8 out of 5 stars

Support

0 of 2 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

1 person says it works.
0 people say it's broken.

100,1,1
100,1,1 100,3,3
100,3,3
75,4,3
100,5,5
100,2,2
100,8,8
100,1,1
0,1,0
100,6,6
100,1,1
100,1,1
100,2,2 100,1,1 100,2,2 100,1,1
100,1,1 100,1,1 80,5,4 100,2,2
77,13,10 100,1,1
75,4,3 100,2,2
100,1,1 100,1,1 100,1,1 100,1,1
100,1,1 100,1,1 20,5,1 50,2,1
100,6,6
67,3,2 100,1,1
100,1,1 100,7,7
100,2,2
100,1,1
100,1,1
100,3,3
100,1,1
100,1,1
0,3,0
100,1,1 100,1,1 67,3,2 100,1,1
100,1,1