/* Adds metabox in movies post type. Showtimes, trailer, movie website, length and ticket price */ function foxnet_kino_create_meta_boxes() { add_meta_box( 'foxnet-movie-info', __( 'Movie Information', hybrid_get_textdomain() ), 'foxnet_kino_display_meta_boxes', 'movies', 'normal', 'high' ); } /* Display metabox. Note that $post object is passed as a parameter, so that we can get post ID */ function foxnet_kino_display_meta_boxes( $post ) { /* get metadata values if they exist. */ $foxnet_kino_showtimes = get_post_meta( $post->ID, 'foxnet_kino_showtimes', 'true' ); // Get showtimes $foxnet_kino_trailer = get_post_meta( $post->ID, 'foxnet_kino_trailer', 'true' ); // Get trailer $foxnet_kino_website = get_post_meta( $post->ID, 'foxnet_kino_website', 'true' ); // Get website $foxnet_kino_length = get_post_meta( $post->ID, 'foxnet_kino_length', 'true' ); // Get length $foxnet_kino_price = get_post_meta( $post->ID, 'foxnet_kino_price', 'true' ); // Get ticket price /* Display metadata in table. Note that there is class theEditor in textarea. It get's wysiwyg (tinyMCE) editor! */ /* Adds WP nonce field: http://codex.wordpress.org/Function_Reference/wp_nonce_field */ wp_nonce_field( 'foxnet-kino-nonce', 'foxnet-kino-nonce-name' ); /* wp_editor settings */ $foxnet_kino_editor_settings = array( 'wpautop' => true, 'media_buttons' => false, 'tinymce' => array( 'theme_advanced_buttons1' => 'bold, bullist, numlist , ordered_list, separator, undo, redo', 'theme_advanced_buttons2' => '', 'theme_advanced_buttons3' => '', 'theme_advanced_buttons4' => '' ), 'quicktags' => array( 'buttons' => 'b,ul,ol,li,close' ) ); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|