| 开发者 | wphuebpo |
|---|---|
| 更新时间 | 2026年8月31日 10:21 |
| PHP版本: | 8.0 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
/wp-content/plugins/bpotech-custom-quicktags-manager directory, or install the plugin through the WordPress plugins screen directly.Yes. Quicktag buttons appear in a dedicated sidebar panel in the Gutenberg Block Editor. Clicking a button inserts the full HTML content as a Custom HTML block.
Yes. Quicktag buttons are added to both the Classic Text Editor (Code tab) toolbar and the TinyMCE Visual Editor toolbar automatically.
Absolutely. The plugin detects all public post types on your site and lets you choose which ones display each quicktag.
This plugin provides several action and filter hooks to allow third-party developers to extend and customize the Quicktags manager without editing the plugin core files.
bpotech_custom_quicktags_manager_data (array $quicktags)
Filters the list of quicktags retrieved from the database before rendering them in the editor or admin list.
Example:',
'end_tag' => '',
'post_types' => array( 'post' ),
'editors' => array( 'gutenberg', 'text' )
);
return $quicktags;
} );
* bpotech_custom_quicktags_manager_post_types (array $post_types)
Filters the list of public post types displayed on the settings screen.
Example:
add_filter( 'bpotech_custom_quicktags_manager_post_types', function( $post_types ) {
// Remove 'attachment' or add custom ones
unset( $post_types['attachment'] );
return $post_types;
} );
* bpotech_custom_quicktags_manager_editors (array $editors)
Filters the list of editors displayed in the settings form checkboxes.
* bpotech_custom_quicktags_manager_default_data (array $default_tags)
Filters the initial default quicktags set on plugin activation or reset.
bpotech_custom_quicktags_manager_admin_form_bottom (array|null $edit_tag)
Fires at the bottom of the quicktag creation/edit form. Useful for adding custom input fields.
Example:bpotech_custom_quicktags_manager_after_save_tag (array $new_tag, array $all_tags, bool $is_new)
Fires after a quicktag is saved or updated. You can use this to save custom form inputs.
Example:
add_action( 'bpotech_custom_quicktags_manager_after_save_tag', function( $new_tag, $all_tags, $is_new ) {
if ( isset( $POST['qt_dev_note'] ) ) {
update_option( 'qt_note' . $new_tag['id'], sanitize_text_field( wp_unslash( $_POST['qt_dev_note'] ) ) );
}
}, 10, 3 );
* bpotech_custom_quicktags_manager_after_delete_tag (string $tag_id, array $updated_tags)
Fires after a quicktag is deleted. Useful for clearing out custom metadata linked to the deleted tag ID.
Other available actions:
bpotech_custom_quicktags_manager_before_save_tag (array $new_tag, bool $is_new)bpotech_custom_quicktags_manager_before_delete_tag (string $tag_id)bpotech_custom_quicktags_manager_reset_defaults (array $default_tags)