Title: generating plugin syntax dynamically
Last modified: August 20, 2016

---

# generating plugin syntax dynamically

 *  [matfish2](https://wordpress.org/support/users/matfish2/)
 * (@matfish2)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/generating-plugin-syntax-dynamically/)
 * I have downloaded an audio player plugin for WP. the syntax is very simple. You
   just add the line : “[audio:my_file.mp3]” to your post editor/excerpt, and call
   it in the loop with the_content() or the_excerpt() respectively. I would like
   to build a metabox in which the user would upload a file, and the plugin syntax
   would automatically be generated accordingly. I know how to insert the meta-data
   into the DB, but pulling it with get_post_meta() or the_meta() just gets the 
   syntax as it is, without replacing it with the desired plugin content (i.e the
   audio player). I thought about dynamically injecting the syntax to the editor\
   excerpt with the use of the filter default_content but this filter only applies
   to normal posts, whereas mine is a custom post type (audio). your ideas are most
   welcomed.

The topic ‘generating plugin syntax dynamically’ is closed to new replies.

## Tags

 * [custom post type](https://wordpress.org/support/topic-tag/custom-post-type/)

 * 0 replies
 * 1 participant
 * Last reply from: [matfish2](https://wordpress.org/support/users/matfish2/)
 * Last activity: [14 years, 5 months ago](https://wordpress.org/support/topic/generating-plugin-syntax-dynamically/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
