Changeset 6967
- Timestamp:
- 11/19/2019 05:47:56 PM (5 years ago)
- Location:
- trunk/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bbpress.php
r6948 r6967 890 890 // Tertiary Slugs 891 891 $feed_slug = 'feed'; 892 $edit_slug = 'edit';892 $edit_slug = bbp_get_edit_slug(); 893 893 $paged_slug = bbp_get_paged_slug(); 894 894 $user_favs_slug = bbp_get_user_favorites_slug(); -
trunk/src/includes/admin/settings.php
r6954 r6967 385 385 'sanitize_callback' => 'bbp_sanitize_slug', 386 386 'args' => array( 'label_for'=>'_bbp_reply_slug' ) 387 ), 388 389 // Edit slug setting 390 '_bbp_edit_slug' => array( 391 'title' => esc_html__( 'Edit', 'bbpress' ), 392 'callback' => 'bbp_admin_setting_callback_edit_slug', 393 'sanitize_callback' => 'bbp_sanitize_slug', 394 'args' => array( 'label_for'=>'_bbp_edit_slug' ) 387 395 ), 388 396 … … 1277 1285 ?> 1278 1286 1279 <p><?php printf( esc_html__( 'Custom slugs for single forums, topics, replies, tags, views, and search.', 'bbpress' ), get_admin_url( null, 'options-permalink.php' ) ); ?></p>1287 <p><?php printf( esc_html__( 'Custom slugs for single forums, topics, replies, tags, views, edit, and search.', 'bbpress' ), get_admin_url( null, 'options-permalink.php' ) ); ?></p> 1280 1288 1281 1289 <?php … … 1371 1379 // Slug Check 1372 1380 bbp_form_slug_conflict_check( '_bbp_search_slug', 'search' ); 1381 } 1382 1383 /** 1384 * Edit slug setting field 1385 * 1386 * @since 2.6.2 bbPress (r6965) 1387 */ 1388 function bbp_admin_setting_callback_edit_slug() { 1389 ?> 1390 1391 <input name="_bbp_edit_slug" id="_bbp_edit_slug" type="text" class="regular-text code" value="<?php bbp_form_option( '_bbp_edit_slug', 'edit', true ); ?>"<?php bbp_maybe_admin_setting_disabled( '_bbp_edit_slug' ); ?> /> 1392 1393 <?php 1394 // Slug Check 1395 bbp_form_slug_conflict_check( '_bbp_edit_slug', 'edit' ); 1373 1396 } 1374 1397 … … 2025 2048 '_bbp_reply_slug' => array( 'name' => esc_html__( 'Reply slug', 'bbpress' ), 'default' => 'reply', 'context' => 'bbPress' ), 2026 2049 2050 // Edit slug 2051 '_bbp_edit_slug' => array( 'name' => esc_html__( 'Edit slug', 'bbpress' ), 'default' => 'edit', 'context' => 'bbPress' ), 2052 2027 2053 // User profile slug 2028 2054 '_bbp_user_slug' => array( 'name' => esc_html__( 'User base', 'bbpress' ), 'default' => 'users', 'context' => 'bbPress' ), -
trunk/src/includes/core/options.php
r6896 r6967 974 974 } 975 975 976 /** 977 * Return the edit slug 978 * 979 * @since 2.6.2 bbPress (r6965) 980 * 981 * @param string $default Optional. Default value 'edit' 982 * @return string 983 */ 984 function bbp_get_edit_slug( $default = 'edit' ) { 985 986 // Filter & return 987 return apply_filters( 'bbp_get_edit_slug', get_option( '_bbp_edit_slug', $default ) ); 988 } 989 976 990 /** Legacy ********************************************************************/ 977 991 -
trunk/src/includes/extend/buddypress/groups.php
r6836 r6967 930 930 931 931 // Topic edit 932 if ( bp_action_variable( $offset + 2 ) === bbp_get_edit_ rewrite_id() ) :932 if ( bp_action_variable( $offset + 2 ) === bbp_get_edit_slug() ) : 933 933 934 934 // Unset the super sticky link on edit topic template … … 1003 1003 } 1004 1004 1005 if ( bp_action_variable( $offset + 2 ) === bbp_get_edit_ rewrite_id() ) :1005 if ( bp_action_variable( $offset + 2 ) === bbp_get_edit_slug() ) : 1006 1006 1007 1007 // Get the main query object -
trunk/src/includes/replies/template.php
r6931 r6967 1906 1906 // https://bbpress.trac.wordpress.org/ticket/3054 1907 1907 if ( false === strpos( $reply_link, '?' ) ) { 1908 $url = trailingslashit( $reply_link ) . bbp_get_edit_ rewrite_id();1908 $url = trailingslashit( $reply_link ) . bbp_get_edit_slug(); 1909 1909 $url = user_trailingslashit( $url ); 1910 1910 -
trunk/src/includes/topics/template.php
r6923 r6967 2461 2461 // https://bbpress.trac.wordpress.org/ticket/3054 2462 2462 if ( false === strpos( $topic_link, '?' ) ) { 2463 $url = trailingslashit( $topic_link ) . bbp_get_edit_ rewrite_id();2463 $url = trailingslashit( $topic_link ) . bbp_get_edit_slug(); 2464 2464 $url = user_trailingslashit( $url ); 2465 2465 … … 3584 3584 // Pretty or ugly URL 3585 3585 $retval = bbp_use_pretty_urls() 3586 ? user_trailingslashit( trailingslashit( bbp_get_topic_tag_link() ) . bbp_get_edit_ rewrite_id() )3586 ? user_trailingslashit( trailingslashit( bbp_get_topic_tag_link() ) . bbp_get_edit_slug() ) 3587 3587 : add_query_arg( array( bbp_get_edit_rewrite_id() => '1' ), bbp_get_topic_tag_link() ); 3588 3588 -
trunk/src/includes/users/template.php
r6953 r6967 636 636 // Pretty permalinks 637 637 if ( bbp_use_pretty_urls() ) { 638 $url = trailingslashit( $profile_url ) . 'edit';638 $url = trailingslashit( $profile_url ) . bbp_get_edit_slug(); 639 639 $url = user_trailingslashit( $url ); 640 640
Note: See TracChangeset
for help on using the changeset viewer.