clicktotalk_form = $clicktotalk_form;
}
public function add_panel( $id, $title, $callback ) {
if ( wp3cxc2c_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->clicktotalk_form );
}
echo '
';
}
}
public function notice( $id, $panel ) {
echo '';
}
}
function wp3cxc2c_editor_panel_config( $post ) {
wp3cxc2c_editor_box_config( $post );
}
function wp3cxc2c_editor_box_config( $post, $args = '' ) {
$args = wp_parse_args( $args, array(
'id' => 'wp3cxc2c-config',
'name' => 'config',
'title' => __( 'Configuration', '3cx-clicktotalk' ),
'use' => null,
) );
$id = esc_attr( $args['id'] );
$config = wp_parse_args( $post->prop( $args['name'] ), array(
'active' => false,
'pbxurl' => '',
'aspect' => 'both',
'enablevideo' => false,
'minimized' => false,
'requireidentity' => 'none',
'chatboxtitle' => 'Let\'s chat',
'phoneboxtitle' => 'Call Us',
'welcomemessage' => 'Hello, how can we help?',
'welcomemessagesender' => 'Support'
) );
?>