Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

dynamically generating plugin syntax

Sounds like a custom TinyMCE button would be the ideal candidate for the job.

WordPress has an excellent write-up in the codex on how to create one; you’d essentially add a button to the TinyMCE toolbar with your own callback, which could trigger a modal pop-up to choose the audio file & insert the shortcode automatically.

Equally, you could hook into the output of media items once they’ve been uploaded, and display a link that would inject the shortcode for that item into the post (if uploaded within the Thickbox pop-up) – akin to how featured thumbnails work.

Check out get_media_item() and get_attachment_fields_to_edit() in wp-admin/includes/media.php for available hooks and filters.

Related Posts:

  1. Adding custom meta boxes to specified custom post type
  2. Updating post meta for custom post types
  3. update a post meta from a single table cell TablePress
  4. update custom post type meta from a shortcode
  5. Plugin “Meta Box”: Implementing meta boxes in custom post type
  6. RW Meta Box ,Problem setting post title
  7. Correct way to make meta box with more than one meta field secure
  8. get_post_type on post.php
  9. All of my custom posttypes are 404’ing
  10. Metabox not show in categories custom post type cmb2
  11. Date format – Meta Box plugin
  12. Error Metabox Warning: call_user_func() expects parameter 1 to be a valid callback
  13. Add an action based on custom post meta field
  14. Displaying image from a repeatable group
  15. How to add jquery to my custom post type wp plugin
  16. How can i do custom author list?
  17. WordPress User Frontend Editing Custom Fields
  18. Should i delete the posts created by a plugin on uninstall?
  19. Advanced Custom Fields
  20. Allow users mark posts as “complete”?
  21. Where to hook my plugin’s action
  22. Is there a way to order posts and custom post types as one group?
  23. Is there a filter for get_post_custom()?
  24. How does WP handle multiple matching rewrite rules?
  25. how do i remove posts from a WP_Query so the pagination is right?
  26. Saving Custom Post types and fields to a custom table
  27. Is it possible to use WordPress as an online portfolio for text content? What kind of theme would I look for?
  28. Building a store locator with google maps
  29. Populate Custom Fields in a Custom Post Type?
  30. Duplicate posts when posting nulls in records in phpMyAdmin [closed]
  31. How to make wp_enqueue_style and wp_enqueue_script work only on custom post type
  32. Loco Translate: Custom Post and Custom Taxonomy Labels not translated in wp-admin menu
  33. Is Wrapping intval() Around esc_attr() Redundant for Escaping Input?
  34. Accessing post’s meta data based on user’s click of a post
  35. Custom meta box data array: foreach not working correctly?
  36. Undefined Variable – Custom Post Type Meta
  37. Not able to complete meta box save function and sanitization/validation
  38. Populate dropdown from one custom post type inside another custom post type
  39. How to check if user meta field is empty in conditional else statement
  40. How to create user groups and allow custom posts and plugin modify/access to specific group?
  41. I want to extend the current themes’ single.php to display the meta fields of my CPT
  42. Plugin custom post type – Internal server Error
  43. Exclude post by custom meta with pre_get_posts
  44. How can I create a custom shortcode that will return a custom post type by ID?
  45. Custom Post Types. Are there any disadvantages/advantages in using a plugin to develop them?
  46. Create digital-virtual-downloadable WooCommerce products from the frontend using Gravity Forms? [closed]
  47. Is it possible to create Custom Post plug-in?
  48. get_post_type() and WP_QUERY issue
  49. List taxonomy terms for post as checkboxes
  50. What is generating my meta og:description?
  51. more types plugin – display all post of post type on page
  52. When using Simple Fields plugin, how do I pull the information out of the database to display on a page?
  53. Save / Show multi line text in metabox
  54. How to make a proper custom post type link
  55. Assign / update custom field value for all posts (How can I assign only to posts without custom field value?)
  56. Matching Chapters to a Custom posts [closed]
  57. How to display the “ratingValue” and “ratingCount” values ​generated by the KK Star Ratings plugin into my page’s recipe ld+json schema
  58. Custom post type – no layout section of Document tab, and no author choice
  59. Creating a custom post type, adding custom meta fields, preventing all future editability of posts of this type
  60. A better way to add a meta box to custom post types
  61. ‘No Results Found’ on single post for custom post type
  62. Keep a post copy when this one is updated – issue
  63. Making a Template for a CPT created by a plugin
  64. PHP basics help in WP context – remove a class/function?
  65. how to add a button next to the wordpress view button?
  66. get current date + 90 days and checking every day
  67. auto populate list of questions if user select a category xyz
  68. How to remove plugin metaboxes from edit.php
  69. How can I make my metabox appear?
  70. How to inform the user that the save was not successful?
  71. How can I change the meta_key for a particular piece of information?
  72. WordPress Post Visibility Options for Frontend
  73. Show Custom Post Type meta boxes only on Page Edit
  74. How to Add multiple instance of meta box to custom post type
  75. Mq translate plugin custom post type issue
  76. Show meta box only when post is being published first time
  77. Retrieving Meta from Image Attachment
  78. Bulk update all posts from plugin settings screen
  79. “Custom Post Type Permalinks” plugin URL strcuture
  80. Unable to delete custom post types, confusion around capabilities
  81. WordPress metaboxes – textfield suggestion automatically populated
  82. Can’t publish custom post type – “You are not allowed to edit this post.”
  83. Adding CSS to custom post type admin page causes error
  84. Custom fields for custom post type
  85. ACF: post query, hide duplicate values [closed]
  86. Redirect to another page using contact form 7? [closed]
  87. Why are my queries interfering with the global post variable?
  88. Meta Data for Custom Post Type not saving
  89. What is the best way for showing a grid of customer logos?
  90. Custom Post Type Fields
  91. How to delete all trashed item in one-go
  92. Meta box losing its value when scheduled post is published
  93. How to insert multiple postmeta values with one query?
  94. How can I use a file in my plugin as a replacement for single.php on custom-post-type query?
  95. Custom setup of wordpress comments that are displayed
  96. publish_post action doesn’t work
  97. Disable Individual Plugins (specifically in Custom Post Types) on a per-post basis?
  98. Finding the screen id of a page generated with add_menu_page
  99. WordPress custom taxonomy not showing
  100. Mass SQL WordPress Meta Key deletion
Categories plugins Tags custom-post-types, metabox, plugins, post-meta
Custom Post Type with has_archive ignores my custom archive and single template
wp_mail is sending two emails when used after retrieving session data

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress