__( 'Sidebar', 'fullportal' ), 'id' => 'sidebar-1', 'description' => __( 'Add widgets here to appear in your sidebar.', 'fullportal' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Content', 'fullportal' ), 'id' => 'sidebar-2', 'description' => __( 'Appears at the bottom of the content on posts and pages.', 'fullportal' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Content2', 'fullportal' ), 'id' => 'sidebar-3', 'description' => __( 'Appears at the bottom of the content on posts and pages.', 'fullportal' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'widgetvemenu_eklemek' ); /** * Fullportal theme setup function */ function fullportal_setup() { add_theme_support( 'custom-logo', array( 'height' => 80, 'width' => 80, 'flex-height' => true, 'flex-width' => false, ) ); /* * Let WordPress manage the document title. * By adding theme support, we declare that this theme does not use a * hard-coded tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); // Indicate widget sidebars can use selective refresh in the Customizer. add_theme_support( 'customize-selective-refresh-widgets' ); add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat', ) ); add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', ) ); add_theme_support( 'automatic-feed-links' ); load_theme_textdomain( 'fullportal', get_template_directory() . '/languages' ); if ( ! isset( $content_width ) ) { $content_width = 900;} add_theme_support( 'fullportal-default-styling' ); } add_action( 'widgets_init', 'fullportal_setup' ); add_theme_support('custom-background', apply_filters( 'fullportal_custom_background_args', array( 'default-image' => get_template_directory_uri() . '/img/default-background.jpg', 'default-repeat' => 'no-repeat', 'default-position-x' => 'left', 'default-position-y' => 'top', 'default-attachment' => 'fixed', ) ) ); add_theme_support( 'custom-header', apply_filters( 'fullportal_custom_header_args', array( 'width' => 1200, 'height' => 280, 'flex-height' => true, 'header-text' => false, ) ) ); $header_info = array( 'width' => 1200, 'height' => 280, 'default-image' => get_template_directory_uri() . '/img/default-header.jpg', ); add_theme_support( 'custom-header', $header_info ); $header_images = array( 'forest' => array( 'url' => get_template_directory_uri() . '/img/default-header.jpg', 'thumbnail_url' => get_template_directory_uri() . '/img/default-header.jpg', 'description' => 'Forest', ), 'eagle' => array( 'url' => get_template_directory_uri() . '/img/eagle.jpg', 'thumbnail_url' => get_template_directory_uri() . '/img/eagle.jpg', 'description' => 'Eagle', ), ); register_default_headers( $header_images ); /** * Converts a HEX value to RGB. * * @param string $color The original color, in 3- or 6-digit hexadecimal form. * @return array Array containing RGB (red, green, and blue) values for the given * HEX code, empty array otherwise. */ function fullportal_hex2rgb( $color ) { $color = trim( $color, '#' ); if ( strlen( $color ) === 3 ) { $r = hexdec( substr( $color, 0, 1 ) . substr( $color, 0, 1 ) ); $g = hexdec( substr( $color, 1, 1 ) . substr( $color, 1, 1 ) ); $b = hexdec( substr( $color, 2, 1 ) . substr( $color, 2, 1 ) ); } elseif ( strlen( $color ) === 6 ) { $r = hexdec( substr( $color, 0, 2 ) ); $g = hexdec( substr( $color, 2, 2 ) ); $b = hexdec( substr( $color, 4, 2 ) ); } else { return array(); } return array( 'red' => $r, 'green' => $g, 'blue' => $b, ); } /** * Function fullportal_body_classes * * @param array $classes custom-background-image and no-sidebar data. * Adds a class of custom-background-image to sites with a custom background image. * Adds a class of no-sidebar to sites without active sidebar. */ function fullportal_body_classes( $classes ) { if ( get_background_image() ) { $classes[] = 'custom-background-image'; } if ( ! is_active_sidebar( 'sidebar-1' ) ) { $classes[] = 'no-sidebar'; } return $classes; } add_filter( 'body_class', 'fullportal_body_classes' ); /** * ******************************** * Öne çıkırılmış öğe ekleme seçeneği */ if ( function_exists( 'add_theme_support' ) ) { add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 400, 250 ); // default Featured Image dimensions (cropped)! } /** * Function fullportal_widget_tag_cloud_args * * @param array $args size and style data for tag cloud. * removes the WordPress version from your header for security! * function wb_remove_version() { * return '<!--built on the fullportal Framework-->'; * } * add_filter( 'the_generator', 'wb_remove_version' );. */ function fullportal_widget_tag_cloud_args( $args ) { $args['largest'] = 1; $args['smallest'] = 1; $args['unit'] = 'em'; $args['format'] = 'list'; return $args; } add_filter( 'widget_tag_cloud_args', 'fullportal_widget_tag_cloud_args' ); /** * ***************************************** */ function register_my_menus() { register_nav_menus( array( 'header-menu' => __( 'Header Menu', 'fullportal' ), 'extra-menu' => __( 'Extra Menu', 'fullportal' ), 'extra-menu2' => __( 'Extra Menu-2', 'fullportal' ), ) ); } add_action( 'init', 'register_my_menus' ); /** * ***************************************** * ******************** * PAGE NAVI * ******************* * Numeric Page Navi (built into the theme by default) */ function fullportal_page_navi() { global $wp_query; $bignum = 999999999; if ( $wp_query->max_num_pages <= 1 ) { return;} echo '<nav class="pagination">'; echo paginate_links( array( 'base' => str_replace( $bignum, '%#%', esc_url( get_pagenum_link( $bignum ) ) ), 'format' => '', 'current' => max( 1, get_query_var( 'paged' ) ), 'total' => $wp_query->max_num_pages, 'prev_text' => '←', 'next_text' => '→', 'type' => 'list', 'end_size' => 3, 'mid_size' => 3, ) ); echo '</nav>'; } /* end page navi */ /** * Function fullportal_comments * * @param var $comment comment data. * @param array $args depth and max-depth datas for comment. * @param var $depth depth data for comment. * Comment Layout. */ function fullportal_comments( $comment, $args, $depth ) { ?> <div id="comment-<?php comment_ID(); ?>" <?php comment_class( 'cf' ); ?>> <article class="cf"> <header class="comment-author vcard"> <?php // create variable! $bgauthemail = get_comment_author_email(); ?> <img data-gravatar="http://www.gravatar.com/avatar/<?php echo esc_html( md5( $bgauthemail ) ); ?>?s=40" class="load-gravatar avatar avatar-48 photo" height="40" width="40" src="<?php echo esc_html( get_template_directory_uri() ); ?>/library/images/nothing.gif" /> <?php // end custom gravatar call! ?> <?php printf( '<cite class="fn">%1$s</cite> %2$s', get_comment_author_link(), edit_comment_link( __( '(Edit)', 'fullportal' ), ' ', '' ) ); ?> <time datetime="<?php echo comment_time( 'Y-m-j' ); ?>"><a href="<?php echo esc_html( htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ); ?>"><?php comment_time( 'F jS, Y' ); ?> </a></time> </header> <?php $yorum_onaylandi = $comment->comment_approved; if ( '0' === $yorum_onaylandi ) : ?> <div class="alert alert-info"> <p><?php esc_html_e( 'Your comment is awaiting moderation.', 'fullportal' ); ?></p> </div> <?php endif; ?> <section class="comment_content cf"> <?php comment_text(); ?> </section> <?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'], ) ) ) ?> </article> <?php } /** ****************************************** * Fullportal Theme only works in WordPress 4.1 or later. */ if ( version_compare( $GLOBALS['wp_version'], '4.1-alpha', '<' ) ) { require get_template_directory() . '/inc/back-compat.php'; } /** * Implement the Custom Header feature. */ require get_template_directory() . '/inc/custom-header.php';