bueltge / addquicktag

This plugin makes it easy to add Quicktags to the html - and visual-editor.
http://wordpress.org/extend/plugins/addquicktag/
GNU General Public License v3.0
17 stars 10 forks source link

Quicktag option need to show on texonomies. #33

Closed truetesterphp closed 9 years ago

truetesterphp commented 9 years ago

Quicktag wordpress plugin option need to show on texonomie page. How to hook that in texonomie page wordpress back-end. query

bueltge commented 9 years ago

You find this two hooks for this topic. https://github.com/bueltge/AddQuicktag/blob/master/readme.md

You must set your values for page and post type.

truetesterphp commented 9 years ago

i need to add the Quicktag in this page of admin www.mysitedomain/wp-admin/edit-tags.php?action=edit&taxonomy=category&tag_ID=99&post_type=post i need it on category page and tag page i used this

    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-tags.php';

        return $page;
    }

but still not having any result. i am adding again a screen shoot. quicktag

bueltge commented 9 years ago

The Editor on tags comes from a plugin, right? If you will add this, you must add the post-type and the page via two hooks. See this example plugin and change only the post-type and page of the admin -area. https://gist.github.com/bueltge/3076698

After this, you have additional fields on the settings page and now you must add the right checkboxes on each button to add the quicktags to the editor.

truetesterphp commented 9 years ago

yes this is coming from plugin that is https://wordpress.org/plugins/categorytinymce/

i tried your code this is working to add post_type in Quicktag but quicktag is not showing on taxonomy-description visual editor.

bueltge commented 9 years ago

I have tested, this plugin works. After activation you find a new post type inside the settings page edit-category.

Result categorytinymce

<?php
/**
 * Plugin Name: AddQuicktag for CategoryTinymce
 * Plugin URI:  http://bueltge.de/
 * Description: Add the quicktags from AddQuicktag plugin to the CategoryTinymce plugin
 * Author:      Frank Bültge
 * Version:     0.0.1
 * Licence:     GPLv3
 * Author URI:  http://bueltge.de
 */

 // This file is not called from WordPress. We don't like that.
if ( ! function_exists( 'add_filter' ) ) {
    echo "Hi there! I'm just a part of plugin, not much I can do when called directly.";
    exit;
}

if ( ! function_exists( 'my_addquicktag_post_types' ) ) {

    // 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 strings
     * 
     * @param   $post_type Array
     * @return  $post_type Array
     */
    function my_addquicktag_post_types( $post_types ) {

        $post_types[] = 'edit-category';

        return $post_types;
    }

    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-tags.php';

        return $page;
    }

}
bueltge commented 9 years ago

Also saved here as comment - https://gist.github.com/bueltge/3076698#comment-1402358

truetesterphp commented 9 years ago

it's working Thank you

bueltge commented 9 years ago

Welcome. I had add this to the wiki - https://github.com/bueltge/AddQuicktag/wiki