In podcast development, constants refer to fixed values or parameters that remain unchanged throughout the program’s execution, playing a crucial role in maintaining consistency and facilitating efficient coding practices.
The following PHP define constants can be set within a WordPress’s wp-config.php file to change specific functionality. PHP define constants (a permanent global variable) that can be used to turn on/off or change plugin features and behavior. All PowerPress define constants are in capital letters and may include underscore characters and numbers.
The following example define constant can be used in the wp-config.php to allow for ajax debug statements to be printed specific for PowerPress.
define('POWERPRESS_AJAX_DEBUG', true);
Full list of PowerPress Define Constants
POWERPRESS_AJAX_DEBUG
If set to true, ajax responses are printed into a js alert.
POWERPRESS_AUTO_DETECT_ONCE
If set to true, PowerPress will not automatically detect file size and duration.
POWERPRESS_CAPABILITY_EDIT_PAGES
Tag for the capability to edit pages, used to check capabilities of the current user. Default ‘edit_pages’.
POWERPRESS_CAPABILITY_MANAGE_OPTIONS
Tag for the capability to check options, used to check capabilities of the current user. Default ‘manage_options’.
POWERPRESS_CONTENT_ACTION_PRIORITY
Priority to be set for PowerPress content filters. Default 10.
POWERPRESS_CURL
Must be set to true to use cURL for HTTP requests in PowerPress.
POWERPRESS_CUSTOM_CAPABILITY_TYPE
Must be set to true for custom post type to be enabled in PowerPress.
POWERPRESS_DEBUG
If set to true, prints extra information about the feed import.
POWERPRESS_DEBUG_QUERIES
If set to true, SQL queries from PowerPress will be printed to the screen.
POWERPRESS_DEFAULT_MEDIA_URL
Prefix to be prepended to media files that don’t start with HTTPS.
POWERPRESS_DISABLE_ITUNES_UTF8
Disables UTF8 in the Apple Podcast itunes tag if set to true.
POWERPRESS_DISABLE_WEBSUB
If set to false, Websub tag will be removed from the podcast feed. Default true.
POWERPRESS_DO_ENCLOSE_FIX
If set to true, tags are added to prevent posts being deleted as part of a WordPress 2.8 bug.
POWERPRESS_DO_SHORTCODE
If set to true, site will use WordPress’s shortcode to create the audio element.
POWERPRESS_DOWNLOAD_BYTE_LIMIT
Download byte limit for audio files.
POWERPRESS_DOWNLOAD_BYTE_LIMIT_VIDEO
Download byte limit for video files.
POWERPRESS_DOWNLOAD_TEXT
Text to be displayed on podcast player. Default ‘Download’.
POWERPRESS_EMBED_TEXT
Text for PowerPress embed. Default ‘Embed’.
POWERPRESS_FEED_AUTH_PRINT_WP_ERRORS
Must be set to true for authorized feeds to work in PowerPress.
POWERPRESS_FEED_TEMPLATE
Template for PowerPress to use for the podcast feed. If not set, will use PowerPress’s default ‘feed-podcast-.php’ template.
POWERPRESS_FEEDS_FORCE_HTTP
Set to true to force all images and media files to use HTTP.
POWERPRESS_FEEDS_FORCE_HTTPs
Set to true to force all images and media files to use HTTPS.
POWERPRESS_FIX_WARNING
If set to true, limits error reporting
POWERPRESS_GOOGLEPLAY_RSS
If set to true, PowerPress will use GooglePlay’s RSS Module.
POWERPRESS_IMAGICK
Should be set to true if Imagick is installed on the server. If set to true, PowerPress will use Imagick to ensure that images are compatible with podcasting.
POWERPRESS_JS_DEBUG
If set to true, non-minified versions of js scripts are included for the player.
POWERPRESS_LINK_SEPARATOR
Character to separate links displayed on the site. Default ‘|’.
POWERPRESS_MULTISITE_VERSION
Must be set to true to enable PowerPress Multisite.
POWERPRESS_NO_PODCAST_FEED
If set to true, the podcast feed will be excluded from the site.
POWERPRESS_NO_REMOVE_WP_HEAD
If set to true, links in the site head will not be removed.
POWERPRESS_NO_THE_EXCERPT
Must be defined for PowerPress to use the ‘the_excerpt’ filter.
POWERPRESS_PLAY_IMAGE
Image file to use for the play button in podcast players. Default ‘play_video_default.jpg’.
POWERPRESS_PLAY_IN_NEW_WINDOW_TEXT
Text to be displayed on podcast player. Default ‘Play in New Window’.
POWERPRESS_PLAY_TEXT
Text to be displayed on podcast player. Default ‘Play’.
POWERPRESS_POST_TYPES
Comma separated list of post types.
POWERPRESS_POSTTYPE_MIXING
If set to true, uses the default post type ‘post’.
POWERPRESS_PREMIUM_GROUPS_PLUGIN
Must be set to true for compatibility with a groups plugin.
POWERPRESS_RAWVOICE_RSS
If set to true, PowerPress will included Rawvoice’s RSS Module.
POWERPRESS_READ_TEXT
Text to be displayed on podcast player. Default ‘Read’.
POWERPRESS_SUBSCRIBE_SIDEBAR_NO_H_STYLING
Set to true to exclude custom styling on subscribe sidebar headings.
POWERPRESS_TEXT_SEPARATOR
Character to separate header text on player. Default ‘:’.