A software framework is designed to support the development of dynamic websites, web applications, web services and web resources. The framework aims to alleviate the overhead associated with common activities performed in web development. For example, many frameworks provide libraries for database access, templating frameworks and session management, and they often promote code reuse.
Cit: http://en.wikipedia.org/wiki/Web_application_framework
function custom_excerpt_length( $length ) {
return 30;
}
add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
function modify_post_type_supports() {
remove_post_type_support( 'pages', 'comments' );
}
add_action( 'init', 'modify_post_type_supports', 11 );
function show() {
$labels = array(
'name' => _x( 'Shows', 'Post Type General Name', 'file_language' ),
'singular_name' => _x( 'Show', 'Post Type Singular Name', 'file_language' ),
'menu_name' => __( 'Show', 'file_language' ),
'name_admin_bar' => __( 'Show', 'file_language' ),
'parent_item_colon' => __( 'Parent Item:', 'file_language' ),
'all_items' => __( 'All Items', 'file_language' ),
'add_new_item' => __( 'Add New Item', 'file_language' ),
'add_new' => __( 'Add New', 'file_language' ),
'new_item' => __( 'New Item', 'file_language' ),
'edit_item' => __( 'Edit Item', 'file_language' ),
'update_item' => __( 'Update Item', 'file_language' ),
'view_item' => __( 'View Item', 'file_language' ),
'search_items' => __( 'Search Item', 'file_language' ),
'not_found' => __( 'Not found', 'file_language' ),
'not_found_in_trash' => __( 'Not found in Trash', 'file_language' ),
);
$args = array(
'label' => __( 'show', 'file_language' ),
'description' => __( 'Show Description', 'file_language' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', 'comments', ),
'taxonomies' => array( 'portfolio_category' ),
'hierarchical' => false,
'public' => true,
'show_in_rest' => true, // Support for rest
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'page',
);
register_post_type( 'show', $args );
}
// Hook into the 'init' action
add_action( 'init', 'show', 0 );