Skip to:
Content

bbPress.org

Changeset 6850


Ignore:
Timestamp:
08/09/2018 09:01:39 PM (7 years ago)
Author:
johnjamesjacoby
Message:

Post Types: replace literal post type strings with functional wrappers.

This fills in a few gaps where filtered post type names would not be used.

Location:
trunk/src/includes
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/replies.php

    r6791 r6850  
    190190        $publish_box = '<p>' . __( '<strong>Publish</strong> - You can set the terms of publishing your reply in the Publish box. For Status, Visibility, and Publish (immediately), click on the Edit link to reveal more options. Visibility includes options for password-protecting a reply or making it stay at the top of your blog indefinitely (sticky). Publish (immediately) allows you to set a future or past date and time, so you can schedule a reply to be published in the future or backdate a reply.', 'bbpress' ) . '</p>';
    191191
    192         if ( current_theme_supports( 'reply-thumbnails' ) && post_type_supports( 'reply', 'thumbnail' ) ) {
     192        if ( current_theme_supports( 'reply-thumbnails' ) && post_type_supports( bbp_get_reply_post_type(), 'thumbnail' ) ) {
    193193            $publish_box .= '<p>' . __( '<strong>Featured Image</strong> - This allows you to associate an image with your reply without inserting it. This is usually useful only if your theme makes use of the featured image as a reply thumbnail on the home page, a custom header, etc.', 'bbpress' ) . '</p>';
    194194        }
  • trunk/src/includes/admin/topics.php

    r6821 r6850  
    196196        $publish_box = '<p>' . __( '<strong>Publish</strong> - You can set the terms of publishing your topic in the Publish box. For Status, Visibility, and Publish (immediately), click on the Edit link to reveal more options. Visibility includes options for password-protecting a topic or making it stay at the top of your blog indefinitely (sticky). Publish (immediately) allows you to set a future or past date and time, so you can schedule a topic to be published in the future or backdate a topic.', 'bbpress' ) . '</p>';
    197197
    198         if ( current_theme_supports( 'topic-thumbnails' ) && post_type_supports( 'topic', 'thumbnail' ) ) {
     198        if ( current_theme_supports( 'topic-thumbnails' ) && post_type_supports( bbp_get_topic_post_type(), 'thumbnail' ) ) {
    199199            $publish_box .= '<p>' . __( '<strong>Featured Image</strong> - This allows you to associate an image with your topic without inserting it. This is usually useful only if your theme makes use of the featured image as a topic thumbnail on the home page, a custom header, etc.', 'bbpress' ) . '</p>';
    200200        }
  • trunk/src/includes/extend/buddypress/functions.php

    r6777 r6850  
    871871 */
    872872function bbp_format_activity_action_new_topic( $action, $activity ) {
    873     $action = bbp_format_activity_action_new_post( 'topic', $action, $activity );
     873    $action = bbp_format_activity_action_new_post( bbp_get_topic_post_type(), $action, $activity );
    874874
    875875    /**
     
    895895 */
    896896function bbp_format_activity_action_new_reply( $action, $activity ) {
    897     $action = bbp_format_activity_action_new_post( 'reply', $action, $activity );
     897    $action = bbp_format_activity_action_new_post( bbp_get_reply_post_type(), $action, $activity );
    898898
    899899    /**
  • trunk/src/includes/replies/functions.php

    r6848 r6850  
    811811
    812812        // Update anonymous meta data (not cookies)
    813         bbp_update_anonymous_post_author( $reply_id, $anonymous_data, 'reply' );
     813        bbp_update_anonymous_post_author( $reply_id, $anonymous_data, bbp_get_reply_post_type() );
    814814
    815815        // Set transient for throttle check (only on new, not edit)
  • trunk/src/includes/topics/functions.php

    r6848 r6850  
    783783
    784784        // Update anonymous meta data (not cookies)
    785         bbp_update_anonymous_post_author( $topic_id, $anonymous_data, 'topic' );
     785        bbp_update_anonymous_post_author( $topic_id, $anonymous_data, bbp_get_topic_post_type() );
    786786
    787787        // Set transient for throttle check (only on new, not edit)
     
    25072507    // Get replies of topic
    25082508    $reply_count = empty( $reply_count )
    2509         ? bbp_get_non_public_child_count( $topic_id, 'reply' )
     2509        ? bbp_get_non_public_child_count( $topic_id, bbp_get_reply_post_type() )
    25102510        : (int) $reply_count;
    25112511
Note: See TracChangeset for help on using the changeset viewer.