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:
- Adding custom meta boxes to specified custom post type
- Updating post meta for custom post types
- update a post meta from a single table cell TablePress
- update custom post type meta from a shortcode
- Plugin “Meta Box”: Implementing meta boxes in custom post type
- RW Meta Box ,Problem setting post title
- Correct way to make meta box with more than one meta field secure
- get_post_type on post.php
- All of my custom posttypes are 404’ing
- Metabox not show in categories custom post type cmb2
- Date format – Meta Box plugin
- Error Metabox Warning: call_user_func() expects parameter 1 to be a valid callback
- Add an action based on custom post meta field
- Displaying image from a repeatable group
- How to add jquery to my custom post type wp plugin
- How can i do custom author list?
- WordPress User Frontend Editing Custom Fields
- Implementing a CrunchBase.com Clone using WordPress?
- How to share category taxonomy with custom post type (The Event Calendar plugin)
- Is it possible to define a template for a custom post type within a plugin independent of the active theme?
- WP_query parameters for date range
- Use a plugin to handle custom post types?
- How do I remove all the metaboxes for a custom post type?
- Get all posts from custom post type and insert in select input as metabox
- Register Custom Post Type from Plugin
- How to attach Links into page/post or custom post type?
- Comparisson between date() and a date from wp_postmeta
- Add custom buttons with custom actions in Edit Post screen in WordPress?
- Frontend editing, Frontend user dashboard
- Override plugin with functions.php
- Should i delete the posts created by a plugin on uninstall?
- Advanced Custom Fields
- How does WP handle multiple matching rewrite rules?
- Is it possible to use WordPress as an online portfolio for text content? What kind of theme would I look for?
- How to make wp_enqueue_style and wp_enqueue_script work only on custom post type
- Is Wrapping intval() Around esc_attr() Redundant for Escaping Input?
- Not able to complete meta box save function and sanitization/validation
- How to create user groups and allow custom posts and plugin modify/access to specific group?
- I want to extend the current themes’ single.php to display the meta fields of my CPT
- How can I create a custom shortcode that will return a custom post type by ID?
- Custom Post Types. Are there any disadvantages/advantages in using a plugin to develop them?
- more types plugin – display all post of post type on page
- Making a Template for a CPT created by a plugin
- PHP basics help in WP context – remove a class/function?
- get current date + 90 days and checking every day
- auto populate list of questions if user select a category xyz
- How to inform the user that the save was not successful?
- Show Custom Post Type meta boxes only on Page Edit
- “Custom Post Type Permalinks” plugin URL strcuture
- Meta Data for Custom Post Type not saving
- Custom Post Type Fields
- Meta box losing its value when scheduled post is published
- Custom setup of wordpress comments that are displayed
- publish_post action doesn’t work
- Disable Individual Plugins (specifically in Custom Post Types) on a per-post basis?
- custom post type don’t appear in the home page
- Meta Box by Rilwis, Load metabox on all page templates EXCEPT the homepage
- How do we update a custom file upload field with the Advanced Custom Field plugin?
- Save Metabox Custom Field Value
- Preview with Custom Post Type Not Working
- Custom Template for wordpress cpt plugin
- Empty meta-box returns publishdate if no value is set?
- Custom Post Type template for homepage
- Custom Meta Box with variable number of fields
- Rename existing cpt and taxonomy with new textdomain
- Best method of implementing compartmentalized custom post types on a multi-site network
- Custom Meta box change size
- How to search post titles with whole words only, but not the exact word only?
- Remove custom taxonomy name from the slug – Custom Post Type UI
- Help to Create a Simple Plugin to make a post
- submit two file input fields in the same form
- Can i stream data to a custom_post_type?
- Is there a hook similar to “save_post” which only fires AFTER the post is completely published?
- save_post hook partly firing in update post
- custom post type get_posts() function not work
- Cannot view Custom Post Type no matter what I try
- “Enable Media Replace” plugin does not update serialized object in WPMeta
- Page not found after creating the add new post slider using custom post type
- Get and Update Most Meta Value as an array in HTML form
- Multiple useres editing specified content
- Get meta values from parent post and save in child post
- Get value from an input field and pass into update_meta_data as $meta_value
- Populate metabox dropdown with post title from another Custom Post Type (issues with wp_reset / global $post)
- Do something with thumbnail image on post publish
- How can I remove this sidebar from my Search Results page?
- Alter add_meta_box
- How to get rid of error message of custom metabox in dashboard when moving out of edit page?
- Custom plugin breaks css.php on Multisite
- Storing values in Post Meta vs new tables
- Advanced Custom Field User Help URL
- Custom Post type plugin breaking the front page shows dashboard?
- Insert data in custom table during new post creation
- Top Contributors Plugin with Custom Post Type
- featured image problem with custom post type
- Is an Office a custom post type [closed]
- Meta Box plugin image_advanced not showing up on frontend
- getting image alt text via ACF plugin in WordPress [closed]
- Snippet displaying LearnDash parent course title with lesson title [closed]
- add_meta_box showing blank screen in my page
- How to make content as required in custom post type?