Permalink
Browse files

fix WordPress conditionals in episode archives

fixes #904
  • Loading branch information...
eteubert committed Aug 11, 2017
1 parent ce31700 commit b4d9f148ecb5fc82520a775cc38a77ec505aeb3a
Showing with 5 additions and 13 deletions.
  1. +0 −11 includes/permalinks.php
  2. +4 −2 lib/podcast_post_type.php
  3. +1 −0 readme.txt
@@ -54,17 +54,6 @@ function podlove_add_podcast_rewrite_rules() {
// Add for WP_Query
$wp_rewrite->use_verbose_page_rules = true;
}
// Add archive pages
if ( 'on' == \Podlove\get_setting( 'website', 'episode_archive' ) ) {
$archive_slug = trim( \Podlove\get_setting( 'website', 'episode_archive_slug' ), '/' );
$blog_prefix = \Podlove\get_blog_prefix();
$blog_prefix = $blog_prefix ? trim( $blog_prefix, '/' ) . '/' : '';
$wp_rewrite->add_rule( "{$blog_prefix}{$archive_slug}/?$", "index.php?post_type=podcast", 'top' );
$wp_rewrite->add_rule( "{$blog_prefix}{$archive_slug}/{$wp_rewrite->pagination_base}/([0-9]{1,})/?$", 'index.php?post_type=podcast&paged=$matches[1]', 'top' );
}
}
/**
@@ -36,8 +36,10 @@ public function __construct() {
'show_in_menu' => true,
'menu_position' => 5, // below "Posts"
'query_var' => true,
'rewrite' => false, // we create our own permastructs
'has_archive' => false, // we create our own permastructs
'rewrite' => [
'slug' => trim( \Podlove\get_setting( 'website', 'episode_archive_slug' ), '/' )
],
'has_archive' => 'on' == \Podlove\get_setting( 'website', 'episode_archive' ),
'capability_type' => 'post',
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields', 'trackbacks' ),
'register_meta_box_cb' => '\Podlove\Podcast_Post_Meta_Box::add_meta_box',
@@ -111,6 +111,7 @@ This product includes GeoLite2 data created by MaxMind, available from http://ww
- See https://cdn.podigee.com/ppp/samples/transcript.txt for an example transcript
* Podlove Web Player 4: support contributors
* fix quotes in contributor fields
* fix WordPress conditionals in episode archives

= 2.6.1 =

0 comments on commit b4d9f14

Please sign in to comment.