<?php /* Plugin Name:Uttaradimath Plugins */ require 'cpt.php'; require 'custom.php'; $parampara = new JW_Post_Type('Parampara', array('supports' => array('title', 'editor', 'thumbnail', 'comments'))); $parampara->add_meta_box('Swamiji Information', array('Sloka ( Sanskrit )' => 'textarea', 'Sloka ( English )' => 'textarea', 'Poorvasharama Name' => 'text', 'Ashrama Name' => 'text', 'Preceptor' => 'text', 'Years in Pitha' => 'text', 'Brindavana At' => 'text', 'Aradhane' => 'text', 'Works' => 'textarea', 'Sloka Audio File' => 'file')); $parampara->add_meta_box('Contact Information', array('Details' => 'textarea', 'Map' => 'textarea'));
$maps = new JW_Post_Type("rapporteur", array('supports' => array('title', 'editor'), 'labels' => array('name' => __('Countries'), 'singular_name' => __('Rapporteur'), 'all_items' => __('All Locations'), 'add_new_item' => __('Add Location'), 'edit_item' => __('Edit Location'), 'new_item' => __('New Location'), 'view_item' => __('View Location'), 'search_items' => __('Search Location'), 'not_found' => __('No items found'), 'not_found_in_trash' => __('No items found in Trash')), 'menu_icon' => admin_url() . '/images/media-button-image.gif', 'query_var' => 'rapporteur')); $maps->add_meta_box('Rapporteur', array('Visit date' => 'text', 'Visit status' => array('type' => 'select', 'options' => util::visit_options()), 'country' => array('type' => 'select', 'options' => util::countries()), 'longitude' => 'text', 'latitude' => 'text', 'Upload File' => 'file')); $pressnews = new JW_Post_Type("rapporteurpressnews", array('supports' => array('title', 'editor', 'thumbnail'), 'labels' => array('name' => __('News'), 'singular_name' => __('News Item'), 'all_items' => __('News'), 'add_new_item' => __('Add New Item'), 'edit_item' => __('Edit Item'), 'new_item' => __('New Item'), 'view_item' => __('View Item'), 'search_items' => __('Search Item'), 'not_found' => __('No items found'), 'not_found_in_trash' => __('No items found in Trash')), 'menu_icon' => admin_url() . '/images/media-button-image.gif', 'taxonomies' => array('post_tag'), 'query_var' => 'rapporteurpressnews')); $pressnews->add_taxonomy('Press Category', array("hierarchical" => true), array('name' => _x('Press Category', 'taxonomy general name'), 'search_items' => __('Search Press Category'), 'all_items' => __('All Press Categories'))); $pressnews->add_meta_box('Rapporteur Press News', array('Release Date' => 'text', 'country' => array('type' => 'checkbox', 'options' => util::countries_options()), 'Upload File' => 'file')); $reports = new JW_Post_Type("rapporteurreports", array('supports' => array('title', 'editor', 'thumbnail'), 'labels' => array('name' => __('Reports'), 'singular_name' => __('Report'), 'all_items' => __('Reports'), 'add_new_item' => __('Add New Item'), 'edit_item' => __('Edit Item'), 'new_item' => __('New Item'), 'view_item' => __('View Item'), 'search_items' => __('Search Item'), 'not_found' => __('No items found'), 'not_found_in_trash' => __('No items found in Trash')), 'menu_icon' => admin_url() . '/images/media-button-image.gif', 'taxonomies' => array('post_tag'), 'query_var' => 'rapporteurreports')); $reports->add_taxonomy('Type', array("hierarchical" => true)); $reports->add_meta_box('Rapporteur Reports', array('Release Date' => 'text', 'country' => array('type' => 'checkbox', 'options' => util::countries_options()), 'Upload File' => 'file')); $discussions = new JW_Post_Type("rapdiscussions", array('supports' => array('title', 'editor', 'thumbnail'), 'labels' => array('name' => __('Discussions'), 'singular_name' => __('Discussion'), 'all_items' => __('Discussions'), 'add_new_item' => __('Add New Item'), 'edit_item' => __('Edit Item'), 'new_item' => __('New Item'), 'view_item' => __('View Item'), 'search_items' => __('Search Item'), 'not_found' => __('No items found'), 'not_found_in_trash' => __('No items found in Trash')), 'menu_icon' => admin_url() . '/images/media-button-image.gif', 'taxonomies' => array('post_tag'), 'query_var' => 'rapcommunications')); $discussions->add_taxonomy('Discussions Type', array("hierarchical" => true)); $discussions->add_meta_box('Discussions Info', array('Release Date' => 'text')); $spreadsheets = new JW_Post_Type("spreadsheets", array('supports' => array('title'), 'labels' => array('name' => __('Spreadsheets'), 'singular_name' => __('Spreadsheet'), 'all_items' => __('Spreadsheets'), 'add_new_item' => __('Add New Item'), 'edit_item' => __('Edit Item'), 'new_item' => __('New Item'), 'view_item' => __('View Item'), 'search_items' => __('Search Item'), 'not_found' => __('No items found'), 'not_found_in_trash' => __('No items found in Trash')), 'menu_icon' => admin_url() . '/images/media-button-image.gif', 'taxonomies' => array('post_tag'), 'query_var' => 'spreadsheets')); $spreadsheets->add_taxonomy('Spreadsheets Category', array("hierarchical" => true)); $spreadsheets->add_meta_box('Uploads', array('Spreadsheet' => 'spreadsheets')); $reports = new JW_Post_Type("resource-center", array('supports' => array('title', 'editor', 'thumbnail'), 'labels' => array('name' => __('Resource Center'), 'singular_name' => __('Resource Center'), 'all_items' => __('Resource Center'), 'add_new_item' => __('Add New Item'), 'edit_item' => __('Edit Item'), 'new_item' => __('New Item'), 'view_item' => __('View Item'), 'search_items' => __('Search Item'), 'not_found' => __('No items found'), 'not_found_in_trash' => __('No items found in Trash')), 'hierarchical' => true, 'menu_icon' => admin_url() . '/images/media-button-image.gif', 'taxonomies' => array('post_tag'), 'query_var' => 'resource-center')); $reports->add_meta_box('Meta', array('Release Date' => 'text', 'Parent' => array('type' => 'checkbox', 'options' => util::resource_center()))); /** * Returns the latitude setting for a post. * @return string Description */ function _get_Lat() { global $post; return get_post_meta($post->ID, 'rapporteur_rapporteur_latitude', true); } /** * @param [type] $num [description] * @return [type] [description] */ function yg_get_posts($type = 'popular', $num = 2) {
--------------------------------------------------------------------------------------- */ $maps = new JW_Post_Type("rapporteur", array('supports' => array('title', 'editor'), 'labels' => array('name' => __('Countries'), 'singular_name' => __('Rapporteur'), 'all_items' => __('All Locations'), 'add_new_item' => __('Add Location'), 'edit_item' => __('Edit Location'), 'new_item' => __('New Location'), 'view_item' => __('View Location'), 'search_items' => __('Search Location'), 'not_found' => __('No items found'), 'not_found_in_trash' => __('No items found in Trash')), 'menu_icon' => admin_url() . '/images/media-button-image.gif', 'query_var' => 'rapporteur')); $maps->add_meta_box('Rapporteur', array('Visit date' => 'text', 'Visit status' => array('type' => 'select', 'options' => util::visit_options()), 'country' => array('type' => 'select', 'options' => util::countries()), 'longitude' => 'text', 'latitude' => 'text', 'Upload File' => 'file')); $pressnews = new JW_Post_Type("rapporteurpressnews", array('supports' => array('title', 'editor', 'thumbnail'), 'labels' => array('name' => __('News'), 'singular_name' => __('News Item'), 'all_items' => __('News'), 'add_new_item' => __('Add New Item'), 'edit_item' => __('Edit Item'), 'new_item' => __('New Item'), 'view_item' => __('View Item'), 'search_items' => __('Search Item'), 'not_found' => __('No items found'), 'not_found_in_trash' => __('No items found in Trash')), 'menu_icon' => admin_url() . '/images/media-button-image.gif', 'taxonomies' => array('post_tag'), 'query_var' => 'rapporteurpressnews')); $pressnews->add_taxonomy('Press Category', array("hierarchical" => true), array('name' => _x('Press Category', 'taxonomy general name'), 'search_items' => __('Search Press Category'), 'all_items' => __('All Press Categories'))); $pressnews->add_meta_box('Rapporteur Press News', array('Release Date' => 'text', 'country' => array('type' => 'checkbox', 'options' => util::countries_options()), 'Upload File' => 'file')); $reports = new JW_Post_Type("rapporteurreports", array('supports' => array('title', 'editor', 'thumbnail'), 'labels' => array('name' => __('Reports'), 'singular_name' => __('Report'), 'all_items' => __('Reports'), 'add_new_item' => __('Add New Item'), 'edit_item' => __('Edit Item'), 'new_item' => __('New Item'), 'view_item' => __('View Item'), 'search_items' => __('Search Item'), 'not_found' => __('No items found'), 'not_found_in_trash' => __('No items found in Trash')), 'menu_icon' => admin_url() . '/images/media-button-image.gif', 'taxonomies' => array('post_tag'), 'query_var' => 'rapporteurreports')); $reports->add_taxonomy('Type', array("hierarchical" => true)); $reports->add_meta_box('Rapporteur Reports', array('Release Date' => 'text', 'country' => array('type' => 'checkbox', 'options' => util::countries_options()), 'Upload File' => 'file')); $discussions = new JW_Post_Type("rapdiscussions", array('supports' => array('title', 'editor', 'thumbnail'), 'labels' => array('name' => __('Discussions'), 'singular_name' => __('Discussion'), 'all_items' => __('Discussions'), 'add_new_item' => __('Add New Item'), 'edit_item' => __('Edit Item'), 'new_item' => __('New Item'), 'view_item' => __('View Item'), 'search_items' => __('Search Item'), 'not_found' => __('No items found'), 'not_found_in_trash' => __('No items found in Trash')), 'menu_icon' => admin_url() . '/images/media-button-image.gif', 'taxonomies' => array('post_tag'), 'query_var' => 'rapcommunications')); $discussions->add_taxonomy('Discussions Type', array("hierarchical" => true)); $discussions->add_meta_box('Discussions Info', array('Release Date' => 'text')); $spreadsheets = new JW_Post_Type("spreadsheets", array('supports' => array('title'), 'labels' => array('name' => __('Spreadsheets'), 'singular_name' => __('Spreadsheet'), 'all_items' => __('Spreadsheets'), 'add_new_item' => __('Add New Item'), 'edit_item' => __('Edit Item'), 'new_item' => __('New Item'), 'view_item' => __('View Item'), 'search_items' => __('Search Item'), 'not_found' => __('No items found'), 'not_found_in_trash' => __('No items found in Trash')), 'menu_icon' => admin_url() . '/images/media-button-image.gif', 'taxonomies' => array('post_tag'), 'query_var' => 'spreadsheets')); $spreadsheets->add_taxonomy('Spreadsheets Category', array("hierarchical" => true)); $spreadsheets->add_meta_box('Uploads', array('Spreadsheet' => 'spreadsheets')); $resource_center = new JW_Post_Type("resourcecenter", array('supports' => array('title', 'editor', 'thumbnail', 'page-attributes'), 'labels' => array('name' => __('Resource Center'), 'singular_name' => __('Resource Center'), 'all_items' => __('Resource Centers'), 'add_new_item' => __('Add New Item'), 'edit_item' => __('Edit Item'), 'new_item' => __('New Item'), 'view_item' => __('View Item'), 'search_items' => __('Search Item'), 'not_found' => __('No items found'), 'not_found_in_trash' => __('No items found in Trash')), "hierarchical" => true, 'menu_icon' => admin_url() . '/images/media-button-image.gif', 'taxonomies' => array('post_tag'), 'query_var' => 'resourcecenter')); $resource_center->add_taxonomy('RC Category', array("hierarchical" => true)); /** * Returns the latitude setting for a post. * @return string Description */ function _get_Lat() { global $post; return get_post_meta($post->ID, 'rapporteur_rapporteur_latitude', true); } /** * @param [type] $num [description] * @return [type] [description] */