/**
  * Create a Custom Post Type to manage this stream
  *
  * @param array $post
  *
  * @return int|WP_Error
  */
 public function create_custom_post_type()
 {
     // Register Custom Post Type
     $labels = array('name' => _x('Pocket Stream', 'Post Type General Name', 'david-vg'), 'singular_name' => _x('Pocket', 'Post Type Singular Name', 'david-vg'), 'menu_name' => __('Pocket', 'david-vg'), 'name_admin_bar' => __('Pocket', 'david-vg'), 'archives' => __('Pocket Archives', 'david-vg'), 'parent_item_colon' => __('Parent Pocket:', 'david-vg'), 'all_items' => __('Pocket', 'david-vg'), 'add_new_item' => __('Add New Pocket', 'david-vg'), 'add_new' => __('Add New', 'david-vg'), 'new_item' => __('New Pocket', 'david-vg'), 'edit_item' => __('Edit Pocket', 'david-vg'), 'update_item' => __('Update Pocket', 'david-vg'), 'view_item' => __('View Pocket', 'david-vg'), 'search_items' => __('Search Pocket', 'david-vg'), 'not_found' => __('Not found', 'david-vg'), 'not_found_in_trash' => __('Not found in Trash', 'david-vg'), 'featured_image' => __('Featured Image', 'david-vg'), 'set_featured_image' => __('Set featured image', 'david-vg'), 'remove_featured_image' => __('Remove featured image', 'david-vg'), 'use_featured_image' => __('Use as featured image', 'david-vg'), 'insert_into_item' => __('Insert into item', 'david-vg'), 'uploaded_to_this_item' => __('Uploaded to this item', 'david-vg'), 'items_list' => __('Pocket list', 'david-vg'), 'items_list_navigation' => __('Pocket list navigation', 'david-vg'), 'filter_items_list' => __('Filter items list', 'david-vg'));
     $args = array('label' => __('Pocket', 'david-vg'), 'description' => __('Stream of Pocket Data', 'david-vg'), 'labels' => $labels, 'supports' => array('title', 'editor', 'author', 'thumbnail'), 'taxonomies' => array('category', 'post_tag'), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => $this->plugin_name, 'menu_position' => 5, 'menu_icon' => 'dashicons-media-text', 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'post');
     register_post_type('pocket_stream', $args);
 }
Example #2
0
/**
 * Initialize Pitch's slide post type
 */
function pitch_slide_init()
{
    $labels = array('name' => _x('Slides', 'post type general name', 'pitch'), 'singular_name' => _x('Slide', 'post type singular name', 'pitch'), 'add_new' => _x('Add New', 'book', 'pitch'), 'add_new_item' => __('Add New Slide', 'pitch'), 'edit_item' => __('Edit Slide', 'pitch'), 'new_item' => __('New Slide', 'pitch'), 'all_items' => __('All Slide', 'pitch'), 'view_item' => __('View Slide', 'pitch'), 'search_items' => __('Search Slides', 'pitch'), 'not_found' => __('No slides found', 'pitch'), 'not_found_in_trash' => __('No slides found in Trash', 'pitch'), 'parent_item_colon' => '', 'menu_name' => __('Slides', 'pitch'));
    $args = array('labels' => $labels, 'public' => false, 'publicly_queryable' => false, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => false, 'rewrite' => false, 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'menu_position' => null, 'supports' => array('title', 'thumbnail', 'excerpt', 'page-attributes'), 'menu_icon' => get_template_directory_uri() . '/images/post-types/slider-small.png');
    register_post_type('slide', $args);
    add_image_size('slide', 960, siteorigin_setting('slider_height'), true);
}
Example #3
0
 /**
  * Register Custom Post Type
  *
  * @since 1.0.0
  */
 public function wpl_sliders_cpt()
 {
     $labels = array('name' => _x($this->wpl_get_name_plural(), 'Post Type General Name', 'charitylife-toolskit'), 'singular_name' => _x($this->wpl_get_name_singular(), 'Post Type Singular Name', 'charitylife-toolskit'), 'menu_name' => __($this->wpl_get_name_singular(), 'charitylife-toolskit'), 'name_admin_bar' => __($this->wpl_get_name_singular(), 'charitylife-toolskit'), 'parent_item_colon' => __('Parent Item:', 'charitylife-toolskit'), 'all_items' => __('All  ' . $this->wpl_get_name_plural(), 'charitylife-toolskit'), 'add_new_item' => __('Add New ' . $this->wpl_get_name_singular(), 'charitylife-toolskit'), 'add_new' => __('Add ' . $this->wpl_get_name_singular(), 'charitylife-toolskit'), 'new_item' => __('New ' . $this->wpl_get_name_singular(), 'charitylife-toolskit'), 'edit_item' => __('Edit ' . $this->wpl_get_name_singular(), 'charitylife-toolskit'), 'update_item' => __('Update ' . $this->wpl_get_name_singular(), 'charitylife-toolskit'), 'view_item' => __('View ' . $this->wpl_get_name_singular(), 'charitylife-toolskit'), 'search_items' => __('Search ' . $this->wpl_get_name_singular(), 'charitylife-toolskit'), 'not_found' => __('Not found', 'charitylife-toolskit'), 'not_found_in_trash' => __('Not found in Trash', 'charitylife-toolskit'));
     $rewrite = array('slug' => $this->wpl_get_rewrite_url(), 'with_front' => true, 'pages' => true, 'feeds' => false);
     $args = array('label' => __($this->wpl_get_name_singular(), 'charitylife-toolskit'), 'description' => __($this->wpl_get_name_singular() . ' description.', 'charitylife-toolskit'), 'labels' => $labels, 'supports' => array('title', 'excerpt'), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_icon' => 'dashicons-slides', 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'rewrite' => $rewrite, 'capability_type' => 'page');
     register_post_type('post_sliders', $args);
 }
/**
 * UCFBands CPT: Location
 * Register CPT
 *
 * @author Jordan Pakrosnis
 */
function ucfbands_cpt_location()
{
    $labels = array('name' => _x('Locations', 'Post Type General Name', 'text_domain'), 'singular_name' => _x('Location', 'Post Type Singular Name', 'text_domain'), 'menu_name' => __('Locations', 'text_domain'), 'parent_item_colon' => __('Parent Item:', 'text_domain'), 'all_items' => __('All Locations', 'text_domain'), 'view_item' => __('View Location', 'text_domain'), 'add_new_item' => __('Add New Location', 'text_domain'), 'add_new' => __('Add Location', 'text_domain'), 'edit_item' => __('Edit Location', 'text_domain'), 'update_item' => __('Update Location', 'text_domain'), 'search_items' => __('Search Locations', 'text_domain'), 'not_found' => __('Not found', 'text_domain'), 'not_found_in_trash' => __('Not found in Trash', 'text_domain'));
    $rewrite = array('slug' => 'locations', 'with_front' => true, 'pages' => true, 'feeds' => false);
    $args = array('label' => __('ucfbands_location', 'text_domain'), 'description' => __('UCF Bands Event Locations', 'text_domain'), 'labels' => $labels, 'supports' => array('title', 'thumbnail'), 'taxonomies' => array(), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => true, 'show_in_admin_bar' => true, 'menu_position' => 4, 'menu_icon' => 'dashicons-location-alt', 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'rewrite' => $rewrite, 'capability_type' => 'page');
    register_post_type('ucfbands_location', $args);
}
Example #5
0
function register_custom_post_types()
{
    /* Register custom post types
     *****************************/
    register_post_type('news', array('public' => true, 'publicly_queryable' => true, 'has_archive' => true, 'hierarchical' => false, 'menu_icon' => get_stylesheet_directory_uri() . '/images/news-icon.png', 'labels' => array('name' => _x('Новости', 'post type general name'), 'singular_name' => _x('Новость', 'post type singular name'), 'add_new' => _x('Добавить новую', 'Новость'), 'add_new_item' => __('Добавить новую новость'), 'edit_item' => __('Редактировать новость'), 'new_item' => __('Новая новость'), 'view_item' => __('Посмотреть новость'), 'search_items' => __('Поиск новостей'), 'not_found' => __('Новостей не найдено'), 'not_found_in_trash' => __('Новостей не найдено в корзине'), 'parent_item_colon' => ''), 'show_ui' => true, 'menu_position' => 5, 'show_in_nav_menus' => false, 'query_var' => true, 'rewrite' => true, 'rewrite' => array('slug' => 'nitem', 'with_front' => FALSE), 'register_meta_box_cb' => 'news_add_box', 'supports' => array('title', 'thumbnail', 'excerpt', 'editor', 'author', 'comments')));
    register_post_type('banners', array('public' => true, 'publicly_queryable' => true, 'has_archive' => false, 'hierarchical' => false, 'menu_icon' => get_stylesheet_directory_uri() . '/images/banners-icon.png', 'labels' => array('name' => _x('Баннеры', 'post type general name'), 'singular_name' => _x('Баннер', 'post type singular name'), 'add_new' => _x('Добавить новый', 'Баннер'), 'add_new_item' => __('Добавить новый баннер'), 'edit_item' => __('Редактировать баннер'), 'new_item' => __('Новый баннер'), 'view_item' => __('Посмотреть баннер'), 'search_items' => __('Поиск баннеров'), 'not_found' => __('Баннеры не найдены'), 'not_found_in_trash' => __('Корзина пуста'), 'parent_item_colon' => ''), 'show_ui' => true, 'menu_position' => 5, 'show_in_nav_menus' => false, 'query_var' => true, 'rewrite' => true, 'rewrite' => array('slug' => 'banners', 'with_front' => FALSE), 'supports' => array('title')));
    register_post_type('ads', array('public' => true, 'publicly_queryable' => true, 'has_archive' => true, 'hierarchical' => false, 'menu_icon' => get_stylesheet_directory_uri() . '/images/adsa_icon.png', 'labels' => array('name' => _x('Объявления', 'post type general name'), 'singular_name' => _x('Объявление', 'post type singular name'), 'add_new' => _x('Добавить новое', 'Объявление'), 'add_new_item' => __('Добавить новое объявление'), 'edit_item' => __('Редактировать объявление'), 'new_item' => __('Новое объявление'), 'view_item' => __('Посмотреть объявление'), 'search_items' => __('Поиск объявлений'), 'not_found' => __('Объявления не найдены'), 'not_found_in_trash' => __('Корзина пуста'), 'parent_item_colon' => ''), 'show_ui' => true, 'menu_position' => 5, 'show_in_nav_menus' => false, 'query_var' => true, 'rewrite' => true, 'rewrite' => array('slug' => 'ads', 'with_front' => FALSE), 'register_meta_box_cb' => 'ads_add_box', 'supports' => array('title', 'thumbnail', 'editor', 'author', 'comments')));
    register_post_type('catalog', array('public' => true, 'publicly_queryable' => true, 'has_archive' => true, 'hierarchical' => false, 'menu_icon' => get_stylesheet_directory_uri() . '/images/catalog_icon.png', 'labels' => array('name' => _x('Справочник', 'post type general name'), 'singular_name' => _x('Организация', 'post type singular name'), 'add_new' => _x('Добавить организацию', 'Организация'), 'add_new_item' => __('Добавить новую организацию'), 'edit_item' => __('Редактировать организацию'), 'new_item' => __('Новая организация'), 'view_item' => __('Посмотреть организацию'), 'search_items' => __('Поиск организаций'), 'not_found' => __('Организации не найдены'), 'not_found_in_trash' => __('Корзина пуста'), 'parent_item_colon' => ''), 'show_ui' => true, 'menu_position' => 5, 'show_in_nav_menus' => false, 'query_var' => true, 'rewrite' => true, 'rewrite' => array('slug' => 'catalog', 'with_front' => FALSE), 'register_meta_box_cb' => 'cat_add_box', 'supports' => array('title', 'thumbnail', 'editor', 'author', 'comments')));
    register_post_type('people', array('public' => true, 'publicly_queryable' => true, 'has_archive' => true, 'hierarchical' => false, 'menu_icon' => get_stylesheet_directory_uri() . '/images/drs-icon.png', 'labels' => array('name' => _x('Врачи', 'post type general name'), 'singular_name' => _x('Врач', 'post type singular name'), 'add_new' => _x('Добавить врача', 'врач'), 'add_new_item' => __('Добавить нового врача'), 'edit_item' => __('Редактировать запись'), 'new_item' => __('Новый врач'), 'view_item' => __('Посмотреть запись'), 'search_items' => __('Поиск врача'), 'not_found' => __('Записи не найдены'), 'not_found_in_trash' => __('Корзина пуста'), 'parent_item_colon' => ''), 'show_ui' => true, 'menu_position' => 5, 'show_in_nav_menus' => false, 'query_var' => true, 'rewrite' => true, 'register_meta_box_cb' => 'pl_add_box', 'rewrite' => array('slug' => 'people', 'with_front' => FALSE), 'supports' => array('title', 'editor', 'thumbnail', 'comments')));
    /*Новости АВТОМАБИЛКИ начало*/
    register_post_type('som', array('public' => true, 'publicly_queryable' => true, 'has_archive' => true, 'hierarchical' => false, 'menu_icon' => get_stylesheet_directory_uri() . '/images/car-icon.png', 'labels' => array('name' => _x('Somicadze', 'post type general name'), 'singular_name' => _x('Som', 'post type singular name'), 'add_new' => _x('Добавить запись', 'новость'), 'add_new_item' => __('Добавить новую запись'), 'edit_item' => __('Редактировать запись'), 'new_item' => __('Новая запись'), 'view_item' => __('Посмотреть запись'), 'search_items' => __('Поиск записей'), 'not_found' => __('Запись не найдена'), 'not_found_in_trash' => __('Корзина пуста'), 'parent_item_colon' => ''), 'show_ui' => true, 'menu_position' => 6, 'show_in_nav_menus' => false, 'query_var' => true, 'rewrite' => true, 'rewrite' => array('slug' => 'somnews', 'with_front' => FALSE), 'supports' => array('title', 'thumbnail', 'excerpt', 'editor', 'author', 'comments')));
    /* Register custom taxonomies
     *****************************/
    $labelsTags = array('name' => _x('Метки', 'taxonomy general name'), 'singular_name' => _x('Метки', 'taxonomy singular name'), 'search_items' => __('Поиск меток'), 'all_items' => __('Все метки'), 'edit_item' => __('Редактировать метку'), 'update_item' => __('Обновить метку'), 'add_new_item' => __('Добавить новую метку'), 'new_item_name' => __('Новая метка'));
    register_taxonomy('ntag', array('news'), array('hierarchical' => false, 'labels' => $labelsTags, 'show_ui' => 'radio', 'show_in_nav_menus' => false, 'query_var' => true, 'rewrite' => array('slug' => 'ntag')));
    $labelsCat = array('name' => _x('Рубрики новостей', 'taxonomy general name'), 'singular_name' => _x('Рубрика', 'taxonomy singular name'), 'search_items' => __('Поиск рубрик'), 'all_items' => __('Все рубрики'), 'parent_item' => __('Родительская рубрика'), 'parent_item_colon' => __('Родительская рубрика:'), 'edit_item' => __('Редактировать рубрику'), 'update_item' => __('Обновить рубрику'), 'add_new_item' => __('Добавить новую рубрику'), 'new_item_name' => __('Новая рубрика'));
    register_taxonomy('ncategory', array('news'), array('hierarchical' => true, 'labels' => $labelsCat, 'show_ui' => 'radio', 'query_var' => true, 'rewrite' => array('slug' => 'ncategory')));
    $labelsLoc = array('name' => _x('Регионы', 'taxonomy general name'), 'singular_name' => _x('Регион', 'taxonomy singular name'), 'search_items' => __('Поиск региона'), 'all_items' => __('Все регионы'), 'parent_item' => __('Родительский регион'), 'parent_item_colon' => __('Родительский регион:'), 'edit_item' => __('Редактировать регион'), 'update_item' => __('Обновить регион'), 'add_new_item' => __('Добавить новый регион'), 'new_item_name' => __('Новый регион'));
    register_taxonomy('nlocation', array('news', 'ads', 'catalog'), array('public' => true, 'hierarchical' => true, 'labels' => $labelsLoc, 'query_var' => 'nlocation', 'show_ui' => true, 'rewrite' => array('slug' => 'nlocation', 'with_front' => false)));
    $labelsAdsCat = array('name' => _x('Категории объявлений', 'taxonomy general name'), 'singular_name' => _x('Категория', 'taxonomy singular name'), 'search_items' => __('Поиск категории'), 'all_items' => __('Все категории'), 'parent_item' => __('Родительская категория'), 'parent_item_colon' => __('Родительская категория:'), 'edit_item' => __('Редактировать категорию'), 'update_item' => __('Обновить категорию'), 'add_new_item' => __('Добавить новую категорию'), 'new_item_name' => __('Новая категория'));
    register_taxonomy('adscategory', 'ads', array('public' => true, 'hierarchical' => true, 'labels' => $labelsAdsCat, 'query_var' => 'adscategory', 'show_ui' => true, 'rewrite' => array('slug' => 'adscategory', 'with_front' => false)));
    $labelsCatalogCat = array('name' => _x('Разделы справочника', 'taxonomy general name'), 'singular_name' => _x('Раздел', 'taxonomy singular name'), 'search_items' => __('Поиск разделов'), 'all_items' => __('Все разделы'), 'parent_item' => __('Родительский раздел'), 'parent_item_colon' => __('Родительский раздел:'), 'edit_item' => __('Редактировать раздел'), 'update_item' => __('Обновить раздел'), 'add_new_item' => __('Добавить новый раздел'), 'new_item_name' => __('Новый раздел'));
    register_taxonomy('catcategory', 'catalog', array('public' => true, 'hierarchical' => true, 'labels' => $labelsCatalogCat, 'query_var' => 'catcategory', 'show_ui' => true, 'rewrite' => array('slug' => 'catcategory', 'with_front' => false)));
    $labelsMedicalNewsCat = array('name' => _x('Тип', 'taxonomy general name'), 'singular_name' => _x('Тип', 'taxonomy singular name'), 'search_items' => __('Поиск типов'), 'all_items' => __('Все типы'), 'parent_item' => __('Родительский пункт'), 'parent_item_colon' => __('Родительский пункт:'), 'edit_item' => __('Редактировать'), 'update_item' => __('Обновить'), 'add_new_item' => __('Добавить новый'), 'new_item_name' => __('Новый'));
    register_taxonomy('medcat', 'medicalnews', array('public' => true, 'hierarchical' => true, 'show_in_nav_menus' => false, 'labels' => $labelsMedicalNewsCat, 'query_var' => 'medcat', 'show_ui' => true, 'rewrite' => array('slug' => 'medcat', 'with_front' => false)));
    $labelsSomCat = array('name' => _x('Разделы', 'taxonomy general name'), 'singular_name' => _x('Раздел', 'taxonomy singular name'), 'search_items' => __('Поиск разделов'), 'all_items' => __('Все разделы'), 'parent_item' => __('Родительский пункт'), 'parent_item_colon' => __('Родительский пункт:'), 'edit_item' => __('Редактировать'), 'update_item' => __('Обновить'), 'add_new_item' => __('Добавить новый'), 'new_item_name' => __('Новый'));
    register_taxonomy('somcat', 'som', array('public' => true, 'hierarchical' => true, 'show_in_nav_menus' => false, 'labels' => $labelsSomCat, 'query_var' => 'somcat', 'show_ui' => true, 'rewrite' => array('slug' => 'somcat', 'with_front' => false)));
}
 /**
  * Register new post type
  * @return void
  */
 public function register_post_type()
 {
     $labels = array('name' => $this->plural, 'singular_name' => $this->single, 'name_admin_bar' => $this->single, 'add_new' => _x('Add New', $this->post_type, 'wp-email-delivery'), 'add_new_item' => sprintf(__('Add New %s', 'wp-email-delivery'), $this->single), 'edit_item' => sprintf(__('Edit %s', 'wp-email-delivery'), $this->single), 'new_item' => sprintf(__('New %s', 'wp-email-delivery'), $this->single), 'all_items' => sprintf(__('All %s', 'wp-email-delivery'), $this->plural), 'view_item' => sprintf(__('View %s', 'wp-email-delivery'), $this->single), 'search_items' => sprintf(__('Search %s', 'wp-email-delivery'), $this->plural), 'not_found' => sprintf(__('No %s Found', 'wp-email-delivery'), $this->plural), 'not_found_in_trash' => sprintf(__('No %s Found In Trash', 'wp-email-delivery'), $this->plural), 'parent_item_colon' => sprintf(__('Parent %s'), $this->single), 'menu_name' => $this->plural);
     $args = array('labels' => apply_filters($this->post_type . '_labels', $labels), 'description' => $this->description, 'public' => true, 'publicly_queryable' => true, 'exclude_from_search' => false, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => true, 'query_var' => true, 'can_export' => true, 'rewrite' => true, 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => true, 'supports' => array('title', 'editor', 'excerpt', 'comments', 'thumbnail'), 'menu_position' => 5, 'menu_icon' => 'dashicons-admin-post');
     $args = array_merge($args, $this->options);
     register_post_type($this->post_type, apply_filters($this->post_type . '_register_args', $args, $this->post_type));
 }
Example #7
0
	function add_nice_article()
	{
	$labels = array(
		'name' 					=> __( 'Articles', 'nicethemes' ),
		'singular_name' 		=> __( 'Article', 'nicethemes' ),
		'add_new' 				=> __( 'Add New', 'nicethemes' ),
		'add_new_item' 			=> __( 'Add New Article', 'nicethemes' ),
		'edit_item' 			=> __( 'Edit Article', 'nicethemes' ),
		'new_item' 				=> __( 'New Article', 'nicethemes' ),
		'view_item' 			=> __( 'View Article', 'nicethemes' ),
		'search_items' 			=> __( 'Search Articles', 'nicethemes' ),
		'not_found' 			=> __( 'No Articles found', 'nicethemes' ),
		'not_found_in_trash' 	=> __( 'No Articles found in Trash', 'nicethemes' ),
		'parent_item_colon' 	=> ''
	);

	$args = array(
		'labels' 				=> $labels,
		'public' 				=> true,
		'publicly_queryable' 	=> true,
		'show_ui' 				=> true,
		'query_var' 			=> true,
		'rewrite' 				=> array( 'slug' => 'article' ),
		'capability_type' 		=> 'page',
		'hierarchical' 			=> false,
		// 'menu_icon' 			=> nice_admin_menu_icon( 'btn-article.png' ),
		'menu_position' 		=> null,
		'supports' 				=> array( 'title', 'editor', 'thumbnail', 'page-attributes', 'comments', 'author', 'revisions' )
	);

	register_post_type( 'article', $args );

	}
Example #8
0
 function init()
 {
     // i18n
     if (is_admin()) {
         $this->load_textdomain();
     }
     add_action('admin_head', array($this, 'admin_head'));
     add_action('admin_footer', array($this, 'admin_footer'));
     add_action('admin_menu', array($this, 'admin_menu'));
     add_action('save_post', array($this, 'save_post'));
     add_action('delete_post', array($this, 'delete_post'));
     add_action('add_meta_boxes', array($this, 'add_meta_boxes'));
     add_action('wp_ajax_cfs_ajax_handler', array($this, 'ajax_handler'));
     // Force the $cfs variable
     if (!is_admin()) {
         add_action('parse_query', array($this, 'parse_query'));
     }
     foreach (array('api', 'upgrade', 'field', 'field_group', 'session', 'form', 'third_party', 'revision') as $f) {
         include CFS_DIR . "/includes/{$f}.php";
     }
     $upgrade = new cfs_upgrade();
     // load classes
     $this->api = new cfs_api();
     $this->form = new cfs_form();
     $this->field_group = new cfs_field_group();
     $this->third_party = new cfs_third_party();
     $this->fields = $this->get_field_types();
     register_post_type('cfs', array('public' => false, 'show_ui' => true, 'show_in_menu' => false, 'capability_type' => 'page', 'hierarchical' => false, 'supports' => array('title'), 'query_var' => false, 'labels' => array('name' => __('Field Groups', 'cfs'), 'singular_name' => __('Field Group', 'cfs'), 'add_new' => __('Add New', 'cfs'), 'add_new_item' => __('Add New Field Group', 'cfs'), 'edit_item' => __('Edit Field Group', 'cfs'), 'new_item' => __('New Field Group', 'cfs'), 'view_item' => __('View Field Group', 'cfs'), 'search_items' => __('Search Field Groups', 'cfs'), 'not_found' => __('No Field Groups found', 'cfs'), 'not_found_in_trash' => __('No Field Groups found in Trash', 'cfs'))));
     // customize the table header
     add_filter('manage_cfs_posts_columns', array($this, 'cfs_columns'));
     add_action('manage_cfs_posts_custom_column', array($this, 'cfs_column_content'), 10, 2);
     do_action('cfs_init');
 }
/**
 * Register the post type of Content Templates.
 *
 * @since unknown
 */
function wpv_register_type_view_template() 
{
  $labels = array(
    'name' => _x('Content Templates', 'post type general name'),
    'singular_name' => _x('Content Template', 'post type singular name'),
    'add_new' => _x('Add New', 'book'),
    'add_new_item' => __('Add New Content Template', 'wpv-views'),
    'edit_item' => __('Edit Content Template', 'wpv-views'),
    'new_item' => __('New Content Template', 'wpv-views'),
    'view_item' => __('View Views-Templates', 'wpv-views'),
    'search_items' => __('Search Content Templates', 'wpv-views'),
    'not_found' =>  __('No Content Templates found', 'wpv-views'),
    'not_found_in_trash' => __('No Content Templates found in Trash', 'wpv-views'), 
    'parent_item_colon' => '',
    'menu_name' => 'Content Templates'

  );
  $args = array(
    'labels' => $labels,
    'public' => false,
    'publicly_queryable' => false,
    'show_ui' => false, 
    'show_in_menu' => false, 
    'query_var' => false,
    'rewrite' => false,
    'can_export' => false,
    'capability_type' => 'post',
    'has_archive' => false, 
    'hierarchical' => false,
    'menu_position' => null,
    'supports' => array('title','editor','author'),
  ); 
  register_post_type('view-template',$args);
}
/**
 * Add custom post types
 */
function framework_post_types()
{
    /**
     * Add custom post types
     */
    register_post_type('book', array('label' => __('book', 'framework'), 'description' => __('Book Description', 'framework'), 'labels' => framework_post_type_labels('Book', 'Books'), 'supports' => array('title', 'editor'), 'taxonomies' => array('category', 'post_tag'), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => true, 'show_in_admin_bar' => true, 'menu_position' => 5, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'post'));
}
Example #11
0
/**
 * admin_init hook.
 */
function wpcf_embedded_admin_init_hook()
{
    // Add callbacks for post edit pages
    add_action('load-post.php', 'wpcf_admin_post_page_load_hook');
    add_action('load-post-new.php', 'wpcf_admin_post_page_load_hook');
    // Add callback for 'media-upload.php'
    add_filter('get_media_item_args', 'wpcf_get_media_item_args_filter');
    // Add save_post callback
    add_action('save_post', 'wpcf_admin_save_post_hook', 10, 2);
    // Render messages
    wpcf_show_admin_messages();
    // Render JS settings
    add_action('admin_head', 'wpcf_admin_render_js_settings');
    // Media insert code
    if (isset($_GET['wpcf-fields-media-insert']) || isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], 'wpcf-fields-media-insert=1')) {
        require_once WPCF_EMBEDDED_INC_ABSPATH . '/fields/file.php';
        // Add types button
        add_filter('attachment_fields_to_edit', 'wpcf_fields_file_attachment_fields_to_edit_filter', 10, 2);
        // Add JS
        add_action('admin_head', 'wpcf_fields_file_media_admin_head');
        // Filter media TABs
        add_filter('media_upload_tabs', 'wpcf_fields_file_media_upload_tabs_filter');
    }
    register_post_type('wp-types-group', array('public' => false, 'label' => 'Types Groups', 'can_export' => false));
    add_filter('icl_custom_fields_to_be_copied', 'wpcf_custom_fields_to_be_copied', 10, 2);
    // WPML editor filters
    add_filter('icl_editor_cf_name', 'wpcf_icl_editor_cf_name_filter');
    add_filter('icl_editor_cf_description', 'wpcf_icl_editor_cf_description_filter', 10, 2);
    add_filter('icl_editor_cf_style', 'wpcf_icl_editor_cf_style_filter', 10, 2);
    // Initialize translations
    if (function_exists('icl_register_string') && defined('WPML_ST_VERSION') && !get_option('wpcf_strings_translation_initialized', false)) {
        wpcf_admin_bulk_string_translation();
        update_option('wpcf_strings_translation_initialized', 1);
    }
}
Example #12
0
 /**
  * @todo Create Custom type for annouce
  *
  */
 function create_post_type()
 {
     $labels = array('name' => __('Deals', THEMENAME), 'singular_name' => __('Deals', THEMENAME), 'menu_name' => __('Deals', THEMENAME), 'name_admin_bar' => __('Deals', THEMENAME), 'add_new' => __('Add New', THEMENAME), 'add_new_item' => __('Add New Deal', THEMENAME), 'new_item' => __('New Deal', THEMENAME), 'edit_item' => __('Edit Deal', THEMENAME), 'view_item' => __('View Deal', THEMENAME), 'all_items' => __('All Deals', THEMENAME), 'search_items' => __('Search Deals', THEMENAME), 'parent_item_colon' => __('Parent Deals:', THEMENAME), 'not_found' => __('No Deals found.', THEMENAME), 'not_found_in_trash' => __('No Deals found in Trash.', THEMENAME));
     $args = array('labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => array('slug' => 'deal'), 'has_archive' => true, 'hierarchical' => true, 'menu_position' => null, 'supports' => array('title', 'editor', 'thumbnail', 'excerpt', 'comments'));
     add_theme_support('post-thumbnails');
     register_post_type(POSTTYPE_DEAL, $args);
 }
Example #13
0
function accessories_post_type()
{
    $labels = array('name' => 'Комплектующие', 'singular_name' => 'Комплектующее', 'menu_name' => 'Комплектующие', 'name_admin_bar' => 'Комплектующие', 'parent_item_colon' => 'Parent Item:', 'all_items' => 'Все комплектующие', 'add_new_item' => 'Добавить комплектующее', 'add_new' => 'Добавить', 'new_item' => 'Новая позиция', 'edit_item' => 'Редактировать комплектующее', 'update_item' => 'Обновить комплектующее', 'view_item' => 'Просмотреть комплектующее', 'search_items' => 'Найти комплектующее', 'not_found' => 'Не нашлось', 'not_found_in_trash' => 'В удаленных не нашлось');
    $rewrite = array('slug' => '', 'with_front' => true, 'pages' => true, 'feeds' => true);
    $args = array('label' => 'Комплектующее', 'description' => 'Комплектующие', 'labels' => $labels, 'supports' => array('title', 'thumbnail'), 'taxonomies' => array('accessories'), 'hierarchical' => false, 'public' => false, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'menu_icon' => 'dashicons-image-filter', 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => '', 'exclude_from_search' => true, 'publicly_queryable' => false, 'rewrite' => $rewrite, 'capability_type' => 'page');
    register_post_type('accessories', $args);
}
 /**
  * Register Property Post Type
  * @since 1.0.0
  */
 public function register_property_post_type()
 {
     $labels = array('name' => _x('Properties', 'Post Type General Name', 'inspiry-real-estate'), 'singular_name' => _x('Property', 'Post Type Singular Name', 'inspiry-real-estate'), 'menu_name' => __('Properties', 'inspiry-real-estate'), 'name_admin_bar' => __('Property', 'inspiry-real-estate'), 'parent_item_colon' => __('Parent Property:', 'inspiry-real-estate'), 'all_items' => __('All Properties', 'inspiry-real-estate'), 'add_new_item' => __('Add New Property', 'inspiry-real-estate'), 'add_new' => __('Add New', 'inspiry-real-estate'), 'new_item' => __('New Property', 'inspiry-real-estate'), 'edit_item' => __('Edit Property', 'inspiry-real-estate'), 'update_item' => __('Update Property', 'inspiry-real-estate'), 'view_item' => __('View Property', 'inspiry-real-estate'), 'search_items' => __('Search Property', 'inspiry-real-estate'), 'not_found' => __('Not found', 'inspiry-real-estate'), 'not_found_in_trash' => __('Not found in Trash', 'inspiry-real-estate'));
     $rewrite = array('slug' => apply_filters('inspiry_property_slug', __('property', 'inspiry-real-estate')), 'with_front' => true, 'pages' => true, 'feeds' => true);
     $args = array('label' => __('property', 'inspiry-real-estate'), 'description' => __('Real Estate Property', 'inspiry-real-estate'), 'labels' => $labels, 'supports' => array('title', 'editor', 'excerpt', 'author', 'thumbnail', 'revisions', 'page-attributes', 'comments'), 'hierarchical' => true, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'menu_icon' => 'dashicons-building', 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'rewrite' => $rewrite, 'capability_type' => 'post');
     register_post_type('property', $args);
 }
Example #15
0
 public function __construct($args)
 {
     extract($args);
     if ($slug) {
         $plural = inflector()->titleize($plural ? $plural : inflector()->pluralize($slug));
         $name = inflector()->titleize($name ? $name : inflector()->humanize($slug));
         $menu_name = $menu_name ? inflector()->titleize($menu_name) : $plural;
         $all_items = $all_items ? inflector()->titleize($all_items) : 'All ' . $plural;
         $labels = array('name' => _x($plural, 'post type general name', CREATIVE_LITTLE_DOMAIN), 'singular_name' => _x($name, 'post type singular name', CREATIVE_LITTLE_DOMAIN), 'menu_name' => _x($menu_name, 'admin menu', CREATIVE_LITTLE_DOMAIN), 'name_admin_bar' => _x($name, 'add new on admin bar', CREATIVE_LITTLE_DOMAIN), 'add_new' => _x('Add New', $slug, CREATIVE_LITTLE_DOMAIN), 'add_new_item' => __('Add New ' . $name, CREATIVE_LITTLE_DOMAIN), 'new_item' => __('New ' . $name, CREATIVE_LITTLE_DOMAIN), 'edit_item' => __('Edit ' . $name, CREATIVE_LITTLE_DOMAIN), 'view_item' => __('View ' . $name, CREATIVE_LITTLE_DOMAIN), 'all_items' => __($all_items, CREATIVE_LITTLE_DOMAIN), 'search_items' => __('Search ' . $plural, CREATIVE_LITTLE_DOMAIN), 'parent_item_colon' => __('Parent ' . $plural . ':', CREATIVE_LITTLE_DOMAIN), 'not_found' => __('No ' . strtolower($plural) . ' found.', CREATIVE_LITTLE_DOMAIN), 'not_found_in_trash' => __('No ' . strtolower($plural) . ' found in Trash.', CREATIVE_LITTLE_DOMAIN));
         $args = array('labels' => $labels, 'public' => $public, 'publicly_queryable' => $publicly_queryable, 'show_ui' => true, 'show_in_menu' => $show_in_menu, 'query_var' => true, 'rewrite' => $rewrite && $rewrite !== true ? $rewrite : array('slug' => inflector()->dasherize(strtolower($slug))), 'capability_type' => 'post', 'has_archive' => $has_archive ? strtolower($plural) : false, 'menu_icon' => $icon, 'hierarchical' => $hierarchical, 'menu_position' => null, 'supports' => $supports);
         register_post_type($slug, $args);
         if (method_exists($this, 'save_' . $slug)) {
             add_action('save_post', array($this, 'save_' . $slug));
         }
         if ($row_actions) {
             $actionType = $hierarchical ? 'page' : 'post';
             add_filter($actionType . '_row_actions', function ($actions, $post) {
                 if ($post->post_type == $slug) {
                     foreach ($row_actions as $action_key => $action) {
                         $actions[$action_key] = '<a href="' . admin_url('post.php?post=' . $post->ID . '&action=' . $action_key) . '">' . $action['name'] . '</a>';
                     }
                 }
                 return $actions;
             }, 10, 2);
             add_action('admin_init', function () {
                 if (isset($_REQUEST['post']) && isset($_REQUEST['action']) && isset($row_actions[$_REQUEST['action']])) {
                     if (isset($row_actions[$_REQUEST['action']]['callback']) && $row_actions[$_REQUEST['action']]['callback'] && method_exists($this, $row_actions[$_REQUEST['action']]['callback'])) {
                         call_user_func(array(__CLASS__, $row_actions[$_REQUEST['action']]['callback']));
                     }
                 }
             });
         }
     }
 }
Example #16
0
 /**
  * Regsiter an unlimited number of CPTs based on an array of parmas.
  * 
  * @uses register_post_type()
  * @uses wp_die()
  *
  * @todo re-map more stuff, current NOT ALL the args are params
  */
 public function registerPostType($args = NULL)
 {
     $taxonomies = $supports = array();
     // our white list taken from http://codex.wordpress.org/Function_Reference/register_post_type see 'supports'
     $white_list = array();
     // Default, title, editor
     $white_list['supports'] = array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments', 'custom-fields', 'trackbacks');
     foreach ($this->post_type as $post_type) {
         if (!empty($post_type['taxonomies'])) {
             $taxonomies = $post_type['taxonomies'];
         }
         $post_type['type'] = strtolower($post_type['type']);
         if (empty($post_type['singular_name'])) {
             $post_type['singular_name'] = $post_type['name'];
         }
         if (empty($post_type['slug'])) {
             $post_type['slug'] = $post_type['type'];
         }
         $labels = array('name' => _x($post_type['name'], 'post type general name'), 'singular_name' => _x($post_type['singular_name'], 'post type singular name'), 'add_new' => _x('Add New ' . $post_type['singular_name'] . '', 'something'), 'add_new_item' => __('Add New ' . $post_type['singular_name'] . ''), 'edit_item' => __('Edit ' . $post_type['singular_name'] . ''), 'new_item' => __('New ' . $post_type['singular_name'] . ''), 'view_item' => __('View ' . $post_type['singular_name'] . ''), 'search_items' => __('Search ' . $post_type['singular_name'] . ''), 'not_found' => __('No ' . $post_type['singular_name'] . ' found'), 'not_found_in_trash' => __('No ' . $post_type['singular_name'] . ' found in Trash'), 'parent_item_colon' => '');
         foreach ($post_type['supports'] as $temp) {
             if (in_array($temp, $white_list['supports'])) {
                 array_push($supports, $temp);
             } else {
                 wp_die('gtfo with this sh!t: <b>' . $temp . '</b> it ain\'t in my white list mofo!');
             }
         }
         $capabilities = array('edit_article');
         // @todo make defaults optional
         $args = array('labels' => $labels, 'public' => true, 'capability_type' => 'post', 'supports' => $supports, 'rewrite' => array('slug' => $post_type['slug']), 'hierarchical' => true, 'description' => 'None for now GFYS', 'taxonomies' => $taxonomies, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'show_in_nav_menus' => true, 'publicly_queryable' => true, 'exclude_from_search' => false, 'has_archive' => true, 'query_var' => true, 'can_export' => true, 'rewrite' => true, 'capability_type' => 'post');
         register_post_type($post_type['type'], $args);
     }
     // End 'foreach'
     return $this->post_type;
 }
Example #17
0
    function __construct()
    {
        add_theme_support('post-thumbnails');
        $this->defaultPostThumb = $this->getTheme() . "/img/logo-circle.png";
        // Remove stupid WP emoji support
        remove_action('wp_head', 'print_emoji_detection_script', 7);
        remove_action('wp_print_styles', 'print_emoji_styles');
        // Add projects CPT
        register_post_type('projects', array('labels' => array('menu_name' => 'Projects', 'name' => __('Project'), 'singular_name' => __('Project'), 'add_new' => __('Add'), 'add_new_item' => __('Add new project'), 'edit_item' => __('Edit project'), 'new_item' => __('New project'), 'all_items' => __('All projects'), 'view_item' => __('View project'), 'search_items' => __('Search projects'), 'not_found' => __('No projects found'), 'not_found_in_trash' => __('No projects found in trash')), 'public' => true, 'has_archive' => true, 'menu_position' => 9));
        // Add votes metabox
        function hackastory_votes_meta_box($post_type, $post)
        {
            add_post_meta($post->ID, 'project-votes-experimental', 0, true);
            add_post_meta($post->ID, 'project-votes-potential', 0, true);
            add_meta_box('votes_box', 'Votes', function ($post) {
                echo 'Best experiment: ' . get_post_meta($post->ID, 'project-votes-experimental', true) . '<br>';
                echo 'Most potential: ' . get_post_meta($post->ID, 'project-votes-potential', true);
            }, array('projects'), 'side');
        }
        add_action('add_meta_boxes', 'hackastory_votes_meta_box', 10, 2);
        // Define ajaxurl in frontend
        function hackastory_ajaxurl()
        {
            ?>
            <script type="text/javascript">
                var ajaxurl = '<?php 
            echo admin_url('admin-ajax.php');
            ?>
';
            </script>
            <?php 
        }
        add_action('wp_head', 'hackastory_ajaxurl');
    }
Example #18
0
 public function __construct($settings = array())
 {
     parent::__construct();
     // Make sure core is the correct version for this module.
     if (version_compare(icit_core::VERSION, self::VERSION, '<')) {
         error_log(sprintf(__('Wrong ICIT Core version. Class "%3$s" expecting core version version %2$s but got version %1$s in file %4$s', self::DOM), icit_core::VERSION, self::VERSION, __CLASS__, __FILE__), E_USER_WARNING);
         return false;
     }
     // Merge the settings passed in with the defaults
     $this->option_page_settings = wp_parse_args($settings, $this->option_page_settings);
     // Options page
     add_action('admin_menu', array($this, '_add_options_page'));
     // Set customiser
     if ($this->option_page_settings['use_customiser']) {
         add_action('customize_register', array($this, '_set_customiser'), 1);
     }
     // Add settings fields
     $register_settings_cb = is_callable($this->option_page_settings['register_settings']) ? $this->option_page_settings['register_settings'] : array($this, 'register_settings');
     add_action('admin_init', $register_settings_cb);
     if ($this->option_page_settings['use_customiser']) {
         add_action('customize_register', $register_settings_cb);
     }
     // Setup / get options page hidden post
     add_action('admin_init', array($this, '_set_options_post'));
     add_action('customize_register', array($this, '_set_options_post'));
     // Admin page scripts
     add_action('admin_enqueue_scripts', array($this, '_option_page_scripts'));
     // Option page posts, well and truly hidden away. Used to attach
     // images uploaded to option page for easy later reference (<=3.4.x)
     if (!get_post_type_object('icit_option_page')) {
         register_post_type('icit_option_page', array('public' => false, 'exclude_from_search' => true, 'publicly_queryable' => false, 'show_ui' => false, 'show_in_menu' => false, 'has_archive' => false, 'can_export' => false, 'rewrite' => false, 'query_var' => false, 'capability_type' => 'page'));
     }
     // Handle settings errors and notices
     add_action('admin_notices', array($this, '_admin_notices'));
 }
 public function register_post_types()
 {
     $post_type = 'dt_testimonials';
     $args = array('labels' => array('name' => _x('Testimonials', 'backend testimonials', 'the7mk2'), 'singular_name' => _x('Testimonials', 'backend testimonials', 'the7mk2'), 'add_new' => _x('Add New Testimonial', 'backend testimonials', 'the7mk2'), 'add_new_item' => _x('Add New Testimonial', 'backend testimonials', 'the7mk2'), 'edit_item' => _x('Edit Testimonial', 'backend testimonials', 'the7mk2'), 'new_item' => _x('New Testimonial', 'backend testimonials', 'the7mk2'), 'view_item' => _x('View Testimonial', 'backend testimonials', 'the7mk2'), 'search_items' => _x('Search Testimonials', 'backend testimonials', 'the7mk2'), 'not_found' => _x('No Testimonials found', 'backend testimonials', 'the7mk2'), 'not_found_in_trash' => _x('No Testimonials found in Trash', 'backend testimonials', 'the7mk2'), 'parent_item_colon' => '', 'menu_name' => _x('Testimonials', 'backend testimonials', 'the7mk2')), 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => true, 'capability_type' => 'post', 'has_archive' => false, 'hierarchical' => false, 'menu_position' => 36, 'supports' => array('title', 'editor', 'excerpt', 'thumbnail'));
     $args = apply_filters("presscore_post_type_{$post_type}_args", $args);
     register_post_type($post_type, $args);
 }
function daily_devotional()
{
    $labels = array('name' => 'Devotionals', 'singular_name' => 'Devotional', 'menu_name' => 'Devotional', 'name_admin_bar' => 'Devotional', 'archives' => 'Devotional Archives', 'parent_item_colon' => 'Parent Devotional:', 'all_items' => 'All Devotionals', 'add_new_item' => 'Add New Devotional', 'add_new' => 'Add New', 'new_item' => 'New Devotional', 'edit_item' => 'Edit Devotional', 'update_item' => 'Update Devotional', 'view_item' => 'View Devotional', 'search_items' => 'Search Devotional', 'not_found' => 'Not found', 'not_found_in_trash' => 'Not found in Trash', 'featured_image' => 'Featured Image', 'set_featured_image' => 'Set featured image', 'remove_featured_image' => 'Remove featured image', 'use_featured_image' => 'Use as featured image', 'insert_into_item' => 'Insert into item', 'uploaded_to_this_item' => 'Uploaded to this devotional', 'items_list' => 'Devotionals list', 'items_list_navigation' => 'Devotionals list navigation', 'filter_items_list' => 'Filter devotionals list');
    $rewrite = array('slug' => 'devotional', 'with_front' => true, 'pages' => true, 'feeds' => true);
    $args = array('label' => 'Devotionals', 'description' => 'Devotional', 'labels' => $labels, 'supports' => array('title', 'editor', 'excerpt', 'author', 'comments'), 'taxonomies' => array('category', 'post_tag'), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'menu_icon' => 'dashicons-book-alt', 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'rewrite' => $rewrite, 'capability_type' => 'post');
    register_post_type('devotional', $args);
}
Example #21
0
function setup_quotes()
{
    //POST TYPE
    $quotesLabels = array('name' => __('Quotes', 'AmazingErick'), 'singular_name' => __('Quote', 'AmazingErick'));
    $quotesOptions = array('labels' => $quotesLabels, 'public' => false, 'publicly_queryable' => false, 'exclude_from_search' => false, 'show_ui' => true, 'query_var' => true, 'menu_position' => 20, 'rewrite' => array('slug' => 'quotes', 'with_front' => false), 'has_archive' => false, 'capability_type' => 'post', 'hierarchical' => false, 'supports' => array('title'));
    register_post_type('quotes', $quotesOptions);
}
function portfolio_register()
{
    global $data;
    $labels = array('name' => __('Portfolio', 'minti-framework'), 'singular_name' => __('Portfolio Item', 'minti-framework'), 'add_new' => __('Add New Item', 'minti-framework'), 'add_new_item' => __('Add New Portfolio Item', 'minti-framework'), 'edit_item' => __('Edit Portfolio Item', 'minti-framework'), 'new_item' => __('Add New Portfolio Item', 'minti-framework'), 'view_item' => __('View Item', 'minti-framework'), 'search_items' => __('Search Portfolio', 'minti-framework'), 'not_found' => __('No portfolio items found', 'minti-framework'), 'not_found_in_trash' => __('No portfolio items found in trash', 'minti-framework'));
    $args = array('labels' => $labels, 'public' => true, 'show_ui' => true, 'capability_type' => 'post', 'hierarchical' => false, 'rewrite' => array('slug' => $data['text_portfolioslug']), 'supports' => array('title', 'editor', 'thumbnail', 'comments'));
    register_post_type('portfolio', $args);
}
Example #23
0
 function register_yada_wiki()
 {
     $labels = array('name' => _x('Wiki Pages', 'Post Type General Name', 'yada_wiki_domain'), 'singular_name' => _x('Wiki', 'Post Type Singular Name', 'yada_wiki_domain'), 'menu_name' => __('Wiki Pages', 'yada_wiki_domain'), 'parent_item_colon' => __('Parent:', 'yada_wiki_domain'), 'all_items' => __('All Wiki Pages', 'yada_wiki_domain'), 'view_item' => __('View', 'yada_wiki_domain'), 'add_new_item' => __('Add New Wiki Page', 'yada_wiki_domain'), 'add_new' => __('Add New', 'yada_wiki_domain'), 'edit_item' => __('Edit', 'yada_wiki_domain'), 'update_item' => __('Update', 'yada_wiki_domain'), 'search_items' => __('Search Wiki', 'yada_wiki_domain'), 'not_found' => __('Not found', 'yada_wiki_domain'), 'not_found_in_trash' => __('Not found in trash', 'yada_wiki_domain'));
     $rewrite = array('slug' => 'wiki', 'with_front' => true, 'pages' => true, 'feeds' => true);
     $args = array('label' => __('yada_wiki', 'yada_wiki_domain'), 'description' => __('A wiki custom post type', 'yada_wiki_domain'), 'labels' => $labels, 'supports' => array('title', 'editor', 'author', 'thumbnail', 'revisions', 'publicize', 'wpcom-markdown'), 'taxonomies' => array('wiki_tags', 'wiki_cats'), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => true, 'show_in_admin_bar' => true, 'menu_position' => 20, 'menu_icon' => 'dashicons-lightbulb', 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'rewrite' => $rewrite, 'capability_type' => 'post');
     register_post_type('yada_wiki', $args);
 }
Example #24
0
	function add_nice_faq()
	{
	  $labels = array(
		'name' 					=> __( 'FAQs', 'nicethemes' ),
		'singular_name' 		=> __( 'FAQ', 'nicethemes' ),
		'add_new' 				=> __( 'Add New', 'nicethemes' ),
		'add_new_item' 			=> __( 'Add New FAQ', 'nicethemes' ),
		'edit_item' 			=> __( 'Edit FAQ', 'nicethemes' ),
		'new_item' 				=> __( 'New FAQ', 'nicethemes' ),
		'view_item' 			=> __( 'View FAQ', 'nicethemes' ),
		'search_items' 			=> __( 'Search FAQs', 'nicethemes' ),
		'not_found' 			=> __( 'No FAQs found', 'nicethemes' ),
		'not_found_in_trash' 	=> __( 'No FAQs found in Trash', 'nicethemes' ),
		'parent_item_colon' 	=> ''
	);

	$args = array(
		'labels' 				=> $labels,
		'public' 				=> true,
		'publicly_queryable' 	=> true,
		'show_ui' 				=> true,
		'query_var' 			=> true,
		'rewrite' 				=> array( 'slug' => 'faq' ),
		'capability_type' 		=> 'post',
		'hierarchical' 			=> false,
		'menu_icon' 			=> nice_admin_menu_icon( 'btn-faq.png' ),
		'menu_position' 		=> null,
		'supports' 				=> array( 'title', 'editor', 'page-attributes' )
	);

	register_post_type( 'faq', $args );

	}
Example #25
0
 function init()
 {
     $args = array('labels' => $this->create_labels(), 'description' => '', 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'show_in_menu' => true, 'menu_position' => 50, 'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt'), 'register_meta_box_cb' => array($this, 'metaboxes'), 'rewrite' => array('slug' => strtolower($this->single), 'with_front' => false, 'feeds' => true, 'pages' => true), 'can_export' => true, 'show_in_nav_menus' => true);
     $args = array_merge($args, $this->overwrite);
     register_post_type($this->name, $args);
     add_filter('post_updated_messages', array($this, 'post_updated_messages'));
 }
Example #26
0
 function iva_at_cpt_offers()
 {
     $labels = array('name' => __('Special Offers', 'aivah_core'), 'singular_name' => __('Special Offer', 'aivah_core'), 'menu_name' => __('Special Offers', 'aivah_core'), 'add_new' => __('Add New Special Offer', 'aivah_core'), 'add_new_item' => __('Add New Special Offer', 'aivah_core'), 'edit_item' => __('Edit Special Offer', 'aivah_core'), 'new_item' => __('New Special Offer', 'aivah_core'), 'view_item' => __('View Special Offers', 'aivah_core'), 'search_items' => __('Search Special Offers', 'aivah_core'), 'not_found' => __('Nothing found', 'aivah_core'), 'not_found_in_trash' => __('Nothing found in Trash', 'aivah_core'), 'parent_item_colon' => '', 'all_items' => __('All Special Offers', 'aivah_core'));
     $iva_offers_slug = get_option('iva_ofrs_slug') ? get_option('iva_ofrs_slug') : 'offers';
     $args = array('labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'exclude_from_search' => false, 'show_ui' => true, 'show_in_menu' => true, 'capability_type' => 'post', 'hierarchical' => false, 'rewrite' => array('slug' => $iva_offers_slug, 'with_front' => true), 'query_var' => true, 'menu_position' => null, 'menu_icon' => AIVAH_CPT_URI . 'assets/images/offers-icon.png', 'supports' => array('editor', 'title', 'thumbnail', 'excerpt', 'custom-meta', 'comments', 'page-attributes'));
     register_post_type('offers', $args);
 }
 /**
  * register_post_types()
  *
  * Static function to register the assignments post types, taxonomies and capabilities.
  */
 function register_post_types()
 {
     $assignment_post_def = array('label' => __('Assignments', 'bpsp'), 'singular_label' => __('Assignment', 'bpsp'), 'description' => __('BuddyPress ScholarPress Courseware Assignments', 'bpsp'), 'public' => BPSP_DEBUG, 'publicly_queryable' => false, 'exclude_from_search' => true, 'show_ui' => BPSP_DEBUG, 'capability_type' => 'assignment', 'hierarchical' => false, 'rewrite' => false, 'query_var' => false, 'supports' => array('title', 'editor', 'author', 'custom-fields'), 'taxonomies' => array('course_id', 'group_id'));
     if (!register_post_type('assignment', $assignment_post_def)) {
         wp_die(__('BuddyPress Courseware error while registering assignment post type.', 'bpsp'));
     }
 }
 function register_post_types()
 {
     if (post_type_exists(self::TESTIMONIAL_POST_TYPE)) {
         return;
     }
     register_post_type(self::TESTIMONIAL_POST_TYPE, array('description' => __('Customer Testimonials', 'jetpack'), 'labels' => array('name' => esc_html__('Testimonials', 'jetpack'), 'singular_name' => esc_html__('Testimonial', 'jetpack'), 'menu_name' => esc_html__('Testimonials', 'jetpack'), 'all_items' => esc_html__('All Testimonials', 'jetpack'), 'add_new' => esc_html__('Add New', 'jetpack'), 'add_new_item' => esc_html__('Add New Testimonial', 'jetpack'), 'edit_item' => esc_html__('Edit Testimonial', 'jetpack'), 'new_item' => esc_html__('New Testimonial', 'jetpack'), 'view_item' => esc_html__('View Testimonial', 'jetpack'), 'search_items' => esc_html__('Search Testimonials', 'jetpack'), 'not_found' => esc_html__('No Testimonials found', 'jetpack'), 'not_found_in_trash' => esc_html__('No Testimonials found in Trash', 'jetpack')), 'supports' => array('title', 'editor', 'thumbnail', 'page-attributes'), 'rewrite' => array('slug' => 'testimonial', 'with_front' => false, 'feeds' => false, 'pages' => false), 'public' => true, 'show_ui' => true, 'menu_position' => 20, 'capability_type' => 'page', 'map_meta_cap' => true, 'has_archive' => true, 'query_var' => 'testimonial'));
 }
function custom_post_type_maxcom()
{
    register_post_type('sucursal', array('labels' => array('name' => __('Sucursal', 'bonestheme'), 'singular_name' => __('Sucursal', 'bonestheme'), 'all_items' => __('All sucursals', 'bonestheme'), 'add_new' => __('Add New', 'bonestheme'), 'add_new_item' => __('Add New Sucursal', 'bonestheme'), 'edit' => __('Edit', 'bonestheme'), 'edit_item' => __('Edit Post Types', 'bonestheme'), 'new_item' => __('New Post Type', 'bonestheme'), 'view_item' => __('View Post Type', 'bonestheme'), 'search_items' => __('Search Post Type', 'bonestheme'), 'not_found' => __('Nothing found in the Database.', 'bonestheme'), 'not_found_in_trash' => __('Nothing found in Trash', 'bonestheme'), 'parent_item_colon' => ''), 'description' => __('This is the example sucursal type', 'bonestheme'), 'public' => true, 'publicly_queryable' => true, 'exclude_from_search' => false, 'show_ui' => true, 'query_var' => true, 'menu_position' => 8, 'rewrite' => array('slug' => 'sucursal', 'with_front' => false), 'has_archive' => 'sucursal', 'capability_type' => 'post', 'hierarchical' => false, 'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'revisions')));
    /* end of register post type */
    register_taxonomy('region', array('sucursal'), array('hierarchical' => true, 'labels' => array('name' => __('Regiónes', 'bonestheme'), 'singular_name' => __('Región', 'bonestheme'), 'search_items' => __('Search Regiónes', 'bonestheme'), 'all_items' => __('All Regiónes', 'bonestheme'), 'parent_item' => __('Parent Región', 'bonestheme'), 'parent_item_colon' => __('Parent Región:', 'bonestheme'), 'edit_item' => __('Edit Región', 'bonestheme'), 'update_item' => __('Update Región', 'bonestheme'), 'add_new_item' => __('Add New Región', 'bonestheme'), 'new_item_name' => __('New Región Name', 'bonestheme')), 'show_admin_column' => true, 'show_ui' => true, 'query_var' => true, 'rewrite' => array('slug' => 'region')));
    register_taxonomy('tipo', array('sucursal'), array('hierarchical' => true, 'labels' => array('name' => __('Tipo Sucursales', 'bonestheme'), 'singular_name' => __('Tipo Sucursal', 'bonestheme'), 'search_items' => __('Search Tipo Sucursales', 'bonestheme'), 'all_items' => __('All Tipo Sucursales', 'bonestheme'), 'parent_item' => __('Parent Tipo Sucursal', 'bonestheme'), 'parent_item_colon' => __('Parent Tipo Sucursal:', 'bonestheme'), 'edit_item' => __('Edit Tipo Sucursal', 'bonestheme'), 'update_item' => __('Update Tipo Sucursal', 'bonestheme'), 'add_new_item' => __('Add New Tipo Sucursal', 'bonestheme'), 'new_item_name' => __('New Tipo Sucursal Name', 'bonestheme')), 'show_admin_column' => true, 'show_ui' => true, 'query_var' => true, 'rewrite' => array('slug' => 'tipo')));
}
Example #30
0
 function be_create_kudos_cpt()
 {
     $labels = array('name' => _x('Kudos', 'post type general name', 'be-kudos'), 'singular_name' => _x('Kudos', 'post type singular name', 'be-kudos'), 'menu_name' => _x('Kudos', 'admin menu', 'be-kudos'), 'name_admin_bar' => _x('Kudos', 'add new on admin bar', 'be-kudos'), 'add_new' => _x('Add New', 'kudo', 'be-kudos'), 'add_new_item' => __('Add New Kudos', 'be-kudos'), 'new_item' => __('New Kudos', 'be-kudos'), 'edit_item' => __('Edit Kudos', 'be-kudos'), 'view_item' => __('View Kudos', 'be-kudos'), 'all_items' => __('All Kudos', 'be-kudos'), 'search_items' => __('Search Kudos', 'be-kudos'), 'parent_item_colon' => __('Parent Kudos:', 'be-kudos'), 'not_found' => __('No kudos found.', 'be-kudos'), 'not_found_in_trash' => __('No kudos found in Trash.', 'be-kudos'));
     $args = array('labels' => $labels, 'description' => __('Description.', 'be-kudos'), 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => true, 'show_in_admin_bar' => true, 'query_var' => true, 'rewrite' => array('slug' => 'kudos'), 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'menu_position' => 5, 'menu_icon' => 'dashicons-heart', 'can_export' => true, 'supports' => array('title', 'editor', 'thumbnail', 'excerpt'));
     register_post_type('kudos', $args);
     flush_rewrite_rules();
 }