Skip to:
Content

BuddyPress.org

Changeset 14185


Ignore:
Timestamp:
12/30/2025 12:45:20 AM (2 weeks ago)
Author:
espellcaste
Message:

Address a WPCS error for the new bp_get_blog_latest_post_id function.

Introduced at [14165].

See #9286, #9174, and #9173.

File:
1 edited

Legend:

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

    r14165 r14185  
    1515 *
    1616 * @since 1.5.0
    17  *
    1817 */
    1918function bp_blogs_slug() {
     
    2524     * @since 1.5.0
    2625     *
    27      * @return string The 'blogs' slug.
     26     * @return string
    2827     */
    2928    function bp_get_blogs_slug() {
     
    4342 *
    4443 * @since 1.5.0
    45  *
    4644 */
    4745function bp_blogs_root_slug() {
     
    818816 */
    819817function bp_blog_latest_post_id() {
    820     echo bp_get_blog_latest_post_id();
     818    echo intval( bp_get_blog_latest_post_id() );
    821819}
    822820    /**
     
    15691567    echo bp_get_blog_create_nav_item();
    15701568}
    1571 
    15721569    /**
    15731570     * Get the Create a Site nav item.
     
    15781575     */
    15791576    function bp_get_blog_create_nav_item() {
    1580         // Get the create a site button.
    15811577        $create_blog_button = bp_get_blog_create_button();
     1578        $output             = '';
    15821579
    15831580        // Make sure the button is available.
    1584         if ( empty( $create_blog_button ) ) {
    1585             return;
    1586         }
    1587 
    1588         $output = '<li id="blog-create-nav">' . $create_blog_button . '</li>';
     1581        if ( ! empty( $create_blog_button ) ) {
     1582            $output = '<li id="blog-create-nav">' . $create_blog_button . '</li>';
     1583        }
    15891584
    15901585        /**
Note: See TracChangeset for help on using the changeset viewer.