Commit realizado el 12:13:52 08-04-2024
This commit is contained in:
@@ -0,0 +1,134 @@
|
||||
<?php
|
||||
/**
|
||||
* RSS2 Feed Template for displaying RSS2 Posts feed.
|
||||
* Forked from WordPress Core - feed-rss2.php.
|
||||
*
|
||||
* @package WordPress
|
||||
*/
|
||||
|
||||
header( 'Content-Type: ' . feed_content_type( 'rss2' ) . '; charset=' . get_option( 'blog_charset' ), true );
|
||||
$more = 1;
|
||||
|
||||
echo '<?xml version="1.0" encoding="' . get_option( 'blog_charset' ) . '"?' . '>';
|
||||
|
||||
/**
|
||||
* Filter to remove Podcast feed credit.
|
||||
*
|
||||
* @param boolean Defaults to false.
|
||||
*/
|
||||
if ( ! apply_filters( 'rank_math/podcast/remove_credit', false ) ) {
|
||||
echo "\n<!-- This Podcast feed is generated by Rank Math PRO SEO plugin - rankmath.com -->\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Fires between the xml and rss tags in a feed.
|
||||
*
|
||||
* @param string $context Type of feed. Possible values include 'rss2', 'rss2-comments',
|
||||
* 'rdf', 'atom', and 'atom-comments'.
|
||||
*/
|
||||
do_action( 'rss_tag_pre', 'rss2' );
|
||||
?>
|
||||
<rss version="2.0"
|
||||
xmlns:content="http://purl.org/rss/1.0/modules/content/"
|
||||
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom"
|
||||
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
|
||||
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
|
||||
<?php
|
||||
/**
|
||||
* Fires at the end of the RSS root to add namespaces.
|
||||
*/
|
||||
do_action( 'rss2_ns' );
|
||||
do_action( 'rss2_podcast_ns' );
|
||||
?>
|
||||
>
|
||||
<channel>
|
||||
<title><?php wp_title_rss(); ?></title>
|
||||
<atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
|
||||
<link><?php bloginfo_rss( 'url' ); ?></link>
|
||||
<description><?php bloginfo_rss( 'description' ); ?></description>
|
||||
<lastBuildDate><?php echo get_feed_build_date( 'r' ); ?></lastBuildDate>
|
||||
<language><?php bloginfo_rss( 'language' ); ?></language>
|
||||
<sy:updatePeriod>
|
||||
<?php
|
||||
$duration = 'hourly';
|
||||
|
||||
/**
|
||||
* Filters how often to update the RSS feed.
|
||||
*
|
||||
* @param string $duration The update period. Accepts 'hourly', 'daily', 'weekly', 'monthly',
|
||||
* 'yearly'. Default 'hourly'.
|
||||
*/
|
||||
echo apply_filters( 'rss_update_period', $duration );
|
||||
?>
|
||||
</sy:updatePeriod>
|
||||
<sy:updateFrequency>
|
||||
<?php
|
||||
$frequency = '1';
|
||||
|
||||
/**
|
||||
* Filters the RSS update frequency.
|
||||
*
|
||||
* @param string $frequency An integer passed as a string representing the frequency
|
||||
* of RSS updates within the update period. Default '1'.
|
||||
*/
|
||||
echo apply_filters( 'rss_update_frequency', $frequency );
|
||||
?>
|
||||
</sy:updateFrequency>
|
||||
<?php
|
||||
/**
|
||||
* Fires at the end of the RSS2 Feed Header.
|
||||
*/
|
||||
do_action( 'rss2_head' );
|
||||
do_action( 'rss2_podcast_head' );
|
||||
|
||||
$podcast_query = $this->get_podcasts();
|
||||
while ( $podcast_query->have_posts() ) :
|
||||
$podcast_query->the_post();
|
||||
?>
|
||||
<item>
|
||||
<title><?php the_title_rss(); ?></title>
|
||||
<link><?php the_permalink_rss(); ?></link>
|
||||
<?php if ( get_comments_number() || comments_open() ) : ?>
|
||||
<comments><?php comments_link_feed(); ?></comments>
|
||||
<?php endif; ?>
|
||||
|
||||
<dc:creator><![CDATA[<?php the_author(); ?>]]></dc:creator>
|
||||
<pubDate><?php echo mysql2date( 'D, d M Y H:i:s +0000', get_post_time( 'Y-m-d H:i:s', true ), false ); ?></pubDate>
|
||||
<?php the_category_rss( 'rss2' ); ?>
|
||||
<guid isPermaLink="false"><?php the_guid(); ?></guid>
|
||||
|
||||
<?php if ( get_option( 'rss_use_excerpt' ) ) : ?>
|
||||
<description><![CDATA[<?php the_excerpt(); ?>]]></description>
|
||||
<?php else : ?>
|
||||
<description><![CDATA[<?php the_excerpt(); ?>]]></description>
|
||||
<?php
|
||||
$content = apply_filters( 'the_content', get_the_content() );
|
||||
$content = str_replace( ']]>', ']]>', $content );
|
||||
?>
|
||||
<?php if ( strlen( $content ) > 0 ) : ?>
|
||||
<content:encoded><![CDATA[<?php echo $content; ?>]]></content:encoded>
|
||||
<?php else : ?>
|
||||
<content:encoded><![CDATA[<?php the_excerpt(); ?>]]></content:encoded>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( get_comments_number() || comments_open() ) : ?>
|
||||
<wfw:commentRss><?php echo esc_url( get_post_comments_feed_link( null, 'rss2' ) ); ?></wfw:commentRss>
|
||||
<slash:comments><?php echo get_comments_number(); ?></slash:comments>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php rss_enclosure(); ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Fires at the end of each RSS2 feed item.
|
||||
*/
|
||||
do_action( 'rss2_item' );
|
||||
do_action( 'rss2_podcast_item' );
|
||||
?>
|
||||
</item>
|
||||
<?php endwhile; ?>
|
||||
</channel>
|
||||
</rss>
|
@@ -0,0 +1,119 @@
|
||||
<?php
|
||||
/**
|
||||
* Podcast general settings.
|
||||
*
|
||||
* @package RankMath
|
||||
* @subpackage RankMathPro\Schema
|
||||
*/
|
||||
|
||||
use RankMath\Helper;
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'podcast_title',
|
||||
'type' => 'text',
|
||||
'name' => esc_html__( 'Podcast Name', 'rank-math-pro' ),
|
||||
'desc' => esc_html__( 'Name of the podcast.', 'rank-math-pro' ),
|
||||
'classes' => 'rank-math-supports-variables',
|
||||
'default' => '%sitename%',
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'podcast_description',
|
||||
'type' => 'textarea_small',
|
||||
'name' => esc_html__( 'Podcast Description', 'rank-math-pro' ),
|
||||
'desc' => esc_html__( 'A plaintext description of the podcast.', 'rank-math-pro' ),
|
||||
'classes' => 'rank-math-supports-variables',
|
||||
'default' => '%sitedesc%',
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'podcast_owner',
|
||||
'type' => 'text',
|
||||
'name' => esc_html__( 'Owner Name', 'rank-math-pro' ),
|
||||
'desc' => esc_html__( 'The podcast owner contact name.', 'rank-math-pro' ),
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'podcast_owner_email',
|
||||
'type' => 'text',
|
||||
'name' => esc_html__( 'Owner Email ', 'rank-math-pro' ),
|
||||
'desc' => esc_html__( 'The email address of the podcast owner. Please make sure the email address is active and monitored.', 'rank-math-pro' ),
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'podcast_category',
|
||||
'type' => 'select',
|
||||
'name' => esc_html__( 'Podcast Category', 'rank-math-pro' ),
|
||||
'options' => [
|
||||
'' => esc_html__( 'None', 'rank-math-pro' ),
|
||||
'Arts' => esc_html__( 'Arts', 'rank-math-pro' ),
|
||||
'Business' => esc_html__( 'Business', 'rank-math-pro' ),
|
||||
'Comedy' => esc_html__( 'Comedy', 'rank-math-pro' ),
|
||||
'Education' => esc_html__( 'Education', 'rank-math-pro' ),
|
||||
'Games & Hobbies' => esc_html__( 'Games & Hobbies', 'rank-math-pro' ),
|
||||
'Government & Organizations' => esc_html__( 'Government & Organizations', 'rank-math-pro' ),
|
||||
'Health' => esc_html__( 'Health', 'rank-math-pro' ),
|
||||
'Kids & Family' => esc_html__( 'Kids & Family', 'rank-math-pro' ),
|
||||
'Music' => esc_html__( 'Music', 'rank-math-pro' ),
|
||||
'News & Politics' => esc_html__( 'News & Politics', 'rank-math-pro' ),
|
||||
'Religion & Spirituality' => esc_html__( 'Religion & Spirituality', 'rank-math-pro' ),
|
||||
'Science & Medicine' => esc_html__( 'Science & Medicine', 'rank-math-pro' ),
|
||||
'Society & Culture' => esc_html__( 'Society & Culture', 'rank-math-pro' ),
|
||||
'Sports & Recreation' => esc_html__( 'Sports & Recreation', 'rank-math-pro' ),
|
||||
'TV & Film' => esc_html__( 'TV & Film', 'rank-math-pro' ),
|
||||
'Technology' => esc_html__( 'Technology', 'rank-math-pro' ),
|
||||
],
|
||||
'default' => '',
|
||||
'desc' => esc_html__( 'Select the category that best reflects the content of your show.', 'rank-math-pro' ),
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'podcast_image',
|
||||
'type' => 'file',
|
||||
'name' => esc_html__( 'Podcast Image', 'rank-math-pro' ),
|
||||
'desc' => __( '<strong>Min Size: 1400x1400px, Max Size: 3000x3000px</strong>.<br /> The filesize should not exceed 0.5MB.', 'rank-math-pro' ),
|
||||
'options' => [ 'url' => false ],
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'podcast_tracking_prefix',
|
||||
'type' => 'text',
|
||||
'name' => esc_html__( 'Tracking Prefix', 'rank-math-pro' ),
|
||||
'desc' => esc_html__( 'Add the tracking prefix provided by your tracking service like Chartable, Podsights, Podtrac, etc.', 'rank-math-pro' ),
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'podcast_explicit',
|
||||
'type' => 'toggle',
|
||||
'name' => esc_html__( 'Is Explicit', 'rank-math-pro' ),
|
||||
'desc' => esc_html__( 'Indicates whether the podcast is explicit language or adult content.', 'rank-math-pro' ),
|
||||
'default' => 'off',
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'podcast_copyright_text',
|
||||
'type' => 'text',
|
||||
'name' => esc_html__( 'Copyright Text', 'rank-math-pro' ),
|
||||
'desc' => esc_html__( 'Add copyright details if your show is copyrighted.', 'rank-math-pro' ),
|
||||
]
|
||||
);
|
Reference in New Issue
Block a user