Skip to:
Content

BuddyPress.org

Changeset 9596


Ignore:
Timestamp:
03/05/2015 05:01:29 AM (7 years ago)
Author:
tw2113
Message:

Adds hooks documentation for bp-core-theme-compatibility.php.

See #5940.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-theme-compatibility.php

    r9517 r9596  
    165165 */
    166166function bp_get_theme_compat_id() {
     167
     168    /**
     169     * Filters the ID of the theme package being used.
     170     *
     171     * @since BuddyPress (1.7.0)
     172     *
     173     * @param string $id ID of the theme package in use.
     174     */
    167175    return apply_filters( 'bp_get_theme_compat_id', buddypress()->theme_compat->theme->id );
    168176}
     
    181189 */
    182190function bp_get_theme_compat_name() {
     191
     192    /**
     193     * Filters the name of the theme package being used.
     194     *
     195     * @since BuddyPress (1.7.0)
     196     *
     197     * @param string $name Name of the theme package in use.
     198     */
    183199    return apply_filters( 'bp_get_theme_compat_name', buddypress()->theme_compat->theme->name );
    184200}
     
    197213 */
    198214function bp_get_theme_compat_version() {
     215
     216    /**
     217     * Filters the version of the theme package being used.
     218     *
     219     * @since BuddyPress (1.7.0)
     220     *
     221     * @param string $version The version string of the theme package in use.
     222     */
    199223    return apply_filters( 'bp_get_theme_compat_version', buddypress()->theme_compat->theme->version );
    200224}
     
    213237 */
    214238function bp_get_theme_compat_dir() {
     239
     240    /**
     241     * Filters the absolute path of the theme package being used.
     242     *
     243     * @since BuddyPress (1.7.0)
     244     *
     245     * @param string $dir The absolute path of the theme package in use.
     246     */
    215247    return apply_filters( 'bp_get_theme_compat_dir', buddypress()->theme_compat->theme->dir );
    216248}
     
    230262 */
    231263function bp_get_theme_compat_url() {
     264
     265    /**
     266     * Filters the URL of the theme package being used.
     267     *
     268     * @since BuddyPress (1.7.0)
     269     *
     270     * @param string $url URL of the theme package in use.
     271     */
    232272    return apply_filters( 'bp_get_theme_compat_url', buddypress()->theme_compat->theme->url );
    233273}
     
    250290    }
    251291
     292    /**
     293     * Filters whether or not to use theme compat for the active theme.
     294     *
     295     * @since BuddyPress (1.9.0)
     296     *
     297     * @param bool $use_with_current_theme True if the current theme needs theme compatibility.
     298     */
    252299    return apply_filters( 'bp_use_theme_compat_with_current_theme', buddypress()->theme_compat->use_with_current_theme );
    253300}
     
    407454 * {@link BuddyPress::register_theme_packages()}.
    408455 *
    409  * @since BuddyPress (1.7)
     456 * @since BuddyPress (1.7.0)
    410457 *
    411458 * @see BP_Theme_Compat for a description of the $theme parameter arguments.
     
    598645
    599646    /**
     647     * Fires when resetting main query vars and filtering 'the_content' to output BuddyPress template parts.
     648     *
    600649     * Use this action to execute code that will communicate to BuddyPress's
    601650     * theme compatibility layer whether or not we're replacing the_content()
    602651     * with some other template part.
     652     *
     653     * @since BuddyPress (1.7.0)
    603654     */
    604655    do_action( 'bp_template_include_reset_dummy_post_data' );
     
    637688    }
    638689
     690    /**
     691     * Filters the template name to include.
     692     *
     693     * @since BuddyPress (1.7.0)
     694     *
     695     * @param string $template Template name.
     696     */
    639697    return apply_filters( 'bp_template_include_theme_compat', $template );
    640698}
     
    663721    bp_set_theme_compat_active( false );
    664722
    665     // Do we have new content to replace the old content?
     723    /**
     724     * Filters the content to replace in the post.
     725     *
     726     * @since BuddyPress (1.7.0)
     727     *
     728     * @param string $content Original post content.
     729     */
    666730    $new_content = apply_filters( 'bp_replace_the_content', $content );
    667731
     
    824888    $retval = is_buddypress() ? false : $open;
    825889
    826     // Allow override of the override
     890    /**
     891     * Filters whether or not to force comments_status to closed for BuddyPress post types.
     892     *
     893     * @since BuddyPress (1.7.0)
     894     *
     895     * @param bool $retval  Whether or not we are on a BuddyPress post type.
     896     * @param bool $open    True if comments open, false if closed.
     897     * @param int  $post_id Post ID for the checked post.
     898     */
    827899    return apply_filters( 'bp_force_comment_status', $retval, $open, $post_id );
    828900}
Note: See TracChangeset for help on using the changeset viewer.