Title: Powerpress PHP API
Last modified: October 5, 2017

---

# Powerpress PHP API

 *  [cclark07](https://wordpress.org/support/users/cclark07/)
 * (@cclark07)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/powerpress-php-api/)
 * I’ve noticed some very specific powerpress PHP functions (e.g. `powerpress_get_enclosure_data`)
   but I am unable to find a comprehensive list of these functions and their inputs/
   outputs.
    Is there such a resource that I can look through? I love the plugin
   but the documentation (that I’ve found) doesn’t include raw developer resources.
 * Cheers!

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Contributor [Angelo Mandato](https://wordpress.org/support/users/amandato/)
 * (@amandato)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/powerpress-php-api/#post-9560157)
 * Hello [@cclark07](https://wordpress.org/support/users/cclark07/),
 * Some of the useful functions such as powerpress_get_enclosure_data() are briefly
   discussed here: [https://create.blubrry.com/resources/powerpress/powerpress-and-your-theme/](https://create.blubrry.com/resources/powerpress/powerpress-and-your-theme/)
   For the most part, most functions within PowerPress are for internal use within
   he plugin and are not documented for other plugins or themes to use, but obviously
   some such as the powerpress_get_enclosure_data() function have a lot of use outside
   of PowerPress and are mentioned on that page linked.
 * Just to get you further along, the powerpress_get_enclosure_data returns a PHP
   array, the array is a set of key=>value pairs. The most important value is the
   media url, the key for the URL is ‘url’. e.g.
 *     ```
       if( function_exists('powerpress_get_enclosure_data') ) {
          $episodeData = powerpress_get_enclosure_data( get_the_ID() );
          if( !empty($episodeData['url']) ) {
             echo 'Media URL: '.$episodeData['url']."\n";
          }
       }
       ```
   
 * The $episodeData array has many key values. What data do you need I can reference
   the code to tell you which keys you may need.
 * Thanks,
    Angelo
 *  Thread Starter [cclark07](https://wordpress.org/support/users/cclark07/)
 * (@cclark07)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/powerpress-php-api/#post-9563866)
 * Thanks for the quick response [@amandato](https://wordpress.org/support/users/amandato/)!
 * I’m using the plugin mainly to gather the RSS feed information and create custom
   posts. My plan was to then manually access the data via PHP in the post template
   and create my own markup/styles. At the moment I’ve found ways to access the 
   data I need but it’s still in early development so that may change (requirements
   shift often unfortunately).
    I should have a better idea of what is missing, 
   if anything, early next week. I’ll post here to confirm all is well, or to ask
   for some more help if necessary.
 * One thing that I’m curious about is if it’s possible to pull in new RSS items
   as they are published to Libsyn. Otherwise our editors will need to manually 
   update the posts by re-importing the feed. It’s not the end of the world if that
   is the case, but it would be nice to automate as much as possible.
 * Thanks again!
    -  This reply was modified 8 years, 7 months ago by [cclark07](https://wordpress.org/support/users/cclark07/).
 *  Plugin Support [Shawn](https://wordpress.org/support/users/shawnogordo/)
 * (@shawnogordo)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/powerpress-php-api/#post-9564101)
 * PowerPress doesn’t have the ability to continuously import new information from
   an external feed. You’d have to either manually copy new entries to the site 
   or possibly run the import tool again. But, running the import tool multiple 
   times could cause issues over time and isn’t really recommended. PowerPress import
   is really meant to be a one-and-done procedure.
 *  Plugin Contributor [Angelo Mandato](https://wordpress.org/support/users/amandato/)
 * (@amandato)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/powerpress-php-api/#post-9564191)
 * Hello [@cclark07](https://wordpress.org/support/users/cclark07/),
 * That sounds awesome! If you end up making this into a plugin that is listed on
   WordPress.org, please met me know, we will link to it.
 * As for Pulling RSS feeds (libsyn or not), you can use the RSS import tool in 
   PowerPress. It is not designed to be used programmatically though, as there are
   possible complication during the feed import process, but it would import a feed.
   Most users who host at LibSyn who use WordPress with PowerPress simply use LibSyn
   as a paste to upload the files then they write everything from within PowerPress.
   Usually once folks get to that point they discover they can switch to Blubrry
   Podcast Hosting to have the ease of uploading and publishing all right from their
   WordPress site.
 * There are big benefits NOT to import the feed but to manually enter the show 
   notes and such within WordPress with PowerPress. With iOS11 for example, the 
   RSS links are now shown in the Podcasts app, which if you import from LibSyn,
   the link will not be to your blog but to the media file which defeats the purpose
   of the link itself. Hope this helps.
 *  Thread Starter [cclark07](https://wordpress.org/support/users/cclark07/)
 * (@cclark07)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/powerpress-php-api/#post-9577666)
 * Hey [@shawnogordo](https://wordpress.org/support/users/shawnogordo/), [@amandato](https://wordpress.org/support/users/amandato/),
 * I’m not sure I’ll be bundling this up into a plugin just yet, but maybe in the
   future! I’m currently trying to create a re-usable Podcast Episode component 
   so we can highlight specific episodes throughout our site.
    I’ve successfully
   pulled all of the meta data from the post object (enclosure, metamarks, etc.),
   the issue I’m having now is rendering the podcast player within the component
   template file. So, in the post template file (single-podcast.php) `the_powerpress_content();`
   works fine. However, I’m trying to reference this outside of that file and it
   is returning an empty string. Is there a way to pull the content (audio player,
   player links) for a specific post object/id?
 * Our set up might be a little confusing so let me know if you need clarification!
 * Cheers!
 *  Thread Starter [cclark07](https://wordpress.org/support/users/cclark07/)
 * (@cclark07)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/powerpress-php-api/#post-9577813)
 * Update: I’ve found a way to embed the player in a non-post template file. It 
   requires calling the `do_shortcode()` PHP function and passing in the powerpress
   shortcode syntax.
    Just for anyone who needs it, my call looks like this: `<?
   php echo do_shortcode('[powerpress url="'.$podcast_episode_audio.'"]'); ?>`
 * The `$podcast_episode_audio` variable is the url pulled from the enclosure data
   returned from the `powerpress_get_enclosure_data()` function:
    `$podcast_enclosure_data
   = powerpress_get_enclosure_data($post_id, $feed_slug='your_feed_slug');` `$podcast_episode_audio
   = $podcast_enclosure_data['url'];`
 * I’m now working on pulling the download link in a similar manner. I will update
   here if/when I find the solution.
 *  Plugin Contributor [Angelo Mandato](https://wordpress.org/support/users/amandato/)
 * (@amandato)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/powerpress-php-api/#post-9579639)
 * Hello [@cclark07](https://wordpress.org/support/users/cclark07/),,
 * Glad you figured it out! The do_shortcode() call is optimal for your situation
   in the event you are outside of the normal WordPress “loop” where it displays
   blog posts / page content. Keep in mind though that if you do the url=”” in the
   shortcode, the player will only appear, the subscribe and player links are not
   available in this case.
 * Thanks,
    Angelo

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Powerpress PHP API’ is closed to new replies.

 * ![](https://ps.w.org/powerpress/assets/icon.svg?rev=2849869)
 * [PowerPress Podcasting plugin by Blubrry](https://wordpress.org/plugins/powerpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/powerpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/powerpress/)
 * [Active Topics](https://wordpress.org/support/plugin/powerpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/powerpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/powerpress/reviews/)

 * 7 replies
 * 3 participants
 * Last reply from: [Angelo Mandato](https://wordpress.org/support/users/amandato/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/powerpress-php-api/#post-9579639)
 * Status: not resolved