Changeset 3270478
- Timestamp:
- 04/10/2025 01:07:24 PM (12 months ago)
- Location:
- augment-types
- Files:
-
- 7 edited
- 10 copied
-
tags/1.21.0 (copied) (copied from augment-types/trunk)
-
tags/1.21.0/README.md (copied) (copied from augment-types/trunk/README.md) (1 diff)
-
tags/1.21.0/assets/at-archive.js (copied) (copied from augment-types/trunk/assets/at-archive.js)
-
tags/1.21.0/assets/at-sort.js (copied) (copied from augment-types/trunk/assets/at-sort.js)
-
tags/1.21.0/augment-types.php (copied) (copied from augment-types/trunk/augment-types.php) (1 diff)
-
tags/1.21.0/class-augment-types.php (copied) (copied from augment-types/trunk/class-augment-types.php)
-
tags/1.21.0/includes/Archive.php (copied) (copied from augment-types/trunk/includes/Archive.php) (6 diffs)
-
tags/1.21.0/includes/Expire.php (copied) (copied from augment-types/trunk/includes/Expire.php) (1 diff)
-
tags/1.21.0/includes/Feature.php (modified) (1 diff)
-
tags/1.21.0/includes/Sort.php (copied) (copied from augment-types/trunk/includes/Sort.php) (4 diffs)
-
tags/1.21.0/includes/Walker.php (copied) (copied from augment-types/trunk/includes/Walker.php)
-
trunk/README.md (modified) (1 diff)
-
trunk/augment-types.php (modified) (1 diff)
-
trunk/includes/Archive.php (modified) (6 diffs)
-
trunk/includes/Expire.php (modified) (1 diff)
-
trunk/includes/Feature.php (modified) (1 diff)
-
trunk/includes/Sort.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
augment-types/tags/1.21.0/README.md
r3264386 r3270478 1 1 # Augment Types 2 2 3 Stable tag: 1.2 0.03 Stable tag: 1.21.0 4 4 Tested up to: 6.7.99 5 5 Requires at least: 4.6 -
augment-types/tags/1.21.0/augment-types.php
r3264386 r3270478 7 7 * Author URI: https://genealysontorcende.wordpress.com/ 8 8 * Description: Add essential functionalities to WordPress Post Types. 9 * Version: 1.2 0.09 * Version: 1.21.0 10 10 * License: GNU General Public License v3.0 11 11 * License URI: https://www.gnu.org/licenses/gpl-3.0.html -
augment-types/tags/1.21.0/includes/Archive.php
r3203335 r3270478 75 75 76 76 foreach ( $types as $type ) { 77 if ( in_array( $type->name, array( 'post', 'page', 'attachment' ), true ) || ! $type->rewrite ) { 77 if ( in_array( $type->name, array( 'post', 'page', 'attachment' ), true ) ) { 78 continue; 79 } 80 81 if ( ! $type->rewrite ) { 78 82 continue; 79 83 } … … 191 195 192 196 if ( is_admin() || ! $query ) { 193 return $query;197 return; 194 198 } 195 199 … … 197 201 198 202 if ( ! $wp_query ) { 199 return $query;203 return; 200 204 } 201 205 … … 209 213 } 210 214 } 211 212 return $query;213 215 214 216 } … … 319 321 remove_action( 'save_post', array( $this, 'save_post' ) ); 320 322 wp_update_post( $postarr ); 321 add_action( 'save_post', array( $this, 'save_post' ) );323 add_action( 'save_post', array( $this, 'save_post' ), 10, 2 ); 322 324 } 323 325 … … 340 342 $screen = get_current_screen(); 341 343 342 return ! ( null === $screen || ! in_array( $screen->base, array( 'edit', 'post' ), true ));344 return null !== $screen && in_array( $screen->base, array( 'edit', 'post' ), true ); 343 345 344 346 } -
augment-types/tags/1.21.0/includes/Expire.php
r3264386 r3270478 189 189 $screen = get_current_screen(); 190 190 191 return ! ( null === $screen || ! in_array( $screen->base, array( 'edit', 'post' ), true ));191 return null !== $screen && in_array( $screen->base, array( 'edit', 'post' ), true ); 192 192 193 193 } -
augment-types/tags/1.21.0/includes/Feature.php
r2877642 r3270478 133 133 } 134 134 135 if ( ! post_type_supports( $screen->post_type, 'thumbnail' ) ) { 136 return false; 137 } 138 139 return true; 135 return post_type_supports( $screen->post_type, 'thumbnail' ); 140 136 141 137 } -
augment-types/tags/1.21.0/includes/Sort.php
r3264386 r3270478 278 278 } 279 279 280 if ( isset( $_GET['orderby'] ) || isset( $_GET['paged'] ) ) { 281 return false; 282 } 283 284 return true; 280 return ! isset( $_GET['orderby'] ) && ! isset( $_GET['paged'] ); 285 281 286 282 } … … 355 351 356 352 if ( $query->get( 'orderby' ) || $query->is_search() ) { 357 return $query;353 return; 358 354 } 359 355 … … 365 361 $query->set( 'orderby', $meta ); 366 362 367 return $query;368 369 363 } 370 364 … … 372 366 public function set_terms_order( $pieces, $taxonomies, $args ) { 373 367 374 if ( ! ( ( is_admin() && isset( $_GET['orderby'] ) ) || ( isset( $args['ignore_term_order'] ) && true === $args['ignore_term_order'] )) ) {368 if ( ! ( is_admin() && isset( $_GET['orderby'] ) ) && ! ( isset( $args['ignore_term_order'] ) && true === $args['ignore_term_order'] ) ) { 375 369 $pieces['orderby'] = 'ORDER BY t.term_order ASC, t.term_id'; 376 370 $pieces['order'] = 'DESC'; -
augment-types/trunk/README.md
r3264386 r3270478 1 1 # Augment Types 2 2 3 Stable tag: 1.2 0.03 Stable tag: 1.21.0 4 4 Tested up to: 6.7.99 5 5 Requires at least: 4.6 -
augment-types/trunk/augment-types.php
r3264386 r3270478 7 7 * Author URI: https://genealysontorcende.wordpress.com/ 8 8 * Description: Add essential functionalities to WordPress Post Types. 9 * Version: 1.2 0.09 * Version: 1.21.0 10 10 * License: GNU General Public License v3.0 11 11 * License URI: https://www.gnu.org/licenses/gpl-3.0.html -
augment-types/trunk/includes/Archive.php
r3203335 r3270478 75 75 76 76 foreach ( $types as $type ) { 77 if ( in_array( $type->name, array( 'post', 'page', 'attachment' ), true ) || ! $type->rewrite ) { 77 if ( in_array( $type->name, array( 'post', 'page', 'attachment' ), true ) ) { 78 continue; 79 } 80 81 if ( ! $type->rewrite ) { 78 82 continue; 79 83 } … … 191 195 192 196 if ( is_admin() || ! $query ) { 193 return $query;197 return; 194 198 } 195 199 … … 197 201 198 202 if ( ! $wp_query ) { 199 return $query;203 return; 200 204 } 201 205 … … 209 213 } 210 214 } 211 212 return $query;213 215 214 216 } … … 319 321 remove_action( 'save_post', array( $this, 'save_post' ) ); 320 322 wp_update_post( $postarr ); 321 add_action( 'save_post', array( $this, 'save_post' ) );323 add_action( 'save_post', array( $this, 'save_post' ), 10, 2 ); 322 324 } 323 325 … … 340 342 $screen = get_current_screen(); 341 343 342 return ! ( null === $screen || ! in_array( $screen->base, array( 'edit', 'post' ), true ));344 return null !== $screen && in_array( $screen->base, array( 'edit', 'post' ), true ); 343 345 344 346 } -
augment-types/trunk/includes/Expire.php
r3264386 r3270478 189 189 $screen = get_current_screen(); 190 190 191 return ! ( null === $screen || ! in_array( $screen->base, array( 'edit', 'post' ), true ));191 return null !== $screen && in_array( $screen->base, array( 'edit', 'post' ), true ); 192 192 193 193 } -
augment-types/trunk/includes/Feature.php
r2877642 r3270478 133 133 } 134 134 135 if ( ! post_type_supports( $screen->post_type, 'thumbnail' ) ) { 136 return false; 137 } 138 139 return true; 135 return post_type_supports( $screen->post_type, 'thumbnail' ); 140 136 141 137 } -
augment-types/trunk/includes/Sort.php
r3264386 r3270478 278 278 } 279 279 280 if ( isset( $_GET['orderby'] ) || isset( $_GET['paged'] ) ) { 281 return false; 282 } 283 284 return true; 280 return ! isset( $_GET['orderby'] ) && ! isset( $_GET['paged'] ); 285 281 286 282 } … … 355 351 356 352 if ( $query->get( 'orderby' ) || $query->is_search() ) { 357 return $query;353 return; 358 354 } 359 355 … … 365 361 $query->set( 'orderby', $meta ); 366 362 367 return $query;368 369 363 } 370 364 … … 372 366 public function set_terms_order( $pieces, $taxonomies, $args ) { 373 367 374 if ( ! ( ( is_admin() && isset( $_GET['orderby'] ) ) || ( isset( $args['ignore_term_order'] ) && true === $args['ignore_term_order'] )) ) {368 if ( ! ( is_admin() && isset( $_GET['orderby'] ) ) && ! ( isset( $args['ignore_term_order'] ) && true === $args['ignore_term_order'] ) ) { 375 369 $pieces['orderby'] = 'ORDER BY t.term_order ASC, t.term_id'; 376 370 $pieces['order'] = 'DESC';
Note: See TracChangeset
for help on using the changeset viewer.