Changeset 3451
- Timestamp:
- 06/19/2016 09:03:37 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
r3449 r3451 508 508 */ 509 509 public function translate_post_title( $title, $post_id ) { 510 if ( $post_id === get_post()->ID ) { 511 return Plugin_I18n::instance()->translate( 'title', $title ); 512 } 510 $post = get_post(); 511 512 if ( $post instanceof \WP_Post && $post_id === $post->ID ) { 513 $title = Plugin_I18n::instance()->translate( 'title', $title ); 514 } 515 513 516 return $title; 514 517 } … … 530 533 public function append_meta_for_jetpack() { 531 534 // TEMP: only do this for low numbered plugin IDs, till we're sure it works. 532 if ( get_post()->ID > 200 ) 535 $post = get_post(); 536 if ( $post instanceof \WP_Post && $post->ID > 200 ) 533 537 return; 534 538
Note: See TracChangeset
for help on using the changeset viewer.