get_template_directory_uri() . '/images/headers/blueprints.jpg', 'width' => apply_filters( 'arebee_header_image_width', 940 ), 'height' => apply_filters( 'arebee_header_image_height', 198 ), 'flex-height' => false, 'flex-width' => false, 'uploads' => true, 'random-default' => false, 'header-text' => true, 'default-text-color' => '', 'wp-head-callback' => '', 'admin-head-callback' => '', 'admin-preview-callback' => '', ); add_theme_support( 'custom-header', $headerdefaults ); set_post_thumbnail_size( $headerdefaults['width'], $headerdefaults['height'], true ); // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI. register_default_headers( array( 'blueflower' => array( 'url' => '%s/images/headers/blueflower.jpg', 'thumbnail_url' => '%s/images/headers/blueflower-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Blue Flower', 'arebee' ) ), 'flower' => array( 'url' => '%s/images/headers/flower.jpg', 'thumbnail_url' => '%s/images/headers/flower-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Flower', 'arebee' ) ), 'raindrops' => array( 'url' => '%s/images/headers/raindrops.jpg', 'thumbnail_url' => '%s/images/headers/raindrops-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Rain Drops', 'arebee' ) ), 'pond' => array( 'url' => '%s/images/headers/pond.jpg', 'thumbnail_url' => '%s/images/headers/ponds-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Pond', 'arebee' ) ), 'bahamasresort' => array( 'url' => '%s/images/headers/bahamasresort.jpg', 'thumbnail_url' => '%s/images/headers/bahamasresort-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Bahamas Resort', 'arebee' ) ), 'atlanticsunset' => array( 'url' => '%s/images/headers/atlanticsunset.jpg', 'thumbnail_url' => '%s/images/headers/atlanticsunset-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Atlantic Sunset', 'arebee' ) ), 'pond' => array( 'url' => '%s/images/headers/pond.jpg', 'thumbnail_url' => '%s/images/headers/pond-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Pond', 'arebee' ) ) ) ); //Custom Backgrounds is a theme feature that provides for customization of the background color and image. //http://codex.wordpress.org/Custom_Backgrounds $backgrounddefaults = array( 'default-color' => '', 'default-image' => '', 'default-repeat' => '', 'default-position-x' => '', 'default-attachment' => '', 'wp-head-callback' => '_custom_background_cb', 'admin-head-callback' => '', 'admin-preview-callback' => '' ); add_theme_support( 'custom-background', $backgrounddefaults ); /**************************************** * Wordpress Title ****************************************/ function arebee_wp_title( $title ) { if( empty( $title ) && ( is_home() || is_front_page() ) ) { return ( bloginfo('name') ); } else { return ( bloginfo('name') . ' | ' . get_the_title() ); } return $title; } add_filter( 'wp_title', 'arebee_wp_title' ); /**************************************** * Wordpress Search ****************************************/ if ( ! function_exists( 'arebee_postinfo' ) ) : function arebee_postinfo() { echo '

'; echo ( 'Created: ' ); echo get_the_date('M jS, Y'); echo ( ', and written by ' ); echo get_the_author(); echo '

'; } endif; /**************************************** * Wordpress Comments ****************************************/ if ( ! function_exists( 'arebee_comment' ) ) { function arebee_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) { case '' : echo '
  • '; echo '
    '; echo get_avatar( $comment, 40 ); printf( __( '%s says:', 'arebee' ), sprintf( '%s', get_comment_author_link() ) ); echo '
    '; if ( $comment->comment_approved == '0' ) { echo ''; echo ( 'Your comment is awaiting moderation.'); echo ''; echo '
    '; } echo '
    '; printf( __( '%1$s at %2$s', 'arebee' ), get_comment_date(), get_comment_time() ); echo ''; edit_comment_link( __( '(Edit)', 'arebee' ), ' ' ); echo '
    '; echo '
    '; comment_text(); echo '
    '; echo '
    '; comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); echo '
    '; echo ''; break; case 'pingback' : case 'trackback' : echo '
  • '; echo '

    '; echo ( 'Pingback:' ); comment_author_link(); edit_comment_link( __('(Edit)', 'arebee'), ' ' ); echo '

    '; break; } } } /**************************************** * Wordpress Single Post ****************************************/ if ( ! function_exists( 'arebee_loop' ) ) : function arebee_loop() { echo '

    '; the_title(); echo '

    '; echo '

    '; echo( 'Written by ' ); echo get_the_author(); echo ( ' on ' ); echo get_the_date('M jS, Y'); echo '

    '; ?>
    Tweet →','arebee') ); wp_link_pages( array( 'before' => '' ) ); } comments_template( '', true ); echo ''; } } endif; /**************************************** * Wordpress Sidebar ****************************************/ function arebee_widgets_init() { //Primary sidebar. register_sidebar( array( 'name' => __( 'Primary Widget', 'arebee' ), 'id' => 'primary-widget-area', 'description' => __( 'Add widgets here to appear in your sidebar.', 'arebee' ), ) ); //Second sidebar register_sidebar( array( 'name' => __( 'Secondary Widget', 'arebee' ), 'id' => 'secondary-widget-area', 'description' => __( 'Optional secondary widget that displays below the primary widget in sidebar.', 'arebee' ), ) ); } add_action( 'widgets_init', 'arebee_widgets_init' ); /**************************************** * Theme Menu ****************************************/ add_theme_support( 'menus' ); register_nav_menus( array( 'primary' => __( 'Top primary menu', 'arebee' ), 'secondary' => __( 'Secondary in footer', 'arebee' ), 'tertiary' => __( 'Tertiary for logged in users', 'arebee' ), ) ); // create custom plugin settings menu add_action('admin_menu', 'setup_arebee_menus'); //create new top-level menu //http://codex.wordpress.org/Function_Reference/add_menu_page function setup_arebee_menus() { add_theme_page('AreBee Settings', 'AreBee', 'administrator', 'arebee','arebee_settings_page'); //call register settings function //http://codex.wordpress.org/Function_Reference/add_submenu_page add_theme_page('Social Media', 'Social Media', 'administrator', 'socialmedia', 'arebee_socialmedia_settings'); add_theme_page('Contact Us', 'Contact Us', 'administrator', 'contactus', 'arebee_contactus_settings'); } function register_arebee_settings(){ //register our settings //http://codex.wordpress.org/Function_Reference/register_setting register_setting( 'arebee-settings-group', 'facebooklink' ); register_setting( 'arebee-settings-group', 'twitterlink' ); register_setting( 'arebee-settings-group', 'linkedinlink' ); register_setting( 'arebee-settings-group', 'emailtoaddress'); register_setting( 'arebee-settings-group', 'collectphone'); register_setting( 'arebee-settings-group', 'ccemail'); register_setting( 'arebee-settings-group', 'ccaddress'); register_setting( 'arebee-settings-group', 'thankyou'); } function register_arebee_socialmedia_settings(){ //register our settings register_setting( 'arebee-socialmedia-settings-group', 'facebooklink' ); register_setting( 'arebee-socialmedia-settings-group', 'twitterlink' ); register_setting( 'arebee-socialmedia-settings-group', 'linkedinlink' ); } function register_arebee_contactus_settings(){ //register our settings register_setting( 'arebee-contactus-settings-group', 'emailtoaddress'); register_setting( 'arebee-contactus-settings-group', 'collectphone'); register_setting( 'arebee-contactus-settings-group', 'ccemail'); register_setting( 'arebee-contactus-settings-group', 'ccaddress'); register_setting( 'arebee-contactus-settings-group', 'thankyou'); } //call register settings function add_action( 'admin_init', 'register_arebee_settings' ); include_once (TEMPLATEPATH . '/functions/arebee.php'); include_once (TEMPLATEPATH . '/functions/socialmedia.php'); include_once (TEMPLATEPATH . '/functions/contactus.php'); /**************************************** * Modified Functions * The below functions have been modified * to strip out the appearance of this * being a WordPress site. This is an effort * to making this site more secure. ****************************************/ //Remove WP Generator -jct remove_action('wp_head', 'wp_generator'); //Disable the Wordpress Admin Bar for everyone. -jct show_admin_bar(false); //Removes Private in the title of private pages -jct function the_title_trim($title) { $title = esc_attr($title); $findthese = array( '#Protected:#', // # is just the delimeter '#Private:#' ); $replacewith = array( '', // What to replace protected with '' // What to replace private with ); $title = preg_replace($findthese, $replacewith, $title); return $title; } add_filter('the_title', 'the_title_trim'); //Removes Wordpress markings from new user email function new_mail_from($old) { return ''; } function new_mail_from_name($old) { return ''; } function res_fromname($email){ $wpfrom = get_option('blogname'); return $wpfrom; } add_filter('wp_mail_from', 'new_mail_from'); add_filter('wp_mail_from_name', 'res_fromname'); ?>