webinar_form = $webinar_form; } public function add_panel( $id, $title, $callback ) { if ( wp3cxw_is_name( $id ) ) { $this->panels[$id] = array( 'title' => $title, 'callback' => $callback, ); } } public function display() { if ( empty( $this->panels ) ) { return; } echo ''; foreach ( $this->panels as $id => $panel ) { echo sprintf( '
', esc_attr( $id ) ); if ( is_callable( $panel['callback'] ) ) { $this->notice( $id, $panel ); call_user_func( $panel['callback'], $this->webinar_form ); } echo '
'; } } public function notice( $id, $panel ) { echo '
'; } } function wp3cxw_editor_panel_config( $post ) { wp3cxw_editor_box_config( $post ); } function wp3cxw_editor_box_config( $post, $args = '' ) { $args = wp_parse_args( $args, array( 'id' => 'wp3cxw-config', 'name' => 'config', 'title' => __( 'Configuration', '3cx-webinar' ), 'use' => null, ) ); $id = esc_attr( $args['id'] ); $config = wp_parse_args( $post->prop( $args['name'] ), array( 'active' => false, 'apitoken' => '', 'portalfqdn' => '', 'extension' => '', 'country' => '', 'maxparticipants' => 0 ) ); ?>