Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/20/2023 02:30:11 AM (12 months ago)
Author:
imath
Message:

Start implementing parse_query() methods for directory components

First concerned commponents are: Activity, Blogs & Members.

  • Remove the notice used to force pretty permalinks
  • Use plain links to test parse_query() methods are rightly setting BuddyPress URI globals
  • Introduce some helper functions used during the BP Rewrites API parsing process :
    • bp_is_directory_homepage() is checking if a BP Directory is used as the site's homepage
    • bp_rewrites_get_custom_slug_rewrite_id() finds a Rewrite ID out of a custom slug.
    • bp_rewrites_get_member_data() returns the field to use to get the user by.
    • bp_reset_query() makes it possible to parse again a request in specific cases (eg: root profiles)

Props r-a-y, johnjamesjacoby, boonebgorges

Closes https://github.com/buddypress/buddypress/pull/87
See #4954

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/admin/bp-core-admin-functions.php

    r13450 r13455  
    205205 *
    206206 * On every Dashboard page, this function checks the following:
    207  *   - that pretty permalinks are enabled.
    208207 *   - that every BP component that needs a WP page for a directory has one.
    209208 *   - that no WP page has multiple BP components associated with it.
     
    250249            bp_blogs_record_existing_blogs();
    251250        }
    252     }
    253 
    254     // Add notice if no rewrite rules are enabled.
    255     if ( empty( $wp_rewrite->permalink_structure ) ) {
    256         bp_core_add_admin_notice(
    257             sprintf(
    258                 // Translators: %s is the url to the permalink settings.
    259                 __( '<strong>BuddyPress is almost ready</strong>. You must <a href="%s">update your permalink structure</a> to something other than the default for it to work.', 'buddypress' ),
    260                 admin_url( 'options-permalink.php' )
    261             ),
    262             'error'
    263         );
    264251    }
    265252
Note: See TracChangeset for help on using the changeset viewer.