__('Animals for Adoption','ADA'), 'singular_name' => _x('Animal', 'post type singular name', 'ADA'), 'add_new' => __('Add Animal', 'ADA'), 'add_new_item' => __('Add animal for Adoption', 'ADA'), 'edit_item' => __('Edit Animal', 'ADA'), 'new_item' => __('New Animal', 'ADA'), 'view_item' => __('View Animal', 'ADA'), 'search_items' => __('Search for Animal', 'ADA'), 'not_found' => __('Not Found!','ADA'), 'not_found_in_trash' => __('Nothing found in Trash','ADA'), 'parent_item_colon' => '', 'menu_name' => __('Animals', 'ADA') ); $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => true, 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'menu_position' => 100, 'show_in_nav_menus'=> false, 'supports' => array('title','editor','thumbnail','comments') ); register_post_type('pet',$args); } $labels = array( 'name' => __( 'Types', 'ADA'), 'singular_name' => _x('Type', 'post type singular name', 'ADA'), 'search_items' => __( 'Search', 'ADA' ), 'popular_items' => __( 'Most Used', 'ADA' ), 'all_items' => __( 'All Types', 'ADA' ), 'parent_item' => null, 'parent_item_colon' => null, 'edit_item' => __( 'Add Type', 'ADA' ), 'update_item' => __( 'Update Type', 'ADA' ), 'add_new_item' => __( 'Add new Type', 'ADA' ), 'new_item_name' => __( 'New Type', 'ADA' ) ); register_taxonomy('type', array('pet'), array( 'hierarchical' => true, 'labels' => $labels, 'singular_label' => __( 'Type', 'ADA'), 'all_items' => __( 'All Types', 'ADA' ), 'query_var' => true, 'rewrite' => array( 'slug' => 'type' )) ); $labels = array( 'name' => __( 'Colors','ADA'), 'singular_name' => _x('Color', 'post type singular name', 'ADA'), 'search_items' => __( 'Search Colors','ADA'), 'all_items' => __( 'All Colors','ADA'), 'parent_item' => null, 'parent_item_colon' => null, 'edit_item' => __( 'Add new Color','ADA'), 'update_item' => __( 'Update Color','ADA'), 'add_new_item' => __( 'Add Color','ADA'), 'new_item_name' => __( 'New Color','ADA') ); register_taxonomy('color', array('pet'), array( 'hierarchical' => false, 'labels' => $labels, 'singular_label' => 'Status', 'all_items' => __('All Colors' ,'ADA'), 'show_in_nav_menus' => false, 'query_var' => true, 'rewrite' => array( 'slug' => 'color' )) ); $labels = array( 'name' => __( 'Status','ADA'), 'singular_name' => __( 'Status','ADA'), 'search_items' => __( 'Search Status','ADA'), 'all_items' => __( 'All Status','ADA'), 'parent_item' => null, 'parent_item_colon' => null, 'edit_item' => __( 'Add New','ADA'), 'update_item' => __( 'Update Status','ADA'), 'add_new_item' => __( 'Add Status','ADA'), 'new_item_name' => __( 'New Status' ,'ADA') ); register_taxonomy('status', array('pet'), array( 'hierarchical' => false, 'labels' => $labels, 'singular_label' => 'Status', 'all_items' => __('All Status','ADA'), 'query_var' => true, 'rewrite' => array( 'slug' => 'status' )) ); add_action('init', 'perdidos_register'); function perdidos_register() { $labels = array( 'name' => __('Lost Pets','ADA'), 'singular_name' => _x('Lost Pet', 'post type singular name', 'ADA'), 'add_new' => __('Add Lost Pet','ADA'), 'add_new_item' => __('Add Lost Pet','ADA'), 'edit_item' => __('Edit Pet','ADA'), 'new_item' => __('New Pet','ADA'), 'view_item' => __('View Pet','ADA'), 'search_items' => __('Search Pet','ADA'), 'not_found' => __('Not Found!','ADA'), 'not_found_in_trash' => __('Nothing found in Trash','ADA'), 'parent_item_colon' => '' ); $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'query_var' => true, 'rewrite' => true, 'capability_type' => 'post', 'hierarchical' => false, 'menu_position' => 100, 'has_archive' => true, 'supports' => array('title','editor','comments','thumbnail') ); register_post_type( 'lost' , $args ); } $labels = array( 'name' => __( 'Types','ADA'), 'singular_name' => _x('Type', 'post type singular name', 'ADA'), 'search_items' => __( 'Search' ,'ADA'), 'popular_items' => __( 'Most Popular','ADA'), 'all_items' => __( 'All Types','ADA'), 'parent_item' => null, 'parent_item_colon' => null, 'edit_item' => __( 'Add New','ADA'), 'update_item' => __( 'Update','ADA'), 'add_new_item' => __( 'Add new Type','ADA'), 'new_item_name' => __( 'New Type','ADA') ); register_taxonomy('lost-type', array('lost'), array( 'hierarchical' => true, 'labels' => $labels, 'singular_label' => __('Pet Types', 'ADA'), 'all_items' => __('All Types', 'ADA'), 'query_var' => true, 'show_in_nav_menus' => false) ); add_action('init', 'noticias_register'); function noticias_register() { $labels = array( 'name' => __('News','ADA'), 'singular_name' => __('News','ADA'), 'add_new' => __('Add News','ADA'), 'add_new_item' => __('Add News','ADA'), 'edit_item' => __('Edit News','ADA'), 'new_item' => __('Add News','ADA'), 'view_item' => __('View News','ADA'), 'search_items' => __('Search News','ADA'), 'not_found' => __('Not Found','ADA'), 'not_found_in_trash' => __('Nothing found in Trash','ADA'), 'parent_item_colon' => '' ); $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'query_var' => true, 'rewrite' => true, 'capability_type' => 'post', 'hierarchical' => false, 'menu_position' => 100, 'show_in_nav_menus'=> false, 'has_archive' => true, 'supports' => array('title','editor','thumbnail', 'author', 'comments') ); register_post_type( 'news' , $args ); } $labels = array( 'name' => __( 'News Tags','ADA'), 'singular_name' => _x('News Tag', 'post type singular tag', 'ADA'), 'search_items' => __( 'Search' ,'ADA'), 'popular_items' => __( 'Most Popular','ADA'), 'all_items' => __( 'All Tag News' ,'ADA'), 'parent_item' => null, 'parent_item_colon' => null, 'edit_item' => __( 'Add New' ,'ADA'), 'update_item' => __( 'Update','ADA'), 'add_new_item' => __( 'Add new Tag','ADA'), 'new_item_name' => __( 'New Tag','ADA') ); register_taxonomy('tag-news', array('news'), array( 'hierarchical' => false, 'labels' => $labels, 'singular_label' => __('News Tag', 'ADA'), 'all_items' => __('All Tags', 'ADA'), 'query_var' => true, 'show_in_nav_menus'=> false, 'rewrite' => array( 'slug' => 'tag-news' )) ); add_action('init', 'article'); function article() { $labels = array( 'name' => __('Article','ADA'), 'singular_name' => _x('Article', 'post type singular name', 'ADA'), 'add_new' => __('Add Article','ADA'), 'add_new_item' => __('Add New Article','ADA'), 'edit_item' => __('Edit Article','ADA'), 'new_item' => __('New Article','ADA'), 'view_item' => __('View Articles','ADA'), 'search_items' => __('Search for Articles','ADA'), 'not_found' => __('Not Found!','ADA'), 'not_found_in_trash' => __('Nothing found in Trash','ADA'), 'parent_item_colon' => '', 'show_in_nav_menus'=> false, 'menu_name' => __('Articles','ADA') ); $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => true, 'capability_type' => 'post', 'hierarchical' => true, 'menu_position' => 100, 'show_in_nav_menus'=> false, 'supports' => array('title','editor','author','thumbnail','comments'), 'rewrite' => array( 'slug' => 'article' ) , 'has_archive' => true ); register_post_type('articles',$args); } $labels = array( 'name' => __( 'Articles Tags','ADA'), 'singular_name' => _x('Articles Tag', 'post type singular tag', 'ADA'), 'search_items' => __( 'Search' ,'ADA'), 'all_items' => __( 'All Tags' ,'ADA'), 'parent_item' => null, 'parent_item_colon' => null, 'edit_item' => __( 'Add New','ADA'), 'update_item' => __( 'Update','ADA'), 'add_new_item' => __( 'Add Tag','ADA'), 'new_item_name' => __( 'New Tag','ADA') ); register_taxonomy('tag-article', array('articles'), array( 'hierarchical' => false, 'labels' => $labels, 'singular_label' => 'Status', 'all_items' => __('All Tags', 'ADA'), 'show_in_nav_menus' => false, 'query_var' => true, 'rewrite' => array( 'slug' => 'tag-article' )) ); //display contextual help add_action( 'contextual_help', 'add_help_text', 10, 3 ); function add_help_text($contextual_help, $screen_id, $screen) { //$contextual_help .= var_dump($screen); // use this to help determine $screen->id if ('pet' == $screen->id ) { $contextual_help = '

' . __('ADA Theme Help', 'ADA') . '

' . '

' . __('ADA Theme is designed for local or personal websites on animals adoption.', 'ADA') . '

' . '

' . __('In this screen, you can add a specif post type for available pets for adoption. All pets stores individual data such breed, colors, size and more. Learn the basics:', 'ADA') . '

' . '' . '

' . __('All posts created in this area are specific for animals availables for adoption. Please fill all fields within the Animal Information box and also these three info:', 'ADA') . '

' . '' . '

' . __('Status info are required. These tags guides animals post type to the right layout area and also helps visitors to navigate the site content. When adding a pet for adoption, use the adopt tag, if the pet are no longer available, remove the previous tag and use adopted tag. Never use boths tag at once.', 'ADA') . '

' . '

' . __('The Animal Informations box, keep all important informations about a pet for adoption. The more you inform, the better. All data are stored within every animal individually. You also can update or change all data anytime.', 'ADA') . '

' . '

' . __('More Help with ADA Theme:', 'ADA') . '

'. '

' . __('ADA Theme site', 'ADA') . '

' ; }elseif ( 'news' == $screen->id ) { $contextual_help = '

' . __('ADA Theme Help','ADA') . '

' . '

' . __('Create News post types and keep your visitors up do date with your project activities.', 'ADA') . '

' . '

' . __('The News post type, can be useful for inform about events in your town related do animals adoption and so on. All News post types are kept in the same place, without categories, so you can focus on adding news.', 'ADA') . '

' . '

' . __('More Help with ADA Theme:', 'ADA') . '

'. '

' . __('ADA Theme site', 'ADA') . '

' ; } elseif ( 'articles' == $screen->id ) { $contextual_help = '

' . __('ADA Theme Help', 'ADA') . '

' . '

' . __('Create Articles post types for special content, interviews and alike', 'ADA') . '

' . '

' . __('The Article post type is designed for anyt content related to your site. Using Articles prevents creating categories for few or single posts only. Article post types can be commented or not and also supports tags.', 'ADA') . '

' . '

' . __('More Help with ADA Theme:', 'ADA') . '>

'. '

' . __('ADA Theme site', 'ADA') . '

' ; } elseif ( 'lost' == $screen->id ) { $contextual_help = '

' . __('ADA Theme Help', 'ADA') . '

' . '

' . __('ADA Theme also can help displaying lost pets. Vistors can help identifying a pet they found or add a pet they have lost.', 'ADA') . '

' . '

' . __('The site Admin can allow visitors to create this post type (Contributor user level).', 'ADA') . '

' . '' . '

' . __('All posts created in this area are specific for lost pets. Please fill all fields within the Lost Pet Information.', 'ADA') . '

' . '

' . __('The Lost Pet Information box ask important informations about a lost pet. The more you inform, the better. All data are stored within the post individually and you can update or change data anytime.', 'ADA') . '

' . '

' . __('Note on Privacy and Security: For security and privacy purposes, the lost pet posts does not have searcheable features such taxonomies.', 'ADA') . '

' . '

' . __('More Help with ADA Theme:', 'ADA') . '>

'. '

' . __('ADA Theme site', 'ADA') . '

' ; } elseif ( 'edit-pet' == $screen->id || 'edit-lost' == $screen->id || 'edit-article' == $screen->id || 'edit-news' == $screen->id) { $contextual_help = '

' . __('More Help with ADA Theme:', 'ADA') . '>

'. '

' . __('ADA Theme site', 'ADA') . '

' ; } return $contextual_help; } //admin interface add_action('admin_head', 'plugin_header'); function plugin_header() { global $post_type; ?> set( 'author', $current_user->id ); } } } add_filter('parse_query', 'ada_parse_query_useronly' ); // Comments function ada_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case '' : ?>
  • id="li-comment-">
    comment_approved == '0' ) : ?>
    $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
  • Pingaback: