'After click on ad, link should be open in...', // 'id' => 'adfoxly-ad-options-target', // 'type' => 'radio', // 'group' => 'image', // 'class' => 'form-control', // 'default' => 1, // 'options' => array( // 1 => 'new tab', // 2 => 'same tab' // ) // ), // array( // 'label' => 'No follow', // 'id' => 'adfoxly-ad-options-nofollow', // 'type' => 'radio', // 'group' => 'image', // 'class' => 'form-control', // 'default' => 1, // 'options' => array( // 1 => 'add nofollow', // 2 => 'do NOT add nofollow' // ) // ), // array( // 'label' => 'Max ad views', // 'id' => 'adfoxly-ad-options-maxviews', // 'type' => 'number', // 'help-block' => 'If "0", ad doesnt have set maximal views, after which will be hided. Ad will be always visible until you manually remove it, or disable', // 'class' => 'form-control' // ), // array( // 'label' => 'Max ad clicks', // 'id' => 'adfoxly-ad-options-maxclicks', // 'type' => 'number', // 'help-block' => 'If "0", ad doesnt have set maximal clicks, after which will be hided. Ad will be always visible until you manually remove it, or disable', // 'class' => 'form-control' // ), // array( // 'label' => 'Campaign start', // 'id' => 'adfoxly-ad-campaign-start', // 'type' => 'date', // 'class' => 'form-control' // ), // array( // 'label' => 'Campaign ends', // 'id' => 'adfoxly-ad-campaign-end', // 'type' => 'date', // 'class' => 'form-control' // ) ); function __construct() { $this->meta_fields = array( array( 'label' => 'Name', 'class' => 'form-control', 'id' => 'adfoxly-group-name', 'default' => '', 'type' => 'text', ), array( 'label' => 'Ad zone rotate', 'class' => 'form-control', 'id' => 'adfoxly-group-is-rotate', 'default' => 'no', 'type' => 'radio', 'wrapper_id' => 'adfoxly-group-is-rotate-wrapper', 'options' => array( 'no' => 'No', 'yes' => 'Yes' ), ), array( 'label' => 'How rotate', 'class' => 'form-control', 'id' => 'adfoxly-group-how-rotate', 'default' => 'refresh', 'type' => 'radio', 'wrapper_id' => 'adfoxly-group-how-rotate-wrapper', 'options' => array( 'refresh' => 'Refresh', 'time' => 'Time' ), ), array( 'label' => 'Rotate time', 'class' => 'form-control', 'id' => 'adfoxly-group-rotate-time', 'wrapper_id' => 'adfoxly-group-rotate-time-wrapper', 'default' => '60', 'type' => 'number', ), array( 'label' => 'Included Ads', 'class' => 'form-control', 'id' => 'adfoxly-group-ads-list', 'default' => '', 'type' => 'checkbox', ), ); if ( isset( $_GET['edit'] ) ) { if ( $_GET[ 'edit' ] !== 'new' ) { $group = new GroupController(); $g_id = $_GET[ 'edit' ]; if ( isset( $group->getGroup( $g_id )[ 'details' ]->post_title ) && ! empty( $group->getGroup( $g_id )[ 'details' ]->post_title ) ) { $this->meta_fields[ 0 ][ 'value' ] = $group->getGroup( $g_id )[ 'details' ]->post_title; } $g_is_rotate = esc_html( get_post_meta( $g_id, 'adfoxly-group-is-rotate', true ) ); $g_how_rotate = esc_html( get_post_meta( $g_id, 'adfoxly-group-how-rotate', true ) ); $g_time_rotate = esc_html( get_post_meta( $g_id, 'adfoxly-group-rotate-time', true ) ); if ( isset( $g_is_rotate ) && ! empty( $g_is_rotate ) ) { $this->meta_fields[ 1 ][ 'value' ] = $g_is_rotate; } if ( isset( $g_how_rotate ) && ! empty( $g_how_rotate ) ) { $this->meta_fields[ 2 ][ 'value' ] = $g_how_rotate; } if ( isset( $g_time_rotate ) && ! empty( $g_time_rotate ) ) { $this->meta_fields[ 3 ][ 'value' ] = $g_time_rotate; } } } } }