diff --git a/includes/class-e-reader.php b/includes/class-e-reader.php index c4829aa..d6a51e3 100644 --- a/includes/class-e-reader.php +++ b/includes/class-e-reader.php @@ -152,7 +152,7 @@ protected function get_content( $format, \WP_Post $post ) { $format . '/footer', null, array( - 'url' => get_permalink( $post ), + 'url' => $this->get_post_source_url( $post ), ) ); $content = ob_get_contents(); @@ -161,6 +161,16 @@ protected function get_content( $format, \WP_Post $post ) { return $content; } + /** + * Resolve the source URL for the chapter footer. + * + * @param \WP_Post $post The post. + * @return string + */ + protected function get_post_source_url( \WP_Post $post ) { + return apply_filters( 'send_to_e_reader_post_url', get_permalink( $post ), $post ); + } + /** * Get the date to show for a post in generated e-reader content. * @@ -192,7 +202,7 @@ protected function update_author_name( \WP_Post $post ) { if ( $override_author_name ) { $author_name = $override_author_name; } - $post->author_name = $author_name; + $post->author_name = apply_filters( 'send_to_e_reader_post_author_name', $author_name, $post ); } return $post->author_name; } diff --git a/templates/plain-list.php b/templates/plain-list.php index 83e707a..6cc811c 100644 --- a/templates/plain-list.php +++ b/templates/plain-list.php @@ -313,6 +313,7 @@