Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/10/2015 12:24:27 AM (12 years ago)
Author:
johnjamesjacoby
Message:

Replace all references to bp_get_root_domain() . '/' . bp_get_blogs_root_slug() with bp_get_blogs_directory_permalink(), ensuring all usages and filters are applied uniformly. See #4954.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-blogs/bp-blogs-template.php

    r9413 r9468  
    13761376/**
    13771377 * Output a "Create a Site" link for users viewing their own profiles.
     1378 *
     1379 * This function is not used by BuddyPress as of 1.2, but is kept here for older
     1380 * themes that may still be using it.
    13781381 */
    13791382function bp_create_blog_link() {
    1380         if ( bp_is_my_profile() )
    1381 
    1382                 /**
    1383                  * Filters "Create a Site" links for users viewing their own profiles.
    1384                  *
    1385                  * @since BuddyPress (1.0.0)
    1386                  *
    1387                  * @param string $value HTML link for creating a site.
    1388                  */
    1389                 echo apply_filters( 'bp_create_blog_link', '<a href="' . bp_get_root_domain() . '/' . bp_get_blogs_root_slug() . '/create/">' . __( 'Create a Site', 'buddypress' ) . '</a>' );
     1383
     1384        // Don't show this link when not on your own profile
     1385        if ( ! bp_is_my_profile() ) {
     1386                return;
     1387        }
     1388
     1389        /**
     1390         * Filters "Create a Site" links for users viewing their own profiles.
     1391         *
     1392         * @since BuddyPress (1.0.0)
     1393         *
     1394         * @param string $value HTML link for creating a site.
     1395         */
     1396        echo apply_filters( 'bp_create_blog_link', '<a href="' . trailingslashit( bp_get_blogs_directory_permalink() . 'create' ) . '">' . __( 'Create a Site', 'buddypress' ) . '</a>' );
    13901397}
    13911398
     
    13981405
    13991406        // Don't show these tabs on a user's own profile
    1400         if ( bp_is_my_profile() )
     1407        if ( bp_is_my_profile() ) {
    14011408                return false;
    1402 
    1403         ?>
     1409        } ?>
    14041410
    14051411        <ul class="content-header-nav">
     
    14711477                        'link_title' => __( 'Create a Site', 'buddypress' ),
    14721478                        'link_class' => 'blog-create no-ajax',
    1473                         'link_href'  => trailingslashit( bp_get_root_domain() ) . trailingslashit( bp_get_blogs_root_slug() ) . trailingslashit( 'create' ),
     1479                        'link_href'  => trailingslashit( bp_get_blogs_directory_permalink() . 'create' ),
    14741480                        'wrapper'    => false,
    14751481                        'block_self' => false,
Note: See TracChangeset for help on using the changeset viewer.