__( 'Sidebar', 'fullportal' ),
'id' => 'sidebar-1',
'description' => __( 'Add widgets here to appear in your sidebar.', 'fullportal' ),
'before_widget' => '',
'before_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' => '',
'before_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' => '',
'before_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 '';
* }
* 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 '';
} /* 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 ) {
?>