Last active
March 4, 2017 04:41
-
-
Save jdembowski/fd0c5dcb1515dbe1f96b2e4b8fc85e32 to your computer and use it in GitHub Desktop.
Clean Retina Child theme functions.php file
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 | |
// Queue up the child theme CSS | |
add_action( 'wp_enqueue_scripts', 'cleanretina_child_enqueue_styles' ); | |
function cleanretina_child_enqueue_styles() { | |
$parent_style = 'parent-style'; | |
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' ); | |
wp_enqueue_style( 'child-style', | |
get_stylesheet_directory_uri() . '/style.css', | |
array( $parent_style ), | |
wp_get_theme()->get('Version') | |
); | |
} | |
// After the theme is setup remove the cleanretina_footer action from the parent theme | |
add_action( 'after_setup_theme', 'mh_remove_credits' ); | |
function mh_remove_credits() { | |
// Remove old credits in the footer | |
remove_action( 'cleanretina_footer', 'cleanretina_footer_info', 25 ); | |
// Add the replacement credits in the footer. Modify $output to whatever you like | |
add_action( 'cleanretina_footer', 'mh_cleanretina_footer_info', 25 ); | |
} | |
function mh_cleanretina_footer_info() { | |
$output = '<div class="copyright">' . __( 'Copyright ©', 'clean-retina' ) . ' '; | |
$output .= cleanretina_the_year().' ' .cleanretina_site_link(); | |
$output .= ' | ' . ' ' .__( 'Theme by:', 'clean-retina' ) . ' ' . cleanretina_themehorse_link(); | |
$output .= ' | ' . ' ' . __( 'Powered by:', 'clean-retina' ); | |
$output .= ' ' . cleanretina_wp_link() . '</div><!-- .copyright -->'; | |
echo $output; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment