Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/12/2010 06:52:58 PM (16 years ago)
Author:
apeatling
Message:

Made the ajax_querystring function a core template tag that can be filtered by the active theme. This will allow the bp-default templates to be copied into another WordPress theme without having to copy anything in functions.php.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-themes/bp-default/functions.php

    r2696 r2712  
    202202add_action( 'init', 'bp_dtheme_add_custom_header_support' );
    203203
    204 /* Show a notice to the user in wp-admin when the theme is activated */
     204/* Remove r */
     205function bp_dtheme_remove_redundant() {
     206    global $bp;
     207
     208    /* Remove the navigation options we do not need in this theme. */
     209    bp_core_remove_subnav_item( $bp->blogs->slug, 'my-blogs' );
     210    bp_core_remove_subnav_item( $bp->blogs->slug, 'recent-posts' );
     211    bp_core_remove_subnav_item( $bp->blogs->slug, 'recent-comments' );
     212}
     213add_action( 'init', 'bp_dtheme_remove_redundant' );
     214
    205215function bp_dtheme_show_notice() { ?>
    206216    <div id="message" class="updated fade">
     
    211221    <?php
    212222}
    213 if ( is_admin() && isset($_GET['activated'] ) && $pagenow == "themes.php" )
    214     add_action( 'admin_notices', 'bp_dtheme_show_notice' );
    215223
    216224/* Add words that we need to use in JS to the end of the page so they can be translated and still used. */
     
    230238add_action( 'wp_footer', 'bp_dtheme_js_terms' );
    231239
     240
     241/* Show a notice when the theme is activated - workaround by Ozh (http://old.nabble.com/Activation-hook-exist-for-themes--td25211004.html) */
     242if ( is_admin() && isset($_GET['activated'] ) && $pagenow == "themes.php" ) {
     243    add_action( 'admin_notices', 'bp_dtheme_show_notice' );
     244}
     245
     246
    232247?>
Note: See TracChangeset for help on using the changeset viewer.