From 1722303797748a828eef409a659a7021f9610444 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 17 Mar 2016 13:21:58 +0100 Subject: [PATCH] refactor & simplify theme setup functions --- functions.php | 23 ----------------- functions/core.php | 64 ++++++++++++++++++---------------------------- 2 files changed, 25 insertions(+), 62 deletions(-) diff --git a/functions.php b/functions.php index 43840ac..9a82509 100644 --- a/functions.php +++ b/functions.php @@ -3,12 +3,6 @@ /** * ascribe functions and definitions * - * When using a child theme (see http://codex.wordpress.org/Theme_Development and - * http://codex.wordpress.org/Child_Themes), you can override certain functions - * (those wrapped in a function_exists() call) by defining them first in your child theme's - * functions.php file. The child theme's functions.php file is included before the parent - * theme's file, so the child theme functions would be used. - * * @package ascribe * @since 0.1.0 */ @@ -31,9 +25,6 @@ require_once WPTHEME_INC . 'cpt-presscoverage.php'; require_once WPTHEME_INC . 'cpt-event.php'; require_once WPTHEME_INC . 'cpt-testimonial.php'; -// Run the setup functions -TenUp\ascribe\Core\setup(); - // REMOVE WIDTH AND HEIGHT ATTRIBUTES ON THUMBNAILS add_filter( 'post_thumbnail_html', 'remove_thumbnail_dimensions', 10 ); @@ -79,10 +70,6 @@ function register_primary_nav_menu() { } add_action( 'init', 'register_primary_nav_menu'); -// ADD THUMBNAILS TO POSTS -add_theme_support( 'post-thumbnails' ); - - // ENABLE HR IN WSYWIG function enable_more_buttons($buttons) { $buttons[] = 'hr'; @@ -91,16 +78,6 @@ function enable_more_buttons($buttons) { } add_filter("mce_buttons", "enable_more_buttons"); - - -// THUMBNAIL ADD CUSTOM SIZE -add_action( 'after_setup_theme', 'ttl_image_setup' ); -function ttl_image_setup() { - add_image_size( 'blog-crop', 600, 350, true ); //(cropped) - add_image_size( 'blog-feature-crop', 300, 175, true ); //(cropped) -} - - // ADD QUERY VAR FOR EVENT PAGINATION add_filter('query_vars', 'add_my_var'); function add_my_var($public_query_vars) { diff --git a/functions/core.php b/functions/core.php index 600a65a..1ee6f75 100644 --- a/functions/core.php +++ b/functions/core.php @@ -1,36 +1,39 @@