<?php
register_nav_menu( 'primary-menu-top', 'Primary Header Menu Top' );
register_nav_menu( 'footer-usefull-menu1', 'Footer Useful Links Menu 1' );
register_nav_menu( 'footer-usefull-menu2', 'Footer Useful Links Menu 2' );



add_theme_support('post-thumbnails');
add_image_size( 'thumb-1352-509', '1352', '509', 'true' );
add_image_size( 'thumb-576-768', '576', '768', 'false' );
add_image_size( 'thumb-1400-300', '1400', '300', 'true' );
add_image_size( 'thumb-181-129', '181', '129', 'true' );
add_image_size( 'thumb-500-500', '500', '500', 'true' );


add_action( 'after_setup_theme', 'my_theme_setup' );
function my_theme_setup() {
	add_image_size( 'edit-screen-thumbnail', 150, 150, true );
} 

/***============================= Register Slider Post Type.(Start Here) ===========================================*/

add_action( 'init', 'slider_type_init' );

function slider_type_init() {

	$slider_post_type_labels = array(

		'name'               => _x( 'Sliders', 'post type general name', 'your-plugin-textdomain' ),

		'singular_name'      => _x( 'Slider', 'post type singular name', 'your-plugin-textdomain' ),

		'menu_name'          => _x( 'Slider Banner', 'admin menu', 'your-plugin-textdomain' ),

		'name_admin_bar'     => _x( 'Sliders', 'add new on admin bar', 'your-plugin-textdomain' ),

		'add_new'            => _x( 'Add New', 'Slider', 'your-plugin-textdomain' ),

		'add_new_item'       => __( 'Add New Slider', 'your-plugin-textdomain' ),

		'new_item'           => __( 'New Slider', 'your-plugin-textdomain' ),

		'edit_item'          => __( 'Edit Slider', 'your-plugin-textdomain' ),

		'view_item'          => __( 'View Slider', 'your-plugin-textdomain' ),

		'all_items'          => __( 'All Sliders', 'your-plugin-textdomain' ),

		'search_items'       => __( 'Search Sliders', 'your-plugin-textdomain' ),

		'parent_item_colon'  => __( 'Parent Sliders:', 'your-plugin-textdomain' ),

		'not_found'          => __( 'No Slider found.', 'your-plugin-textdomain' ),

		'not_found_in_trash' => __( 'No Slider found in Trash.', 'your-plugin-textdomain' )

	);



	$slider_post_type_args = array(

		'labels'             => $slider_post_type_labels,

		'public'             => true,

		'publicly_queryable' => true,

		'show_ui'            => true,

		'show_in_menu'       => true,

		'query_var'          => true,

		'rewrite'            => array( 'slug' => 'slider-post-type' ),

		'capability_type'    => 'post',

		'has_archive'        => true,

		'hierarchical'       => false,

		'menu_position'      => null,

        'menu_icon'   => 'dashicons-slides',

		'supports'           => array( 'title', 'thumbnail','editor')

	);



	register_post_type( 'slider-post-type', $slider_post_type_args );

} 
/*-----------------------------------------------------------------*/

add_action( 'init', 'property_type_init' );

function property_type_init() {

	$property_post_type_labels = array(

		'name'               => _x( 'Properties', 'post type general name', 'your-plugin-textdomain' ),

		'singular_name'      => _x( 'Property', 'post type singular name', 'your-plugin-textdomain' ),

		'menu_name'          => _x( 'Property ', 'admin menu', 'your-plugin-textdomain' ),

		'name_admin_bar'     => _x( 'Properties', 'add new on admin bar', 'your-plugin-textdomain' ),

		'add_new'            => _x( 'Add New', 'Properti', 'your-plugin-textdomain' ),

		'add_new_item'       => __( 'Add New Property', 'your-plugin-textdomain' ),

		'new_item'           => __( 'New Property', 'your-plugin-textdomain' ),

		'edit_item'          => __( 'Edit Property', 'your-plugin-textdomain' ),

		'view_item'          => __( 'View Property', 'your-plugin-textdomain' ),

		'all_items'          => __( 'All Properties', 'your-plugin-textdomain' ),

		'search_items'       => __( 'Search Properties', 'your-plugin-textdomain' ),

		'parent_item_colon'  => __( 'Parent Property:', 'your-plugin-textdomain' ),

		'not_found'          => __( 'No Property found.', 'your-plugin-textdomain' ),

		'not_found_in_trash' => __( 'No Property found in Trash.', 'your-plugin-textdomain' )

	);



	$property_post_type_args = array(

		'labels'             => $property_post_type_labels,

		'public'             => true,

		'publicly_queryable' => true,

		'show_ui'            => true,

		'show_in_menu'       => true,

		'query_var'          => true,

		'rewrite'            => array( 'slug' => 'property-post-type' ),

		'capability_type'    => 'post',

		'has_archive'        => true,

		'hierarchical'       => false,

		'menu_position'      => null,

        'menu_icon'   => 'dashicons-format-aside',

		'supports'           => array( 'title', 'thumbnail','editor')

	);



	register_post_type( 'property-post-type', $property_post_type_args );

} 





/*------------------------Register Sidebar For Footer About Us-------------------------*/
add_action( 'widgets_init', 'footer_aboutus_widget' );
function footer_aboutus_widget() {
    register_sidebar( array(
        'name' => __( 'Sidebar Below The Form Widget', 'oncova' ),
        'id' => 'about-sidebar',
        'description' => __( 'Add Your Sidebar Below the form Bar.', 'theme-slug' ),
        
       
    ) );
}

/*------------------------------------------------------*/
add_action( 'init', 'codex_service_init' );
/**
 * Register a Gallery post type.
 *
 * @link http://codex.wordpress.org/Function_Reference/register_post_type
 */
function codex_service_init() {
	$labels = array(
		'name'               => _x( 'services', 'post type general name', 'your-plugin-textdomain' ),
		'singular_name'      => _x( 'service', 'post type singular name', 'your-plugin-textdomain' ),
		'menu_name'          => _x( 'service', 'admin menu', 'your-plugin-textdomain' ),
		'name_admin_bar'     => _x( 'service', 'add new on admin bar', 'your-plugin-textdomain' ),
		'add_new'            => _x( 'Add New', 'service', 'your-plugin-textdomain' ),
		'add_new_item'       => __( 'Add New service', 'your-plugin-textdomain' ),
		'new_item'           => __( 'New service', 'your-plugin-textdomain' ),
		'edit_item'          => __( 'Edit service', 'your-plugin-textdomain' ),
		'view_item'          => __( 'View service', 'your-plugin-textdomain' ),
		'all_items'          => __( 'All services', 'your-plugin-textdomain' ),
		'search_items'       => __( 'Search services', 'your-plugin-textdomain' ),
		'parent_item_colon'  => __( 'Parent services:', 'your-plugin-textdomain' ),
		'not_found'          => __( 'No services found.', 'your-plugin-textdomain' ),
		'not_found_in_trash' => __( 'No services found in Trash.', 'your-plugin-textdomain' )
	);

	$args = array(
		'labels'             => $labels,
                'description'        => __( 'Description.', 'your-plugin-textdomain' ),
		'public'             => true,
		'publicly_queryable' => true,
		'show_ui'            => true,
		'show_in_menu'       => true,
		'query_var'          => true,
		'rewrite'            => array( 'slug' => 'service' ),
		'capability_type'    => 'post',
		'has_archive'        => true,
		'hierarchical'       => false,
		'menu_position'      => null,
        'menu_icon'      => 'dashicons-menu',
        
		'supports'           => array( 'title', 'thumbnail','editor' )
	);

	register_post_type( 'service', $args );
}


add_action( 'init', 'property_taxonomies', 0 );

function property_taxonomies() {
	// Add new taxonomy, make it hierarchical (like categories)
	$labels = array(
		'name'              => _x( 'Property Type', 'taxonomy general name' ),
		'singular_name'     => _x( 'Property Type', 'taxonomy singular name' ),
		'search_items'      => __( 'Search Property Type' ),
		'all_items'         => __( 'All Property Type' ),
		'parent_item'       => __( 'Parent Property Type' ),
		'parent_item_colon' => __( 'Parent Property Type:' ),
		'edit_item'         => __( 'Edit Property Type' ),
		'update_item'       => __( 'Update Property Type' ),
		'add_new_item'      => __( 'Add New Property Type' ),
		'new_item_name'     => __( 'New Property Type Name' ),
		'menu_name'         => __( 'Property Type' ),
	);

	$args = array(
		'hierarchical'      => true,
		'labels'            => $labels,
		'show_ui'           => true,
		'show_admin_column' => true,
		'query_var'         => true,
		'rewrite'           => array( 'slug' => 'property-category' ),
	);

	register_taxonomy( 'property-type', 'property-post-type' , $args );
}


add_action( 'init', 'property_taxonomies_location', 0 );

function property_taxonomies_location() {
	// Add new taxonomy, make it hierarchical (like categories)
	$labels = array(
		'name'              => _x( 'Property Location', 'taxonomy general name' ),
		'singular_name'     => _x( 'Property Location', 'taxonomy singular name' ),
		'search_items'      => __( 'Search Property Location' ),
		'all_items'         => __( 'All Property Location' ),
		'parent_item'       => __( 'Parent Property Location' ),
		'parent_item_colon' => __( 'Parent Property Location:' ),
		'edit_item'         => __( 'Edit Property Location' ),
		'update_item'       => __( 'Update Property Location' ),
		'add_new_item'      => __( 'Add New Property Location' ),
		'new_item_name'     => __( 'New Property Location Name' ),
		'menu_name'         => __( 'Property Location' ),
	);

	$args = array(
		'hierarchical'      => true,
		'labels'            => $labels,
		'show_ui'           => true,
		'show_admin_column' => true,
		'query_var'         => true,
		'rewrite'           => array( 'slug' => 'property-location' ),
	);

	register_taxonomy( 'property-location', 'property-post-type' , $args );
}




add_action( 'init', 'property_taxonomies_featured', 0 );

function property_taxonomies_featured() {
	// Add new taxonomy, make it hierarchical (like categories)
	$labels2 = array(
		'name'              => _x( 'Property Featured', 'taxonomy general name' ),
		'singular_name'     => _x( 'Property Featured', 'taxonomy singular name' ),
		'search_items'      => __( 'Search Property Featured' ),
		'all_items'         => __( 'All Property Featured' ),
		'parent_item'       => __( 'Parent Property Featured' ),
		'parent_item_colon' => __( 'Parent Property Featured:' ),
		'edit_item'         => __( 'Edit Property Featured' ),
		'update_item'       => __( 'Update Property Featured' ),
		'add_new_item'      => __( 'Add New Property Featured' ),
		'new_item_name'     => __( 'New Property Featured Name' ),
		'menu_name'         => __( 'Property Featured' ),
	);

	$args2 = array(
		'hierarchical'      => true,
		'labels'            => $labels2,
		'show_ui'           => true,
		'show_admin_column' => true,
		'query_var'         => true,
		'rewrite'           => array( 'slug' => 'property-featured' ),
	);

	register_taxonomy( 'property-featured', 'property-post-type' , $args2 );
}





add_action( 'init', 'property_taxonomies_status', 0 );

function property_taxonomies_status() {
	// Add new taxonomy, make it hierarchical (like categories)
	$labels = array(
		'name'              => _x( 'Property Status', 'taxonomy general name' ),
		'singular_name'     => _x( 'Property Status', 'taxonomy singular name' ),
		'search_items'      => __( 'Search Property Status' ),
		'all_items'         => __( 'All Property Status' ),
		'parent_item'       => __( 'Parent Property Status' ),
		'parent_item_colon' => __( 'Parent Property Status:' ),
		'edit_item'         => __( 'Edit Property Status' ),
		'update_item'       => __( 'Update Property Status' ),
		'add_new_item'      => __( 'Add New Property Status' ),
		'new_item_name'     => __( 'New Property Status Name' ),
		'menu_name'         => __( 'Property Status' ),
	);

	$args = array(
		'hierarchical'      => true,
		'labels'            => $labels,
		'show_ui'           => true,
		'show_admin_column' => true,
		'query_var'         => true,
		'rewrite'           => array( 'slug' => 'property-status' ),
	);

	register_taxonomy( 'property_status', 'property-post-type' , $args );
}




add_action( 'init', 'property_taxonomies_bts_mts', 0 );

function property_taxonomies_bts_mts() {
	// Add new taxonomy, make it hierarchical (like categories)
	$labelsbts = array(
		'name'              => _x( 'Property bts/mts', 'taxonomy general name' ),
		'singular_name'     => _x( 'Property bts/mts', 'taxonomy singular name' ),
		'search_items'      => __( 'Search Property bts/mts' ),
		'all_items'         => __( 'All Property bts/mts' ),
		'parent_item'       => __( 'Parent Property bts/mts' ),
		'parent_item_colon' => __( 'Parent Property bts/mts:' ),
		'edit_item'         => __( 'Edit Property bts/mts' ),
		'update_item'       => __( 'Update Property bts/mts' ),
		'add_new_item'      => __( 'Add New Property bts/mts' ),
		'new_item_name'     => __( 'New Property bts/mts Name' ),
		'menu_name'         => __( 'Property bts/mts' ),
	);

	$argsbts = array(
		'hierarchical'      => true,
		'labels'            => $labelsbts,
		'show_ui'           => true,
		'show_admin_column' => true,
		'query_var'         => true,
		'rewrite'           => array( 'slug' => 'property-bts-mts' ),
	);

	register_taxonomy( 'property_bts_mts', 'property-post-type' , $argsbts );
}



add_action( 'init', 'codex_test_init' );
/**
 * Register a Gallery post type.
 *
 * @link http://codex.wordpress.org/Function_Reference/register_post_type
 */
function codex_test_init() {
	$labels = array(
		'name'               => _x( 'Testimonials', 'post type general name', 'your-plugin-textdomain' ),
		'singular_name'      => _x( 'Testimonial', 'post type singular name', 'your-plugin-textdomain' ),
		'menu_name'          => _x( 'Testimonial', 'admin menu', 'your-plugin-textdomain' ),
		'name_admin_bar'     => _x( 'Testimonial', 'add new on admin bar', 'your-plugin-textdomain' ),
		'add_new'            => _x( 'Add New', 'Testimonial', 'your-plugin-textdomain' ),
		'add_new_item'       => __( 'Add New Testimonial', 'your-plugin-textdomain' ),
		'new_item'           => __( 'New Testimonial', 'your-plugin-textdomain' ),
		'edit_item'          => __( 'Edit Testimonial', 'your-plugin-textdomain' ),
		'view_item'          => __( 'View Testimonial', 'your-plugin-textdomain' ),
		'all_items'          => __( 'All Testimonials', 'your-plugin-textdomain' ),
		'search_items'       => __( 'Search Testimonials', 'your-plugin-textdomain' ),
		'parent_item_colon'  => __( 'Parent Testimonials:', 'your-plugin-textdomain' ),
		'not_found'          => __( 'No Testimonials found.', 'your-plugin-textdomain' ),
		'not_found_in_trash' => __( 'No Testimonials found in Trash.', 'your-plugin-textdomain' )
	);

	$args = array(
		'labels'             => $labels,
                'description'        => __( 'Description.', 'your-plugin-textdomain' ),
		'public'             => true,
		'publicly_queryable' => true,
		'show_ui'            => true,
		'show_in_menu'       => true,
		'query_var'          => true,
		'rewrite'            => array( 'slug' => 'testmonials' ),
		'capability_type'    => 'post',
		'has_archive'        => true,
		'hierarchical'       => false,
		'menu_position'      => null,
       // 'menu_icon'      => 'dashicons-menu',
        
		'supports'           => array( 'title', 'thumbnail','editor' )
	);

	register_post_type( 'testmonials', $args );
}



function own_widgets_init() {
	
	register_sidebar( array(
		'name'          => __( 'sidebar Careers Image', 'oncova' ),
		'id'            => 'careers-image',
		'description'   => __( 'Edit Your Sidebar  Careers Image' ),
		
	) );
}
add_action( 'widgets_init', 'own_widgets_init' );











?>