SHARE
TWEET

functions

a guest Jul 26th, 2012 131 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /**
  3. * functions.php defines all manner of back-end coolness for
  4. * Elbee Elgee.
  5. */
  6.  
  7. define( 'LBLG_FUNCTIONS_DIR',  get_template_directory() . '/includes/functions/' );
  8.  
  9. // Functions and settings related to handling theme options
  10. require_once( LBLG_FUNCTIONS_DIR . 'options.php' );
  11.  
  12. // Functions and settings related to handling the Custom Header functionality
  13. require_once( LBLG_FUNCTIONS_DIR . 'headers.php' );
  14.  
  15. // Functions and settings related to the back-end theme admin page[s]
  16. require_once( LBLG_FUNCTIONS_DIR . 'admin.php' );
  17.  
  18. // Functions and settings handling custom widgets functionality
  19. require_once( LBLG_FUNCTIONS_DIR . 'widgets.php' );
  20.  
  21. // Registration of custom theme hooks
  22. require_once( LBLG_FUNCTIONS_DIR . 'hooks.php' );
  23.  
  24. // Register theme support for various core WordPress functionality
  25. require_once( LBLG_FUNCTIONS_DIR . 'supports.php' );
  26.  
  27. // Custom functionality that doesn't fit in any other area
  28. require_once( LBLG_FUNCTIONS_DIR . 'custom.php' );
  29.  
  30. // BuddyPress-related code, only loaded if BP is active
  31. if( function_exists( 'bp_init' ) )
  32.         require_once( LBLG_FUNCTIONS_DIR . 'buddypress.php' );
  33.  
  34. // bbPress-related code, only loaded if bbP is active
  35. if( function_exists( 'bbp_get_current_user_id' ) )
  36.         require_once( LBLG_FUNCTIONS_DIR . 'bbpress.php' );
  37.        
  38.         function lbc_remove_postimage(){
  39.     remove_action( 'lblg_before_itemtext',
  40.                    'lblg_the_postimage' );
  41. }
  42. add_action( 'init', 'lbc_remove_postimage' );
  43.  
  44. remove_action( 'lblg_after_itemtext', 'lblg_post_info' );
  45. add_action( 'lblg_before_itemtext', 'lblg_post_info' );
  46.  
  47. function register_my_menus() {
  48.   register_nav_menus(
  49.     array( 'header-menu' => __( 'Header Menu' ) )
  50.   );
  51. }
  52. add_action( 'init', 'register_my_menus' );
  53.  
  54.  
  55. //Disavble sidebars
  56.  
  57.  
  58.  
  59. add_filter( 'sidebars_widgets', 'disable_all_widgets' );
  60.  
  61. function disable_all_widgets( $sidebars_widgets ) {
  62.  
  63.         if ( is_home() )
  64.                 $sidebars_widgets = array( false );
  65.  
  66.         return $sidebars_widgets;
  67. }
  68. function lbc_unplug_lblg_post_info(){
  69. remove_action( 'lblg_after_itemtext', 'lblg_post_info' );
  70. }
  71. add_action( 'init', 'lbc_unplug_lblg_post_info');
  72.  
  73.  
  74.  
  75. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top