Changeset 10781
- Timestamp:
- 03/05/2021 12:50:03 AM (4 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/inc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/inc/handbook.php
r10780 r10781 135 135 // If no name defined yet, try handbook post type if not standard. 136 136 if ( ! $name && ( 'handbook' !== $post_type ) ) { 137 $name = ucfirst( s ubstr( $post_type, 0, -9) );137 $name = ucfirst( str_replace( '-handbook', '', $post_type ) ); 138 138 } 139 139 … … 285 285 $label = ( 'handbook' === $this->post_type ) ? 286 286 __( 'Handbook name', 'wporg' ) : 287 sprintf( __( 'Handbook name (%s)', 'wporg' ), s ubstr( $this->post_type, 0, -9) );287 sprintf( __( 'Handbook name (%s)', 'wporg' ), str_replace( '-handbook', '', $this->post_type ) ); 288 288 289 289 add_settings_field( … … 525 525 $page = get_page_by_path( $this->post_type, OBJECT, $this->post_type ); 526 526 if ( ! $page ) { 527 $slug = s ubstr( $this->post_type, 0, -9);527 $slug = str_replace( '-handbook', '', $this->post_type ); 528 528 $page = get_page_by_path( $slug, OBJECT, $this->post_type ); 529 529 } -
sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/inc/widgets.php
r10768 r10781 95 95 $page = get_page_by_path( $post_type, OBJECT, $post_type ); 96 96 if ( ! $page ) { 97 $slug = s ubstr( $post_type, 0, -9);97 $slug = str_replace( '-handbook', '', $post_type ); 98 98 $page = get_page_by_path( $slug, OBJECT, $post_type ); 99 99 }
Note: See TracChangeset
for help on using the changeset viewer.