function kopa_front_after_setup_theme() { kopa_i18n(); add_theme_support('post-formats', array('gallery', 'audio', 'video')); add_theme_support('post-thumbnails'); add_theme_support('automatic-feed-links'); add_theme_support('loop-pagination'); add_theme_support("title-tag"); register_nav_menus(array('main-nav' => esc_attr__('Main Menu', 'fastnews-light'), 'footer-nav' => esc_attr__('Footer Menu', 'fastnews-light'))); global $content_width; if (!isset($content_width)) { $content_width = 1061; } if (!is_admin()) { add_filter('wp_title', 'kopa_wp_title', 10, 2); add_action('wp_enqueue_scripts', 'kopa_enqueue_script'); add_filter('body_class', 'kopa_body_class'); } $sizes = array('flexslider-image-size' => array(720, 480, TRUE, esc_attr__('Flexslider Post Image (Kopatheme)', 'fastnews-light')), 'flexslider-image-size-full' => array(1061, 707, TRUE, esc_attr__('Flexslider Post Image (Kopatheme)', 'fastnews-light')), 'article-list-image-size' => array(300, 277, TRUE, esc_attr__('Article List Post Image (Kopatheme)', 'fastnews-light')), 'article-list-sm-image-size' => array(120, 120, TRUE, esc_attr__('Article List Small Post Image (Kopatheme)', 'fastnews-light')), 'article-carousel-image-size' => array(354, 354, TRUE, esc_attr__('Article Carousel Post Image (Kopatheme)', 'fastnews-light')), 'entry-list-image-size' => array(227, 182, TRUE, esc_attr__('Entry List Thumbnail Image (Kopatheme)', 'fastnews-light')), 'blog-image-size' => array(680, 419, TRUE, esc_attr__('Blog Image Size (Kopatheme)', 'fastnews-light'))); $sizes = apply_filters('kopa_get_image_sizes', $sizes); foreach ($sizes as $slug => $details) { add_image_size($slug, $details[0], $details[1], $details[2]); } // customize filter add_filter('kopa_customization_init_options', 'fastnews_light_init_options'); add_filter('excerpt_length', 'fastnews_light_custom_excerpt_length', 999); add_filter('embed_oembed_html', 'fastnews_light_remove_oembed_attributes', 10, 4); }
function kopa_after_setup_theme() { kopa_i18n(); add_action('admin_menu', 'kopa_admin_menu'); add_action('init', 'kopa_initial_database'); add_action('init', 'kopa_add_exceprt_page'); require trailingslashit(get_template_directory()) . '/library/includes/widgets.php'; add_filter('get_avatar', 'kopa_get_avatar'); }
/** * @package Kopa * @subpackage Core * @author thethangtran <*****@*****.**> * @since 1.0.0 */ function kopa_after_setup_theme() { kopa_i18n(); if (is_admin()) { add_action('kopa_after_save_post_custom_post_type', 'kopa_after_save_post_custom_post_type'); add_action('admin_menu', 'kopa_admin_menu'); add_action('admin_notices', 'kopa_update_notices'); add_filter('user_contactmethods', 'kopa_user_contact_methods'); add_action('admin_enqueue_scripts', 'kopa_admin_register_assets', 5); add_action('admin_enqueue_scripts', 'kopa_theme_options_enqueue', 10); add_action('admin_enqueue_scripts', 'kopa_sidebar_manage_enqueue', 10); add_action('admin_enqueue_scripts', 'kopa_layout_manage_enqueue', 10); add_action('admin_enqueue_scripts', 'kopa_widget_enqueue', 10); add_action('admin_enqueue_scripts', 'kopa_edit_post_enqueue', 10); } }