| 1 |
<?php |
| 2 |
/* |
| 3 |
* License: GPLv3 |
| 4 |
* License URI: https://www.gnu.org/licenses/gpl.txt |
| 5 |
* Copyright 2012-2026 Jean-Sebastien Morisset (https://wpsso.com/) |
| 6 |
*/ |
| 7 |
|
| 8 |
if ( ! defined( 'ABSPATH' ) ) { |
| 9 |
|
| 10 |
die( 'These aren\'t the droids you\'re looking for.' ); |
| 11 |
} |
| 12 |
|
| 13 |
if ( ! class_exists( 'WpssoStdAdminEdit' ) ) { |
| 14 |
|
| 15 |
class WpssoStdAdminEdit { |
| 16 |
|
| 17 |
private $p; // Wpsso class object. |
| 18 |
|
| 19 |
public function __construct( &$plugin ) { |
| 20 |
|
| 21 |
$this->p =& $plugin; |
| 22 |
|
| 23 |
if ( $this->p->debug->enabled ) { |
| 24 |
|
| 25 |
$this->p->debug->mark(); |
| 26 |
} |
| 27 |
|
| 28 |
$this->p->util->add_plugin_filters( $this, array( |
| 29 |
'mb_sso_edit_media_prio_video_rows' => 4, |
| 30 |
) ); |
| 31 |
} |
| 32 |
|
| 33 |
public function filter_mb_sso_edit_media_prio_video_rows( $table_rows, $form, $head_info, $mod ) { |
| 34 |
|
| 35 |
$form_rows = array( |
| 36 |
'subsection_priority_video' => array( |
| 37 |
'td_class' => 'subsection', |
| 38 |
'header' => 'h5', |
| 39 |
'label' => _x( 'Priority Video Information', 'metabox title', 'wpsso' ) |
| 40 |
), |
| 41 |
'pro_feature_msg_video_api' => array( |
| 42 |
'table_row' => '<td colspan="2">' . $this->p->msgs->pro_feature_video_api() . '</td>', |
| 43 |
), |
| 44 |
'og_vid_embed' => array( |
| 45 |
'th_class' => 'medium', |
| 46 |
'td_class' => 'blank', |
| 47 |
'label' => _x( 'Video Embed HTML', 'option label', 'wpsso' ), |
| 48 |
'tooltip' => 'meta-og_vid_embed', |
| 49 |
'content' => $form->get_no_textarea_value( $value = '' ), |
| 50 |
), |
| 51 |
'og_vid_url' => array( |
| 52 |
'th_class' => 'medium', |
| 53 |
'td_class' => 'blank', |
| 54 |
'label' => _x( 'or a Video URL', 'option label', 'wpsso' ), |
| 55 |
'tooltip' => 'meta-og_vid_url', |
| 56 |
'content' => $form->get_no_input_value( $value = '', $css_class = 'wide' ), |
| 57 |
), |
| 58 |
'subsection_priority_video_info' => array( |
| 59 |
'td_class' => 'subsection', |
| 60 |
'header' => 'h5', |
| 61 |
'label' => _x( 'Video Information from Video API', 'metabox title', 'wpsso' ) |
| 62 |
), |
| 63 |
'og_vid_title' => array( |
| 64 |
'th_class' => 'medium', |
| 65 |
'td_class' => 'blank', |
| 66 |
'label' => _x( 'Video Name', 'option label', 'wpsso' ), |
| 67 |
'tooltip' => 'meta-og_vid_title', |
| 68 |
'content' => $form->get_no_input_value( $value = '', $css_class = 'wide' ), |
| 69 |
), |
| 70 |
'og_vid_desc' => array( |
| 71 |
'th_class' => 'medium', |
| 72 |
'td_class' => 'blank', |
| 73 |
'label' => _x( 'Video Description', 'option label', 'wpsso' ), |
| 74 |
'tooltip' => 'meta-og_vid_desc', |
| 75 |
'content' => $form->get_no_textarea_value( '' ), |
| 76 |
), |
| 77 |
'og_vid_stream_url' => array( |
| 78 |
'th_class' => 'medium', |
| 79 |
'td_class' => 'blank', |
| 80 |
'label' => _x( 'Video Stream URL', 'option label', 'wpsso' ), |
| 81 |
'tooltip' => 'meta-og_vid_stream_url', |
| 82 |
'content' => $form->get_no_input_value( $value = '', $css_class = 'wide' ), |
| 83 |
), |
| 84 |
'og_vid_dimensions' => array( |
| 85 |
'th_class' => 'medium', |
| 86 |
'td_class' => 'blank', |
| 87 |
'label' => _x( 'Video Dimensions', 'option label', 'wpsso' ), |
| 88 |
'tooltip' => 'meta-og_vid_dimensions', |
| 89 |
'content' => $form->get_no_input_video_dimensions( 'og_vid' ), |
| 90 |
), |
| 91 |
'og_vid_upload_date' => array( |
| 92 |
'th_class' => 'medium', |
| 93 |
'td_class' => 'blank', |
| 94 |
'label' => _x( 'Video Upload Date', 'option label', 'wpsso' ), |
| 95 |
'tooltip' => 'meta-og_vid_upload_date', |
| 96 |
'content' => $form->get_no_date_time_timezone( 'og_vid_upload' ), |
| 97 |
), |
| 98 |
); |
| 99 |
|
| 100 |
return $form->get_md_form_rows( $table_rows, $form_rows, $head_info, $mod ); |
| 101 |
} |
| 102 |
} |
| 103 |
} |
| 104 |
|