Changeset 3296345
- Timestamp:
- 05/19/2025 10:00:12 AM (10 months ago)
- Location:
- wpstream
- Files:
-
- 2 added
- 16 edited
- 1 copied
-
tags/4.6.7.3 (copied) (copied from wpstream/trunk)
-
tags/4.6.7.3/admin/class-wpstream-admin.php (modified) (11 diffs)
-
tags/4.6.7.3/admin/css/wpstream-admin.css (modified) (1 diff)
-
tags/4.6.7.3/admin/js/wpstream_settings.js (added)
-
tags/4.6.7.3/includes/class-wpstream-live-api-connection.php (modified) (4 diffs)
-
tags/4.6.7.3/includes/class-wpstream.php (modified) (3 diffs)
-
tags/4.6.7.3/includes/class-wpstream_product.php (modified) (3 diffs)
-
tags/4.6.7.3/public/js/start_streaming.js (modified) (2 diffs)
-
tags/4.6.7.3/readme.txt (modified) (2 diffs)
-
tags/4.6.7.3/wpstream.php (modified) (2 diffs)
-
trunk/admin/class-wpstream-admin.php (modified) (11 diffs)
-
trunk/admin/css/wpstream-admin.css (modified) (1 diff)
-
trunk/admin/js/wpstream_settings.js (added)
-
trunk/includes/class-wpstream-live-api-connection.php (modified) (4 diffs)
-
trunk/includes/class-wpstream.php (modified) (3 diffs)
-
trunk/includes/class-wpstream_product.php (modified) (3 diffs)
-
trunk/public/js/start_streaming.js (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/wpstream.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wpstream/tags/4.6.7.3/admin/class-wpstream-admin.php
r3288783 r3296345 263 263 )); 264 264 265 wp_enqueue_script('wpstream-settings', plugin_dir_url( __DIR__ ) .'/admin/js/wpstream_settings.js?v='.time(),array(), WPSTREAM_PLUGIN_VERSION, true); 266 wp_localize_script('wpstream-settings', 'wpstream_settings_vars', array( 267 'error_message' => esc_html__( 'Failed to save settings. Please try again.', 'wpstream'), 268 )); 269 265 270 266 271 wp_enqueue_script('wpstream-on-boarding-js', plugin_dir_url( __DIR__ ) .'/admin/js/wpstream-onboarding2.js?v='.time(),array(), WPSTREAM_PLUGIN_VERSION, true); … … 1262 1267 update_option( sanitize_key('wpstream_stream_role'), '' ); 1263 1268 } 1264 1265 foreach($_POST as $variable=>$value){ 1269 1270 foreach($_POST as $variable=>$value){ 1266 1271 if ($variable!='submit'){ 1267 1272 if (!in_array($variable, $exclude_array) ){ … … 1296 1301 1297 1302 // reset permalinkgs 1298 global $wp_rewrite; 1299 1300 update_option( "rewrite_rules", FALSE ); 1303 global $wp_rewrite; 1304 1305 update_option( "rewrite_rules", FALSE ); 1301 1306 $wp_rewrite->flush_rules( true ); 1302 1307 … … 1512 1517 continue; 1513 1518 } 1514 1519 1520 if ( $option['type']=='user_streaming_global_channel_options' ) { 1521 print '<div class="default-channel-settings-info">'; 1522 print esc_html__( 'These settings will apply to newly created channels; existing channels will not change settings if you change them here', 'wpstream'); 1523 print '</div>'; 1524 1525 } 1515 1526 print '<div class="wpstream_option">'; 1516 1527 $options_value = get_option('wpstream_'.$option['name']) ; … … 1539 1550 1540 1551 print '<label for="'.$option['name'].'">'.$option['label'].'</label>'; 1541 print '<input id="'.$option['name'].'" type="'.$option['type'].'" size="36" name="'.$option['name'].'" value="'.esc_attr($options_value).'" />';1552 print '<input class="wpstream-text-input-setting" id="'.$option['name'].'" type="'.$option['type'].'" size="36" name="'.$option['name'].'" value="'.esc_attr($options_value).'" />'; 1542 1553 print '<div class="settings_details">'.$option['details'].'</div>'; 1543 1554 … … 1562 1573 <input type="hidden" class="wpstream_event_option_itemc" value="0" name="'.$option['name'].'" > 1563 1574 <input type="checkbox" class="wpstream_event_option_itemc" value="1" name="'.$option['name'].'" '; 1564 1565 if( intval($options_value) !==0 ){ 1566 print ' checked '; 1567 } 1568 1569 1570 1571 print '> <span class="wpstream_slider round"></span>'; 1572 print '</label>'; 1573 print '<div class="settings_details">'.$option['details'].'</div>'; 1575 if( intval($options_value) !==0 ){ 1576 print ' checked '; 1577 } 1578 print '> <span class="wpstream_slider round"></span>'; 1579 print '</label>'; 1580 print '<div class="settings_details">'.$option['details'].'</div>'; 1574 1581 } 1575 1582 print '</div>'; … … 1578 1585 1579 1586 1587 print '<div class="wpstream-save-settings">'; 1580 1588 print '<input type="submit" name="submit" class="wpstream_button wpstream_button_action" value="'.__('Save Changes','wpstream').'" />'; 1581 1582 print '<input name="wpstream-settings-nonce" type="hidden" value="'.wp_create_nonce('wpstream-settings-nonce').'" /> '; 1589 print '<div class="spinner"></div>'; 1590 print '</div>'; 1591 1592 print '<input id="wpstream-settings-nonce" name="wpstream-settings-nonce" type="hidden" value="'.wp_create_nonce('wpstream-settings-nonce').'" /> '; 1583 1593 print '</form>'; 1584 1594 print '</div>'; … … 1678 1688 $allowed_html = array(); 1679 1689 1680 foreach($_POST as $variable=>$value){ 1690 foreach($_POST as $variable=>$value){ 1681 1691 if ($variable!='submit'){ 1682 1692 if (!in_array($variable, $exclude_array) ){ 1683 update_option( sanitize_key('wpstream_'.$variable), wp_kses ($value,$allowed_html) ); 1684 } 1693 switch ( $variable ) { 1694 case 'api_username': 1695 update_option( sanitize_key('wpstream_api_username'), sanitize_text_field($value) ); 1696 break; 1697 case 'api_password': 1698 update_option( sanitize_key('wpstream_api_password'), $value ); 1699 break; 1700 } 1701 } 1685 1702 } 1686 1703 } … … 1944 1961 1945 1962 // show pending items 1946 if ( is_array( $video_list_raw['pending'] ) ) {1963 if ( key_exists( 'pending', $video_list_raw ) && is_array( $video_list_raw['pending'] ) ) { 1947 1964 foreach ( $video_list_raw['pending'] as $key => $video ) { 1948 1965 $video_size = intval($video['size']/1048576); … … 1994 2011 1995 2012 // no items to show 1996 if ( !is_array( $video_list_raw['items'] ) || !is_array( $video_list_raw['pending']) ) {2013 if ( !is_array( $video_list_raw['items'] ) || ( key_exists( 'pending', $video_list_raw ) && !is_array( $video_list_raw['pending'] ) ) ) { 1997 2014 $to_return.= '<div class="wpstream_video_wrapper">'.esc_html__('You don\'t have any videos.','wpstream').'</div>'; 1998 2015 } … … 3418 3435 if(current_user_can('administrator')){ 3419 3436 $username = sanitize_text_field($_POST['api_username']); 3420 $password = sanitize_text_field($_POST['api_password']);3437 $password = $_POST['api_password']; 3421 3438 update_option('wpstream_api_username',$username); 3422 3439 update_option('wpstream_api_password',$password); -
wpstream/tags/4.6.7.3/admin/css/wpstream-admin.css
r3278949 r3296345 470 470 .wpstream_button_action{ 471 471 padding: 12px 25px; 472 } 473 474 .default-channel-settings-info { 475 width: 40%; 476 padding-bottom: 20px; 477 font-size: 14px; 478 line-height: 1.4rem;; 479 } 480 481 .wpstream-save-settings { 482 display: flex; 483 align-items: center; 484 } 485 486 .wpstream-save-settings-error { 487 color: #f00; 472 488 } 473 489 -
wpstream/tags/4.6.7.3/includes/class-wpstream-live-api-connection.php
r3283102 r3296345 10 10 add_action( 'wp_ajax_wpstream_turn_of_channel', array($this,'wpstream_turn_of_channel') ); 11 11 add_action( 'wp_ajax_wpstream_update_local_event_settings',array($this,'wpstream_update_local_event_settings')); 12 12 add_action( 'wp_ajax_wpstream_update_default_channel_settings', array( $this, 'wpstream_update_default_channel_settings' ) ); 13 add_action( 'wp_ajax_wpstream_update_settings', array( $this, 'wpstream_update_settings' ) ); 14 13 15 add_action( 'wp_ajax_wpstream_check_dns_sync', array($this,'wpstream_check_dns_sync') ); 14 16 add_action( 'wp_ajax_wpstream_check_event_status', array($this,'wpstream_check_event_status') ); … … 414 416 415 417 } 416 417 418 419 public function wpstream_update_default_channel_settings() { 420 check_ajax_referer( 'wpstream-settings-nonce', 'security' ); 421 422 $options_array= $_POST['option']; 423 $sanitized_options = array(); 424 foreach( $options_array as $key => $value ) { 425 $sanitized_options[ sanitize_key( $key ) ] = sanitize_text_field( $value ); 426 } 427 428 if ( $sanitized_options['low_latency'] == 1 || $sanitized_options['adaptive_bitrate'] == 1 ) { 429 $sanitized_options['encrypt'] = 0; 430 } 431 432 if ( $sanitized_options['encrypt'] == 1 ) { 433 $sanitized_options['low_latency'] = 0; 434 $sanitized_options['adaptive_bitrate'] = 0; 435 } 436 437 $successful_update = update_option( 'wpstream_user_streaming_global_channel_options', $sanitized_options ); 438 439 if ( $successful_update ) { 440 wp_send_json( 441 array( 442 'success' => true, 443 ) 444 ); 445 } else { 446 wp_send_json_error( 447 array( 448 'success' => false, 449 ) 450 ); 451 } 452 453 wp_die(); 454 } 455 456 public function wpstream_update_settings() { 457 check_ajax_referer( 'wpstream-settings-nonce', 'security' ); 458 459 $option_name = sanitize_key( $_POST['option_name'] ); 460 $option_type = sanitize_key( $_POST['option_type'] ); 461 462 switch( $option_type ) { 463 case 'checkbox': 464 $option_value = filter_var( $_POST['option_value'], FILTER_VALIDATE_INT ); 465 break; 466 case 'text': 467 case 'select': 468 $option_value = sanitize_text_field( $_POST['option_value'] ); 469 break; 470 case 'multiple-select': 471 $option_value = array_map( 'sanitize_text_field', $_POST['option_value'] ); 472 break; 473 default: 474 $option_value = sanitize_text_field( $_POST['option_value'] ); 475 } 476 477 $successful_update = update_option( 'wpstream_' . $option_name, $option_value ); 478 479 if( $successful_update ) { 480 wp_send_json( 481 array( 482 'success' => true, 483 ) 484 ); 485 } else { 486 wp_send_json_error( 487 array( 488 'success' => false, 489 ) 490 ); 491 } 492 493 wp_die(); 494 } 418 495 419 496 /** … … 864 941 */ 865 942 protected function wpstream_club_get_token(){ 866 $username = esc_html ( get_option('wpstream_api_username',''));867 $password = esc_html ( get_option('wpstream_api_password',''));943 $username = get_option('wpstream_api_username',''); 944 $password = get_option('wpstream_api_password',''); 868 945 869 946 if ( $username=='' || $password==''){ … … 875 952 'grant_type' => 'password', 876 953 'username' => $username, 877 'password' => $password 954 'password' => $password 878 955 ); 879 956 -
wpstream/tags/4.6.7.3/includes/class-wpstream.php
r3288783 r3296345 264 264 // add and save category extra fields 265 265 $this->loader->add_action( 'category_edit_form_fields', $plugin_post_types, 'wpstream_category_callback_function', 10, 2); 266 $this->loader->add_action( 'category_add_form_fields', $plugin_post_types, 'wpstream_category_callback_add_function' , 10, 2 );266 $this->loader->add_action( 'category_add_form_fields', $plugin_post_types, 'wpstream_category_callback_add_function' ); 267 267 $this->loader->add_action( 'created_category', $plugin_post_types, 'wpstream_category_save_extra_fields_callback', 10, 2); 268 268 $this->loader->add_action( 'edited_category', $plugin_post_types, 'wpstream_category_save_extra_fields_callback', 10, 2); 269 269 270 270 $this->loader->add_action( 'product_cat_edit_form_fields', $plugin_post_types, 'wpstream_category_callback_function', 10, 2); 271 $this->loader->add_action( 'product_cat_add_form_fields', $plugin_post_types, 'wpstream_category_callback_add_function' , 10, 2 );271 $this->loader->add_action( 'product_cat_add_form_fields', $plugin_post_types, 'wpstream_category_callback_add_function' ); 272 272 $this->loader->add_action( 'created_product_cat', $plugin_post_types, 'wpstream_category_save_extra_fields_callback', 10, 2); 273 273 $this->loader->add_action( 'edited_product_cat', $plugin_post_types, 'wpstream_category_save_extra_fields_callback', 10, 2); … … 275 275 276 276 $this->loader->add_action( 'wpstream_category_edit_form_fields', $plugin_post_types, 'wpstream_category_callback_function', 10, 2); 277 $this->loader->add_action( 'wpstream_category_add_form_fields', $plugin_post_types, 'wpstream_category_callback_add_function' , 10, 2 );277 $this->loader->add_action( 'wpstream_category_add_form_fields', $plugin_post_types, 'wpstream_category_callback_add_function' ); 278 278 $this->loader->add_action( 'created_wpstream_category', $plugin_post_types, 'wpstream_category_save_extra_fields_callback', 10, 2); 279 279 $this->loader->add_action( 'edited_wpstream_category', $plugin_post_types, 'wpstream_category_save_extra_fields_callback', 10, 2); … … 281 281 282 282 $this->loader->add_action( 'wpstream_actors_edit_form_fields', $plugin_post_types, 'wpstream_category_callback_function', 10, 2); 283 $this->loader->add_action( 'wpstream_actors_add_form_fields', $plugin_post_types, 'wpstream_category_callback_add_function' , 10, 2 );283 $this->loader->add_action( 'wpstream_actors_add_form_fields', $plugin_post_types, 'wpstream_category_callback_add_function' ); 284 284 $this->loader->add_action( 'created_wpstream_actors', $plugin_post_types, 'wpstream_category_save_extra_fields_callback', 10, 2); 285 285 $this->loader->add_action( 'edited_wpstream_actors', $plugin_post_types, 'wpstream_category_save_extra_fields_callback', 10, 2); 286 286 287 287 $this->loader->add_action( 'wpstream_movie_rating_edit_form_fields', $plugin_post_types, 'wpstream_category_callback_function', 10, 2); 288 $this->loader->add_action( 'wpstream_movie_rating_add_form_fields', $plugin_post_types, 'wpstream_category_callback_add_function' , 10, 2 );288 $this->loader->add_action( 'wpstream_movie_rating_add_form_fields', $plugin_post_types, 'wpstream_category_callback_add_function' ); 289 289 $this->loader->add_action( 'created_wpstream_movie_rating', $plugin_post_types, 'wpstream_category_save_extra_fields_callback', 10, 2); 290 290 $this->loader->add_action( 'edited_wpstream_movie_rating', $plugin_post_types, 'wpstream_category_save_extra_fields_callback', 10, 2); -
wpstream/tags/4.6.7.3/includes/class-wpstream_product.php
r3149939 r3296345 403 403 404 404 405 public function wpstream_category_callback_function($tag ){405 public function wpstream_category_callback_function($tag, $taxonomy){ 406 406 if(is_object ($tag)){ 407 407 $t_id = $tag->term_id; … … 447 447 448 448 449 <input id="category_tax" type="hidden" size="36" name="term_meta[category_tax]" value="'.$ta g->taxonomy.'" />449 <input id="category_tax" type="hidden" size="36" name="term_meta[category_tax]" value="'.$taxonomy.'" /> 450 450 451 451 … … 499 499 <input id="category_tagline" type="text" size="36" name="term_meta[category_tagline]" value="'.$category_tagline.'" /> 500 500 </div> 501 <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.'" /> 502 502 '; 503 503 } -
wpstream/tags/4.6.7.3/public/js/start_streaming.js
r3278949 r3296345 747 747 wpstream_adjust_settings(jQuery(this)); 748 748 749 750 749 var holder = jQuery(this).parents('.wpstream_event_streaming_local'); 751 750 var show_id = jQuery(this).parents('.event_list_unit').find('.start_event').attr('data-show-id'); … … 782 781 } 783 782 784 785 783 /* 786 784 * -
wpstream/tags/4.6.7.3/readme.txt
r3288783 r3296345 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.1 7 Stable tag: 4.6.7. 27 Stable tag: 4.6.7.3 8 8 License: GPL 9 9 License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html … … 138 138 == Changelog == 139 139 140 = 4.6.7.3 = 141 * Fix - Broken WpStream login functionality 142 * Enhancement - Automatically save changes on the plugin settings 143 140 144 = 4.6.7.2 = 141 145 * Fix - Styling of the play button over the player -
wpstream/tags/4.6.7.3/wpstream.php
r3288783 r3296345 4 4 * Plugin URI: http://wpstream.net 5 5 * Description: WpStream is a platform that allows you to live stream, create Video-on-Demand, and offer Pay-Per-View videos. We provide an affordable and user-friendly way for businesses, non-profits, and public institutions to broadcast their content and monetize their work. 6 * Version: 4.6.7. 26 * Version: 4.6.7.3 7 7 * Author: wpstream 8 8 * Author URI: http://wpstream.net … … 15 15 die; 16 16 } 17 define('WPSTREAM_PLUGIN_VERSION', '4.6.7. 2');17 define('WPSTREAM_PLUGIN_VERSION', '4.6.7.3'); 18 18 define('WPSTREAM_CLUBLINK', 'wpstream.net'); 19 19 define('WPSTREAM_CLUBLINKSSL', 'https'); -
wpstream/trunk/admin/class-wpstream-admin.php
r3288783 r3296345 263 263 )); 264 264 265 wp_enqueue_script('wpstream-settings', plugin_dir_url( __DIR__ ) .'/admin/js/wpstream_settings.js?v='.time(),array(), WPSTREAM_PLUGIN_VERSION, true); 266 wp_localize_script('wpstream-settings', 'wpstream_settings_vars', array( 267 'error_message' => esc_html__( 'Failed to save settings. Please try again.', 'wpstream'), 268 )); 269 265 270 266 271 wp_enqueue_script('wpstream-on-boarding-js', plugin_dir_url( __DIR__ ) .'/admin/js/wpstream-onboarding2.js?v='.time(),array(), WPSTREAM_PLUGIN_VERSION, true); … … 1262 1267 update_option( sanitize_key('wpstream_stream_role'), '' ); 1263 1268 } 1264 1265 foreach($_POST as $variable=>$value){ 1269 1270 foreach($_POST as $variable=>$value){ 1266 1271 if ($variable!='submit'){ 1267 1272 if (!in_array($variable, $exclude_array) ){ … … 1296 1301 1297 1302 // reset permalinkgs 1298 global $wp_rewrite; 1299 1300 update_option( "rewrite_rules", FALSE ); 1303 global $wp_rewrite; 1304 1305 update_option( "rewrite_rules", FALSE ); 1301 1306 $wp_rewrite->flush_rules( true ); 1302 1307 … … 1512 1517 continue; 1513 1518 } 1514 1519 1520 if ( $option['type']=='user_streaming_global_channel_options' ) { 1521 print '<div class="default-channel-settings-info">'; 1522 print esc_html__( 'These settings will apply to newly created channels; existing channels will not change settings if you change them here', 'wpstream'); 1523 print '</div>'; 1524 1525 } 1515 1526 print '<div class="wpstream_option">'; 1516 1527 $options_value = get_option('wpstream_'.$option['name']) ; … … 1539 1550 1540 1551 print '<label for="'.$option['name'].'">'.$option['label'].'</label>'; 1541 print '<input id="'.$option['name'].'" type="'.$option['type'].'" size="36" name="'.$option['name'].'" value="'.esc_attr($options_value).'" />';1552 print '<input class="wpstream-text-input-setting" id="'.$option['name'].'" type="'.$option['type'].'" size="36" name="'.$option['name'].'" value="'.esc_attr($options_value).'" />'; 1542 1553 print '<div class="settings_details">'.$option['details'].'</div>'; 1543 1554 … … 1562 1573 <input type="hidden" class="wpstream_event_option_itemc" value="0" name="'.$option['name'].'" > 1563 1574 <input type="checkbox" class="wpstream_event_option_itemc" value="1" name="'.$option['name'].'" '; 1564 1565 if( intval($options_value) !==0 ){ 1566 print ' checked '; 1567 } 1568 1569 1570 1571 print '> <span class="wpstream_slider round"></span>'; 1572 print '</label>'; 1573 print '<div class="settings_details">'.$option['details'].'</div>'; 1575 if( intval($options_value) !==0 ){ 1576 print ' checked '; 1577 } 1578 print '> <span class="wpstream_slider round"></span>'; 1579 print '</label>'; 1580 print '<div class="settings_details">'.$option['details'].'</div>'; 1574 1581 } 1575 1582 print '</div>'; … … 1578 1585 1579 1586 1587 print '<div class="wpstream-save-settings">'; 1580 1588 print '<input type="submit" name="submit" class="wpstream_button wpstream_button_action" value="'.__('Save Changes','wpstream').'" />'; 1581 1582 print '<input name="wpstream-settings-nonce" type="hidden" value="'.wp_create_nonce('wpstream-settings-nonce').'" /> '; 1589 print '<div class="spinner"></div>'; 1590 print '</div>'; 1591 1592 print '<input id="wpstream-settings-nonce" name="wpstream-settings-nonce" type="hidden" value="'.wp_create_nonce('wpstream-settings-nonce').'" /> '; 1583 1593 print '</form>'; 1584 1594 print '</div>'; … … 1678 1688 $allowed_html = array(); 1679 1689 1680 foreach($_POST as $variable=>$value){ 1690 foreach($_POST as $variable=>$value){ 1681 1691 if ($variable!='submit'){ 1682 1692 if (!in_array($variable, $exclude_array) ){ 1683 update_option( sanitize_key('wpstream_'.$variable), wp_kses ($value,$allowed_html) ); 1684 } 1693 switch ( $variable ) { 1694 case 'api_username': 1695 update_option( sanitize_key('wpstream_api_username'), sanitize_text_field($value) ); 1696 break; 1697 case 'api_password': 1698 update_option( sanitize_key('wpstream_api_password'), $value ); 1699 break; 1700 } 1701 } 1685 1702 } 1686 1703 } … … 1944 1961 1945 1962 // show pending items 1946 if ( is_array( $video_list_raw['pending'] ) ) {1963 if ( key_exists( 'pending', $video_list_raw ) && is_array( $video_list_raw['pending'] ) ) { 1947 1964 foreach ( $video_list_raw['pending'] as $key => $video ) { 1948 1965 $video_size = intval($video['size']/1048576); … … 1994 2011 1995 2012 // no items to show 1996 if ( !is_array( $video_list_raw['items'] ) || !is_array( $video_list_raw['pending']) ) {2013 if ( !is_array( $video_list_raw['items'] ) || ( key_exists( 'pending', $video_list_raw ) && !is_array( $video_list_raw['pending'] ) ) ) { 1997 2014 $to_return.= '<div class="wpstream_video_wrapper">'.esc_html__('You don\'t have any videos.','wpstream').'</div>'; 1998 2015 } … … 3418 3435 if(current_user_can('administrator')){ 3419 3436 $username = sanitize_text_field($_POST['api_username']); 3420 $password = sanitize_text_field($_POST['api_password']);3437 $password = $_POST['api_password']; 3421 3438 update_option('wpstream_api_username',$username); 3422 3439 update_option('wpstream_api_password',$password); -
wpstream/trunk/admin/css/wpstream-admin.css
r3278949 r3296345 470 470 .wpstream_button_action{ 471 471 padding: 12px 25px; 472 } 473 474 .default-channel-settings-info { 475 width: 40%; 476 padding-bottom: 20px; 477 font-size: 14px; 478 line-height: 1.4rem;; 479 } 480 481 .wpstream-save-settings { 482 display: flex; 483 align-items: center; 484 } 485 486 .wpstream-save-settings-error { 487 color: #f00; 472 488 } 473 489 -
wpstream/trunk/includes/class-wpstream-live-api-connection.php
r3283102 r3296345 10 10 add_action( 'wp_ajax_wpstream_turn_of_channel', array($this,'wpstream_turn_of_channel') ); 11 11 add_action( 'wp_ajax_wpstream_update_local_event_settings',array($this,'wpstream_update_local_event_settings')); 12 12 add_action( 'wp_ajax_wpstream_update_default_channel_settings', array( $this, 'wpstream_update_default_channel_settings' ) ); 13 add_action( 'wp_ajax_wpstream_update_settings', array( $this, 'wpstream_update_settings' ) ); 14 13 15 add_action( 'wp_ajax_wpstream_check_dns_sync', array($this,'wpstream_check_dns_sync') ); 14 16 add_action( 'wp_ajax_wpstream_check_event_status', array($this,'wpstream_check_event_status') ); … … 414 416 415 417 } 416 417 418 419 public function wpstream_update_default_channel_settings() { 420 check_ajax_referer( 'wpstream-settings-nonce', 'security' ); 421 422 $options_array= $_POST['option']; 423 $sanitized_options = array(); 424 foreach( $options_array as $key => $value ) { 425 $sanitized_options[ sanitize_key( $key ) ] = sanitize_text_field( $value ); 426 } 427 428 if ( $sanitized_options['low_latency'] == 1 || $sanitized_options['adaptive_bitrate'] == 1 ) { 429 $sanitized_options['encrypt'] = 0; 430 } 431 432 if ( $sanitized_options['encrypt'] == 1 ) { 433 $sanitized_options['low_latency'] = 0; 434 $sanitized_options['adaptive_bitrate'] = 0; 435 } 436 437 $successful_update = update_option( 'wpstream_user_streaming_global_channel_options', $sanitized_options ); 438 439 if ( $successful_update ) { 440 wp_send_json( 441 array( 442 'success' => true, 443 ) 444 ); 445 } else { 446 wp_send_json_error( 447 array( 448 'success' => false, 449 ) 450 ); 451 } 452 453 wp_die(); 454 } 455 456 public function wpstream_update_settings() { 457 check_ajax_referer( 'wpstream-settings-nonce', 'security' ); 458 459 $option_name = sanitize_key( $_POST['option_name'] ); 460 $option_type = sanitize_key( $_POST['option_type'] ); 461 462 switch( $option_type ) { 463 case 'checkbox': 464 $option_value = filter_var( $_POST['option_value'], FILTER_VALIDATE_INT ); 465 break; 466 case 'text': 467 case 'select': 468 $option_value = sanitize_text_field( $_POST['option_value'] ); 469 break; 470 case 'multiple-select': 471 $option_value = array_map( 'sanitize_text_field', $_POST['option_value'] ); 472 break; 473 default: 474 $option_value = sanitize_text_field( $_POST['option_value'] ); 475 } 476 477 $successful_update = update_option( 'wpstream_' . $option_name, $option_value ); 478 479 if( $successful_update ) { 480 wp_send_json( 481 array( 482 'success' => true, 483 ) 484 ); 485 } else { 486 wp_send_json_error( 487 array( 488 'success' => false, 489 ) 490 ); 491 } 492 493 wp_die(); 494 } 418 495 419 496 /** … … 864 941 */ 865 942 protected function wpstream_club_get_token(){ 866 $username = esc_html ( get_option('wpstream_api_username',''));867 $password = esc_html ( get_option('wpstream_api_password',''));943 $username = get_option('wpstream_api_username',''); 944 $password = get_option('wpstream_api_password',''); 868 945 869 946 if ( $username=='' || $password==''){ … … 875 952 'grant_type' => 'password', 876 953 'username' => $username, 877 'password' => $password 954 'password' => $password 878 955 ); 879 956 -
wpstream/trunk/includes/class-wpstream.php
r3288783 r3296345 264 264 // add and save category extra fields 265 265 $this->loader->add_action( 'category_edit_form_fields', $plugin_post_types, 'wpstream_category_callback_function', 10, 2); 266 $this->loader->add_action( 'category_add_form_fields', $plugin_post_types, 'wpstream_category_callback_add_function' , 10, 2 );266 $this->loader->add_action( 'category_add_form_fields', $plugin_post_types, 'wpstream_category_callback_add_function' ); 267 267 $this->loader->add_action( 'created_category', $plugin_post_types, 'wpstream_category_save_extra_fields_callback', 10, 2); 268 268 $this->loader->add_action( 'edited_category', $plugin_post_types, 'wpstream_category_save_extra_fields_callback', 10, 2); 269 269 270 270 $this->loader->add_action( 'product_cat_edit_form_fields', $plugin_post_types, 'wpstream_category_callback_function', 10, 2); 271 $this->loader->add_action( 'product_cat_add_form_fields', $plugin_post_types, 'wpstream_category_callback_add_function' , 10, 2 );271 $this->loader->add_action( 'product_cat_add_form_fields', $plugin_post_types, 'wpstream_category_callback_add_function' ); 272 272 $this->loader->add_action( 'created_product_cat', $plugin_post_types, 'wpstream_category_save_extra_fields_callback', 10, 2); 273 273 $this->loader->add_action( 'edited_product_cat', $plugin_post_types, 'wpstream_category_save_extra_fields_callback', 10, 2); … … 275 275 276 276 $this->loader->add_action( 'wpstream_category_edit_form_fields', $plugin_post_types, 'wpstream_category_callback_function', 10, 2); 277 $this->loader->add_action( 'wpstream_category_add_form_fields', $plugin_post_types, 'wpstream_category_callback_add_function' , 10, 2 );277 $this->loader->add_action( 'wpstream_category_add_form_fields', $plugin_post_types, 'wpstream_category_callback_add_function' ); 278 278 $this->loader->add_action( 'created_wpstream_category', $plugin_post_types, 'wpstream_category_save_extra_fields_callback', 10, 2); 279 279 $this->loader->add_action( 'edited_wpstream_category', $plugin_post_types, 'wpstream_category_save_extra_fields_callback', 10, 2); … … 281 281 282 282 $this->loader->add_action( 'wpstream_actors_edit_form_fields', $plugin_post_types, 'wpstream_category_callback_function', 10, 2); 283 $this->loader->add_action( 'wpstream_actors_add_form_fields', $plugin_post_types, 'wpstream_category_callback_add_function' , 10, 2 );283 $this->loader->add_action( 'wpstream_actors_add_form_fields', $plugin_post_types, 'wpstream_category_callback_add_function' ); 284 284 $this->loader->add_action( 'created_wpstream_actors', $plugin_post_types, 'wpstream_category_save_extra_fields_callback', 10, 2); 285 285 $this->loader->add_action( 'edited_wpstream_actors', $plugin_post_types, 'wpstream_category_save_extra_fields_callback', 10, 2); 286 286 287 287 $this->loader->add_action( 'wpstream_movie_rating_edit_form_fields', $plugin_post_types, 'wpstream_category_callback_function', 10, 2); 288 $this->loader->add_action( 'wpstream_movie_rating_add_form_fields', $plugin_post_types, 'wpstream_category_callback_add_function' , 10, 2 );288 $this->loader->add_action( 'wpstream_movie_rating_add_form_fields', $plugin_post_types, 'wpstream_category_callback_add_function' ); 289 289 $this->loader->add_action( 'created_wpstream_movie_rating', $plugin_post_types, 'wpstream_category_save_extra_fields_callback', 10, 2); 290 290 $this->loader->add_action( 'edited_wpstream_movie_rating', $plugin_post_types, 'wpstream_category_save_extra_fields_callback', 10, 2); -
wpstream/trunk/includes/class-wpstream_product.php
r3149939 r3296345 403 403 404 404 405 public function wpstream_category_callback_function($tag ){405 public function wpstream_category_callback_function($tag, $taxonomy){ 406 406 if(is_object ($tag)){ 407 407 $t_id = $tag->term_id; … … 447 447 448 448 449 <input id="category_tax" type="hidden" size="36" name="term_meta[category_tax]" value="'.$ta g->taxonomy.'" />449 <input id="category_tax" type="hidden" size="36" name="term_meta[category_tax]" value="'.$taxonomy.'" /> 450 450 451 451 … … 499 499 <input id="category_tagline" type="text" size="36" name="term_meta[category_tagline]" value="'.$category_tagline.'" /> 500 500 </div> 501 <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.'" /> 502 502 '; 503 503 } -
wpstream/trunk/public/js/start_streaming.js
r3278949 r3296345 747 747 wpstream_adjust_settings(jQuery(this)); 748 748 749 750 749 var holder = jQuery(this).parents('.wpstream_event_streaming_local'); 751 750 var show_id = jQuery(this).parents('.event_list_unit').find('.start_event').attr('data-show-id'); … … 782 781 } 783 782 784 785 783 /* 786 784 * -
wpstream/trunk/readme.txt
r3288783 r3296345 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.1 7 Stable tag: 4.6.7. 27 Stable tag: 4.6.7.3 8 8 License: GPL 9 9 License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html … … 138 138 == Changelog == 139 139 140 = 4.6.7.3 = 141 * Fix - Broken WpStream login functionality 142 * Enhancement - Automatically save changes on the plugin settings 143 140 144 = 4.6.7.2 = 141 145 * Fix - Styling of the play button over the player -
wpstream/trunk/wpstream.php
r3288783 r3296345 4 4 * Plugin URI: http://wpstream.net 5 5 * Description: WpStream is a platform that allows you to live stream, create Video-on-Demand, and offer Pay-Per-View videos. We provide an affordable and user-friendly way for businesses, non-profits, and public institutions to broadcast their content and monetize their work. 6 * Version: 4.6.7. 26 * Version: 4.6.7.3 7 7 * Author: wpstream 8 8 * Author URI: http://wpstream.net … … 15 15 die; 16 16 } 17 define('WPSTREAM_PLUGIN_VERSION', '4.6.7. 2');17 define('WPSTREAM_PLUGIN_VERSION', '4.6.7.3'); 18 18 define('WPSTREAM_CLUBLINK', 'wpstream.net'); 19 19 define('WPSTREAM_CLUBLINKSSL', 'https');
Note: See TracChangeset
for help on using the changeset viewer.