WordPress.org

Forums

AddQuicktag
[resolved] Costom Post Type is not reflected (8 posts)

  1. Suzakura Karin
    Member
    Posted 2 years ago #

    AddQuicktag 2.1.1 is used.

    > see Repo: https://github.com/bueltge/AddQuicktag

    Add the Custom Post Type is not reflected.
    Until the previous version reflected.

    Has added the function to functions.php in my theme.
    ---
    function addquicktag_set_custom_post_type($post_types){
    $post_types[] = "custom_post_type";
    return $post_types;
    }
    add_filter('addquicktag_post_types', 'addquicktag_set_custom_post_type');
    ---

    Please advice.

    http://wordpress.org/extend/plugins/addquicktag/

  2. Frank Bueltge
    Member
    Plugin Author

    Posted 2 years ago #

    Thanks, i will fix this in the next verison
    see: https://github.com/bueltge/AddQuicktag/issues/2

  3. Suzakura Karin
    Member
    Posted 2 years ago #

    Thank you for the quick update.

    But, Custom Post Types check box is still not displayed in the settings screen.

    If you modify the 'addquicktag.php' 51 line follows the custom post types check box is displayed in the settings screen.

    static private $post_types_for_js = array( 'post', 'page', 'comment', 'custom' );

    Continue please respond.

  4. Frank Bueltge
    Member
    Plugin Author

    Posted 2 years ago #

    Today I have end the dev on the new version and he works with the example plugin inside the folder or on the readme. Please reinstall new from github version and give me an feedback - maybe on github issue #2; its easier to track for me.
    Thanks!

  5. Suzakura Karin
    Member
    Posted 2 years ago #

    Although there is no telling whether become helpful or not ....

    'class-settings.php' 175line:
    ---
    public function get_settings_page() {
    $this->post_types_for_js = apply_filters( 'addquicktag_post_types', $this->post_types_for_js );

    ?>
    <div class="wrap">
    <?php screen_icon('options-general'); ?>
    <h2><?php echo parent :: get_plugin_data( 'Name' ); ?></h2>

    <h3><?php _e('Add or delete Quicktag buttons', $this -> get_textdomain() ); ?></h3>
    ---

    When indicated as mentioned above, the custom post type was also displayed.
    I hope this comment will be helpful to you.

  6. Frank Bueltge
    Member
    Plugin Author

    Posted 2 years ago #

    the var set in the constructor, see
    line 63: https://github.com/bueltge/AddQuicktag/blob/master/inc/class-settings.php
    $this->post_types_for_js = parent::get_post_types_for_js();

    works and use custom post types.
    Do you have test the last version form github?

  7. Suzakura Karin
    Member
    Posted 2 years ago #

    I have test the last version. → ver.2.2.0
    I don't understand how to use GitHub.
    The ZIP file downloaded from the link is installed in WordPress.
    https://github.com/bueltge/AddQuicktag

    line 63 of 'class-settings.php' had set the constructor.
    But, Custom Post Types check box is still not displayed in the settings.

    So far I try to insert hooks get_settings_page(), custom post type checkbox is displayed.

    Incidentally.
    The improvement of a phenomenon was not found even if it tested the newest commitment file.
    https://github.com/bueltge/AddQuicktag/commit/69834b8b2713517de79226e2e7bf770626853b8f

    I am sorry to bother you so many times.

  8. Frank Bueltge
    Member
    Plugin Author

    Posted 2 years ago #

    the last version is on this link: https://github.com/bueltge/AddQuicktag/zipball/master

    please give me your code, how do you include your post_type to addquicktag. Do you use the source from my example plugin? After you include your post type with your custom plugin, then it is in the list of settings. I test this here with my custom post type and works fine.

    The Settings-link on plugins-page dont work? If you click on the Settings-link, then you must go to the settings page of the plugin Addquicktag.

    Welcome, no problem.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • AddQuicktag
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.