Plugin Directory

Changeset 3254130


Ignore:
Timestamp:
03/11/2025 02:35:01 PM (13 months ago)
Author:
keith_wp
Message:

Release 0.14 tested up to 6.7.2

Location:
keep-pagination-in-same-taxonomy
Files:
1 added
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • keep-pagination-in-same-taxonomy/tags/0.14/keep-pagination-in-same-taxonomy.php

    r2991897 r3254130  
    22/*
    33Plugin Name: Keep Pagination in Same Taxonomy
    4 Version: 0.13
     4Version: 0.14
    55Description: Makes the previous/next post links use the same taxonomy as the current post. Select which taxonomies are affected in Settings-><strong>Reading</strong>.
    66Author: Keith Drakard
    77Author URI: https://drakard.com/
     8License: BSD-3-Clause
    89*/
    910
     
    1112
    1213    public function __construct() {
    13         load_plugin_textdomain('KeepPaginationInSameTaxonomy', false, plugin_dir_path(__FILE__).'/languages');
     14       
     15        add_action('init', function() { load_plugin_textdomain('keep-pagination-in-same-taxonomy', false, plugin_dir_path(__FILE__).'/languages'); });
    1416
    1517        $this->settings = get_option('KeepPaginationInSameTaxonomyPlugin', array(
     
    4042            ksort($this->taxonomies);
    4143            $this->toggles = array(
    42                 'all' => __('ALL', 'KeepPaginationInSameTaxonomy'),
    43                 'any' => __('ANY', 'KeepPaginationInSameTaxonomy'),
     44                'all' => __('ALL', 'keep-pagination-in-same-taxonomy'),
     45                'any' => __('ANY', 'keep-pagination-in-same-taxonomy'),
    4446            );
    4547            add_action('admin_init', array($this, 'settings_init'));
     
    4850
    4951
    50     /******************************************************************************************************************************************************************/
     52    /*******************************************************************************************************************************************************/
    5153
    5254
     
    6062
    6163    public function settings_form() {
     64       
     65        wp_nonce_field('save_kpist_settings', '_KeepPaginationInSameTaxonomy_nonce');
     66       
    6267        $output = '<table class="form-table" role="presentation"><tbody>';
    6368
    64         $output.= '<tr><th scope="row">'.__('Keep Pagination in Same Taxonomy', 'KeepPaginationInSameTaxonomy').'</th>'
    65                 . '<td><fieldset><legend class="screen-reader-text">'.__('Keep Pagination in Same Taxonomy', 'KeepPaginationInSameTaxonomy').'</legend>';
     69        $output.= '<tr><th scope="row">'.__('Keep Pagination in Same Taxonomy', 'keep-pagination-in-same-taxonomy').'</th>'
     70                . '<td><fieldset><legend class="screen-reader-text">'.__('Keep Pagination in Same Taxonomy', 'keep-pagination-in-same-taxonomy').'</legend>';
    6671
    6772        foreach ($this->taxonomies as $key => $obj) {
     
    7378
    7479        $output.= '<p class="description">'
    75                 . __('Posts that have one of the selected taxonomies will have their Previous/Next Post links directed to other posts that share their taxonomy.', 'KeepPaginationInSameTaxonomy')
     80                . __('Posts that have one of the selected taxonomies will have their Previous/Next Post links directed to other posts that share their taxonomy.', 'keep-pagination-in-same-taxonomy')
    7681                . '</p><br>';
    7782
     
    8590
    8691        $output.= '<p class="description">'
    87                 . __('Selecting ALL will only join posts that share at least one common term in ALL of the chosen taxonomies; selecting ANY will join posts that share at least one common term across ANY of the chosen taxonomies.', 'KeepPaginationInSameTaxonomy')
     92                . __('Selecting ALL will only join posts that share at least one common term in ALL of the chosen taxonomies; selecting ANY will join posts that share at least one common term across ANY of the chosen taxonomies.', 'keep-pagination-in-same-taxonomy')
    8893                . '</p>';
    8994
     
    96101    public function validate_settings($input) {
    97102        if (! isset($input) OR ! isset($_POST['KeepPaginationInSameTaxonomyPlugin']) OR
    98             ! is_array($input) OR ! is_array($_POST['KeepPaginationInSameTaxonomyPlugin'])
     103            ! is_array($input) OR ! is_array($_POST['KeepPaginationInSameTaxonomyPlugin']) OR
     104            (! isset($_POST['_KeepPaginationInSameTaxonomy_nonce'] ) OR ! wp_verify_nonce($_POST['_KeepPaginationInSameTaxonomy_nonce'], 'save_kpist_settings'))
    99105        ) return false;
    100106
     
    116122
    117123
    118     /******************************************************************************************************************************************************************/
     124    /*******************************************************************************************************************************************************/
     125
    119126
    120127    public function same_pagination($post = null) {
  • keep-pagination-in-same-taxonomy/tags/0.14/readme.txt

    r3067456 r3254130  
    33Author Link:       https://drakard.com/
    44Requires at least: 4.0 or higher
    5 Tested up to:      6.5
     5Tested up to:      6.7.2
    66Requires PHP:      5.6
    7 Stable tag:        0.13
     7Stable tag:        0.14
    88License:           BSD-3-Clause
    99License URI:       https://directory.fsf.org/wiki/License:BSD-3-Clause
    10 Tags:              previous next posts, link posts, post navigation, navigation, previous post, next post, previous/next links, pagination, taxonomy pagination
     10Tags:              previous next posts, link posts, post navigation, previous/next links, pagination
     11
    1112
    1213Makes any previous/next post links use the same taxonomy as the current post.
     14
    1315
    1416== Description ==
     
    4143== Screenshots ==
    4244
     451. The settings form (on the Reading admin page).
    4346
    4447
    4548== Changelog ==
    4649
     50= 0.14 =
     51* Tested with WP 6.7.2
     52* Fix: moved the translation text domain loading to later in the init and changed it to be the plugin slug
     53
    4754= 0.13 =
    4855* Tested with WP 6.4 and 6.5
    49 * Bugfix: only show public taxonomies in the Settings
    50 * Bugfix: call our Settings page later in the init() hook so we can include custom taxonomies (was inadvertently dependent on plugin activation order before)
     56* Fix: only show public taxonomies in the Settings
     57* Fix: call our Settings page later in the init() hook so we can include custom taxonomies (was inadvertently dependent on plugin activation order before)
    5158
    5259= 0.12 =
    53 * No changes, just a version number bump
    5460* Tested with WP 6.3.2
    5561
    5662= 0.11 =
    57 * Bugfix: check if we've excluded all the terms from a taxonomy
     63* Fix: check if we've excluded all the terms from a taxonomy
    5864
    5965= 0.1 =
    6066* Initial release.
    6167
    62 
    63 
    64 == Upgrade Notice ==
    65 
    66 
  • keep-pagination-in-same-taxonomy/trunk/keep-pagination-in-same-taxonomy.php

    r2991897 r3254130  
    22/*
    33Plugin Name: Keep Pagination in Same Taxonomy
    4 Version: 0.13
     4Version: 0.14
    55Description: Makes the previous/next post links use the same taxonomy as the current post. Select which taxonomies are affected in Settings-><strong>Reading</strong>.
    66Author: Keith Drakard
    77Author URI: https://drakard.com/
     8License: BSD-3-Clause
    89*/
    910
     
    1112
    1213    public function __construct() {
    13         load_plugin_textdomain('KeepPaginationInSameTaxonomy', false, plugin_dir_path(__FILE__).'/languages');
     14       
     15        add_action('init', function() { load_plugin_textdomain('keep-pagination-in-same-taxonomy', false, plugin_dir_path(__FILE__).'/languages'); });
    1416
    1517        $this->settings = get_option('KeepPaginationInSameTaxonomyPlugin', array(
     
    4042            ksort($this->taxonomies);
    4143            $this->toggles = array(
    42                 'all' => __('ALL', 'KeepPaginationInSameTaxonomy'),
    43                 'any' => __('ANY', 'KeepPaginationInSameTaxonomy'),
     44                'all' => __('ALL', 'keep-pagination-in-same-taxonomy'),
     45                'any' => __('ANY', 'keep-pagination-in-same-taxonomy'),
    4446            );
    4547            add_action('admin_init', array($this, 'settings_init'));
     
    4850
    4951
    50     /******************************************************************************************************************************************************************/
     52    /*******************************************************************************************************************************************************/
    5153
    5254
     
    6062
    6163    public function settings_form() {
     64       
     65        wp_nonce_field('save_kpist_settings', '_KeepPaginationInSameTaxonomy_nonce');
     66       
    6267        $output = '<table class="form-table" role="presentation"><tbody>';
    6368
    64         $output.= '<tr><th scope="row">'.__('Keep Pagination in Same Taxonomy', 'KeepPaginationInSameTaxonomy').'</th>'
    65                 . '<td><fieldset><legend class="screen-reader-text">'.__('Keep Pagination in Same Taxonomy', 'KeepPaginationInSameTaxonomy').'</legend>';
     69        $output.= '<tr><th scope="row">'.__('Keep Pagination in Same Taxonomy', 'keep-pagination-in-same-taxonomy').'</th>'
     70                . '<td><fieldset><legend class="screen-reader-text">'.__('Keep Pagination in Same Taxonomy', 'keep-pagination-in-same-taxonomy').'</legend>';
    6671
    6772        foreach ($this->taxonomies as $key => $obj) {
     
    7378
    7479        $output.= '<p class="description">'
    75                 . __('Posts that have one of the selected taxonomies will have their Previous/Next Post links directed to other posts that share their taxonomy.', 'KeepPaginationInSameTaxonomy')
     80                . __('Posts that have one of the selected taxonomies will have their Previous/Next Post links directed to other posts that share their taxonomy.', 'keep-pagination-in-same-taxonomy')
    7681                . '</p><br>';
    7782
     
    8590
    8691        $output.= '<p class="description">'
    87                 . __('Selecting ALL will only join posts that share at least one common term in ALL of the chosen taxonomies; selecting ANY will join posts that share at least one common term across ANY of the chosen taxonomies.', 'KeepPaginationInSameTaxonomy')
     92                . __('Selecting ALL will only join posts that share at least one common term in ALL of the chosen taxonomies; selecting ANY will join posts that share at least one common term across ANY of the chosen taxonomies.', 'keep-pagination-in-same-taxonomy')
    8893                . '</p>';
    8994
     
    96101    public function validate_settings($input) {
    97102        if (! isset($input) OR ! isset($_POST['KeepPaginationInSameTaxonomyPlugin']) OR
    98             ! is_array($input) OR ! is_array($_POST['KeepPaginationInSameTaxonomyPlugin'])
     103            ! is_array($input) OR ! is_array($_POST['KeepPaginationInSameTaxonomyPlugin']) OR
     104            (! isset($_POST['_KeepPaginationInSameTaxonomy_nonce'] ) OR ! wp_verify_nonce($_POST['_KeepPaginationInSameTaxonomy_nonce'], 'save_kpist_settings'))
    99105        ) return false;
    100106
     
    116122
    117123
    118     /******************************************************************************************************************************************************************/
     124    /*******************************************************************************************************************************************************/
     125
    119126
    120127    public function same_pagination($post = null) {
  • keep-pagination-in-same-taxonomy/trunk/readme.txt

    r3067456 r3254130  
    33Author Link:       https://drakard.com/
    44Requires at least: 4.0 or higher
    5 Tested up to:      6.5
     5Tested up to:      6.7.2
    66Requires PHP:      5.6
    7 Stable tag:        0.13
     7Stable tag:        0.14
    88License:           BSD-3-Clause
    99License URI:       https://directory.fsf.org/wiki/License:BSD-3-Clause
    10 Tags:              previous next posts, link posts, post navigation, navigation, previous post, next post, previous/next links, pagination, taxonomy pagination
     10Tags:              previous next posts, link posts, post navigation, previous/next links, pagination
     11
    1112
    1213Makes any previous/next post links use the same taxonomy as the current post.
     14
    1315
    1416== Description ==
     
    4143== Screenshots ==
    4244
     451. The settings form (on the Reading admin page).
    4346
    4447
    4548== Changelog ==
    4649
     50= 0.14 =
     51* Tested with WP 6.7.2
     52* Fix: moved the translation text domain loading to later in the init and changed it to be the plugin slug
     53
    4754= 0.13 =
    4855* Tested with WP 6.4 and 6.5
    49 * Bugfix: only show public taxonomies in the Settings
    50 * Bugfix: call our Settings page later in the init() hook so we can include custom taxonomies (was inadvertently dependent on plugin activation order before)
     56* Fix: only show public taxonomies in the Settings
     57* Fix: call our Settings page later in the init() hook so we can include custom taxonomies (was inadvertently dependent on plugin activation order before)
    5158
    5259= 0.12 =
    53 * No changes, just a version number bump
    5460* Tested with WP 6.3.2
    5561
    5662= 0.11 =
    57 * Bugfix: check if we've excluded all the terms from a taxonomy
     63* Fix: check if we've excluded all the terms from a taxonomy
    5864
    5965= 0.1 =
    6066* Initial release.
    6167
    62 
    63 
    64 == Upgrade Notice ==
    65 
    66 
Note: See TracChangeset for help on using the changeset viewer.