bp_dtheme_show_notice

Show a notice when the theme is activated - workaround by Ozh (http://old.nabble.com/Activation-hook-exist-for-themes--td25211004.html).

Description

bp_dtheme_show_notice(); 

Usage

  1. if ( !function_exists( 'bp_dtheme_show_notice' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-themes/bp-default/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_dtheme_show_notice(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bp-themes/bp-default/functions.php  
  1. function bp_dtheme_show_notice() { 
  2. global $pagenow; 
  3.  
  4. // Bail if bp-default theme was not just activated 
  5. if ( empty( $_GET['activated'] ) || ( 'themes.php' != $pagenow ) || !is_admin() ) 
  6. return; 
  7.  
  8. ?> 
  9.  
  10. <div id="message" class="updated fade"> 
  11. <p><?php printf( __( 'Theme activated! This theme contains <a href="%s">custom header image</a> support and <a href="%s">sidebar widgets</a>.', buddypress ), admin_url( 'themes.php?page=custom-header' ), admin_url( 'widgets.php' ) ); ?></p> 
  12. </div> 
  13.  
  14. <style type="text/css">#message2, #message0 { display: none; }</style> 
  15.  
  16. <?php