Plugin Directory

Changeset 2118746


Ignore:
Timestamp:
07/06/2019 09:22:30 PM (7 years ago)
Author:
diddledan
Message:

Version 3.0.2

Location:
a-z-listing
Files:
56 added
9 edited

Legend:

Unmodified
Added
Removed
  • a-z-listing/trunk/a-z-listing.php

    r2117942 r2118746  
    88 * Text Domain:     a-z-listing
    99 * Domain Path:     /languages
    10  * Version:         3.0.1
     10 * Version:         3.0.2
    1111 *
    1212 * @package         A_Z_Listing
  • a-z-listing/trunk/changelog.md

    r2117782 r2118746  
    11# Full Changelog #
     2
     3## 3.0.2 ##
     4
     5* Fix for causing "This site is experiencing difficulties" errors on some sites.
     6
     7## 3.0.1 ##
     8
     9* Fix broken permalinks in 3.0.0
    210
    311## 3.0.0 ##
  • a-z-listing/trunk/languages/a-z-listing.pot

    r2117782 r2118746  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: A-Z Listing 3.0.0\n"
    6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/a-z-listing\n"
    7 "POT-Creation-Date: 2019-07-04 23:12:18+00:00\n"
     5"Project-Id-Version: A-Z Listing 3.0.1\n"
     6"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-a-z-listing\n"
     7"POT-Creation-Date: 2019-07-06 19:29:20+00:00\n"
    88"MIME-Version: 1.0\n"
    99"Content-Type: text/plain; charset=utf-8\n"
  • a-z-listing/trunk/readme.txt

    r2117949 r2118746  
    77Requires PHP: 5.6
    88Tested up to: 5.2
    9 Stable tag: 3.0.1
     9Stable tag: 3.0.2
    1010License: GPLv2 or later
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    458458== Changelog ==
    459459
    460 = 3.0.1 =
    461 
    462 * Fix broken permalinks in 3.0.0
     460= 3.0.2 =
     461
     462* Fix for causing "This site is experiencing difficulties" errors on some sites.
    463463
    464464If you are upgrading from pre-3.0.0 this is a major version change, which means that it might break your site when you upgrade. Please check in a test site first!
     
    475475* Miscellaneous documentation Fixes.
    476476
    477 = 3.0.0 =
    478 
    479 This is a major version change, which means that it might break your site when you upgrade. Please check in a test site first!
     477= 3.0.1 =
     478
     479* Fix broken permalinks in 3.0.0
     480
     481If you are upgrading from pre-3.0.0 this is a major version change, which means that it might break your site when you upgrade. Please check in a test site first!
    480482
    481483**NEW EXTENSIONS**
     
    490492* Miscellaneous documentation Fixes.
    491493
     494= 3.0.0 =
     495
     496This is a major version change, which means that it might break your site when you upgrade. Please check in a test site first!
     497
     498**NEW EXTENSIONS**
     499
     500Check out the two new extensions at [A-Z-Listing.com](https://a-z-listing.com/shop). These extensions provide convinience functionality. Purchasing one or both will help towards the cost of maintaining the A-Z Listing plugin.
     501
     502* Add `get_the_item_id` and `the_item_id` template tags.
     503* Add `get_the_item_type` template tag.
     504* Add support for extensions.
     505* Complete refactor to use more modern PHP features.
     506* Minor refactoring of `get_the_item_object`, `get_item_meta`, and `get_the_item_count` template tags.
     507* Miscellaneous documentation Fixes.
     508
    492509= 2.3.0 =
    493510
  • a-z-listing/trunk/src/Indices.php

    r2117782 r2118746  
    4040     *
    4141     * @since 2.0.0
    42      * @param array       $indices Previously discovered indices.
    43      * @param int|WP_Term $item ID of the item whose index letters we want to find.
    44      * @param string      $type Type of listing - terms or posts.
     42     * @param array        $indices Previously discovered indices.
     43     * @param int|\WP_Term $item ID of the item whose index letters we want to find.
     44     * @param string       $type Type of listing - terms or posts.
    4545     * @return array The post's index letters (usually matching the first character of the post title)
    4646     */
     
    6161         * @since 2.1.0
    6262         * @param string          $title The current title
    63          * @param WP_Term|WP_Post $item The item
     63         * @param \WP_Term|\WP_Post $item The item
    6464         * @param string          $item_type The type of the item. Either 'posts' or 'terms'.
    6565         */
     
    7171         * @since 2.1.0
    7272         * @param string          $title The current title
    73          * @param WP_Term|WP_Post $item The item
     73         * @param \WP_Term|\WP_Post $item The item
    7474         * @param string          $item_type The type of the item. Either 'posts' or 'terms'.
    7575         */
     
    8989         * @since 2.1.0
    9090         * @param array           $indices The current indices
    91          * @param WP_Term|WP_Post $item The item
     91         * @param \WP_Term|\WP_Post $item The item
    9292         * @param string          $item_type The type of the item. Either 'posts' or 'terms'.
    9393         */
     
    9999         * @since 2.1.0
    100100         * @param array           $indices The current indices
    101          * @param WP_Term|WP_Post $item The item
     101         * @param \WP_Term|\WP_Post $item The item
    102102         * @param string          $item_type The type of the item. Either 'posts' or 'terms'.
    103103         */
     
    138138         * @see a_z_listing_item_index_letter, a_z_listing_item_title
    139139         * @param array           $indices The current indices
    140          * @param WP_Term|WP_Post $item The item
     140         * @param \WP_Term|\WP_Post $item The item
    141141         * @param string          $item_type The type of the item. Either 'posts' or 'terms'.
    142142         */
     
    151151         * @see a_z_listing_item_index_letter, a_z_listing_item_title
    152152         * @param array           $indices The current indices
    153          * @param WP_Term|WP_Post $item The item
     153         * @param \WP_Term|\WP_Post $item The item
    154154         * @param string          $item_type The type of the item. Either 'posts' or 'terms'.
    155155         */
  • a-z-listing/trunk/src/Query.php

    r2117942 r2118746  
    9898     * The query for this instance of the A-Z Listing
    9999     *
    100      * @var WP_Query|array
     100     * @var \WP_Query|array
    101101     */
    102102    private $query;
     
    106106     *
    107107     * @since 0.1
    108      * @since 1.9.2 Instantiate the WP_Query object here instead of in `A_Z_Listing::construct_query()`
     108     * @since 1.9.2 Instantiate the \WP_Query object here instead of in `A_Z_Listing::construct_query()`
    109109     * @since 2.0.0 add $type and $use_cache parameters
    110      * @param null|WP_Query|array|string $query     A WP_Query-compatible query definition or a taxonomy name.
    111      * @param null|string                $type      Specify the listing type; either 'posts' or 'terms'.
    112      * @param boolean                    $use_cache Cache the Listing via WordPress transients.
     110     * @param null|\WP_Query|array|string $query     A \WP_Query-compatible query definition or a taxonomy name.
     111     * @param null|string                 $type      Specify the listing type; either 'posts' or 'terms'.
     112     * @param boolean                     $use_cache Cache the Listing via WordPress transients.
    113113     */
    114114    public function __construct( $query = null, $type = 'posts', $use_cache = true ) {
     
    151151             * @since 1.0.0
    152152             * @since 2.0.0 apply to taxonomy queries. Add type parameter indicating type of query.
    153              * @param array|Object|WP_Query  $query  The query object
     153             * @param array|Object|\WP_Query  $query  The query object
    154154             * @param string  $type  The type of the query. Either 'posts' or 'terms'.
    155155             */
     
    161161             * @since 1.7.1
    162162             * @since 2.0.0 apply to taxonomy queries. Add type parameter indicating type of query.
    163              * @param array|Object|WP_Query  $query  The query object
     163             * @param array|Object|\WP_Query  $query  The query object
    164164             * @param string  $type  The type of the query. Either 'posts' or 'terms'.
    165165             */
     
    197197             * @since 1.0.0
    198198             * @since 2.0.0 apply to taxonomy queries. Add type parameter indicating type of query.
    199              * @param array|Object|WP_Query $query The query object
     199             * @param array|Object|\WP_Query $query The query object
    200200             */
    201201            $query = apply_filters( 'a_z_listing_query', $query );
     
    206206             * @since 1.7.1
    207207             * @since 2.0.0 apply to taxonomy queries. Add type parameter indicating type of query.
    208              * @param array|Object|WP_Query $query The query object
     208             * @param array|Object|\WP_Query $query The query object
    209209             */
    210210            $query = apply_filters( 'a-z-listing-query', $query );
    211211
    212             if ( ! $query instanceof WP_Query ) {
     212            if ( ! $query instanceof \WP_Query ) {
    213213                $query = (array) $query;
    214214
     
    223223                        if ( 'page' === $query['post_type'] && 'page' === $post->post_type ) {
    224224                            $section = self::get_section();
    225                             if ( $section && is_a( $section, 'WP_Post' ) ) {
     225                            if ( $section && $section instanceof \WP_Post ) {
    226226                                $query['child_of'] = $section->ID;
    227227                            }
     
    244244            }
    245245
    246             if ( $query instanceof WP_Query ) {
     246            if ( $query instanceof \WP_Query ) {
    247247                $items       = $query->posts;
    248248                $this->query = $query;
     
    282282
    283283    /**
    284      * Set the fields we require on WP_Query.
     284     * Set the fields we require on \WP_Query.
    285285     *
    286286     * @since 3.0.0 Introduced.
    287      * @param string   $fields The current fields in SQL format.
    288      * @param WP_Query $query The WP_Query object.
     287     * @param string    $fields The current fields in SQL format.
     288     * @param \WP_Query $query The \WP_Query object.
    289289     * @return string The new fields in SQL format.
    290290     */
     
    413413     *
    414414     * @since 1.4.0
    415      * @param WP_Post|int $page The post whose parent we want to find.
    416      * @return WP_Post|bool The parent post or the original post if no parents were found. Will be false if the function is called with incorrect arguments.
     415     * @param \WP_Post|int $page The post whose parent we want to find.
     416     * @return \WP_Post|bool The parent post or the original post if no parents were found. Will be false if the function is called with incorrect arguments.
    417417     */
    418418    public static function find_post_parent( $page ) {
     
    420420            return false;
    421421        }
    422         if ( ! $page instanceof WP_Post ) {
     422        if ( ! $page instanceof \WP_Post ) {
    423423            $page = get_post( $page );
    424424        }
     
    433433     *
    434434     * @since 0.1
    435      * @param WP_Post|int $page Optional: The post object, or post-ID, of the page whose section we want to find.
    436      * @return WP_Post|null The post object of the current section's top-level page.
     435     * @param \WP_Post|int $page Optional: The post object, or post-ID, of the page whose section we want to find.
     436     * @return \WP_Post|null The post object of the current section's top-level page.
    437437     */
    438438    protected static function get_section( $page = 0 ) {
     
    511511     *
    512512     * @since 1.0.0
    513      * @return WP_Query The query object
     513     * @return \WP_Query The query object
    514514     */
    515515    public function get_the_query() {
     
    694694        } else {
    695695            $section = self::get_section();
    696             if ( $section instanceof WP_Post ) {
     696            if ( $section instanceof \WP_Post ) {
    697697                $section = $section->post_name;
    698698            }
     
    717717            _do_template( $this, plugin_dir_path( __DIR__ ) . 'templates/a-z-listing.php' );
    718718        }
    719         wp_reset_postdata();
     719        \wp_reset_postdata();
    720720    }
    721721
     
    822822     * @since 2.0.0
    823823     * @param string $force Set this to 'I understand the issues!' to acknowledge that this function will cause slowness on large sites.
    824      * @return array|WP_Error|WP_Post|WP_Term
     824     * @return array|\WP_Error|\WP_Post|\WP_Term
    825825     */
    826826    public function get_the_item_object( $force = '' ) {
     
    842842                }
    843843            }
    844             if ( is_a( $current_item, 'WP_Post' ) ) {
     844            if ( $current_item instanceof \WP_Post ) {
    845845                $post = $current_item;
    846846                setup_postdata( $post );
    847847                return $post;
    848848            }
    849             if ( is_a( $current_item, 'WP_Term' ) ) {
     849            if ( $current_item instanceof \WP_Term ) {
    850850                return get_term( $current_item );
    851851            }
    852852            return $current_item;
    853853        }
    854         return new WP_Error( 'understanding', 'You must tell the plugin "I understand the issues!" when calling get_the_item_object().' );
     854        return new \WP_Error( 'understanding', 'You must tell the plugin "I understand the issues!" when calling get_the_item_object().' );
    855855    }
    856856
     
    861861     * @param string $key The meta key to retrieve. By default returns data for all keys.
    862862     * @param bool   $single Whether to return a single value.
    863      * @return mixed|WP_Error Will be an array if $single is false. Will be value of meta data field if $single is true.
     863     * @return mixed|\WP_Error Will be an array if $single is false. Will be value of meta data field if $single is true.
    864864     */
    865865    function get_item_meta( $key = '', $single = false ) {
     
    874874            }
    875875        }
    876         if ( is_a( $this->current_item['item'], 'WP_Term' ) ) {
     876        if ( $this->current_item['item'] instanceof \WP_Term ) {
    877877            return get_term_meta( $this->current_item['item']->term_id, $key, $single );
    878878        }
    879         if ( is_a( $this->current_item['item'], 'WP_Post' ) ) {
     879        if ( $this->current_item['item'] instanceof \WP_Post ) {
    880880            return get_post_meta( $this->current_item['item']->ID, $key, $single );
    881881        }
    882         return new WP_Error( 'no-type', 'Unknown item type.' );
     882        return new \WP_Error( 'no-type', 'Unknown item type.' );
    883883    }
    884884
     
    909909            }
    910910        }
    911         if ( is_a( $this->current_item['item'], 'WP_Term' ) ) {
     911        if ( $this->current_item['item'] instanceof \WP_Term ) {
    912912            $term = get_term( $this->current_item['item'] );
    913913            if ( $term ) {
     
    10181018            }
    10191019        }
    1020         if ( is_a( $current_item, 'WP_Post' ) ) {
     1020        if ( $current_item instanceof \WP_Post ) {
    10211021            return $current_item->ID;
    10221022        }
    1023         if ( is_a( $current_item, 'WP_Term' ) ) {
     1023        if ( $current_item instanceof \WP_Term ) {
    10241024            return $current_item->term_id;
    10251025        }
     
    10311031     *
    10321032     * @since 2.4.0
    1033      * @return string|WP_Error The type of the current item. Either `post` or `term`. Will return a WP_Error object if the type of the current item cannot be determined.
     1033     * @return string|\WP_Error The type of the current item. Either `post` or `term`. Will return a \WP_Error object if the type of the current item cannot be determined.
    10341034     */
    10351035    public function get_the_item_type() {
    10361036        $current_item = $this->current_item['item'];
    1037         if ( is_a( $current_item, 'WP_Post' ) ) {
     1037        if ( $current_item instanceof \WP_Post ) {
    10381038            return 'post';
    10391039        }
    1040         if ( is_a( $current_item, 'WP_Term' ) ) {
     1040        if ( $current_item instanceof \WP_Term ) {
    10411041            return 'term';
    10421042        }
     
    10501050            return 'terms' === $this->type ? 'term' : 'post';
    10511051        }
    1052         return new WP_Error( 'no-type', 'Unknown item type.' );
     1052        return new \WP_Error( 'no-type', 'Unknown item type.' );
    10531053    }
    10541054
     
    11321132            }
    11331133        } else {
    1134             if ( is_a( $item, 'WP_Post' ) ) {
     1134            if ( $item instanceof \WP_Post ) {
    11351135                return apply_filters( 'the_title', $title, $item->ID );
    11361136            }
    1137             if ( is_a( $item, 'WP_Term' ) ) {
     1137            if ( $item instanceof \WP_Term ) {
    11381138                return apply_filters( 'term_name', $title, $item->term_id );
    11391139            }
  • a-z-listing/trunk/vendor/autoload.php

    r2117782 r2118746  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInit34da614de95f7d37c0c957d873dfcc33::getLoader();
     7return ComposerAutoloaderInit76ef8f225a807bf642094a3e0a7b0253::getLoader();
  • a-z-listing/trunk/vendor/composer/autoload_real.php

    r2117782 r2118746  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit34da614de95f7d37c0c957d873dfcc33
     5class ComposerAutoloaderInit76ef8f225a807bf642094a3e0a7b0253
    66{
    77    private static $loader;
     
    2020        }
    2121
    22         spl_autoload_register(array('ComposerAutoloaderInit34da614de95f7d37c0c957d873dfcc33', 'loadClassLoader'), true, true);
     22        spl_autoload_register(array('ComposerAutoloaderInit76ef8f225a807bf642094a3e0a7b0253', 'loadClassLoader'), true, true);
    2323        self::$loader = $loader = new \Composer\Autoload\ClassLoader();
    24         spl_autoload_unregister(array('ComposerAutoloaderInit34da614de95f7d37c0c957d873dfcc33', 'loadClassLoader'));
     24        spl_autoload_unregister(array('ComposerAutoloaderInit76ef8f225a807bf642094a3e0a7b0253', 'loadClassLoader'));
    2525
    2626        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
     
    2828            require_once __DIR__ . '/autoload_static.php';
    2929
    30             call_user_func(\Composer\Autoload\ComposerStaticInit34da614de95f7d37c0c957d873dfcc33::getInitializer($loader));
     30            call_user_func(\Composer\Autoload\ComposerStaticInit76ef8f225a807bf642094a3e0a7b0253::getInitializer($loader));
    3131        } else {
    3232            $classMap = require __DIR__ . '/autoload_classmap.php';
  • a-z-listing/trunk/vendor/composer/autoload_static.php

    r2117782 r2118746  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit34da614de95f7d37c0c957d873dfcc33
     7class ComposerStaticInit76ef8f225a807bf642094a3e0a7b0253
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    3333    {
    3434        return \Closure::bind(function () use ($loader) {
    35             $loader->prefixLengthsPsr4 = ComposerStaticInit34da614de95f7d37c0c957d873dfcc33::$prefixLengthsPsr4;
    36             $loader->prefixDirsPsr4 = ComposerStaticInit34da614de95f7d37c0c957d873dfcc33::$prefixDirsPsr4;
    37             $loader->classMap = ComposerStaticInit34da614de95f7d37c0c957d873dfcc33::$classMap;
     35            $loader->prefixLengthsPsr4 = ComposerStaticInit76ef8f225a807bf642094a3e0a7b0253::$prefixLengthsPsr4;
     36            $loader->prefixDirsPsr4 = ComposerStaticInit76ef8f225a807bf642094a3e0a7b0253::$prefixDirsPsr4;
     37            $loader->classMap = ComposerStaticInit76ef8f225a807bf642094a3e0a7b0253::$classMap;
    3838
    3939        }, null, ClassLoader::class);
Note: See TracChangeset for help on using the changeset viewer.