PluginProbe
WpStream – Live Streaming, Video on Demand, Pay Per View / 4.8.2
WpStream – Live Streaming, Video on Demand, Pay Per View v4.8.2
4.14.1 4.14.0 4.13.2 4.13.1 4.13 4.12.5 4.12.4 4.12.3 4.12.2 4.12.1 4.12 4.4.4 4.4.5 4.4.6 4.4.7 4.4.8 4.4.9 4.5 4.5.1 4.5.11 4.5.11.1 4.5.11.2 4.5.11.4 4.5.11.5 4.5.11.6 All 181 releases
← All changes | includes/class-wpstream_product.php +93 -19 4.5.114.8.2 View file →
@@ -17,8 +17,9 @@
17 17 public function __construct() {
18 18 add_action( 'create_term', array($this,'wpstream_redo_transient') );
19 19 add_action( 'edit_term', array($this,'wpstream_redo_transient') );
20 20 add_action( 'delete_term', array($this,'wpstream_redo_transient') );
21 + add_filter('manage_edit-product_columns', array($this,'remove_wpstream_category_column') ) ;
21 22 }
22 23
23 24
24 25 public function wpstream_redo_transient(){
@@ -189,8 +190,9 @@
189 190
190 191 $all_tax_labels=array();
191 192 $property_action_category_values = get_transient('wpstream_woo_movie_category_values');
192 193 if($property_action_category_values===false){
194 + $property_action_category_values=array();
193 195 $terms_category = get_terms( array(
194 196 'taxonomy' => 'wpstream_category',
195 197 'hide_empty' => false,
196 198 ) );
@@ -222,8 +224,9 @@
222 224 $all_tax_labels=array();
223 225 $movie_actors_values = get_transient('wpstream_woo_actors_category_values');
224 226
225 227 if($movie_actors_values===false){
228 + $movie_actors_values=array();
226 229 $terms_actors= get_terms( array(
227 230 'taxonomy' => 'wpstream_actors',
228 231 'hide_empty' => false,
229 232 ) );
@@ -258,11 +261,9 @@
258 261 $product_cat= get_terms( array(
259 262 'taxonomy' => 'product_cat',
260 263 'hide_empty' => false,
261 264 ) );
262 -
263 -
264 -
265 + $product_categ_values=array();
265 266 if( is_array($product_cat) ){
266 267 foreach($product_cat as $term){
267 268 $places[$term->name]= $term->term_id;
268 269 $temp_array=array();
@@ -292,8 +293,9 @@
292 293 $movie_ratiog= get_terms( array(
293 294 'taxonomy' => 'wpstream_movie_rating',
294 295 'hide_empty' => false,
295 296 ) );
297 + $movie_rating_values=array();
296 298 if( is_array($movie_ratiog) ){
297 299 foreach($movie_ratiog as $term){
298 300 $places[$term->name]= $term->term_id;
299 301 $temp_array=array();
@@ -399,9 +401,9 @@
399 401 * CUSTOMIZE CUSTOM POST TYPE AS YOU WISH.
400 402 */
401 403
402 404
403 - public function wpstream_category_callback_function($tag){
405 + public function wpstream_category_callback_function($tag, $taxonomy){
404 406 if(is_object ($tag)){
405 407 $t_id = $tag->term_id;
406 408 $term_meta = get_option( "taxonomy_$t_id");
407 409 $pagetax = $term_meta['pagetax'] ? $term_meta['pagetax'] : '';
@@ -419,20 +421,20 @@
419 421 print'
420 422 <table class="form-table">
421 423 <tbody>
422 424 <tr class="form-field">
423 - <th scope="row" valign="top"><label for="term_meta[pagetax]">'.esc_html__( 'Page id for this term','wpstream').'</label></th>
425 + <th scope="row" valign="top"><label for="term_meta[pagetax]">'.esc_html__( 'Display the content for page id for this term','wpstream').'</label></th>
424 426 <td>
425 427 <input type="text" name="term_meta[pagetax]" class="postform" value="'.$pagetax.'">
426 - <p class="description">'.esc_html__( 'Page id for this term','wpstream').'</p>
428 + <p class="description">'.esc_html__( 'Display the content for page id for this term','wpstream').'</p>
427 429 </td>
428 430
429 431 <tr valign="top">
430 432 <th scope="row"><label for="category_featured_image">'.esc_html__( 'Featured Image','wpstream').'</label></th>
431 433 <td>
432 - <input id="category_featured_image" type="text" class="postform" size="36" name="term_meta[category_featured_image]" value="'.$category_featured_image.'" />
434 + <input id="category_featured_image" type="text" class="postform wpestate_landing_upload" size="36" name="term_meta[category_featured_image]" value="'.$category_featured_image.'" />
433 435 <input id="category_featured_image_button" type="button" class="upload_button button category_featured_image_button" value="'.esc_html__( 'Upload Image','wpstream').'" />
434 - <input id="category_attach_id" type="hidden" size="36" name="term_meta[category_attach_id]" value="'.$category_attach_id.'" />
436 + <input id="category_attach_id" class="wpestate_landing_upload_id" type="hidden" size="36" name="term_meta[category_attach_id]" value="'.$category_attach_id.'" />
435 437 </td>
436 438 </tr>
437 439
438 440 <tr valign="top">
@@ -443,9 +445,9 @@
443 445 </tr>
444 446
445 447
446 448
447 - <input id="category_tax" type="hidden" size="36" name="term_meta[category_tax]" value="'.$tag->taxonomy.'" />
449 + <input id="category_tax" type="hidden" size="36" name="term_meta[category_tax]" value="'.$taxonomy.'" />
448 450
449 451
450 452 </tr>
451 453 </tbody>
@@ -485,11 +487,11 @@
485 487 </div>
486 488
487 489 <div class="form-field">
488 490 <label for="term_meta[pagetax]">'. esc_html__( 'Featured Image','wpstream').'</label>
489 - <input id="category_featured_image" type="text" size="36" name="term_meta[category_featured_image]" value="'.$category_featured_image.'" />
491 + <input id="category_featured_image" class="wpestate_landing_upload" type="text" size="36" name="term_meta[category_featured_image]" value="'.$category_featured_image.'" />
490 492 <input id="category_featured_image_button" type="button" class="upload_button button category_featured_image_button" value="'.esc_html__( 'Upload Image','wpstream').'" />
491 - <input id="category_attach_id" type="hidden" size="36" name="term_meta[category_attach_id]" value="'.$category_attach_id.'" />
493 + <input id="category_attach_id" type="hidden" class="wpestate_landing_upload_id" size="36" name="term_meta[category_attach_id]" value="'.$category_attach_id.'" />
492 494
493 495 </div>
494 496
495 497 <div class="form-field">
@@ -495,9 +497,9 @@
495 497 <div class="form-field">
496 498 <label for="term_meta[category_tagline]">'. esc_html__( 'Category Tagline','wpstream').'</label>
497 499 <input id="category_tagline" type="text" size="36" name="term_meta[category_tagline]" value="'.$category_tagline.'" />
498 500 </div>
499 - <input id="category_tax" type="hidden" size="36" name="term_meta[category_tax]" value="'.$tag->taxonomy.'" />
501 + <input id="category_tax" type="hidden" size="36" name="term_meta[category_tax]" value="'.$tag.'" />
500 502 ';
501 503 }
502 504
503 505 /**
@@ -572,9 +574,9 @@
572 574 ),
573 575 'menu_position' => 20,
574 576 'public' => true,
575 577 'publicly_queryable' => true,
576 - 'exclude_from_search' => true,
578 + 'exclude_from_search' => false,
577 579 'show_ui' => true,
578 580 'show_in_menu' => true,
579 581 'query_var' => true,
580 582 'show_in_admin_bar' => true,
@@ -581,8 +583,9 @@
581 583 'show_in_nav_menus' => true,
582 584 'supports' => array(
583 585 'title',
584 586 'editor',
587 + 'excerpt',
585 588 'thumbnail',
586 589 'comments',
587 590
588 591 ),
@@ -596,9 +599,9 @@
596 599 array(
597 600 'taxonomy' => 'wpstream_actors',
598 601 'plural' => esc_html__('Actors','wpstream'),
599 602 'single' => esc_html__('Actor','wpstream'),
600 - 'post_types' => array('wpstream_product','product','wpstream_product_vod'),
603 + 'post_types' => array('wpstream_product','product','wpstream_product_vod','wpstream_bundles'),
601 604 'hierarchical' => true,
602 605 'query_var' => true,
603 606 'rewrite' => array( 'slug' => 'actors' )
604 607 ),
@@ -606,9 +609,9 @@
606 609 array(
607 610 'taxonomy' => 'wpstream_category',
608 611 'plural' => esc_html__('Media Categories','wpstream'),
609 612 'single' => esc_html__('Media Category','wpstream'),
610 - 'post_types' => array('wpstream_product','product','wpstream_product_vod'),
613 + 'post_types' => array('wpstream_product','product','wpstream_product_vod','wpstream_bundles'),
611 614 'hierarchical' => true,
612 615 'query_var' => true,
613 616 'rewrite' => array( 'slug' => 'media_category' )
614 617 ),
@@ -616,9 +619,9 @@
616 619 array(
617 620 'taxonomy' => 'wpstream_movie_rating',
618 621 'plural' => esc_html__('Movie Ratings','wpstream'),
619 622 'single' => esc_html__('Movie Rating','wpstream'),
620 - 'post_types' => array('wpstream_product','product','wpstream_product_vod'),
623 + 'post_types' => array('wpstream_product','product','wpstream_product_vod','wpstream_bundles'),
621 624 'hierarchical' => true,
622 625 'query_var' => true,
623 626 'rewrite' => array( 'slug' => 'rating' )
624 627 ),
@@ -647,9 +650,9 @@
647 650 ),
648 651 'menu_position' => 20,
649 652 'public' => true,
650 653 'publicly_queryable' => true,
651 - 'exclude_from_search' => true,
654 + 'exclude_from_search' => false,
652 655 'show_ui' => true,
653 656 'show_in_menu' => true,
654 657 'query_var' => true,
655 658 'show_in_admin_bar' => true,
@@ -656,8 +659,9 @@
656 659 'show_in_nav_menus' => true,
657 660 'supports' => array(
658 661 'title',
659 662 'editor',
663 + 'excerpt',
660 664 'thumbnail',
661 665 'comments',
662 666
663 667 ),
@@ -667,10 +671,68 @@
667 671 ),
668 672
669 673 );
670 674
675 + if( function_exists('wpstream_custom_theme_customizer')){
676 + $post_types_fields[] = array(
677 +
678 + 'slug' => 'wpstream_bundles',
679 + 'singular' => __( 'Video Collection','wpstream'),
680 + 'plural' => __( 'Video Collections','wpstream'),
681 + 'menu_name' => __( 'Video Collections','wpstream'),
682 + 'description' => __( 'Video Collections','wpstream'),
683 +
684 + 'labels' => array(
685 + 'name' => esc_html__( 'Video Collections', 'wpstream' ),
686 + 'singular_name' => esc_html__( 'Video Collection', 'wpstream' ),
687 + 'add_new' => esc_html__( 'Add New Video Collection', 'wpstream' ),
688 + 'add_new_item' => esc_html__( 'Add Video Collection', 'wpstream' ),
689 + 'edit' => esc_html__( 'Edit', 'wpstream' ),
690 + 'edit_item' => esc_html__( 'Edit Video Collection', 'wpstream' ),
691 + 'new_item' => esc_html__( 'New Video Collection', 'wpstream' ),
692 + 'view' => esc_html__( 'View', 'wpstream' ),
693 + 'view_item' => esc_html__( 'View Video Collection', 'wpstream' ),
694 + 'search_items' => esc_html__( 'Search Video Collection By Name or ID', 'wpstream' ),
695 + 'not_found' => esc_html__( 'No Video Collection found', 'wpstream' ),
696 + 'not_found_in_trash' => esc_html__( 'No Video Collection found in Trash', 'wpstream' ),
697 + 'parent' => esc_html__( 'Parent Video Collection', 'wpstream' ),
698 + 'featured_image' => esc_html__( 'Featured Image', 'wpstream' ),
699 + 'set_featured_image' => esc_html__( 'Set Featured Image', 'wpstream' ),
700 + 'remove_featured_image' => esc_html__( 'Remove Featured Image', 'wpstream' ),
701 + 'use_featured_image' => esc_html__( 'Use Featured Image', 'wpstream' ),
702 + ),
703 +
704 + 'has_archive' => true,
705 + 'hierarchical' => false,
706 + 'menu_icon' => WPSTREAM_PLUGIN_DIR_URL.'img/wpstream-icon-menu_2.png',
707 + 'rewrite' => array( 'slug' => 'wpstream_bundles' ),
708 + 'menu_position' => 20,
709 + 'public' => true,
710 + 'publicly_queryable' => true,
711 + 'show_in_rest' => true,
712 + 'exclude_from_search' => false,
713 + 'show_ui' => true,
714 + 'show_in_menu' => true,
715 + 'query_var' => true,
716 + 'show_in_admin_bar' => true,
717 + 'show_in_nav_menus' => true,
718 + 'supports' => array(
719 + 'title',
720 + 'editor',
721 + 'excerpt',
722 + 'thumbnail',
723 + 'comments',
724 +
725 + ),
726 + 'custom_caps' => true,
727 + 'custom_caps_users' => array(
728 + 'administrator',
729 + ),
730 +
731 + );
732 + }
733 +
671 734
672 -
673 735 // loop torugh custom post type array and register
674 736 foreach ( $post_types_fields as $fields ) {
675 737 $this->register_single_post_type( $fields );
676 738 }
@@ -713,9 +775,21 @@
713 775 }
714 776
715 777
716 778
717 -
779 +
780 + /*
781 + *Remove the custom taxonomy column from the WooCommerce product list
782 + */
783 + function remove_wpstream_category_column($columns) {
784 + if (isset($columns['taxonomy-wpstream_category'])) {
785 + unset($columns['taxonomy-wpstream_category']);
786 + unset($columns['taxonomy-wpstream_actors']);
787 + unset($columns['taxonomy-wpstream_movie_rating']);
788 + }
789 + return $columns;
790 + }
791 +
718 792
719 793
720 794
721 795 }