diff --git a/grandchild-mechanical/grandchild-functions.php b/grandchild-mechanical/grandchild-functions.php new file mode 100644 index 0000000..0ab592a --- /dev/null +++ b/grandchild-mechanical/grandchild-functions.php @@ -0,0 +1,121 @@ + $word_limit) + array_pop($words); + return implode(' ', $words); +} + +// ------------------------- Custom Header ------------------------- + +// We are hooking to the 'load_custom_header' filter +// and return a value of 'true' meaning that we want to +// load a custom header + +/* + +add_filter( 'load_custom_header', '__return_true', 99 ); + +add_filter( 'get_custom_header', function( $header ) { + return plugin_dir_path( __FILE__ ).'templates/header.php'; +}, 99 ); + +*/ + +// ------------------------- Register a new sidebar ------------------------- + +/* + +if ( function_exists('register_sidebar') ) { + register_sidebar( array( + 'name' => __( 'Header - Social Media' ), + 'id' => 'header-social', + 'description' => __( 'Widgets in this area will be shown on the header.' ), + 'before_title' => '