Last active
June 27, 2016 11:24
-
-
Save larsschenk/74d71094fe6c94c8fdfaccc5dff1b0bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Baylys Kiteboarding Child | |
Just a simple start for a WordPress child theme for keyboarding based on baylys. | |
This file should give the gist a meaningfull title, only ;-) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Let the style.css empty by design and use this css instead. | |
This way we can work around the cache by increaging version numbers. | |
*/ | |
#footer { | |
background:#000045 !important; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// slow down heartbeat | |
add_filter('heartbeat_send', 'my_heartbeat_settings'); | |
function my_heartbeat_settings($response) | |
{ | |
if ($_POST['interval'] != 60) { | |
$response['heartbeat_interval'] = 60; | |
} | |
return $response; | |
} | |
// remove unwanted dashboard widgets for relevant users | |
function remove_dashboard_widgets() | |
{ | |
remove_meta_box('dashboard_primary', 'dashboard', 'normal'); // wp news | |
remove_meta_box('dashboard_quick_press', 'dashboard', 'side'); | |
$user = wp_get_current_user(); | |
if (!$user->has_cap('manage_options')) { | |
remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal'); | |
remove_meta_box('dashboard_plugins', 'dashboard', 'normal'); | |
remove_meta_box('dashboard_secondary', 'dashboard', 'normal'); | |
remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal'); | |
remove_meta_box('dashboard_recent_drafts', 'dashboard', 'side'); | |
remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal'); | |
remove_meta_box('dashboard_right_now', 'dashboard', 'normal'); | |
} | |
} | |
add_action('admin_init', 'remove_dashboard_widgets'); | |
// load style | |
add_action('wp_enqueue_scripts', 'my_theme_enqueue_styles'); | |
function my_theme_enqueue_styles() | |
{ | |
wp_enqueue_style('parent-style', get_template_directory_uri() . '/style.css', array(), '1.1.1'); | |
wp_enqueue_style('child-style', get_stylesheet_directory_uri().'/baylys-kiteboarding-child.css', array(), '0.0.3'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Theme Name: Baylys Kiteboarding Child | |
Theme URI: http://www.ocx.de/baylys-kiteboarding-child/ | |
Description: Baylys Leible Child Theme, https://gist.github.com/larsschenk/74d71094fe6c94c8fdfaccc5dff1b0bb | |
Author: Lars Schenk but mostly Jan K. ;-) | |
Author URI: https://ocx.de | |
Template: baylys | |
Version: 0.0.3 | |
Tags: light, responsive-layout | |
Text Domain: baylys-kiteboarding-child | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment