Changeset 2118746
- Timestamp:
- 07/06/2019 09:22:30 PM (7 years ago)
- Location:
- a-z-listing
- Files:
-
- 56 added
- 9 edited
-
tags/3.0.2 (added)
-
tags/3.0.2/.distignore (added)
-
tags/3.0.2/.svnignore (added)
-
tags/3.0.2/LICENSE (added)
-
tags/3.0.2/a-z-listing.php (added)
-
tags/3.0.2/changelog.md (added)
-
tags/3.0.2/composer.json (added)
-
tags/3.0.2/composer.lock (added)
-
tags/3.0.2/css (added)
-
tags/3.0.2/css/a-z-listing-customize.css (added)
-
tags/3.0.2/css/a-z-listing-customize.css.map (added)
-
tags/3.0.2/css/a-z-listing-customize.scss (added)
-
tags/3.0.2/css/a-z-listing-default.css (added)
-
tags/3.0.2/css/a-z-listing-default.css.map (added)
-
tags/3.0.2/css/a-z-listing-default.scss (added)
-
tags/3.0.2/css/mixins.css (added)
-
tags/3.0.2/css/mixins.scss (added)
-
tags/3.0.2/functions (added)
-
tags/3.0.2/functions/enqueues.php (added)
-
tags/3.0.2/functions/health-check.php (added)
-
tags/3.0.2/functions/helpers.php (added)
-
tags/3.0.2/functions/i18n.php (added)
-
tags/3.0.2/functions/scripts.php (added)
-
tags/3.0.2/functions/styles.php (added)
-
tags/3.0.2/languages (added)
-
tags/3.0.2/languages/a-z-listing.pot (added)
-
tags/3.0.2/readme.txt (added)
-
tags/3.0.2/scripts (added)
-
tags/3.0.2/scripts/a-z-listing-scroll-fix.js (added)
-
tags/3.0.2/scripts/a-z-listing-tabs.js (added)
-
tags/3.0.2/scripts/a-z-listing-widget-admin.js (added)
-
tags/3.0.2/src (added)
-
tags/3.0.2/src/Grouping.php (added)
-
tags/3.0.2/src/Indices.php (added)
-
tags/3.0.2/src/Numbers.php (added)
-
tags/3.0.2/src/Query.php (added)
-
tags/3.0.2/src/Shortcode.php (added)
-
tags/3.0.2/src/Singleton.php (added)
-
tags/3.0.2/templates (added)
-
tags/3.0.2/templates/a-z-listing.example.php (added)
-
tags/3.0.2/templates/a-z-listing.php (added)
-
tags/3.0.2/vendor (added)
-
tags/3.0.2/vendor/autoload.php (added)
-
tags/3.0.2/vendor/composer (added)
-
tags/3.0.2/vendor/composer/ClassLoader.php (added)
-
tags/3.0.2/vendor/composer/LICENSE (added)
-
tags/3.0.2/vendor/composer/autoload_classmap.php (added)
-
tags/3.0.2/vendor/composer/autoload_namespaces.php (added)
-
tags/3.0.2/vendor/composer/autoload_psr4.php (added)
-
tags/3.0.2/vendor/composer/autoload_real.php (added)
-
tags/3.0.2/vendor/composer/autoload_static.php (added)
-
tags/3.0.2/vendor/composer/installed.json (added)
-
tags/3.0.2/widgets (added)
-
tags/3.0.2/widgets/class-a-z-listing-widget.php (added)
-
tags/3.0.2/wp-includes (added)
-
tags/3.0.2/wp-includes/version.php (added)
-
trunk/a-z-listing.php (modified) (1 diff)
-
trunk/changelog.md (modified) (1 diff)
-
trunk/languages/a-z-listing.pot (modified) (1 diff)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/src/Indices.php (modified) (7 diffs)
-
trunk/src/Query.php (modified) (24 diffs)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_real.php (modified) (3 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
a-z-listing/trunk/a-z-listing.php
r2117942 r2118746 8 8 * Text Domain: a-z-listing 9 9 * Domain Path: /languages 10 * Version: 3.0. 110 * Version: 3.0.2 11 11 * 12 12 * @package A_Z_Listing -
a-z-listing/trunk/changelog.md
r2117782 r2118746 1 1 # 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 2 10 3 11 ## 3.0.0 ## -
a-z-listing/trunk/languages/a-z-listing.pot
r2117782 r2118746 3 3 msgid "" 4 4 msgstr "" 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-0 4 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" 8 8 "MIME-Version: 1.0\n" 9 9 "Content-Type: text/plain; charset=utf-8\n" -
a-z-listing/trunk/readme.txt
r2117949 r2118746 7 7 Requires PHP: 5.6 8 8 Tested up to: 5.2 9 Stable tag: 3.0. 19 Stable tag: 3.0.2 10 10 License: GPLv2 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 458 458 == Changelog == 459 459 460 = 3.0. 1=461 462 * Fix broken permalinks in 3.0.0460 = 3.0.2 = 461 462 * Fix for causing "This site is experiencing difficulties" errors on some sites. 463 463 464 464 If 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! … … 475 475 * Miscellaneous documentation Fixes. 476 476 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 481 If 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! 480 482 481 483 **NEW EXTENSIONS** … … 490 492 * Miscellaneous documentation Fixes. 491 493 494 = 3.0.0 = 495 496 This 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 500 Check 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 492 509 = 2.3.0 = 493 510 -
a-z-listing/trunk/src/Indices.php
r2117782 r2118746 40 40 * 41 41 * @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. 45 45 * @return array The post's index letters (usually matching the first character of the post title) 46 46 */ … … 61 61 * @since 2.1.0 62 62 * @param string $title The current title 63 * @param WP_Term|WP_Post $item The item63 * @param \WP_Term|\WP_Post $item The item 64 64 * @param string $item_type The type of the item. Either 'posts' or 'terms'. 65 65 */ … … 71 71 * @since 2.1.0 72 72 * @param string $title The current title 73 * @param WP_Term|WP_Post $item The item73 * @param \WP_Term|\WP_Post $item The item 74 74 * @param string $item_type The type of the item. Either 'posts' or 'terms'. 75 75 */ … … 89 89 * @since 2.1.0 90 90 * @param array $indices The current indices 91 * @param WP_Term|WP_Post $item The item91 * @param \WP_Term|\WP_Post $item The item 92 92 * @param string $item_type The type of the item. Either 'posts' or 'terms'. 93 93 */ … … 99 99 * @since 2.1.0 100 100 * @param array $indices The current indices 101 * @param WP_Term|WP_Post $item The item101 * @param \WP_Term|\WP_Post $item The item 102 102 * @param string $item_type The type of the item. Either 'posts' or 'terms'. 103 103 */ … … 138 138 * @see a_z_listing_item_index_letter, a_z_listing_item_title 139 139 * @param array $indices The current indices 140 * @param WP_Term|WP_Post $item The item140 * @param \WP_Term|\WP_Post $item The item 141 141 * @param string $item_type The type of the item. Either 'posts' or 'terms'. 142 142 */ … … 151 151 * @see a_z_listing_item_index_letter, a_z_listing_item_title 152 152 * @param array $indices The current indices 153 * @param WP_Term|WP_Post $item The item153 * @param \WP_Term|\WP_Post $item The item 154 154 * @param string $item_type The type of the item. Either 'posts' or 'terms'. 155 155 */ -
a-z-listing/trunk/src/Query.php
r2117942 r2118746 98 98 * The query for this instance of the A-Z Listing 99 99 * 100 * @var WP_Query|array100 * @var \WP_Query|array 101 101 */ 102 102 private $query; … … 106 106 * 107 107 * @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()` 109 109 * @since 2.0.0 add $type and $use_cache parameters 110 * @param null| WP_Query|array|string $query AWP_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. 113 113 */ 114 114 public function __construct( $query = null, $type = 'posts', $use_cache = true ) { … … 151 151 * @since 1.0.0 152 152 * @since 2.0.0 apply to taxonomy queries. Add type parameter indicating type of query. 153 * @param array|Object| WP_Query $query The query object153 * @param array|Object|\WP_Query $query The query object 154 154 * @param string $type The type of the query. Either 'posts' or 'terms'. 155 155 */ … … 161 161 * @since 1.7.1 162 162 * @since 2.0.0 apply to taxonomy queries. Add type parameter indicating type of query. 163 * @param array|Object| WP_Query $query The query object163 * @param array|Object|\WP_Query $query The query object 164 164 * @param string $type The type of the query. Either 'posts' or 'terms'. 165 165 */ … … 197 197 * @since 1.0.0 198 198 * @since 2.0.0 apply to taxonomy queries. Add type parameter indicating type of query. 199 * @param array|Object| WP_Query $query The query object199 * @param array|Object|\WP_Query $query The query object 200 200 */ 201 201 $query = apply_filters( 'a_z_listing_query', $query ); … … 206 206 * @since 1.7.1 207 207 * @since 2.0.0 apply to taxonomy queries. Add type parameter indicating type of query. 208 * @param array|Object| WP_Query $query The query object208 * @param array|Object|\WP_Query $query The query object 209 209 */ 210 210 $query = apply_filters( 'a-z-listing-query', $query ); 211 211 212 if ( ! $query instanceof WP_Query ) {212 if ( ! $query instanceof \WP_Query ) { 213 213 $query = (array) $query; 214 214 … … 223 223 if ( 'page' === $query['post_type'] && 'page' === $post->post_type ) { 224 224 $section = self::get_section(); 225 if ( $section && is_a( $section, 'WP_Post' )) {225 if ( $section && $section instanceof \WP_Post ) { 226 226 $query['child_of'] = $section->ID; 227 227 } … … 244 244 } 245 245 246 if ( $query instanceof WP_Query ) {246 if ( $query instanceof \WP_Query ) { 247 247 $items = $query->posts; 248 248 $this->query = $query; … … 282 282 283 283 /** 284 * Set the fields we require on WP_Query.284 * Set the fields we require on \WP_Query. 285 285 * 286 286 * @since 3.0.0 Introduced. 287 * @param string $fields The current fields in SQL format.288 * @param WP_Query $query TheWP_Query object.287 * @param string $fields The current fields in SQL format. 288 * @param \WP_Query $query The \WP_Query object. 289 289 * @return string The new fields in SQL format. 290 290 */ … … 413 413 * 414 414 * @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. 417 417 */ 418 418 public static function find_post_parent( $page ) { … … 420 420 return false; 421 421 } 422 if ( ! $page instanceof WP_Post ) {422 if ( ! $page instanceof \WP_Post ) { 423 423 $page = get_post( $page ); 424 424 } … … 433 433 * 434 434 * @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. 437 437 */ 438 438 protected static function get_section( $page = 0 ) { … … 511 511 * 512 512 * @since 1.0.0 513 * @return WP_Query The query object513 * @return \WP_Query The query object 514 514 */ 515 515 public function get_the_query() { … … 694 694 } else { 695 695 $section = self::get_section(); 696 if ( $section instanceof WP_Post ) {696 if ( $section instanceof \WP_Post ) { 697 697 $section = $section->post_name; 698 698 } … … 717 717 _do_template( $this, plugin_dir_path( __DIR__ ) . 'templates/a-z-listing.php' ); 718 718 } 719 wp_reset_postdata();719 \wp_reset_postdata(); 720 720 } 721 721 … … 822 822 * @since 2.0.0 823 823 * @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_Term824 * @return array|\WP_Error|\WP_Post|\WP_Term 825 825 */ 826 826 public function get_the_item_object( $force = '' ) { … … 842 842 } 843 843 } 844 if ( is_a( $current_item, 'WP_Post' )) {844 if ( $current_item instanceof \WP_Post ) { 845 845 $post = $current_item; 846 846 setup_postdata( $post ); 847 847 return $post; 848 848 } 849 if ( is_a( $current_item, 'WP_Term' )) {849 if ( $current_item instanceof \WP_Term ) { 850 850 return get_term( $current_item ); 851 851 } 852 852 return $current_item; 853 853 } 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().' ); 855 855 } 856 856 … … 861 861 * @param string $key The meta key to retrieve. By default returns data for all keys. 862 862 * @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. 864 864 */ 865 865 function get_item_meta( $key = '', $single = false ) { … … 874 874 } 875 875 } 876 if ( is_a( $this->current_item['item'], 'WP_Term' )) {876 if ( $this->current_item['item'] instanceof \WP_Term ) { 877 877 return get_term_meta( $this->current_item['item']->term_id, $key, $single ); 878 878 } 879 if ( is_a( $this->current_item['item'], 'WP_Post' )) {879 if ( $this->current_item['item'] instanceof \WP_Post ) { 880 880 return get_post_meta( $this->current_item['item']->ID, $key, $single ); 881 881 } 882 return new WP_Error( 'no-type', 'Unknown item type.' );882 return new \WP_Error( 'no-type', 'Unknown item type.' ); 883 883 } 884 884 … … 909 909 } 910 910 } 911 if ( is_a( $this->current_item['item'], 'WP_Term' )) {911 if ( $this->current_item['item'] instanceof \WP_Term ) { 912 912 $term = get_term( $this->current_item['item'] ); 913 913 if ( $term ) { … … 1018 1018 } 1019 1019 } 1020 if ( is_a( $current_item, 'WP_Post' )) {1020 if ( $current_item instanceof \WP_Post ) { 1021 1021 return $current_item->ID; 1022 1022 } 1023 if ( is_a( $current_item, 'WP_Term' )) {1023 if ( $current_item instanceof \WP_Term ) { 1024 1024 return $current_item->term_id; 1025 1025 } … … 1031 1031 * 1032 1032 * @since 2.4.0 1033 * @return string| WP_Error The type of the current item. Either `post` or `term`. Will return aWP_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. 1034 1034 */ 1035 1035 public function get_the_item_type() { 1036 1036 $current_item = $this->current_item['item']; 1037 if ( is_a( $current_item, 'WP_Post' )) {1037 if ( $current_item instanceof \WP_Post ) { 1038 1038 return 'post'; 1039 1039 } 1040 if ( is_a( $current_item, 'WP_Term' )) {1040 if ( $current_item instanceof \WP_Term ) { 1041 1041 return 'term'; 1042 1042 } … … 1050 1050 return 'terms' === $this->type ? 'term' : 'post'; 1051 1051 } 1052 return new WP_Error( 'no-type', 'Unknown item type.' );1052 return new \WP_Error( 'no-type', 'Unknown item type.' ); 1053 1053 } 1054 1054 … … 1132 1132 } 1133 1133 } else { 1134 if ( is_a( $item, 'WP_Post' )) {1134 if ( $item instanceof \WP_Post ) { 1135 1135 return apply_filters( 'the_title', $title, $item->ID ); 1136 1136 } 1137 if ( is_a( $item, 'WP_Term' )) {1137 if ( $item instanceof \WP_Term ) { 1138 1138 return apply_filters( 'term_name', $title, $item->term_id ); 1139 1139 } -
a-z-listing/trunk/vendor/autoload.php
r2117782 r2118746 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit 34da614de95f7d37c0c957d873dfcc33::getLoader();7 return ComposerAutoloaderInit76ef8f225a807bf642094a3e0a7b0253::getLoader(); -
a-z-listing/trunk/vendor/composer/autoload_real.php
r2117782 r2118746 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 34da614de95f7d37c0c957d873dfcc335 class ComposerAutoloaderInit76ef8f225a807bf642094a3e0a7b0253 6 6 { 7 7 private static $loader; … … 20 20 } 21 21 22 spl_autoload_register(array('ComposerAutoloaderInit 34da614de95f7d37c0c957d873dfcc33', 'loadClassLoader'), true, true);22 spl_autoload_register(array('ComposerAutoloaderInit76ef8f225a807bf642094a3e0a7b0253', 'loadClassLoader'), true, true); 23 23 self::$loader = $loader = new \Composer\Autoload\ClassLoader(); 24 spl_autoload_unregister(array('ComposerAutoloaderInit 34da614de95f7d37c0c957d873dfcc33', 'loadClassLoader'));24 spl_autoload_unregister(array('ComposerAutoloaderInit76ef8f225a807bf642094a3e0a7b0253', 'loadClassLoader')); 25 25 26 26 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 28 28 require_once __DIR__ . '/autoload_static.php'; 29 29 30 call_user_func(\Composer\Autoload\ComposerStaticInit 34da614de95f7d37c0c957d873dfcc33::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInit76ef8f225a807bf642094a3e0a7b0253::getInitializer($loader)); 31 31 } else { 32 32 $classMap = require __DIR__ . '/autoload_classmap.php'; -
a-z-listing/trunk/vendor/composer/autoload_static.php
r2117782 r2118746 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 34da614de95f7d37c0c957d873dfcc337 class ComposerStaticInit76ef8f225a807bf642094a3e0a7b0253 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 33 33 { 34 34 return \Closure::bind(function () use ($loader) { 35 $loader->prefixLengthsPsr4 = ComposerStaticInit 34da614de95f7d37c0c957d873dfcc33::$prefixLengthsPsr4;36 $loader->prefixDirsPsr4 = ComposerStaticInit 34da614de95f7d37c0c957d873dfcc33::$prefixDirsPsr4;37 $loader->classMap = ComposerStaticInit 34da614de95f7d37c0c957d873dfcc33::$classMap;35 $loader->prefixLengthsPsr4 = ComposerStaticInit76ef8f225a807bf642094a3e0a7b0253::$prefixLengthsPsr4; 36 $loader->prefixDirsPsr4 = ComposerStaticInit76ef8f225a807bf642094a3e0a7b0253::$prefixDirsPsr4; 37 $loader->classMap = ComposerStaticInit76ef8f225a807bf642094a3e0a7b0253::$classMap; 38 38 39 39 }, null, ClassLoader::class);
Note: See TracChangeset
for help on using the changeset viewer.