__( 'Primary Menu', 'skt-iamone' ),
) );
add_theme_support( 'custom-background', array(
'default-color' => '000000'
) );
add_editor_style( 'editor-style.css' );
}
endif; // skt_iamone_setup
add_action( 'after_setup_theme', 'skt_iamone_setup' );
function skt_iamone_widgets_init() {
register_sidebar( array(
'name' => __( 'Blog Sidebar', 'skt-iamone' ),
'description' => __( 'Appears on blog page sidebar', 'skt-iamone' ),
'id' => 'sidebar-1',
'before_widget' => '',
'before_title' => '
',
) );
}
add_action( 'widgets_init', 'skt_iamone_widgets_init' );
if ( !function_exists( 'optionsframework_init' ) ) {
define( 'OPTIONS_FRAMEWORK_DIRECTORY', get_template_directory_uri() . '/inc/' );
require_once dirname( __FILE__ ) . '/inc/options-framework.php';
}
function skt_iamone_font_url(){
$font_url = '';
/* Translators: If there are characters in your language that are not
* supported by Open Sans, translate this to 'off'. Do not translate
* into your own language.
*/
$open_sans = _x('on', 'Open Sans font:on or off', 'skt-iamone');
/* Translators: If there has characters in your language that are not
* supported by Roboto, translate this to 'off'. Do not translate
* into your own language.
*/
$roboto = _x('on', 'Roboto font:on or off', 'skt-iamone');
/* Translators: If there has characters in your language that are
* not supported by Lobster, translate this to 'off'. Do not translate
* into your own language.
*/
$lobster = _x('on', 'Lobster font:on or off', 'skt-iamone');
/* Translators: If there has characters in your language that are not
* supported by Open Sans Condensed, translate this to 'off'. Do not translate
* into your own language.
*/
$open_sans_condensed = _x('on', 'Open Sans Condensed font: on or off', 'skt-iamone');
/* Translators: If there has characters in your language that are not
* suported by Lato, translate this to 'off'. Do not translate
* into your own language.
*/
$lato = _x('on', 'Lato font: on or off', 'skt-iamone');
if('off' !== $lobster){
$font_families = array();
if('off' !== $open_sans){
$font_families[] = 'Open sans:400,600,700';
}
if('off' !== $roboto){
$font_families[] = 'Roboto:400,100,300,500,700';
}
if('off' !== $lobster){
$font_families[] = 'Lobster';
}
if('off' !== $open_sans_condensed){
$font_families[] = 'Open Sans Condensed:300';
}
if('off' !== $lato){
$font_families[] = 'Lato:300,300italic,400,400italic,700,700italic,900';
}
$query_args = array(
'family' => urlencode(implode('|',$font_families)),
);
$font_url = add_query_arg($query_args,'//fonts.googleapis.com/css');
}
return $font_url;
}
function skt_iamone_scripts() {
wp_enqueue_style( 'skt-iamone-font', skt_iamone_font_url(), array() );
wp_enqueue_style( 'skt_iamone-basic-style', get_stylesheet_uri() );
wp_enqueue_style( 'skt_iamone-editor-style', get_template_directory_uri().'/editor-style.css' );
wp_enqueue_style( 'skt_iamone-base-style', get_template_directory_uri().'/css/style_base.css' );
if ( (of_get_option('innerpageslider', true) != 'hide') || is_home() || is_front_page() ) {
wp_enqueue_style( 'skt_iamone-supersized-default-theme', get_template_directory_uri().'/css/supersized.css' );
wp_enqueue_style( 'skt_iamone-supersized-style', get_template_directory_uri().'/css/supersized.shutter.css' );
wp_enqueue_script( 'skt_iamone-supersized-easing', get_template_directory_uri() . '/js/jquery.easing.min.js', array('jquery') );
wp_enqueue_script( 'skt_iamone-supersized-slider', get_template_directory_uri() . '/js/supersized.3.2.7.min.js', array('jquery') );
wp_enqueue_script( 'skt_iamone-supersized-shutter', get_template_directory_uri() . '/js/supersized.shutter.js', array('jquery') );
}
wp_enqueue_style( 'skt_iamone-prettyphoto-style', get_template_directory_uri().'/css/prettyPhoto.css' );
wp_enqueue_script( 'skt_iamone-prettyphoto-script', get_template_directory_uri() . '/js/jquery.prettyPhoto.js', array('jquery') );
wp_enqueue_script( 'skt_iamone-customscripts', get_template_directory_uri() . '/js/custom.js', array('jquery') );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'wp_enqueue_scripts', 'skt_iamone_scripts' );
function skt_iamone_media_css_hook(){
wp_enqueue_style('skt-iamone-computer-style', get_template_directory_uri().'/css/computer.css','','','screen and (min-width:940px)');
wp_enqueue_style('skt-iamone-tab-style', get_template_directory_uri().'/css/tablet.css','','','screen and (min-width: 720px) and (max-width:939px)');
wp_enqueue_style('skt-iamone-mobhor-style', get_template_directory_uri().'/css/mobile_hz.css','','','screen and (min-width: 480px) and (max-width:719px)');
wp_enqueue_style('skt-iamone-mobile-style', get_template_directory_uri().'/css/mobile.css','','','screen and (max-width: 479px)');
if ( (of_get_option('innerpageslider', true) != 'hide') || is_home() || is_front_page() ) {
$slAr = array();
for ($i=1; $i<6; $i++) {
if ( of_get_option('slide'.$i, true) != "" ) {
$imgUrl = of_get_option('slide'.$i, true);
$imgTitle = of_get_option('slidetitle'.$i, true);
if ( strlen($imgUrl) > 3 ) $slAr[$i] = of_get_option('slide'.$i, true);
}
}
?>
". of_get_option('style2', true) ."";
}
}
}
add_action('wp_head', 'skt_iamone_custom_head_codes');
function skt_iamone_pagination() {
global $wp_query;
$big = 12345678;
$page_format = paginate_links( array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '?paged=%#%',
'current' => max( 1, get_query_var('paged') ),
'total' => $wp_query->max_num_pages,
'type' => 'array'
) );
if( is_array($page_format) ) {
$paged = ( get_query_var('paged') == 0 ) ? 1 : get_query_var('paged');
echo '';
}
}
/**
* Implement the Custom Header feature.
*/
require get_template_directory() . '/inc/custom-header.php';
/**
* Custom template tags for this theme.
*/
require get_template_directory() . '/inc/template-tags.php';
/**
* Custom functions that act independently of the theme templates.
*/
require get_template_directory() . '/inc/extras.php';
/**
* Customizer additions.
*/
require get_template_directory() . '/inc/customizer.php';
/**
* Load Jetpack compatibility file.
*/
require get_template_directory() . '/inc/jetpack.php';
/**
* Load custom functions file.
*/
require get_template_directory() . '/inc/custom-functions.php';
function skt_iamone_credit_link(){
printf(__('I am one theme by SKTThemes.'));
}