Plugin Directory

Changeset 2068265

Timestamp:
04/13/2019 03:07:44 PM (5 years ago)
Author:
danieltj
Message:

Updated Unlist My Post to v3.1

Location:
unlist-my-post
Files:
6 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • unlist-my-post/trunk/readme.txt

    r2052012 r2068265  
    44Requires at least: 4.6
    55Tested up to: 5.1
    6 Stable tag: 3.0
     6Stable tag: 3.
    77License: GNU GPL v3
    88License URI: https://www.gnu.org/licenses/gpl-3.0.html
  • unlist-my-post/trunk/unlist-my-post.php

    r2052012 r2068265  
    55 * Plugin URI: https://wordpress.org/plugins/unlist-my-post/
    66 * Description: Unlist your posts so you'll need a link to read them.
    7  * Version: 3.0
     7 * Version: 3.
    88 * Author: Daniel James
    99 * Author URI: https://danieltj.uk/
     
    5656        add_filter( 'widget_posts_args', array( __CLASS__, 'filter_post_widget' ), 10, 1 );
    5757        add_filter( 'widget_pages_args', array( __CLASS__, 'filter_page_widget' ), 10, 1 );
     58
    5859        add_filter( 'rest_post_query', array( __CLASS__, 'filter_rest_api_posts' ), 10, 2 );
    5960        add_filter( 'rest_page_query', array( __CLASS__, 'filter_rest_api_posts' ), 10, 2 );
     
    365366
    366367    /**
    367      * Filter the list of posts in the Recent Posts widget.
    368      *
    369      * See the function above, `filter_unlisted_posts` for more information.
     368     * Filter the recent posts widget.
    370369     *
    371370     * @see filter_unlisted_posts()
    372371     *
    373      * @param array $args Arguments for filtering posts in the widget.
     372     * @param array $args A.
    374373     *
    375374     * @return array $args
     
    392391
    393392        /**
    394          * Filter the arguments for the Post widget.
     393         * Filter the arguments for the widget.
    395394         *
    396395         * @since 1.1
     
    400399         * @return array $args
    401400         */
    402         $args = apply_filters( 'unlisted_post_widget_args', $args );
    403 
    404         return $args;
    405 
    406     }
    407 
    408     /**
    409      * Filter the list of pages in the Recent Pages widget.
    410      *
    411      * This works a little different to the Post widget filtering above
    412      * because the page widget uses `wp_list_pages` to get the pages instead
    413      * for some reason and expects a comma seperated string of page IDs.
     401        return apply_filters( 'unlisted_post_widget_args', $args );
     402
     403    }
     404
     405    /**
     406     * Filter the pages widget.
    414407     *
    415408     * @see wp_list_pages()
    416409     *
    417      * @param array $args Arguments for filtering pages in the widget.
     410     * @param array $args A.
    418411     *
    419412     * @return array $args
     
    432425
    433426        /**
    434          * Filter the arguments for the Page widget.
     427         * Filter the arguments for the widget.
    435428         *
    436429         * @since 1.1
     
    441434         */
    442435        return apply_filters( 'unlisted_page_widget_args', $args );
     436
     437
     438
     439
     440
     441
     442
     443
     444
     445
     446
     447
     448
     449
     450
     451
     452
     453
     454
     455
     456
     457
     458
     459
     460
     461
     462
     463
     464
     465
     466
     467
     468
     469
     470
     471
     472
     473
    443474
    444475    }
Note: See TracChangeset for help on using the changeset viewer.