72, 'width' => 184, 'flex-height' => true, ) ); //Register Menus register_nav_menus( array( 'primary' => __( 'Home Sibebar Navigation', 'full-page' ), ) ); add_theme_support( 'custom-background', array( 'default-color' => 'ffffff' ) ); add_editor_style( 'editor-style.css' ); } endif; // full_page_setup add_action( 'after_setup_theme', 'full_page_setup' ); function full_page_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Blog Sidebar', 'full-page' ), 'description' => esc_html__( 'Appears on blog page sidebar', 'full-page' ), 'id' => 'sidebar-1', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'full_page_widgets_init' ); function full_page_font_url(){ $font_url = ''; /* Translators: If there are any character that are not * supported by Roboto Condensed, trsnalate this to off, do not * translate into your own language. */ $robotocondensed = _x('on','Roboto Condensed:on or off','full-page'); /* Translators: If there has any character that are not supported * by Scada, translate this to off, do not translate * into your own language. */ $lato = _x('on','Lato:on or off','full-page'); $roboto = _x('on','Roboto:on or off','full-page'); $poppins = _x('on','Poppins:on or off','full-page'); $montserrat = _x('on','Montserrat:on or off','full-page'); if('off' !== $robotocondensed ){ $font_family = array(); if('off' !== $robotocondensed){ $font_family[] = 'Roboto Condensed:300,400,600,700,800,900'; } if('off' !== $lato){ $font_family[] = 'Lato:100,100i,300,300i,400,400i,700,700i,900,900i'; } if('off' !== $roboto){ $font_family[] = 'Roboto:100,100i,300,300i,400,400i,500,500i,700,700i,900,900i'; } if('off' !== $poppins){ $font_family[] = 'Poppins:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i'; } if('off' !== $montserrat){ $font_family[] = 'Montserrat:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i'; } $query_args = array( 'family' => urlencode(implode('|',$font_family)), ); $font_url = add_query_arg($query_args,'//fonts.googleapis.com/css'); } return $font_url; } function skt_full_page_slide_codes() { $hideslide = get_theme_mod('hide_slides', 1); if (!is_home() && is_front_page()) {if( $hideslide == '') { ?> ' . "\n", esc_html(get_bloginfo( 'pingback_url' ) )); } } add_action( 'wp_head', 'full_page_pingback_header' ); add_filter( 'body_class','full_page_body_class' ); function full_page_body_class( $classes ) { $classes[] = 'panleload'; return $classes; } /** * Filter the except length to 20 words. * * @param int $length Excerpt length. * @return int (Maybe) modified excerpt length. */ function full_page_custom_excerpt_length( $excerpt_length ) { return 19; } add_filter( 'excerpt_length', 'full_page_custom_excerpt_length', 999 ); /** * * Style For About Theme Page * */ function full_page_admin_about_page_css_enqueue($hook) { if ( 'appearance_page_full_page_guide' != $hook ) { return; } wp_enqueue_style( 'full-page-about-page-style', get_template_directory_uri() . '/css/full-page-about-page-style.css' ); } add_action( 'admin_enqueue_scripts', 'full_page_admin_about_page_css_enqueue' ); /* Lens Menu */ class full_page_CSS_Menu_Lens extends Walker { var $db_fields = array( 'parent' => 'menu_item_parent', 'id' => 'db_id' ); function start_lvl( &$output, $depth = 0, $args = array() ) { $indent = str_repeat("\t", $depth); $output .= "\n$indent\n"; } function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { global $wp_query; $indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; $class_names = $value = ''; $classes = empty( $item->classes ) ? array() : (array) $item->classes; /* Add active class */ if(in_array('current-menu-item', $classes)) { $classes[] = 'active'; unset($classes['current-menu-item']); } /* Check for children */ $children = get_posts(array('post_type' => 'nav_menu_item', 'nopaging' => true, 'numberposts' => 1, 'meta_key' => '_menu_item_menu_item_parent', 'meta_value' => $item->ID)); if (!empty($children)) { $classes[] = 'has-sub'; } $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item, $args ) ); $class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : ''; $id = apply_filters( 'nav_menu_item_id', 'menu-item-'. $item->ID, $item, $args ); $id = $id ? ' id="' . esc_attr( $id ) . '"' : ''; $output .= $indent . ''; $attributes = ! empty( $item->attr_title ) ? ' title="' . esc_attr( $item->attr_title ) .'"' : ''; $attributes .= ! empty( $item->target ) ? ' target="' . esc_attr( $item->target ) .'"' : ''; $attributes .= ! empty( $item->xfn ) ? ' rel="' . esc_attr( $item->xfn ) .'"' : ''; $attributes .= ! empty( $item->url ) ? ' href="' . esc_attr( $item->url ) .'"' : ''; $item_output = $args->before; $item_output .= ''; $item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after; $item_output .= ''; $item_output .= $args->after; $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args ); } function end_el( &$output, $item, $depth = 0, $args = array() ) { $output .= "\n"; } } /* Lens Menu */ // WordPress wp_body_open backward compatibility if ( ! function_exists( 'wp_body_open' ) ) { function wp_body_open() { do_action( 'wp_body_open' ); } } /** * Include the Plugin_Activation class. */ require_once dirname( __FILE__ ) . '/class-tgm-plugin-activation.php'; add_action( 'tgmpa_register', 'full_page_register_required_plugins' ); function full_page_register_required_plugins() { $plugins = array( array( 'name' => 'SKT Templates', 'slug' => 'skt-templates', 'required' => false, ) ); $config = array( 'id' => 'tgmpa', // Unique ID for hashing notices for multiple instances of TGMPA. 'default_path' => '', // Default absolute path to bundled plugins. 'menu' => 'skt-install-plugins', // Menu slug. 'parent_slug' => 'themes.php', // Parent menu slug. 'capability' => 'edit_theme_options', // Capability needed to view plugin install page, should be a capability associated with the parent menu used. 'has_notices' => true, // Show admin notices or not. 'dismissable' => true, // If false, a user cannot dismiss the nag message. 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag. 'is_automatic' => false, // Automatically activate plugins after installation or not. 'message' => '', // Message to output right before the plugins table. ); tgmpa( $plugins, $config ); }