Changeset 44914
- Timestamp:
- 03/15/2019 09:54:29 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-post.php
r43177 r44914 277 277 */ 278 278 public function __isset( $key ) { 279 if ( 'ancestors' == $key ) {279 if ( 'ancestors' === $key ) { 280 280 return true; 281 281 } 282 282 283 if ( 'page_template' == $key ) {283 if ( 'page_template' === $key ) { 284 284 return true; 285 285 } 286 286 287 if ( 'post_category' == $key ) {287 if ( 'post_category' === $key ) { 288 288 return true; 289 289 } 290 290 291 if ( 'tags_input' == $key ) {291 if ( 'tags_input' === $key ) { 292 292 return true; 293 293 } … … 305 305 */ 306 306 public function __get( $key ) { 307 if ( 'page_template' == $key && $this->__isset( $key ) ) {307 if ( 'page_template' === $key && $this->__isset( $key ) ) { 308 308 return get_post_meta( $this->ID, '_wp_page_template', true ); 309 309 } 310 310 311 if ( 'post_category' == $key ) {311 if ( 'post_category' === $key ) { 312 312 if ( is_object_in_taxonomy( $this->post_type, 'category' ) ) { 313 313 $terms = get_the_terms( $this, 'category' ); … … 321 321 } 322 322 323 if ( 'tags_input' == $key ) {323 if ( 'tags_input' === $key ) { 324 324 if ( is_object_in_taxonomy( $this->post_type, 'post_tag' ) ) { 325 325 $terms = get_the_terms( $this, 'post_tag' ); … … 334 334 335 335 // Rest of the values need filtering. 336 if ( 'ancestors' == $key ) {336 if ( 'ancestors' === $key ) { 337 337 $value = get_post_ancestors( $this ); 338 338 } else { … … 356 356 */ 357 357 public function filter( $filter ) { 358 if ( $this->filter == $filter ) {358 if ( $this->filter === $filter ) { 359 359 return $this; 360 360 } 361 361 362 if ( $filter == 'raw') {362 if ( 'raw' === $filter ) { 363 363 return self::get_instance( $this->ID ); 364 364 }
Note: See TracChangeset
for help on using the changeset viewer.