Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List of post_types, post_meta, taxonomies and term_meta #317

Open
carstingaxion opened this issue Aug 24, 2023 · 4 comments
Open

List of post_types, post_meta, taxonomies and term_meta #317

carstingaxion opened this issue Aug 24, 2023 · 4 comments
Milestone

Comments

@carstingaxion
Copy link

To better understand the inner workings of the plugin (and its extensions) I'd like to have an overview about registered data AND their relations altogether, in particular:

@slimndap
Copy link
Owner

Post types

  • Productions: wp_theatre_prod
  • Events: wp_theatre_event
  • Season: wp_theatre_season

Registered here.

Taxonomies

No taxonomies are registered. Productions us the existing 'category' and 'post_tag' taxonomies.

Defined here.

Post meta

  • Most meta fields for events are defined here.
  • All other meta fields are just being used whenever thet are needed and are scattered all over the code.
  • Events are linked to a production through a wp_theatre_prod meta field, that contains the ID of the production.
  • Productions are, optionally, linked to a season through a wp_theatre_season meta field.
  • Productions and events have a _wpt_order meta field that is used to display them in the corrected order or to select them by a date range.

@slimndap slimndap added this to the 1.0 milestone Aug 24, 2023
@carstingaxion
Copy link
Author

What is the reason for assigning the identical ˋlabelˋ arguments for the event and production post_types?

$post_type_args = array(
'labels' => array(
'name' => __( 'Events','theatre'),
'singular_name' => __( 'Event','theatre'),
'add_new' => _x('Add New', 'production','theatre'),
'new_item' => __('New event','theatre'),
'add_new_item' => __('Add new event','theatre'),
'edit_item' => __('Edit event','theatre')
),
'public' => true,
'has_archive' => true,
'show_in_menu' => false,
'show_in_admin_bar' => true,
'supports' => array('title', 'editor', 'excerpt', 'thumbnail','comments'),
'taxonomies' => array('category','post_tag'),
'rewrite' => array(
'slug' => $wp_theatre->production_permalink->get_base(),
'with_front' => false,
'feeds' => true
),
);
/**
* Filter the post type args for productions.
*
* @since 0.15.9
* @param $post_type_args The post type args.
*/
$post_type_args = apply_filters('wpt/setup/post_type/args/?post_type='.WPT_Production::post_type_name, $post_type_args);
register_post_type( WPT_Production::post_type_name, $post_type_args );
$post_type_args = array(
'labels' => array(
'name' => __( 'Events','theatre'),
'singular_name' => __( 'Event','theatre'),
'new_item' => __('New event','theatre'),
'add_new_item' => __('Add new event','theatre'),
'edit_item' => __('Edit event','theatre')
),
'public' => true,
'has_archive' => true,
'show_in_menu' => false,
'supports' => array(''),
'taxonomies' => array('category','post_tag'),
'show_in_nav_menus'=> false,
);
/**
* Filter the post type args for events.
*
* @since 0.15.9
* @param $post_type_args The post type args.
*/
$post_type_args = apply_filters('wpt/setup/post_type/args/?post_type='.WPT_Event::post_type_name, $post_type_args);
register_post_type( WPT_Event::post_type_name, $post_type_args );

@slimndap
Copy link
Owner

slimndap commented Aug 24, 2023 via email

@slimndap
Copy link
Owner

Additionally, the label for the wp_theatre_event post type is not being used in the user interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants