Changeset 8846 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-markdown/inc/class-importer.php
- Timestamp:
- 05/21/2019 05:51:33 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-markdown/inc/class-importer.php
r8788 r8846 84 84 protected function get_existing_for_post( WP_Post $post ) { 85 85 $key = rtrim( str_replace( $this->get_base(), '', get_permalink( $post->ID ) ), '/' ); 86 if ( empty( $key ) ) { 86 // Account for potential handbook landing page, which results in an empty $key. 87 if ( ! $key ) { 88 if ( in_array( $post->post_name, [ 'handbook', $post->post_type, "{$post->post_type}-handbook" ] ) ) { 89 $key = $post->post_name; 90 } 91 } 92 if ( ! $key ) { 87 93 $key = 'index'; 88 94 }
Note: See TracChangeset
for help on using the changeset viewer.