Commit 4744295c authored by Erick Hitter's avatar Erick Hitter

Version 0.9: later conditional registration of certain actions and filters so...

Version 0.9: later conditional registration of certain actions and filters so necessary data is available and filters can be engaged by external code.

Also bumps compatibility to correspond with latest tested release.
parent 7b4f2fac
......@@ -3,8 +3,8 @@ Contributors: ethitter, thinkoomph
Donate link: http://www.thinkoomph.com/plugins-modules/view-all-posts-pages/
Tags: view all, pages, paged, paged post, multipage, single view, single page, wp_link_pages, nextpage, next page, quicktag
Requires at least: 3.2.1
Tested up to: 3.6
Stable tag: 0.8.1
Tested up to: 3.8
Stable tag: 0.9
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
......@@ -45,6 +45,9 @@ This plugin is known to conflict with certain plugins, many pertaining to SEO an
== Changelog ==
= 0.9 =
* Move conditional registration of some filters to `init`, both to ensure external code can interact with filters and to avoid PHP notices.
= 0.8.1 =
* Correct translation implementation issue introduced in v0.8.
......@@ -89,6 +92,9 @@ This plugin is known to conflict with certain plugins, many pertaining to SEO an
== Upgrade Notice ==
= 0.9 =
Recommended update for anyone hoping to use plugin's filters to modify its behaviour.
= 0.8.1 =
Recommended upgrade for anyone translating plugin's interface.
......
......@@ -4,7 +4,7 @@ Plugin Name: View All Post's Pages
Plugin URI: http://www.thinkoomph.com/plugins-modules/view-all-posts-pages/
Description: Provides a "view all" (single page) option for posts, pages, and custom post types paged using WordPress' <a href="http://codex.wordpress.org/Write_Post_SubPanel#Quicktags" target="_blank"><code>&lt;!--nextpage--&gt;</code> Quicktag</a> (multipage posts).
Author: Erick Hitter & Oomph, Inc.
Version: 0.8.1
Version: 0.9
Author URI: http://www.thinkoomph.com/
Text Domain: view_all_posts_pages
......@@ -67,10 +67,6 @@ class view_all_posts_pages {
*
* @uses register_deactivation_hook
* @uses add_action
* @uses add_filter
* @uses this::get_options
* @uses apply_filters
* @uses get_option
* @return null
*/
private function setup() {
......@@ -83,17 +79,6 @@ class view_all_posts_pages {
add_action( 'redirect_canonical', array( $this, 'filter_redirect_canonical' ) );
add_action( 'the_post', array( $this, 'action_the_post' ), 5 );
$options = $this->get_options();
if ( array_key_exists( 'wlp', $options ) && true === $options[ 'wlp' ] )
add_filter( 'wp_link_pages_args', array( $this, 'filter_wp_link_pages_args_early' ), 0 );
if ( $options[ 'link' ] )
add_filter( 'the_content', array( $this, 'filter_the_content_auto' ), $options[ 'link_priority' ] );
if ( apply_filters( 'vapp_display_rewrite_rules_notice', true ) && ! get_option( $this->notice_key ) )
add_action( 'admin_notices', array( $this, 'action_admin_notices_activation' ) );
}
/**
......@@ -143,6 +128,11 @@ class view_all_posts_pages {
*
* @global $wp_rewrite
* @uses __
* @uses this::get_options
* @uses add_filter
* @uses apply_filters
* @uses get_option
* @uses add_action
* @uses add_rewrite_endpoint
* @action init
* @return null
......@@ -166,6 +156,18 @@ class view_all_posts_pages {
'link_priority' => 10,
);
// Register additional plugin actions if settings call for them.
$options = $this->get_options();
if ( array_key_exists( 'wlp', $options ) && true === $options[ 'wlp' ] )
add_filter( 'wp_link_pages_args', array( $this, 'filter_wp_link_pages_args_early' ), 0 );
if ( $options[ 'link' ] )
add_filter( 'the_content', array( $this, 'filter_the_content_auto' ), $options[ 'link_priority' ] );
if ( apply_filters( 'vapp_display_rewrite_rules_notice', true ) && ! get_option( $this->notice_key ) )
add_action( 'admin_notices', array( $this, 'action_admin_notices_activation' ) );
// Register rewrite endpoint, which handles most of our rewrite needs
add_rewrite_endpoint( $this->query_var, EP_ALL );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment