'GMO Font Agent', // The plugin name 'slug' => 'gmo-font-agent', // The plugin slug (typically the folder name) // 'source' => get_stylesheet_directory() . '/lib/plugins/tgm-example-plugin.zip', // The plugin source 'required' => false, // If false, the plugin is only 'recommended' instead of required // 'version' => '', // E.g. 1.0.0. If set, the active plugin must be this version or higher, otherwise a notice is presented // 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch // 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins // 'external_url' => '', // If set, overrides default API URL and points to an external URL ), array( 'name' => 'GMO Showtime', 'slug' => 'gmo-showtime', 'required' => false, ), ); $theme_text_domain = 'azabujuban'; $config = array( 'domain' => $theme_text_domain, // Text domain - likely want to be the same as your theme. 'default_path' => '', // Default absolute path to pre-packaged plugins 'parent_menu_slug' => 'themes.php', // Default parent menu slug 'parent_url_slug' => 'themes.php', // Default parent URL slug 'menu' => 'install-required-plugins', // Menu slug 'has_notices' => true, // Show admin notices or not 'is_automatic' => false, // Automatically activate plugins after installation or not 'message' => '', // Message to output right before the plugins table 'strings' => array( 'page_title' => __( 'Install Required Plugins', $theme_text_domain ), 'menu_title' => __( 'Install Plugins', $theme_text_domain ), 'installing' => __( 'Installing Plugin: %s', $theme_text_domain ), // %1$s = plugin name 'oops' => __( 'Something went wrong with the plugin API.', $theme_text_domain ), 'notice_can_install_required' => _n_noop( 'This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.' ), // %1$s = plugin name(s) 'notice_can_install_recommended' => _n_noop( 'This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.' ), // %1$s = plugin name(s) 'notice_cannot_install' => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.' ), // %1$s = plugin name(s) 'notice_can_activate_required' => _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s) 'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s) 'notice_cannot_activate' => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.' ), // %1$s = plugin name(s) 'notice_ask_to_update' => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.' ), // %1$s = plugin name(s) 'notice_cannot_update' => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.' ), // %1$s = plugin name(s) 'install_link' => _n_noop( 'Begin installing plugin', 'Begin installing plugins' ), 'activate_link' => _n_noop( 'Activate installed plugin', 'Activate installed plugins' ), 'return' => __( 'Return to Required Plugins Installer', $theme_text_domain ), 'plugin_activated' => __( 'Plugin activated successfully.', $theme_text_domain ), 'complete' => __( 'All plugins installed and activated successfully. %s', $theme_text_domain ) // %1$s = dashboard link ) ); tgmpa( $plugins, $config ); } function azabujuban_custom_header_setup(){ $args = array( 'default-text-color' => '220e10', 'default-image' => '%2$s/images/headers/koboreume.png', 'height' => 230, 'width' => 1600, 'uploads' => true, 'wp-head-callback' => 'twentythirteen_header_style', 'admin-head-callback' => 'twentythirteen_admin_header_style', 'admin-preview-callback' => 'twentythirteen_admin_header_image', ); add_theme_support( 'custom-header', $args ); } add_action('after_setup_theme', 'azabujuban_custom_header_setup'); function azabujuban_header_image_setup(){ global $_wp_default_headers; unregister_default_headers(array_keys($_wp_default_headers)); register_default_headers( array( 'koboreume' => array( 'url' => '%2$s/images/headers/koboreume.png', 'thumbnail_url' => '%2$s/images/headers/koboreume-thumbnail.png', 'description' => _x( 'Koboreume', 'header image description', 'twentythirteen' ) ), 'tsuyushiba' => array( 'url' => '%2$s/images/headers/tsuyushiba.png', 'thumbnail_url' => '%2$s/images/headers/tsuyushiba-thumbnail.png', 'description' => _x( 'Tsuyushiba', 'header image description', 'twentythirteen' ) ), 'sarasa_hanabishi' => array( 'url' => '%2$s/images/headers/sarasa_hanabishi.png', 'thumbnail_url' => '%2$s/images/headers/sarasa_hanabishi-thumbnail.png', 'description' => _x( 'Sarasa Hanabishi', 'header image description', 'twentythirteen' ) ), 'kikuseigaiha' => array( 'url' => '%2$s/images/headers/kikuseigaiha.png', 'thumbnail_url' => '%2$s/images/headers/kikuseigaiha-thumbnail.png', 'description' => _x( 'Kikuseigaiha', 'header image description', 'twentythirteen' ) ), 'ichimatsuhanabishi' => array( 'url' => '%2$s/images/headers/ichimatsuhanabishi.png', 'thumbnail_url' => '%2$s/images/headers/ichimatsuhanabishi-thumbnail.png', 'description' => _x( 'Ichimatsuhanabishi', 'header image description', 'twentythirteen' ) ), 'higaki' => array( 'url' => '%2$s/images/headers/higaki.png', 'thumbnail_url' => '%2$s/images/headers/higaki_thumbnail.png', 'description' => _x( 'Higaki', 'header image description', 'twentythirteen' ) ), 'sasa' => array( 'url' => '%2$s/images/headers/sasa.png', 'thumbnail_url' => '%2$s/images/headers/sasa_thumbnail.png', 'description' => _x( 'Sasa', 'header image description', 'twentythirteen' ) ), 'sayagata' => array( 'url' => '%2$s/images/headers/sayagata.png', 'thumbnail_url' => '%2$s/images/headers/sayagata_thumbnail.png', 'description' => _x( 'Sayagata', 'header image description', 'twentythirteen' ) ), 'sippoukomon' => array( 'url' => '%2$s/images/headers/sippoukomon.png', 'thumbnail_url' => '%2$s/images/headers/sippoukomon_thumbnail.png', 'description' => _x( 'Sippoukomon', 'header image description', 'twentythirteen' ) ), 'yotuwakuzusi' => array( 'url' => '%2$s/images/headers/yotuwakuzusi.png', 'thumbnail_url' => '%2$s/images/headers/yotuwakuzusi_thumbnail.png', 'description' => _x( 'Yotuwakuzusi', 'header image description', 'twentythirteen' ) ), ) ); } add_action('after_setup_theme', 'azabujuban_header_image_setup', 12); function azabujuban_original_customize( $wp_customize ) { $wp_customize->add_section( 'original_section', array( 'title' => 'Azabu Juban', 'priority' => 10000, )); $wp_customize->add_setting('navbar_color', array( 'default' => '#f7f5e7', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'navbar_color', array( 'label' => 'Header Navigation Color', 'section' => 'original_section', 'settings' => 'navbar_color', ))); $wp_customize->add_setting('Header_Navigation_Opacity', array( 'default' => '100', 'type' => 'option', )); $wp_customize->add_control('Header_Navigation_Opacity', array( 'label' => 'Header Navigation Opacity(1-100)', 'section' => 'original_section', 'settings' => 'Header_Navigation_Opacity', 'type' => 'text', )); $wp_customize->add_setting('paging_navigation_color', array( 'default' => '#e8e5ce', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'paging_navigation_color', array( 'label' => 'Paging Navigation Color', 'section' => 'original_section', 'settings' => 'paging_navigation_color', ))); $wp_customize->add_setting('Navigation_Selected_Link_Color', array( 'default' => '#e8e5ce', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'Navigation_Selected_Link_Color', array( 'label' => 'Navigation Selected Link Color', 'section' => 'original_section', 'settings' => 'Navigation_Selected_Link_Color', ))); $wp_customize->add_setting('footer_widget_area_color', array( 'default' => '#220e10', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'footer_widget_area_color', array( 'label' => 'Footer Widget Area Color', 'section' => 'original_section', 'settings' => 'footer_widget_area_color', ))); $wp_customize->add_setting('site_info_color', array( 'default' => '#e8e5ce', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'site_info_color', array( 'label' => 'Site Info Color', 'section' => 'original_section', 'settings' => 'site_info_color', ))); $wp_customize->add_setting('Header_Text_Color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'Header_Text_Colorr', array( 'label' => 'Header Text Color', 'section' => 'original_section', 'settings' => 'Header_Text_Color', ))); $wp_customize->add_setting('Navigation_Text_Color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'Navigation_Text_Color', array( 'label' => 'Navigation Text Color', 'section' => 'original_section', 'settings' => 'Navigation_Text_Color', ))); $wp_customize->add_setting('Navigation_Link_Hover_Color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'Navigation_Link_Hover_Color', array( 'label' => 'Navigation Link Hover Color', 'section' => 'original_section', 'settings' => 'Navigation_Link_Hover_Color', ))); $wp_customize->add_setting('Main_Text_Color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'Main_Text_Color', array( 'label' => 'Main Text Color', 'section' => 'original_section', 'settings' => 'Main_Text_Color', ))); $wp_customize->add_setting('Accent_Color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'Accent_Color', array( 'label' => 'Accent Color', 'section' => 'original_section', 'settings' => 'Accent_Color', ))); $wp_customize->add_setting('Main_Text_Color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'Main_Text_Color', array( 'label' => 'Main Text Color', 'section' => 'original_section', 'settings' => 'Main_Text_Color', ))); $wp_customize->add_setting('Main_Link_Hover_Color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'Main_Link_Hover_Color', array( 'label' => 'Main Link Hover Color', 'section' => 'original_section', 'settings' => 'Main_Link_Hover_Color', ))); $wp_customize->add_setting('Sidebar_Background_Color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'Sidebar_Background_Color', array( 'label' => 'Sidebar Background Color', 'section' => 'original_section', 'settings' => 'Sidebar_Background_Color', ))); $wp_customize->add_setting('Sidebar_Text_Color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'Sidebar_Text_Color', array( 'label' => 'Sidebar Text Color', 'section' => 'original_section', 'settings' => 'Sidebar_Text_Color', ))); $wp_customize->add_setting('Sidebar_Link_Hover_Color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'Sidebar_Link_Hover_Color', array( 'label' => 'Sidebar Link Hover Color', 'section' => 'original_section', 'settings' => 'Sidebar_Link_Hover_Color', ))); $wp_customize->add_setting('Paging_Navigation_Text_Color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'Paging_Navigation_Text_Color', array( 'label' => 'Paging Navigation Text Color', 'section' => 'original_section', 'settings' => 'Paging_Navigation_Text_Color', ))); $wp_customize->add_setting('Paging_Navigation_Link_Color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'Paging_Navigation_Link_Color', array( 'label' => 'Paging Navigation Link Color', 'section' => 'original_section', 'settings' => 'Paging_Navigation_Link_Color', ))); $wp_customize->add_setting('Footer_Text_Color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'Footer_Text_Color', array( 'label' => 'Footer Text Color', 'section' => 'original_section', 'settings' => 'Footer_Text_Color', ))); $wp_customize->add_setting('Footer_Link_Hover_Color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'Footer_Link_Hover_Color', array( 'label' => 'Footer Link Hover Color', 'section' => 'original_section', 'settings' => 'Footer_Link_Hover_Color', ))); $wp_customize->add_setting('Site_Info_Text_Color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'Site_Info_Text_Color', array( 'label' => 'Site Info Text Color', 'section' => 'original_section', 'settings' => 'Site_Info_Text_Color', ))); $wp_customize->add_setting('Site_Info_Link_Hover_Color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'Site_Info_Link_Hover_Color', array( 'label' => 'Site Info Link Hover Color', 'section' => 'original_section', 'settings' => 'Site_Info_Link_Hover_Color', ))); $wp_customize->add_setting('Background_Color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'Background_Color', array( 'label' => 'Background Color', 'section' => 'original_section', 'settings' => 'Background_Color', ))); $wp_customize->add_setting('Video_Background_Color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'Video_Background_Color', array( 'label' => 'Video Background Color', 'section' => 'original_section', 'settings' => 'Video_Background_Color', ))); $wp_customize->add_setting('Status_Background_Color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'Status_Background_Color', array( 'label' => 'Status Background Color', 'section' => 'original_section', 'settings' => 'Status_Background_Color', ))); $wp_customize->add_setting('Quote_Background_Color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'Quote_Background_Color', array( 'label' => 'Quote Background Color', 'section' => 'original_section', 'settings' => 'Quote_Background_Color', ))); $wp_customize->add_setting('Link_Background_Color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'Link_Background_Color', array( 'label' => 'Link Background Color', 'section' => 'original_section', 'settings' => 'Link_Background_Color', ))); $wp_customize->add_setting('Image_Background_Color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'Image_Background_Color', array( 'label' => 'Image Background Color', 'section' => 'original_section', 'settings' => 'Image_Background_Color', ))); $wp_customize->add_setting('Gallery_Background_Color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'Gallery_Background_Color', array( 'label' => 'Gallery Background Color', 'section' => 'original_section', 'settings' => 'Gallery_Background_Color', ))); $wp_customize->add_setting('Chat_Background_Color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'Chat_Background_Color', array( 'label' => 'Chat Background Color', 'section' => 'original_section', 'settings' => 'Chat_Background_Color', ))); $wp_customize->add_setting('Audio_Background_Color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'Audio_Background_Color', array( 'label' => 'Audio Background Color', 'section' => 'original_section', 'settings' => 'Audio_Background_Color', ))); $wp_customize->add_setting('Aside_Background_Color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'Aside_Background_Color', array( 'label' => 'Aside Background Color', 'section' => 'original_section', 'settings' => 'Aside_Background_Color', ))); $wp_customize->add_setting('Standard_Background_Color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'Standard_Background_Color', array( 'label' => 'Standard Background Color', 'section' => 'original_section', 'settings' => 'Standard_Background_Color', ))); // Logo Image $wp_customize->add_setting('Logo_Image', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'Logo_Image',array( 'label' => 'Logo Image', 'section' => 'original_section', 'settings' => 'Logo_Image', ) )); $wp_customize->remove_section('colors'); } add_action('customize_register', 'azabujuban_original_customize'); function azabujuban_customize_css(){ $Header_Navigation_Opacity = get_option('Header_Navigation_Opacity'); $Header_Navigation_Opacity = $Header_Navigation_Opacity / 100; $navi_color = get_option('navbar_color'); $navi_color = preg_replace("/^#/", '', $navi_color); $out = array(); for($i = 0; $i < 6; $i+=2) { $hex = substr($navi_color, $i, 2); $out[] = hexdec($hex); } echo "\n"; } add_action('wp_head', 'azabujuban_customize_css'); function azabujuban_scripts(){ wp_enqueue_script('jquery'); wp_enqueue_script( 'script', get_stylesheet_directory_uri() . '/js/script.js' ); } add_action( 'wp_enqueue_scripts', 'azabujuban_scripts' ); //Dashboard function azabu_juban_dashboard_widget_function() { ?> $normal_dashboard['azabu_juban_dashboard_widget']); unset($normal_dashboard['azabu_juban_dashboard_widget']); $sorted_dashboard = array_merge($example_widget_backup, $normal_dashboard); $wp_meta_boxes['dashboard']['normal']['core'] = $sorted_dashboard; } add_action('wp_dashboard_setup', 'azabu_juban_add_dashboard_widgets' );