__('home-landing1','amdhas'), 'description' => __('Widget home area 1', 'amdhas'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => __('home-landing2','amdhas'), 'description' => __('Widget home area 2', 'amdhas'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => __('home-landing3','amdhas'), 'description' => __('Widget home area 3', 'amdhas'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => __('home-landing4','amdhas'), 'description' => __('Widget home area 4', 'amdhas'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => __('home-landing5','amdhas'), 'description' => __('Widget home area 5', 'amdhas'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => __('sidebar-rotator','amdhas'), 'description' => __('sidebar for rotator and ads', 'amdhas'), 'before_widget' => '', 'after_widget' => '', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => __('sidebar-one-coloumn','amdhas'), 'description' => __('sidebar one column1', 'amdhas'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => __('coloumn-one','amdhas'), 'description' => __('sidebar right column1', 'amdhas'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => __('coloumn-two','amdhas'), 'description' => __('sidebar right column2', 'amdhas'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => __('footer left','amdhas'), 'description' => __('footer left area', 'amdhas'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => __('footer midlle','amdhas'), 'description' => __('footer midle area', 'amdhas'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => __('footer right','amdhas'), 'description' => __('fotter right area', 'amdhas'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => __('footer right last','amdhas'), 'description' => __('fotter right area - the last', 'amdhas'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); } function amdhas_takberjudul($title) { if ($title == '') {return 'Untitled';} else {return $title;}} function amdhas_default_menu() { echo ''; } function amdhas_secondary_menu() { echo ''; } function amdhas_excerpt_length( $length ) { return 60; } function amdhas_continue_reading_link() { return '' . __( 'Read more »', 'amdhas' ) . ''; } function amdhas_excerpt_more( $more ) { return ' …' . amdhas_continue_reading_link(); } add_theme_support( 'custom-header', array( 'default-image' => get_template_directory_uri() . '/images/logo-amdhas.png', 'header-text' => false, 'flex-width' => true, 'width' => 320, 'flex-height' => true, 'height' => 44 )); if ( ! function_exists( 'get_custom_header' ) ) { define('HEADER_TEXTCOLOR', ''); define('HEADER_IMAGE', '%s/images/logo-amdhas.png'); define('HEADER_IMAGE_WIDTH', 320); define('HEADER_IMAGE_HEIGHT', 44); define('NO_HEADER_TEXT', true); } function amdhas_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case 'pingback' : case 'trackback' : ?>
  • ', '' ); ?>

  • id="li-comment-">
    comment_parent ) $avatar_size = 39; echo get_avatar( $comment, $avatar_size ); printf( __( '%1$s on %2$s said:', 'amdhas' ), sprintf( '%s', get_comment_author_link() ), sprintf( '', esc_url( get_comment_link( $comment->comment_ID ) ), get_comment_time( 'c' ), sprintf( __( '%1$s at %2$s', 'amdhas' ), get_comment_date(), get_comment_time() ) ) ); ?> ', '' ); ?>
    comment_approved == '0' ) : ?>
    __( 'Reply ', 'amdhas' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
    = 2 ) $title .= " $separator " . sprintf(__( 'Page %s','amdhas'), $paged ); $title .= " $separator " . get_bloginfo( 'name', 'display' ); return $title; } $title .= get_bloginfo( 'name', 'display' ); $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) $title .= " $separator " . $site_description; if ( $paged >= 2 || $page >= 2 ) $title .= " $separator " . sprintf(__( 'Page %s', 'amdhas'), max( $paged, $page ) ); return $title; } function amdhas_content_choices() { $amdhas_options = get_option('amdhas_options'); if(!empty($amdhas_options['amdhas_content_choices'])) { switch($amdhas_options['amdhas_content_choices']) { case 1: $amdhas_con = the_excerpt(); break; case 2: $amdhas_con = the_content(__( 'Read more »', 'amdhas' )); break; default: $amdhas_con = the_excerpt(); break; } } else{ $amdhas_con = the_excerpt(); } return $amdhas_con; }//end amdhas_content_choices /* ============================================================= Ccontent Navigation ================================================================ */ function amdhas_content_nav() { global $wp_query; $paged = ( get_query_var( 'paged' ) ) ? intval( get_query_var( 'paged' ) ) : 1; $pagenum_link = get_pagenum_link(); $url_parts = parse_url( $pagenum_link ); $format = ( get_option('permalink_structure') ) ? user_trailingslashit('page/%#%', 'paged') : '?paged=%#%'; if ( isset($url_parts['query']) ) { $pagenum_link = "{$url_parts['scheme']}://{$url_parts['host']}{$url_parts['path']}%_%?{$url_parts['query']}"; } else { $pagenum_link .= '%_%'; } $links = paginate_links( array( 'base' => $pagenum_link, 'format' => $format, 'total' => $wp_query->max_num_pages, 'current' => $paged, 'mid_size' => 2, 'type' => 'list' ) ); if ( $links ) { echo "
    {$links}
    "; } } /* ============================================================= Bread crumb ================================================================ */ function amdhas_breadcrumb() { $amdhas = ''; $name = 'Home'; //'Home' link $currentBefore = ''; $currentAfter = ''; echo ''; } /* ============================================================= Element for logical ================================================================ */ function amdhas_custom_logical_element() { $amdhas_options = get_option('amdhas_options'); { ?>

    appearance -> header and remove default header image. Amdhas WordPress theme the real classical theme element with logical element, have 8 different layout for your homepage. Also you can build site with complex design or simple design, a lot of options for element here. Just using simple variable metodh but you can build elegant, responsive, mobile site, fixed width, profesional site, personal blog and great site. So...lets start with amdhas classical theme and enjoy.', 'amdhas'); ?>

    $name ) : if ( $tab == $current ) : $links[] = "$name"; else : $links[] = "$name"; endif; endforeach; echo ''; } function amdhas_display_setting( $setting = array() ) { $amdhas_options = get_option('amdhas_options'); if ( ! isset( $amdhas_options[$setting['id']] ) ) $amdhas_options[$setting['id']] = $setting['std']; switch ( $setting['type'] ) { case 'text': echo ""; echo '
    '; break; case 'textsize': echo ""; echo '
    '; break; case 'textarea': echo ""; echo '
    '; break; case 'checkbox': echo "'; break; case "color": echo '
    '; echo ""; echo '
    '; break; case 'ched': echo "'; break; case 'select': echo ""; echo '
    '; break; case 'radio': foreach ( $setting['choices'] as $value => $label ) { echo " " . $label . "
    "; } break; case 'image': echo "

    "; echo ''; echo ''; echo ' '; break; default: echo ""; echo '
    '; break; } } function amdhas_register_settings() { if ( isset ( $_GET['tab'] ) ) : $tab = $_GET['tab']; else: $tab = 'general'; endif; $amdhas_sections = amdhas_get_sections($tab); $amdhas_settings = amdhas_get_settings($tab); register_setting( 'amdhas_options', 'amdhas_options', 'amdhas_options_validate' ); foreach ($amdhas_sections as $section) { add_settings_section($section['id'], $section['name'], 'amdhas_section_text', 'amdhas'); } foreach ($amdhas_settings as $setting) { add_settings_field($setting['id'], $setting['name'], 'amdhas_display_setting', 'amdhas', $setting['section'], $setting); } } function amdhas_sanitize_hex( $hex, $default = '' ) { if ( $amdhas_options( $hex ) ) { return $hex; } return $default; } function amdhas_validate_hex( $hex ) { $hex = trim( $hex ); if ( 0 === strpos( $hex, '#' ) ) { $hex = substr( $hex, 1 ); } elseif ( 0 === strpos( $hex, '%23' ) ) { $hex = substr( $hex, 3 ); } if ( 0 === preg_match( '/^[0-9a-fA-F]{6}$/', $hex ) ) { return false; } else { return true; } } function amdhas_sanitize_color( $input ) { $output = wp_parse_args( $input, array('color' => '') ); $output['color'] = apply_filters( 'amdhas_sanitize_hex', $input['color'] ); return $output; } add_filter( 'amdhas_sanitize_color', 'amdhas_sanitize_color' ); function amdhas_options_validate($input) { $amdhas_options = get_option('amdhas_options'); if ( isset ( $input['validation-submit'] ) ) : $tab = $input['validation-submit']; else: $tab = 'general'; endif; $validate_settings = amdhas_get_settings($tab); foreach ($validate_settings as $setting) { if ($setting['type'] == 'checkbox' and !isset($input[$setting['id']]) ) { $amdhas_options[$setting['id']] = 'false'; $input[$setting['id']] = ( $input[$setting['id']] == 1 ? 1 : 0 ); } elseif ($setting['type'] == 'radio' and !isset($input[$setting['id']]) ) { $amdhas_options[$setting['id']] = 1; } elseif ($setting['type'] == 'textarea') { $amdhas_options[$setting['id']] = wp_kses_stripslashes(trim($input[$setting['id']])); } else { $amdhas_options[$setting['id']] = esc_textarea(trim($input[$setting['id']])); } } return $amdhas_options; } function amdhas_section_text() {} /* ============================================================= Lets begin to set up ================================================================ */ function amdhas_setup(){ load_theme_textdomain('amdhas', get_template_directory() . '/languages' ); register_nav_menus(array( 'navi' => __('Primary Menu', 'amdhas'), 'secondary' => __('Secondary Menu', 'amdhas') ) ); add_theme_support('custom-background'); add_theme_support('automatic-feed-links'); add_theme_support('post-thumbnails'); add_editor_style(); } /* ==================================================== Lets begin to filter ======================================================= */ add_filter('excerpt_more', 'amdhas_excerpt_more'); add_filter('excerpt_length', 'amdhas_excerpt_length'); add_filter('the_title', 'amdhas_takberjudul'); add_filter( 'wp_title', 'amdhas_filter_title', 10, 2 ); /* =============================================== Lets begin to action ================================================== */ add_action('widgets_init', 'amdhas_widgets_init'); add_action('after_setup_theme', 'amdhas_setup' ); add_action('admin_init', 'amdhas_register_settings'); add_action('admin_menu', 'amdhas_admin_add_page'); add_action( 'admin_print_styles-appearance_page_amdhas', 'amdhas_admin_enqueue_scripts' ); add_action('wp_enqueue_scripts', 'amdhas_enqueue_comment_reply'); add_action('wp_enqueue_scripts', 'amdhas_cycle_enqueue_scripts'); /* ======================================================== Lets begin to require ============================================================ */ require( get_template_directory() . '/includes/js/jscript.php' ); require( get_template_directory() . '/options/theme-functions.php' );