Changeset 2996205
- Timestamp:
- 11/15/2023 07:09:50 AM (2 years ago)
- Location:
- rich-taxonomy
- Files:
-
- 14 edited
- 1 copied
-
tags/1.1.6 (copied) (copied from rich-taxonomy/trunk)
-
tags/1.1.6/functions.php (modified) (1 diff)
-
tags/1.1.6/readme.txt (modified) (1 diff)
-
tags/1.1.6/rich-taxonomy.php (modified) (1 diff)
-
tags/1.1.6/src/Tarosky/RichTaxonomy/Controller/Rewrites.php (modified) (1 diff)
-
tags/1.1.6/src/Tarosky/RichTaxonomy/Utility/PageAccessor.php (modified) (1 diff)
-
tags/1.1.6/src/Tarosky/RichTaxonomy/Vendor/TaroCustomStyle.php (modified) (2 diffs)
-
tags/1.1.6/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/functions.php (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/rich-taxonomy.php (modified) (1 diff)
-
trunk/src/Tarosky/RichTaxonomy/Controller/Rewrites.php (modified) (1 diff)
-
trunk/src/Tarosky/RichTaxonomy/Utility/PageAccessor.php (modified) (1 diff)
-
trunk/src/Tarosky/RichTaxonomy/Vendor/TaroCustomStyle.php (modified) (2 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
rich-taxonomy/tags/1.1.6/functions.php
r2631284 r2996205 9 9 * Get taxonomy page object in 10 10 * 11 * @param bool $only_first If false, include each paged archive. 12 * @param bool $include_admin If true, get taxonomy page even if in admin. 11 13 * @retun WP_Post|null 12 14 */ 13 function rich_taxonomy_current_post( ) {15 function rich_taxonomy_current_post( $only_first = true, $include_admin = false ) { 14 16 global $wp_query; 15 return \Tarosky\RichTaxonomy\Controller\Rewrites::get_instance()->get_taxonomy_page_from_query( $wp_query, false, false);17 return \Tarosky\RichTaxonomy\Controller\Rewrites::get_instance()->get_taxonomy_page_from_query( $wp_query, $include_admin, $only_first ); 16 18 } 17 19 -
rich-taxonomy/tags/1.1.6/readme.txt
r2995569 r2996205 6 6 Requires at least: 5.9 7 7 Requires PHP: 7.0 8 Stable Tag: 1.1. 58 Stable Tag: 1.1.6 9 9 License: GPLv3 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.txt -
rich-taxonomy/tags/1.1.6/rich-taxonomy.php
r2995569 r2996205 5 5 Plugin URI: https://wordpress.org/plugins/rich-taxonomy/ 6 6 Author: Tarosky INC. 7 Version: 1.1. 57 Version: 1.1.6 8 8 Author URI: https://tarosky.co.jp/ 9 9 License: GPL3 or later -
rich-taxonomy/tags/1.1.6/src/Tarosky/RichTaxonomy/Controller/Rewrites.php
r2995526 r2996205 101 101 } 102 102 // Should override? 103 $post = $this->get_post( $term, true);103 $post = $this->get_post( $term, ! current_user_can( 'edit_posts' ) ); 104 104 $should_override = apply_filters( 'rich_taxonomy_override', true, $post, $query ); 105 105 if ( ! $should_override ) { -
rich-taxonomy/tags/1.1.6/src/Tarosky/RichTaxonomy/Utility/PageAccessor.php
r2995569 r2996205 112 112 return $post_id; 113 113 } 114 115 /**116 * Get WP_Post if current page is a overridden.117 *118 * @return null|\WP_Post119 */120 public function get_overriding_page() {121 if ( ! ( is_category() || is_tag() || is_tax() ) ) {122 return null;123 }124 if ( ! Setting::get_instance()->is_rich( get_queried_object()->taxonomy ) ) {125 // Not a rich taxonomy.126 return null;127 }128 // This may be a rich taxonomy page.129 return $this->get_post( get_queried_object(), ! current_user_can( 'edit_posts' ) );130 }131 114 } -
rich-taxonomy/tags/1.1.6/src/Tarosky/RichTaxonomy/Vendor/TaroCustomStyle.php
r2995569 r2996205 39 39 */ 40 40 public function add_style_group( $styles ) { 41 $rich_taxonomy_page = $this->get_overriding_page();41 $rich_taxonomy_page = rich_taxonomy_current_post(); 42 42 if ( ! $rich_taxonomy_page ) { 43 43 return $styles; … … 60 60 */ 61 61 public function override_rich_taxonomy_page( $object ) { 62 return $this->get_overriding_page() ?: $object;62 return rich_taxonomy_current_post() ?: $object; 63 63 } 64 64 } -
rich-taxonomy/tags/1.1.6/vendor/composer/installed.php
r2995569 r2996205 2 2 'root' => array( 3 3 'name' => 'tarosky/rich-taxonomy', 4 'pretty_version' => '1.1. 5',5 'version' => '1.1. 5.0',6 'reference' => ' ab61137e9b45842f31ccf89dbb080b9953c49d57',4 'pretty_version' => '1.1.6', 5 'version' => '1.1.6.0', 6 'reference' => 'be346e10a672c825bcc983bb45cd76f940ff07fb', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 'tarosky/rich-taxonomy' => array( 14 'pretty_version' => '1.1. 5',15 'version' => '1.1. 5.0',16 'reference' => ' ab61137e9b45842f31ccf89dbb080b9953c49d57',14 'pretty_version' => '1.1.6', 15 'version' => '1.1.6.0', 16 'reference' => 'be346e10a672c825bcc983bb45cd76f940ff07fb', 17 17 'type' => 'library', 18 18 'install_path' => __DIR__ . '/../../', -
rich-taxonomy/trunk/functions.php
r2631284 r2996205 9 9 * Get taxonomy page object in 10 10 * 11 * @param bool $only_first If false, include each paged archive. 12 * @param bool $include_admin If true, get taxonomy page even if in admin. 11 13 * @retun WP_Post|null 12 14 */ 13 function rich_taxonomy_current_post( ) {15 function rich_taxonomy_current_post( $only_first = true, $include_admin = false ) { 14 16 global $wp_query; 15 return \Tarosky\RichTaxonomy\Controller\Rewrites::get_instance()->get_taxonomy_page_from_query( $wp_query, false, false);17 return \Tarosky\RichTaxonomy\Controller\Rewrites::get_instance()->get_taxonomy_page_from_query( $wp_query, $include_admin, $only_first ); 16 18 } 17 19 -
rich-taxonomy/trunk/readme.txt
r2995569 r2996205 6 6 Requires at least: 5.9 7 7 Requires PHP: 7.0 8 Stable Tag: 1.1. 58 Stable Tag: 1.1.6 9 9 License: GPLv3 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.txt -
rich-taxonomy/trunk/rich-taxonomy.php
r2995569 r2996205 5 5 Plugin URI: https://wordpress.org/plugins/rich-taxonomy/ 6 6 Author: Tarosky INC. 7 Version: 1.1. 57 Version: 1.1.6 8 8 Author URI: https://tarosky.co.jp/ 9 9 License: GPL3 or later -
rich-taxonomy/trunk/src/Tarosky/RichTaxonomy/Controller/Rewrites.php
r2995526 r2996205 101 101 } 102 102 // Should override? 103 $post = $this->get_post( $term, true);103 $post = $this->get_post( $term, ! current_user_can( 'edit_posts' ) ); 104 104 $should_override = apply_filters( 'rich_taxonomy_override', true, $post, $query ); 105 105 if ( ! $should_override ) { -
rich-taxonomy/trunk/src/Tarosky/RichTaxonomy/Utility/PageAccessor.php
r2995569 r2996205 112 112 return $post_id; 113 113 } 114 115 /**116 * Get WP_Post if current page is a overridden.117 *118 * @return null|\WP_Post119 */120 public function get_overriding_page() {121 if ( ! ( is_category() || is_tag() || is_tax() ) ) {122 return null;123 }124 if ( ! Setting::get_instance()->is_rich( get_queried_object()->taxonomy ) ) {125 // Not a rich taxonomy.126 return null;127 }128 // This may be a rich taxonomy page.129 return $this->get_post( get_queried_object(), ! current_user_can( 'edit_posts' ) );130 }131 114 } -
rich-taxonomy/trunk/src/Tarosky/RichTaxonomy/Vendor/TaroCustomStyle.php
r2995569 r2996205 39 39 */ 40 40 public function add_style_group( $styles ) { 41 $rich_taxonomy_page = $this->get_overriding_page();41 $rich_taxonomy_page = rich_taxonomy_current_post(); 42 42 if ( ! $rich_taxonomy_page ) { 43 43 return $styles; … … 60 60 */ 61 61 public function override_rich_taxonomy_page( $object ) { 62 return $this->get_overriding_page() ?: $object;62 return rich_taxonomy_current_post() ?: $object; 63 63 } 64 64 } -
rich-taxonomy/trunk/vendor/composer/installed.php
r2995569 r2996205 2 2 'root' => array( 3 3 'name' => 'tarosky/rich-taxonomy', 4 'pretty_version' => '1.1. 5',5 'version' => '1.1. 5.0',6 'reference' => ' ab61137e9b45842f31ccf89dbb080b9953c49d57',4 'pretty_version' => '1.1.6', 5 'version' => '1.1.6.0', 6 'reference' => 'be346e10a672c825bcc983bb45cd76f940ff07fb', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 'tarosky/rich-taxonomy' => array( 14 'pretty_version' => '1.1. 5',15 'version' => '1.1. 5.0',16 'reference' => ' ab61137e9b45842f31ccf89dbb080b9953c49d57',14 'pretty_version' => '1.1.6', 15 'version' => '1.1.6.0', 16 'reference' => 'be346e10a672c825bcc983bb45cd76f940ff07fb', 17 17 'type' => 'library', 18 18 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.