function child_theme_setup()
{
    // ** Backend **
    // Remove Unused Menu Items
    add_action('admin_menu', 'be_remove_menus');
    // Customize Menu Order
    add_filter('custom_menu_order', 'be_custom_menu_order');
    add_filter('menu_order', 'be_custom_menu_order');
    // Set up Taxonomies
    add_action('init', 'be_create_my_taxonomies');
    // Set up Taxonomy Default Terms
    add_action('save_post', 'mfields_set_default_object_terms', 100, 2);
    // Set up Meta Boxes
    add_action('init', 'be_create_metaboxes');
    // Setup Sidebars
    genesis_register_sidebar(array('name' => 'Home Column 1', 'id' => 'home-column-1'));
    genesis_register_sidebar(array('name' => 'Home Column 2', 'id' => 'home-column-2'));
    genesis_register_sidebar(array('name' => 'Home Column 3', 'id' => 'home-column-3'));
    // Setup Default Layout
    genesis_set_default_layout('full-width-content');
    // Setup Widgets
    include_once 'lib/widgets/widget-old-prospects.php';
    include_once 'lib/widgets/widget-new-prospects.php';
    include_once 'lib/widgets/widget-active-projects.php';
    include_once 'lib/widgets/widget-other-stats.php';
    include_once 'lib/widgets/widget-poc.php';
    include_once 'lib/widgets/widget-inquiry.php';
    include_once 'lib/widgets/widget-inquiry-result.php';
    include_once 'lib/widgets/widget-forwarded.php';
    include_once 'lib/widgets/widget-project-sources.php';
    include_once 'lib/widgets/widget-referral.php';
    include_once 'lib/widgets/widget-activity-graph.php';
    include_once 'lib/widgets/widget-quotes.php';
    // Move Post Editor to Metabox
    add_action('admin_enqueue_scripts', 'crm_move_posteditor', 10, 1);
    // Don't update theme
    add_filter('http_request_args', 'be_dont_update_theme', 5, 2);
    // Change the labeling for the "Posts" menu to "Contacts"
    add_action('init', 'crm_change_post_object_label');
    add_action('admin_menu', 'crm_change_post_menu_label');
    // Change post title text
    add_action('gettext', 'crm_change_title_text');
    // Modify post column layout
    add_filter('manage_posts_columns', 'crm_add_new_columns');
    // Add taxonomies to post column
    add_action('manage_posts_custom_column', 'crm_manage_columns', 10, 2);
    // Remove post meta fields
    add_action('admin_menu', 'crm_remove_page_fields');
    // Remove Genesis SEO Metabox
    remove_post_type_support('post', 'genesis-seo');
    // Remove Genesis Layout Options
    remove_post_type_support('post', 'genesis-layouts');
    // ** Frontend **
    // Exclude Form from login
    add_filter('registered-users-only_exclusions', 'crm_form_exclusion');
    // Remove Footer
    remove_action('genesis_footer', 'genesis_do_footer');
}
add_action('wp_enqueue_scripts', 'coastal_enqueue_scripts');
// Set default attachment display settings
function coastal_setup()
{
    // Set default values for the upload media box
    update_option('image_default_align', 'center');
    update_option('image_default_link_type', 'none');
    update_option('image_default_size', 'full');
}
add_action('after_setup_theme', 'coastal_setup');
//Set content width
if (!isset($content_width)) {
    $content_width = 840;
}
//* Set default layout as full width
genesis_set_default_layout('full-width-content');
/* Header Structure */
add_action('genesis_before_header', 'coastal_header_fill');
/**
 * This function adds the fill bar at the top of the site.
 */
function coastal_header_fill()
{
    echo '<div class="header-fill" id="top">' . '</div>';
}
//*Add theme support for woocommerce
add_action('after_setup_theme', 'woocommerce_support');
function woocommerce_support()
{
    add_theme_support('woocommerce');
}
Example #3
0
/** Start the engine */
require_once get_template_directory() . '/lib/init.php';
/** Child theme (do not remove) */
define('CHILD_THEME_NAME', 'Mocha Theme');
define('CHILD_THEME_URL', 'http://www.studiopress.com/themes/mocha');
/** Create additional color style options */
add_theme_support('genesis-style-selector', array('mocha-blue' => 'Blue', 'mocha-green' => 'Green', 'mocha-orange' => 'Orange', 'mocha-pink' => 'Pink'));
/** Add Viewport meta tag for mobile browsers */
add_action('genesis_meta', 'mocha_add_viewport_meta_tag');
function mocha_add_viewport_meta_tag()
{
    echo '<meta name="viewport" content="width=device-width, initial-scale=1.0"/>';
}
/** Register default layout setting */
genesis_set_default_layout('sidebar-content-sidebar');
/** Unregister content/sidebar layout setting */
genesis_unregister_layout('content-sidebar-sidebar');
genesis_unregister_layout('sidebar-sidebar-content');
/** Add support for custom background */
add_custom_background();
/** Add support for structural wraps */
add_theme_support('genesis-structural-wraps', array('header', 'nav', 'subnav', 'inner', 'footer-widgets', 'footer'));
/** Customize the post info function */
add_filter('genesis_post_info', 'post_info_filter');
function post_info_filter($post_info)
{
    if (!is_page()) {
        $post_info = 'Posted on [post_date] &middot; [post_comments] [post_edit]';
        return $post_info;
    }