Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/23/2014 07:42:14 PM (10 years ago)
Author:
r-a-y
Message:

Theme compatibility: Fix issues with themes using post type conditionals.

Previously, when BP resets a post for theme compatibility, we set the
'post_type' to a post type that does not exist (eg. 'bp_activity'). For
themes doing conditional template loading based on the post type, BP's
theme compatibility would not kick in due to the non-existent post type.

This commit replaces all 'post_type' values in bp_theme_compat_reset_post()
to 'page' to address this problem.

For backward compatibility, this commit also modifies the post class to
emulate the older post classes prior to this commit resulting from the
'page' post type change.

Fixes #5418.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-screens.php

    r8678 r8682  
    10721072            'post_date'      => 0,
    10731073            'post_content'   => '',
    1074             'post_type'      => 'bp_group',
     1074            'post_type'      => 'page',
    10751075            'post_status'    => 'publish',
    10761076            'is_page'        => true,
     
    11281128            'post_date'      => 0,
    11291129            'post_content'   => '',
    1130             'post_type'      => 'bp_group',
     1130            'post_type'      => 'page',
    11311131            'post_status'    => 'publish',
    11321132            'is_page'        => true,
     
    11881188            'post_date'      => 0,
    11891189            'post_content'   => '',
    1190             'post_type'      => 'bp_group',
     1190            'post_type'      => 'page',
    11911191            'post_status'    => 'publish',
    11921192            'is_page'        => true,
Note: See TracChangeset for help on using the changeset viewer.