Plugin Directory

Changeset 2356316


Ignore:
Timestamp:
08/10/2020 04:15:40 PM (6 years ago)
Author:
wprequal
Message:

Commit v7.7.9

Location:
wprequal/trunk
Files:
2 added
161 edited

Legend:

Unmodified
Added
Removed
  • wprequal/trunk/app/abstracts/class.Api.php

    r2315196 r2356316  
    77
    88namespace WPrequal\App;
     9
     10if ( ! defined( 'ABSPATH' ) ) {
     11    die( __( 'Access denied!!' ) );
     12}
    913
    1014trait Api {
  • wprequal/trunk/app/abstracts/class.Mail.php

    r2324825 r2356316  
    88 */
    99namespace WPrequal\App;
     10
     11if ( ! defined( 'ABSPATH' ) ) {
     12    die( __( 'Access denied!!' ) );
     13}
    1014
    1115abstract class Mail {
  • wprequal/trunk/app/abstracts/class.PostType.php

    r2315196 r2356316  
    1111
    1212namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( __( 'Access denied!!' ) );
     16}
    1317
    1418abstract class PostType {
     
    213217        $can_delete       = current_user_can( $post_type_object->cap->delete_post );
    214218
    215         if ( $view = apply_filters( 'wprequal_view', 'admin/submit-metabox' ) ) {
    216             include $view;
    217         }
     219        view( 'admin', 'submit-metabox', [
     220            'post_id'     => $post->ID,
     221            'post_status' => $post->post_status,
     222            'can_publish' => $can_publish,
     223            'can_delete'  => $can_delete,
     224            'label_name'  => $this->label_name
     225        ]);
    218226
    219227    }
  • wprequal/trunk/app/classes/class.Calc.php

    r2315196 r2356316  
    77
    88namespace WPrequal\App;
     9
     10if ( ! defined( 'ABSPATH' ) ) {
     11    die( __( 'Access denied!!' ) );
     12}
    913
    1014class Calc {
     
    120124     * Find and include the view file.
    121125     *
    122      * @param        $file
     126     * @param        $view
    123127     * @param bool   $key
    124128     * @param string $size
    125129     */
    126130
    127     public function view( $file, $key = FALSE, $size = '', $shade = '' ) {
    128 
    129         if ( $key ) {
    130             $option = get_option( $key );
    131         }
    132 
    133         if ( $view = apply_filters( 'wprequal_view', "calc/$file" ) ) {
    134             include $view;
    135         }
     131    public static function view( $view, $key = FALSE, $size = '', $shade = '' ) {
     132
     133        view( 'calc', $view, [
     134            'option' => $key ? get_option( $key ) : [],
     135            'size'   => $size,
     136            'shade'  => $shade
     137        ]);
    136138
    137139    }
     
    149151        wp_enqueue_script( 'wprequal_js' );
    150152
    151         $this->view( $template, FALSE, $size, $shade );
     153        self::view( $template, FALSE, $size, $shade );
    152154
    153155    }
     
    165167        add_action( 'wp_footer', array( $this, 'calc_popup' ) );
    166168
    167         $this->view( 'button' );
     169        self::view( 'button' );
    168170
    169171    }
     
    283285        wp_enqueue_script( 'wprequal_js' );
    284286
    285         $this->view( 'amortize' );
     287        self::view( 'amortize' );
    286288
    287289    }
     
    293295     */
    294296
    295     public function currency( $content = '' ) {
     297    public static function currency( $content = '' ) {
    296298
    297299        if ( $currency = get_option( 'wprequal_currency' ) ) {
    298300
    299             $symbol   = $this->symbol( $currency );
     301            $symbol   = self::symbol( $currency );
    300302            $position = get_option( 'wprequal_currency_position', 'before' );
    301303            $content  = ( 'after' === $position ) ? "{$content}{$symbol}" : "{$symbol}{$content}";
     
    315317     */
    316318
    317     public function symbol( $currency ) {
     319    public static function symbol( $currency ) {
    318320
    319321        $symbols = Core::currency_symbols();
     
    331333     */
    332334
    333     public function ranges( $key ) {
     335    public static function ranges( $key ) {
    334336
    335337        $min   = get_option( "wprequal_{$key}_min", 1 );
  • wprequal/trunk/app/classes/class.ContactForm.php

    r2325232 r2356316  
    77 * @package WPrequal
    88 */
     9
    910namespace WPrequal\App;
     11
     12if ( ! defined( 'ABSPATH' ) ) {
     13    die( __( 'Access denied!!' ) );
     14}
    1015
    1116class ContactForm extends PostType {
     
    122127
    123128    /**
    124      * View.
    125      *
    126      * @param      $path
    127      * @param      $view
    128      * @param bool $return
    129      *
    130      * @return string
    131      */
    132 
    133     public function view( $path, $view, $return = FALSE, $input = array() ) {
    134 
    135         if ( $return ) {
    136             ob_start();
     129     * Get the input for the form.
     130     *
     131     * @param $contact_form_id
     132     *
     133     * @return array|mixed
     134     */
     135
     136    public function get_inputs( $contact_form_id ) {
     137
     138        if ( is_int( $contact_form_id ) && 0 < $contact_form_id ) {
     139
     140            if ( $inputs = get_post_meta( $contact_form_id, 'inputs', TRUE ) ) {
     141
     142                if ( ! empty( $inputs ) && is_array( $inputs ) ) {
     143
     144                    $defaults = [
     145                        'label'       => '',
     146                        'class'       => '',
     147                        'key'         => '',
     148                        'placeholder' => '',
     149                        'required'    => '',
     150                        'value'       => '',
     151                        'type_label'  => '',
     152                        'email_mask'  => '',
     153                        'labels'      => []
     154                    ];
     155
     156                    foreach ( $inputs as $input => $values ) {
     157
     158                        foreach ( $defaults as $key => $default_value ) {
     159
     160                            // Set the required value to the required class.
     161                            if ( 'required' === $key ) {
     162                                $inputs[ $input ][ $key ] = empty( $inputs[ $input ][ $key ] ) ? $default_value : 'wpq-required';
     163                            }
     164                            else {
     165                                $inputs[ $input ][ $key ] = empty( $inputs[ $input ][ $key ] ) ? $default_value : $inputs[ $input ][ $key ];
     166                            }
     167
     168                        }
     169
     170                    }
     171
     172                    return $inputs;
     173
     174                }
     175
     176            }
     177
    137178        }
    138179
    139         if ( $view = apply_filters( 'wprequal_view', "$path/$view" ) ) {
    140             include $view;
    141         }
    142 
    143         if ( $return ) {
    144             return ob_get_clean();
    145         }
    146 
    147     }
    148 
    149     /**
    150      * Get the input for the form.
    151      *
    152      * @param $post_id
    153      *
    154      * @return array|mixed
    155      */
    156 
    157     public function get_inputs( $post_id ) {
    158 
    159         $meta = FALSE;
    160 
    161         if ( is_int( $post_id ) && 0 < $post_id ) {
    162             $meta = get_post_meta( $post_id, 'inputs', TRUE );
    163         }
    164 
    165         return ( ! empty( $meta ) ) ? $meta : array(
     180        return array(
    166181            0 => array(
    167182                'type'       => 'name',
     
    199214     * Get the form details.
    200215     *
    201      * @param $post_id
     216     * @param $contact_form_id
    202217     *
    203218     * @return array
    204219     */
    205220
    206     public static function get_details( $post_id ) {
     221    public static function get_details( $contact_form_id ) {
    207222
    208223        $details = [
     
    215230        ];
    216231
    217         $post_id = intval( $post_id );
    218 
    219         if ( is_int( $post_id ) && 0 < $post_id ) {
    220 
    221             if ( $saved = get_post_meta( $post_id, 'details', TRUE ) ) {
     232        $contact_form_id = intval( $contact_form_id );
     233
     234        if ( is_int( $contact_form_id ) && 0 < $contact_form_id ) {
     235
     236            if ( $saved = get_post_meta( $contact_form_id, 'details', TRUE ) ) {
    222237
    223238                foreach ( $saved as $key => $value ) {
     
    245260    public function form( $args ) {
    246261
    247         $inputs  = $this->get_inputs( $args['contact_form_id'] );
    248         $details = self::get_details( $args['contact_form_id'] );
    249262        $view    = ( $args['type'] === 'contact' ) ?  'contact-form' : 'contact-inputs';
    250263
    251         if ( $view = apply_filters( 'wprequal_view', "contact/form/{$view}" ) ) {
    252             include $view;
    253         }
     264        view( 'contact/form', $view, [
     265            'inputs'          => $this->get_inputs( $args['contact_form_id'] ),
     266            'details'         => self::get_details( $args['contact_form_id'] ),
     267            'type'            => $args['type'],
     268            'contact_form_id' => $args['contact_form_id']
     269        ] );
    254270
    255271    }
  • wprequal/trunk/app/classes/class.ContactFormAdmin.php

    r2321931 r2356316  
    77 * @package WPrequal
    88 */
     9
    910namespace WPrequal\App;
    1011
     12if ( ! defined( 'ABSPATH' ) ) {
     13    die( __( 'Access denied!!' ) );
     14}
     15
    1116class ContactFormAdmin extends ContactForm {
    1217
    1318    /**
    14      * @var string
    15      */
    16 
    17     public $view_path = 'contact/admin';
     19     * Path to the views admin.
     20     */
     21
     22    const view_path = 'contact/admin';
    1823
    1924    /**
     
    157162
    158163    /**
     164     * View.
     165     *
     166     * @param      $view
     167     * @param bool $return
     168     *
     169     * @return string
     170     */
     171
     172    public static function view( $view, $input = [] ) {
     173
     174        view( self::view_path, $view, [
     175            'input' => $input
     176        ]);
     177
     178    }
     179
     180    /**
    159181     * Get the view for an input.
    160182     *
     
    165187   
    166188    public function get_view( $view ) {
    167        
    168         $inputs = $this->default_values();
    169        
    170         return $this->view( $this->view_path, $view, TRUE, $inputs );
     189
     190        ob_start();
     191
     192        $this->view( $view, $this->default_values() );
     193
     194        return ob_get_clean();
    171195       
    172196    }
     
    273297    public function meta_box( $post, $view ) {
    274298
    275         $view_path = $this->view_path;
    276299        $allow     = [ 'shortcode', 'contact-fields', 'details', 'inputs' ];
    277300
    278301        if ( ! Core::status( 1 ) && ! in_array( $view['id'], $allow ) ) {
    279             $view['id'] = 'go-premium';
    280             $view_path = 'buttons';
    281         }
    282 
    283         $this->view( $view_path, $view['id'] );
     302            view( 'buttons', 'go-premium' );
     303            return;
     304        }
     305
     306        switch ( $view['id'] ) {
     307
     308            case 'contact-fields':
     309            case 'lead-fields':
     310                $args = [
     311                    'inputs'         => $this->input_types(),
     312                    'contact_fields' => $this->contact_fields()
     313                ];
     314                break;
     315
     316            case 'inputs':
     317                $args = [
     318                    'inputs' => $this->get_inputs( get_the_ID() )
     319                ];
     320                break;
     321
     322            case 'details':
     323                $args = ContactForm::get_details( get_the_ID() );
     324                break;
     325
     326            default:
     327                $args = [];
     328        }
     329
     330        view( self::view_path, $view['id'], $args );
    284331
    285332    }
  • wprequal/trunk/app/classes/class.Core.php

    r2321317 r2356316  
    88namespace WPrequal\App;
    99
     10if ( ! defined( 'ABSPATH' ) ) {
     11    die( __( 'Access denied!!' ) );
     12}
     13
    1014class Core {
    1115
     
    5357        add_action( 'update_option_wprequal_allow_logging', array( $this, 'delete_error_log' ), 10, 2 );
    5458
    55         add_filter( 'wprequal_view', array( $this, 'view' ) );
    5659        add_filter( 'body_class', array( $this, 'body_class' ) );
    5760
     
    119122
    120123        return $status >= $min;
    121 
    122     }
    123 
    124     /**
    125      * HTML Views.
    126      *
    127      * @param $name
    128      *
    129      * @return bool|string
    130      */
    131 
    132     public function view( $name ) {
    133 
    134         $view = WPREQUAL_VIEWS . "{$name}.php";
    135 
    136         if ( file_exists( $view ) ) {
    137             return $view;
    138         }
    139 
    140         return FALSE;
    141124
    142125    }
  • wprequal/trunk/app/classes/class.Email.php

    r2350549 r2356316  
    77
    88namespace WPrequal\App;
     9
     10if ( ! defined( 'ABSPATH' ) ) {
     11    die( __( 'Access denied!!' ) );
     12}
    913 
    1014class Email extends Mail {
     
    8791        add_filter( 'wp_mail', [ $this, 'email_headers' ] );
    8892
    89         $contact    = get_post_meta( $this->post_id, 'contact', TRUE );
    90         $fields     = get_post_meta( $this->post_id, 'fields', TRUE );
    91         $labels     = get_post_meta( $this->post_id, 'field_labels', TRUE );
    92         $source_url = get_post_meta( $this->post_id, 'source_url', TRUE );
    93         $logo       = WPREQUAL_ASSETS .  'img/wprequal-logo.png';
    94 
    95         extract( $contact );
    96 
    97         $this->email = $email;
     93        $contact     = get_post_meta( $this->post_id, 'contact', TRUE );
     94        $this->email = $contact['email'];
    9895
    9996        ob_start();
    10097
    101         if ( $view = apply_filters( 'wprequal_view', 'email/notification' ) ) {
    102             include $view;
    103         }
     98        view( 'email', 'notification', [
     99            'contact'    => $contact,
     100            'fields'     => get_post_meta( $this->post_id, 'fields', TRUE ),
     101            'labels'     => get_post_meta( $this->post_id, 'field_labels', TRUE ),
     102            'source_url' => get_post_meta( $this->post_id, 'source_url', TRUE ),
     103            'logo'       => WPREQUAL_ASSETS .  'img/wprequal-logo.png'
     104        ]);
    104105
    105106        $msg      = ob_get_clean();
     
    110111        }
    111112
    112         remove_filter ( 'wp_mail', array( $this, 'email_headers' ) );
     113        remove_filter ( 'wp_mail', [ $this, 'email_headers' ] );
    113114
    114115    }
  • wprequal/trunk/app/classes/class.Entry.php

    r2321317 r2356316  
    88namespace WPrequal\App;
    99use WP_REST_Server;
     10
     11if ( ! defined( 'ABSPATH' ) ) {
     12    die( __( 'Access denied!!' ) );
     13}
    1014
    1115class Entry {
  • wprequal/trunk/app/classes/class.Lead.php

    r2350549 r2356316  
    77
    88namespace WPrequal\App;
     9
     10if ( ! defined( 'ABSPATH' ) ) {
     11    die( __( 'Access denied!!' ) );
     12}
    913
    1014class Lead extends PostType {
     
    500504    public function metabox( $post, $meta_box ) {
    501505
    502         $this->view( 'lead', $meta_box['id'] );
    503 
    504     }
    505 
    506     /**
    507      * Get the view template.
    508      *
    509      * @param $path
    510      * @param $key
    511      */
    512 
    513     public function view( $path, $key ) {
    514 
    515         if ( $view = apply_filters( 'wprequal_view', "$path/$key" ) ) {
    516             include $view;
    517         }
     506        switch ( $meta_box['id'] ) {
     507
     508            case 'contact' :
     509                $args = [
     510                    'values' => get_post_meta( get_the_ID(), $this->contact_key, TRUE ) ?: array()
     511                ];
     512                break;
     513
     514            case 'fields' :
     515                $args = [
     516                    'values' => get_post_meta( get_the_ID(), $this->fields_key, TRUE ) ?: array(),
     517                    'labels' => get_post_meta( get_the_ID(), $this->labels_key, TRUE ) ?: array()
     518                ];
     519                break;
     520
     521            default :
     522                $args = [];
     523
     524        }
     525
     526        view( 'lead', $meta_box['id'], $args );
    518527
    519528    }
     
    572581    public function export_leads_page() {
    573582
    574         $this->view( 'lead', 'export' );
     583        $access_token = Core::access_token();
     584
     585        $args = [
     586            'href' => admin_url( "/edit.php?post_type={$this->post_type}&page=export-leads&export_key={$access_token}" )
     587        ];
     588
     589        view( 'lead', 'export', $args );
    575590
    576591    }
  • wprequal/trunk/app/classes/class.Log.php

    r2315196 r2356316  
    77
    88namespace WPrequal\App;
     9
     10if ( ! defined( 'ABSPATH' ) ) {
     11    die( __( 'Access denied!!' ) );
     12}
    913
    1014class Log {
  • wprequal/trunk/app/classes/class.Nonce.php

    r2321317 r2356316  
    1212namespace WPrequal\App;
    1313use WP_REST_Server;
     14
     15if ( ! defined( 'ABSPATH' ) ) {
     16    die( __( 'Access denied!!' ) );
     17}
    1418
    1519class Nonce {
  • wprequal/trunk/app/classes/class.Note.php

    r2315196 r2356316  
    77
    88namespace WPrequal\App;
     9
     10if ( ! defined( 'ABSPATH' ) ) {
     11    die( __( 'Access denied!!' ) );
     12}
    913
    1014class Note {
  • wprequal/trunk/app/classes/class.PostEntry.php

    r2315196 r2356316  
    77
    88namespace WPrequal\App;
     9
     10if ( ! defined( 'ABSPATH' ) ) {
     11    die( __( 'Access denied!!' ) );
     12}
    913
    1014class PostEntry {
  • wprequal/trunk/app/classes/class.Referrer.php

    r2315196 r2356316  
    1111
    1212namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( __( 'Access denied!!' ) );
     16}
    1317
    1418class Referrer {
  • wprequal/trunk/app/classes/class.RegisterForm.php

    r2321931 r2356316  
    77 * @package WPrequal
    88 */
     9
    910namespace WPrequal\App;
     11
     12if ( ! defined( 'ABSPATH' ) ) {
     13    die( __( 'Access denied!!' ) );
     14}
    1015
    1116class RegisterForm extends PostType {
     
    109114
    110115    /**
    111      * View.
    112      *
    113      * @param      $path
    114      * @param      $view
    115      * @param bool $return
    116      *
    117      * @return string
    118      */
    119 
    120     public function view( $path, $view, $return = FALSE, $input = array() ) {
    121 
    122         if ( $return ) {
    123             ob_start();
    124         }
    125 
    126         if ( $view = apply_filters( 'wprequal_view', "$path/$view" ) ) {
    127             include $view;
    128         }
    129 
    130         if ( $return ) {
    131             return ob_get_clean();
    132         }
    133 
    134     }
    135 
    136     /**
    137116     * Get the input for the form.
    138117     *
     
    142121     */
    143122
    144     public function get_input( $post_id ) {
     123    public static function get_input( $post_id ) {
    145124
    146125        $meta = FALSE;
     
    170149    public function form( $contact_form_id, $type = 'register' ) {
    171150
    172         $input   = $this->get_input( $contact_form_id );
    173         $details = ContactForm::get_details( $contact_form_id );
    174 
    175         if ( $view = apply_filters( 'wprequal_view', 'contact/form/register-form' ) ) {
    176             include $view;
    177         }
     151        view( 'contact/form', 'register-form', [
     152            'contact_form_id' => $contact_form_id,
     153            'type'            => $type,
     154            'input'           => self::get_input( $contact_form_id ),
     155            'details'         => ContactForm::get_details( $contact_form_id )
     156        ]);
    178157
    179158    }
  • wprequal/trunk/app/classes/class.RegisterFormAdmin.php

    r2315196 r2356316  
    77 * @package WPrequal
    88 */
     9
    910namespace WPrequal\App;
     11
     12if ( ! defined( 'ABSPATH' ) ) {
     13    die( __( 'Access denied!!' ) );
     14}
    1015
    1116class RegisterFormAdmin extends RegisterForm {
    1217
    1318    /**
    14      * @var string
     19     * Path to contact admin views.
    1520     */
    1621
    17     public $view_path = 'contact/admin';
     22    const view_path = 'contact/admin';
    1823
    1924    /**
     
    113118    public function meta_box( $post, $view ) {
    114119
    115         $view_path = $this->view_path;
     120        switch( $view['id'] ) {
    116121
    117         $this->view( $view_path, $view['id'] );
     122            case 'details':
     123                $args = ContactForm::get_details( get_the_ID() );
     124                break;
    118125
     126            case 'register-input':
     127                $args = [ 'input' => RegisterForm::get_input( get_the_ID() ) ];
     128                break;
     129
     130            default:
     131                $args = [];
     132
     133        }
     134
     135        view( self::view_path, $view['id'], $args );
    119136    }
    120137
     
    156173        else {
    157174
    158             update_post_meta( $post_id, 'input', array() );
     175            update_post_meta( $post_id, 'input', [] );
    159176
    160177        }
     
    171188        else {
    172189
    173             update_post_meta( $post_id, 'details', array() );
     190            update_post_meta( $post_id, 'details', [] );
    174191
    175192        }
  • wprequal/trunk/app/classes/class.Settings.php

    r2321931 r2356316  
    77
    88namespace WPrequal\App;
     9
     10if ( ! defined( 'ABSPATH' ) ) {
     11    die( __( 'Access denied!!' ) );
     12}
    913
    1014class Settings {
     
    276280        }
    277281
    278         $file = ( ! Core::access_token() ) ? 'startup-form' : 'page';
    279 
    280         if ( $view = apply_filters( 'wprequal_view', "settings/$file" ) ) {
    281             include $view;
     282        if ( Core::access_token() ) {
     283
     284            view( 'settings', 'page', [
     285                'group'      => $this->group,
     286                'active_tab' => $this->active_tab,
     287                'tabs'       => $this->tabs()
     288            ] );
     289
     290        }
     291        else {
     292
     293            view( 'settings', 'startup', [
     294                'logo' => WPREQUAL_ASSETS . 'img/wprequal-logo.png'
     295            ] );
     296
    282297        }
    283298
     
    294309    public function tabs() {
    295310
    296         $tabs = $this->admin_tabs();
    297 
    298         if ( $view = apply_filters( 'wprequal_view', 'settings/tabs' ) ) {
    299             include $view;
    300         }
     311        ob_start();
     312
     313        view( 'settings', 'tabs', [
     314            'tabs'       => $this->admin_tabs(),
     315            'active_tab' => $this->active_tab,
     316            'href'       => admin_url( "admin.php?page=" . WPREQUAL_OPTIONS . "&{$this->active_tab}=" )
     317        ]);
     318
     319        return ob_get_clean();
    301320
    302321    }
     
    403422    public function hidden( $setting ) {
    404423
    405         $value = $this->value( $setting );
    406 
    407         if ( $view = apply_filters( 'wprequal_view', 'settings/hidden' ) ) {
    408             include $view;
    409         }
     424        view( 'settings', 'hidden', [
     425            'value'   => $this->value( $setting ),
     426            'setting' => $setting
     427        ]);
    410428
    411429        $this->note( $setting );
     
    422440    public function input( $setting ) {
    423441
    424         $value = $this->value( $setting );
    425 
    426         if ( $view = apply_filters( 'wprequal_view', 'settings/input' ) ) {
    427             include $view;
    428         }
     442        view( 'settings', 'input', [
     443            'value'   => $this->value( $setting ),
     444            'setting' => $setting
     445        ]);
    429446
    430447        $this->note( $setting );
     
    441458    public function select( $setting ) {
    442459
    443         $choice = $this->value( $setting );
    444 
    445         if ( $view = apply_filters( 'wprequal_view', 'settings/select' ) ) {
    446             include $view;
    447         }
     460        view( 'settings', 'select', [
     461            'choice'  => $this->value( $setting ),
     462            'values'  => is_object( $setting['values'] ) ? $setting['values'] : $this->get_values( $setting['values'] ),
     463            'setting' => $setting
     464        ]);
    448465
    449466        $this->note( $setting );
     
    461478    public function checkbox( $setting ) {
    462479
    463         $value = $this->value( $setting );
    464 
    465         if ( $view = apply_filters( 'wprequal_view', 'settings/checkbox' ) ) {
    466             include $view;
    467         }
     480        view( 'settings', 'checkbox', [
     481            'value'   => $this->value( $setting ),
     482            'setting' => $setting
     483        ]);
    468484
    469485        $this->note( $setting );
     
    535551
    536552            case 'premium':
    537                 $file = 'buttons/go-premium';
     553                view( 'buttons', 'go-premium' );
    538554                break;
    539555            case 'pro':
    540                 $file = 'buttons/go-pro';
     556                view( 'buttons', 'go-pro' );
    541557                break;
    542558            case 'connect-api':
    543                 $file = 'buttons/get-connect-api';
     559                view( 'buttons', 'get-connect-api' );
    544560                break;
    545561            case 'pro-fa-icons':
    546                 $file = 'buttons/pro-fa-icons';
     562                view( 'buttons', 'pro-fa-icons' );
    547563                break;
    548564            case 'free-fa-icons':
    549                 $file = 'buttons/free-fa-icons';
     565                view( 'buttons', 'free-fa-icons' );
    550566                break;
    551567            default:
    552                 $file = 'settings/note';
    553 
    554         }
    555 
    556         if ( $view = apply_filters( 'wprequal_view', $file ) ) {
    557             include $view;
     568                view( 'settings', 'note', [
     569                    'note' => $this->notes( $setting['note'] )
     570                ] );
    558571        }
    559572
     
    580593
    581594    public function help_buttons() {
    582 
    583         if ( $view = apply_filters( 'wprequal_view', 'buttons/help-buttons' ) ) {
    584             include $view;
    585         }
    586 
     595        view( 'buttons', 'help-buttons' );
    587596    }
    588597
  • wprequal/trunk/app/classes/class.SurveyForm.php

    r2315196 r2356316  
    77 * @package WPrequal
    88 */
     9
    910namespace WPrequal\App;
    1011
     12if ( ! defined( 'ABSPATH' ) ) {
     13    die( __( 'Access denied!!' ) );
     14}
     15
    1116class SurveyForm extends PostType {
     17
     18    /**
     19     * Path to survey form views.
     20     */
     21    const view_path = 'survey/form';
    1222
    1323    /**
     
    117127    public function localize_scripts() {
    118128
    119         $path = 'survey/form';
    120 
    121129        wp_localize_script( 'wprequal_js', 'surveyForm', array(
    122130            'forms'            => array(),
    123             'slide'            => $this->view( $path, 'slide', TRUE ),
    124             'icon'             => $this->view( $path, 'icon', TRUE ),
    125             'button'           => $this->view( $path, 'button', TRUE ),
    126             'text'             => $this->view( $path, 'text', TRUE ),
    127             'amount'           => $this->view( $path, 'amount', TRUE ),
    128             'contact'          => $this->view( $path, 'contact', TRUE ),
    129             'processing'       => $this->view( $path, 'processing', TRUE ),
    130             'confirmation'     => $this->view( $path, 'confirmation', TRUE ),
     131            'slide'            => $this->view( self::view_path, 'slide' ),
     132            'icon'             => $this->view( self::view_path, 'icon' ),
     133            'button'           => $this->view( self::view_path, 'button' ),
     134            'text'             => $this->view( self::view_path, 'text' ),
     135            'amount'           => $this->view( self::view_path, 'amount' ),
     136            'contact'          => $this->view( self::view_path, 'contact' ),
     137            'processing'       => $this->view( self::view_path, 'processing' ),
     138            'confirmation'     => $this->view( self::view_path, 'confirmation' ),
    131139            'currency_symbols' => Core::currency_symbols()
    132140        ));
     
    203211
    204212        $post_id = empty( $post_id ) ? $this->default_id() : $post_id;
    205 
    206         $slides = $this->get_slides( $post_id, TRUE );
    207 
    208         if ( $view = apply_filters( 'wprequal_view', 'survey/form/form' ) ) {
    209             include $view;
    210         }
     213        $rand    = mt_rand();
     214        $form_id = "wpq-{$rand}";
     215
     216        view( self::view_path, 'form', [
     217            'post_id'   => $post_id,
     218            'form'      => [
     219                'form_id' => $form_id,
     220                'slides'  => $this->get_slides( $post_id, TRUE )
     221            ],
     222            'back_text' => get_post_meta( $post_id, 'back_text', TRUE ) ?: '',
     223            'styles'    => $this->styles( $post_id, $form_id ),
     224            'classes'   => $this->classes( $post_id )
     225        ] );
    211226
    212227    }
     
    217232     * @param      $path
    218233     * @param      $view
    219      * @param bool $return
    220234     *
    221235     * @return string
    222236     */
    223237
    224     public function view( $path, $view, $return = FALSE ) {
    225 
    226         if ( $return ) {
    227             ob_start();
    228         }
    229 
    230         if ( $view = apply_filters( 'wprequal_view', "$path/$view" ) ) {
    231             include $view;
    232         }
    233 
    234         if ( $return ) {
    235             return ob_get_clean();
    236         }
     238    public function view( $path, $view ) {
     239
     240        ob_start();
     241        view( $path, $view );
     242        return ob_get_clean();
    237243
    238244    }
     
    333339        $post_id = $this->popup_id();
    334340
    335         if ( $view = apply_filters( 'wprequal_view', 'survey/form/popup' ) ) {
    336             include $view;
    337         }
     341        ob_start();
     342        $this->form( $post_id );
     343        $form = ob_get_clean();
     344
     345        view( self::view_path, 'popup', [
     346            'form' => $form
     347        ]);
    338348
    339349    }
  • wprequal/trunk/app/classes/class.SurveyFormAdmin.php

    r2315196 r2356316  
    1111use WP_REST_Server;
    1212
     13if ( ! defined( 'ABSPATH' ) ) {
     14    die( __( 'Access denied!!' ) );
     15}
     16
    1317class SurveyFormAdmin extends SurveyForm {
    1418
    1519    /**
    16      * @var string
    17      */
    18 
    19     protected $view_path = 'survey/admin';
     20     * Path to survey form admin views.
     21     */
     22    const view_path = 'survey/admin';
    2023
    2124    /**
     
    8891                wp_enqueue_script( 'wprequal_admin_js' );
    8992
    90                 $fa_license = $this->fa_license();
     93                $fa_license = self::fa_license();
    9194
    9295                wp_localize_script( 'wprequal_admin_js', 'surveyAdmin', array(
     
    107110     */
    108111
    109     public function fa_license() {
     112    public static function fa_license() {
    110113
    111114        $checked = get_option( 'wprequal_fa_pro' );
     
    143146
    144147        $inputs = array(
    145             'icons'        => $this->view( $this->view_path, 'icons', TRUE ),
    146             'text'         => $this->view( $this->view_path, 'text', TRUE ),
    147             'buttons'      => $this->view( $this->view_path, 'buttons', TRUE ),
    148             'amount'       => $this->view( $this->view_path, 'amount', TRUE ),
    149             'contact'      => $this->view( $this->view_path, 'contact', TRUE ),
    150             'confirmation' => $this->view( $this->view_path, 'confirmation', TRUE ),
    151             'redirect'     => $this->view( $this->view_path, 'redirect', TRUE ),
    152             'processing'   => $this->view( $this->view_path, 'processing', TRUE ),
    153             'faSelect'     => $this->view( $this->view_path, 'fa-select', TRUE ),
    154             'button'       => $this->view( $this->view_path, 'button', TRUE ),
    155             'logicInput'   => $this->view( $this->view_path, 'conditional-logic-result', TRUE )
     148            'icons'        => $this->view( self::view_path, 'icons' ),
     149            'text'         => $this->view( self::view_path, 'text' ),
     150            'buttons'      => $this->view( self::view_path, 'buttons' ),
     151            'amount'       => $this->view( self::view_path, 'amount' ),
     152            'contact'      => $this->view( self::view_path, 'contact' ),
     153            'confirmation' => $this->view( self::view_path, 'confirmation' ),
     154            'redirect'     => $this->view( self::view_path, 'redirect' ),
     155            'processing'   => $this->view( self::view_path, 'processing' ),
     156            'faSelect'     => $this->view( self::view_path, 'fa-select' ),
     157            'button'       => $this->view( self::view_path, 'button' ),
     158            'logicInput'   => $this->view( self::view_path, 'conditional-logic-result' )
    156159        );
    157160
     
    248251
    249252    public function meta_box( $post, $view ) {
    250 
    251         $view_path = $this->view_path;
    252         $allow     = array( 'shortcode', 'styles', 'template' );
     253       
     254        $allow = [ 'shortcode', 'styles', 'template' ];
    253255
    254256        if ( ! Core::status( 1 ) && ! in_array( $view['id'], $allow ) ) {
    255             $view['id'] = 'go-premium';
    256             $view_path = 'buttons';
    257         }
    258 
    259         $this->view( $view_path, $view['id'] );
     257            view( 'buttons', 'go-premium' );
     258            return;
     259        }
     260
     261        view( self::view_path, $view['id'] );
    260262
    261263    }
     
    375377
    376378        if ( ! Core::status( 1 ) ) {
    377             $this->view( 'buttons', 'go-premium' );
     379            view( 'buttons', 'go-premium' );
    378380            return;
    379381        }
  • wprequal/trunk/app/classes/class.Text.php

    r2315196 r2356316  
    77
    88namespace WPrequal\App;
     9
     10if ( ! defined( 'ABSPATH' ) ) {
     11    die( __( 'Access denied!!' ) );
     12}
    913 
    1014class Text extends Mail {
  • wprequal/trunk/app/classes/class.Update.php

    r2324825 r2356316  
    77
    88namespace WPrequal\App;
     9
     10if ( ! defined( 'ABSPATH' ) ) {
     11    die( __( 'Access denied!!' ) );
     12}
    913
    1014class Update {
  • wprequal/trunk/app/functions/activate.php

    r2315196 r2356316  
    1111
    1212namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( __( 'Access denied!!' ) );
     16}
    1317
    1418/**
  • wprequal/trunk/app/functions/auto-update.php

    r2152886 r2356316  
    1111
    1212namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( __( 'Access denied!!' ) );
     16}
    1317
    1418/**
  • wprequal/trunk/app/functions/deactivate.php

    r2321931 r2356316  
    1111
    1212namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( __( 'Access denied!!' ) );
     16}
    1317
    1418/**
  • wprequal/trunk/app/functions/hide-metaboxes.php

    r2286071 r2356316  
    1111
    1212namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( __( 'Access denied!!' ) );
     16}
    1317
    1418add_filter( 'hidden_meta_boxes', function( $hidden, $screen, $use_defaults ) {
  • wprequal/trunk/app/functions/refresh.php

    r2321931 r2356316  
    1212namespace WPrequal\App;
    1313
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( __( 'Access denied!!' ) );
     16}
     17
    1418add_action( 'init', 'WPrequal\App\refresh' );
    1519
  • wprequal/trunk/app/functions/reset-defaults.php

    r2152886 r2356316  
    1111
    1212namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( __( 'Access denied!!' ) );
     16}
    1317
    1418add_action( 'admin_init', 'WPrequal\App\reset_defaults' );
  • wprequal/trunk/app/functions/set-capibilities.php

    r2184781 r2356316  
    1111
    1212namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( __( 'Access denied!!' ) );
     16}
    1317
    1418/**
  • wprequal/trunk/app/functions/update-notice.php

    r2152886 r2356316  
    1111
    1212namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( __( 'Access denied!!' ) );
     16}
    1317
    1418add_action( 'in_plugin_update_message-wprequal/wprequal.php', 'WPrequal\App\update_message', 10, 2 );
  • wprequal/trunk/app/widgets/class.WidgetAmortize.php

    r2169595 r2356316  
    88namespace WPrequal\App;
    99use WP_Widget;
     10
     11if ( ! defined( 'ABSPATH' ) ) {
     12    die( __( 'Access denied!!' ) );
     13}
    1014 
    1115class WidgetAmortize extends WP_Widget {
  • wprequal/trunk/app/widgets/class.WidgetCalc.php

    r2207906 r2356316  
    88namespace WPrequal\App;
    99use WP_Widget;
     10
     11if ( ! defined( 'ABSPATH' ) ) {
     12    die( __( 'Access denied!!' ) );
     13}
    1014 
    1115class WidgetCalc extends WP_Widget {
  • wprequal/trunk/app/widgets/class.WidgetCalcButton.php

    r2169595 r2356316  
    88namespace WPrequal\App;
    99use WP_Widget;
     10
     11if ( ! defined( 'ABSPATH' ) ) {
     12    die( __( 'Access denied!!' ) );
     13}
    1014 
    1115class WidgetCalcButton extends WP_Widget {
  • wprequal/trunk/app/widgets/class.WidgetContactForm.php

    r2219042 r2356316  
    1010namespace WPrequal\App;
    1111use WP_Widget;
     12
     13if ( ! defined( 'ABSPATH' ) ) {
     14    die( __( 'Access denied!!' ) );
     15}
    1216 
    1317class WidgetContactForm extends WP_Widget {
     
    1822            'wprequal_contact_form',
    1923            __( 'WPrequal Contact Form', 'wprequal' ),
    20             array( 'description' => __( 'Add a contact form', 'wprequal' ), )
     24            [ 'description' => __( 'Add a contact form', 'wprequal' ), ]
    2125        );
    2226    }
     
    3741        $post_id = isset( $instance['post_id'] ) ? $instance['post_id'] : FALSE;
    3842
    39         $form_args = array(
     43        $form_args = [
    4044            'contact_form_id' => (int) $post_id,
    4145            'type'            => 'contact'
    42         );
     46        ];
    4347
    4448        do_action( 'wprequal_contact_form', $form_args );
     
    5761    public function form( $instance ) {
    5862
    59         if ( $view = apply_filters( 'wprequal_view', 'contact/widget/contact-form' ) ) {
    60             include $view;
    61         }
     63        $post_id = isset( $instance['post_id'] ) ? $instance['post_id'] : '';
     64
     65        view( 'contact/widget', 'contact-form', [
     66            'title'        => ! empty( $instance['title'] )   ? $instance['title']   : '',
     67            'content'      => ! empty( $instance['content'] ) ? $instance['content'] : '',
     68            'title_id'     => $this->get_field_id( 'title' ),
     69            'title_name'   => $this->get_field_name( 'title' ),
     70            'content_id'   => $this->get_field_id( 'content' ),
     71            'content_name' => $this->get_field_name( 'content' ),
     72            'args'         => [
     73                'post_type'        => 'wpq_contact_form',
     74                'name'             => $this->get_field_name( 'post_id' ),
     75                'class'            => 'post_id widefat',
     76                'id'               => 'post_id',
     77                'selected'         => $post_id,
     78                'show_option_none' => __('Select One')
     79            ]
     80        ] );
    6281
    6382    }
     
    7493     */
    7594    public function update( $new_instance, $old_instance ) {
    76         $instance = array();
     95        $instance = [];
    7796        $instance['title']   = ( ! empty( $new_instance['title'] ) ) ? sanitize_text_field( $new_instance['title'] ) : '';
    7897        $instance['content'] = ( ! empty( $new_instance['content'] ) ) ? wp_kses_post( $new_instance['content'] ) : '';
  • wprequal/trunk/app/widgets/class.WidgetInit.php

    r2315196 r2356316  
    99
    1010namespace WPrequal\App;
     11
     12if ( ! defined( 'ABSPATH' ) ) {
     13    die( __( 'Access denied!!' ) );
     14}
    1115 
    1216class WidgetInit {
  • wprequal/trunk/app/widgets/class.WidgetRegisterForm.php

    r2219042 r2356316  
    1010namespace WPrequal\App;
    1111use WP_Widget;
     12
     13if ( ! defined( 'ABSPATH' ) ) {
     14    die( __( 'Access denied!!' ) );
     15}
    1216 
    1317class WidgetRegisterForm extends WP_Widget {
     
    5256    public function form( $instance ) {
    5357
    54         if ( $view = apply_filters( 'wprequal_view', 'contact/widget/register-form' ) ) {
    55             include $view;
    56         }
     58        $post_id = isset( $instance['post_id'] ) ? $instance['post_id'] : '';
     59
     60        view( 'contact/widget', 'register-form', [
     61            'title'        => ! empty( $instance['title'] )   ? $instance['title']   : '',
     62            'content'      => ! empty( $instance['content'] ) ? $instance['content'] : '',
     63            'title_id'     => $this->get_field_id( 'title' ),
     64            'content_id'   => $this->get_field_id( 'content' ),
     65            'title_name'   => $this->get_field_name( 'title' ),
     66            'content_name' => $this->get_field_name( 'content' ),
     67            'args'         => [
     68                'post_type'         => 'wpq_register_form',
     69                'name'              => $this->get_field_name( 'post_id' ),
     70                'class'             => 'post_id widefat',
     71                'id'                => 'post_id',
     72                'selected'          => $post_id,
     73                'show_option_none'  => __('Select One')
     74            ]
     75        ]);
    5776
    5877    }
  • wprequal/trunk/app/widgets/class.WidgetSurveyForm.php

    r2225972 r2356316  
    1010namespace WPrequal\App;
    1111use WP_Widget;
     12
     13if ( ! defined( 'ABSPATH' ) ) {
     14    die( __( 'Access denied!!' ) );
     15}
    1216 
    1317class WidgetSurveyForm extends WP_Widget {
     
    4347    public function form( $instance ) {
    4448
    45         if ( $view = apply_filters( 'wprequal_view', 'survey/widget/form' ) ) {
    46             include $view;
    47         }
     49        $post_id = isset( $instance['post_id'] ) ? $instance['post_id'] : '';
     50
     51        view( 'survey/widget', 'form', [
     52            'args' => [
     53                'post_type' => 'wpq_survey_form',
     54                'name'      => $this->get_field_name( 'post_id' ),
     55                'class'     => 'post_id widefat',
     56                'id'        => 'post_id',
     57                'selected'  => $post_id
     58            ]
     59        ]);
    4860
    4961    }
  • wprequal/trunk/readme.txt

    r2350549 r2356316  
    1515Wouldn’t it be great to generate and capture pre-qualified leads right on your website? Now you can!
    1616
    17 [WPrequal](https://wprequal.com "WPrequal Home Page") is the only WordPress plugin that delivers a complete lead generation system directly to your WordPress website or landing page. It’s perfect for any business that depends on identifying strong leads:
     17[WPrequal](https://wprequal.com/?affid=marketing&ref=wordpress "WPrequal Home Page") is the only WordPress plugin that delivers a complete lead generation system directly to your WordPress website or landing page. It’s perfect for any business that depends on identifying strong leads:
    1818
    1919&#x2611; Mortgage Lenders
     
    5555* Confirmation redirects
    5656
    57 [Go Premium](https://wprequal.com/product/premium-license/ "Premium License")
     57[Go Premium](https://wprequal.com/product/premium-license/?affid=marketing&ref=wordpress "Premium License")
    5858
    5959__Pro License__
     
    7575    * Zoho CRM
    7676
    77 [Go Pro](https://wprequal.com/product/pro-license/ "Pro License")
     77[Go Pro](https://wprequal.com/product/pro-license/?affid=marketing&ref=wordpress "Pro License")
    7878
    7979__Landing Pages__
     
    8888&#x2611; Priority support
    8989
    90 [Get Landing Page](https://wprequal.com/product/landingpage-license/ "WPrequal Landing Pages")
     90[Get Landing Page](https://wprequal.com/product/landingpage-license/?affid=marketing&ref=wordpress "WPrequal Landing Pages")
    9191
    9292__Helpful Resources__
    9393
    94 [WPrequal Support](https://wprequal.com/support/ "WPrequal Support")
    95 [How to Guides](https://wprequal.com/category/how-to/ "How to Guides")
    96 [Shortcode Examples](https://wprequal.com/what-short-codes-does-wprequal-offer/ "Shortcode Examples")
    97 [Developer Documentation](https://wprequal.com/documentation-type/developers/ "Developer Documentation")
    98 [Connect API](https://wprequal.com/connect-api/ "Connect API")
     94[WPrequal Support](https://wprequal.com/support/?affid=marketing&ref=wordpress "WPrequal Support")
     95[How to Guides](https://wprequal.com/category/how-to/?affid=marketing&ref=wordpress "How to Guides")
     96[Shortcode Examples](https://wprequal.com/what-short-codes-does-wprequal-offer/?affid=marketing&ref=wordpress "Shortcode Examples")
     97[Developer Documentation](https://wprequal.com/documentation-type/developers/?affid=marketing&ref=wordpress "Developer Documentation")
     98[Connect API](https://wprequal.com/connect-api/?affid=marketing&ref=wordpress "Connect API")
    9999
    100100
     
    1111119. If you are using the short code or widget, place them in the desired locations.
    112112
    113 [How to Guides](https://wprequal.com/category/how-to/ "How to Guides")
    114 [Shortcode Examples](https://wprequal.com/what-short-codes-does-wprequal-offer/ "Shortcode Examples")
     113[How to Guides](https://wprequal.com/category/how-to/?affid=marketing&ref=wordpress "How to Guides")
     114[Shortcode Examples](https://wprequal.com/what-short-codes-does-wprequal-offer/?affid=marketing&ref=wordpress "Shortcode Examples")
    115115
    116116== Frequently Asked Questions ==
     
    130130= Is WPrequal free to use? =
    131131
    132 Yes, the basic plugin that creates the lead generation form is free. Additional services are available through the [Premium](https://wprequal.com/product/premium-license/ "Premium License") and [Pro](https://wprequal.com/product/pro-license/ "Pro License") license.
     132Yes, the basic plugin that creates the lead generation form is free. Additional services are available through the [Premium](https://wprequal.com/product/premium-license/ "Premium License") and [Pro](https://wprequal.com/product/pro-license/?affid=marketing&ref=wordpress "Pro License") license.
    133133
    134134= Can I use WPrequal on the homepage? =
     
    138138= Can my developer add custom functionality to WPrequal? =
    139139
    140 Yes. We have [Developer Documentation](https://wprequal.com/documentation-type/developers/ "Developer Documentation") available.
     140Yes. We have [Developer Documentation](https://wprequal.com/documentation-type/developers/?affid=marketing&ref=wordpress "Developer Documentation") available.
    141141
    142142== Screenshots ==
     
    159159== Change Log ==
    160160
     161= 7.7.9 =
     162* Improvement - Add args param to wprequal_view hook
     163* Security - Require constant ABSPATH to access files
     164
     165= 7.7.8 =
     166* Tweek - Spelling error
     167
    161168= 7.7.7 =
    162169* Improvement - Add source URL tracking
  • wprequal/trunk/views/admin/submit-metabox.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<div class="submitbox wpq-submitbox" id="submitpost">
     
    2226            <span class="spinner"></span><?php
    2327
    24             if ( ! in_array( $post->post_status, array( 'publish' ) ) || 0 == $post->ID ) {
     28            if ( ! in_array( $post_status, array( 'publish' ) ) || 0 == $post_id ) {
    2529
    2630                if ( $can_publish ) : ?>
    2731
    2832                    <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e( 'Add Tab' ) ?>" /><?php
    29                     submit_button( __( "Add {$this->label_name}" ), 'primary button-large wpq-post-submit', 'publish', FALSE, array( 'accesskey' => 'p' ) );
     33                    submit_button( __( "Add {$label_name}" ), 'primary button-large wpq-post-submit', 'publish', FALSE, array( 'accesskey' => 'p' ) );
    3034
    3135                endif;
     
    3337            } else { ?>
    3438
    35                 <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e( "Update {$this->label_name}" ); ?>" />
    36                 <input name="save" type="submit" class="button button-primary button-large wpq-post-submit" id="publish" accesskey="p" value="<?php esc_attr_e( "Update {$this->label_name}" ); ?>" /><?php
     39                <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e( "Update {$label_name}" ); ?>" />
     40                <input name="save" type="submit" class="button button-primary button-large wpq-post-submit" id="publish" accesskey="p" value="<?php esc_attr_e( "Update {$label_name}" ); ?>" /><?php
    3741
    3842            } ?>
     
    4246        if( $can_delete ) {
    4347
    44             $delete_link = get_delete_post_link( $post->ID, '', TRUE ); ?>
     48            $delete_link = get_delete_post_link( $post_id, '', TRUE ); ?>
    4549
    4650            <div id="delete-action" class="delete-action">
  • wprequal/trunk/views/admin/upgrade-metabox.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<div class="upgrade-meta-box" id="upgrade-meta-box">
     
    1923
    2024    <div style="padding: 20px 10px;">
    21         <?php if ( $view = apply_filters( 'wprequal_view', "buttons/go-premium" ) ) {
    22             include $view;
    23         } ?>
     25        <?php view( 'buttons', 'go-premium' ); ?>
    2426    </div>
    2527
  • wprequal/trunk/views/buttons/free-fa-icons.php

    r2315196 r2356316  
    88 */
    99
    10 namespace WPrequal\App; ?>
     10namespace WPrequal\App;
     11
     12if ( ! defined( 'ABSPATH' ) ) {
     13    die( 'Access denied!!' );
     14} ?>
    1115
    1216<td>
  • wprequal/trunk/views/buttons/get-connect-api.php

    r2315196 r2356316  
    88 */
    99
    10 namespace WPrequal\App; ?>
     10namespace WPrequal\App;
     11
     12if ( ! defined( 'ABSPATH' ) ) {
     13    die( 'Access denied!!' );
     14} ?>
    1115
    1216<td>
  • wprequal/trunk/views/buttons/go-premium.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<td>
  • wprequal/trunk/views/buttons/go-pro.php

    r2315196 r2356316  
    88 */
    99
    10 namespace WPrequal\App; ?>
     10namespace WPrequal\App;
     11
     12if ( ! defined( 'ABSPATH' ) ) {
     13    die( 'Access denied!!' );
     14} ?>
    1115
    1216<td>
  • wprequal/trunk/views/buttons/help-buttons.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<style>
  • wprequal/trunk/views/buttons/pro-fa-icons.php

    r2315196 r2356316  
    88 */
    99
    10 namespace WPrequal\App; ?>
     10namespace WPrequal\App;
     11
     12if ( ! defined( 'ABSPATH' ) ) {
     13    die( 'Access denied!!' );
     14} ?>
    1115
    1216<td>
  • wprequal/trunk/views/calc/amortize.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<!-- Start amortization Section -->
     
    1923        <div class="wpq-row"><?php
    2024
    21             $this->view( 'title', 'wprequal_amortize_title' );
    22             $this->view( 'purchase-price' );
    23             $this->view( 'down-payment' );
    24             $this->view( 'loan-term' );
    25             $this->view( 'interest-rate' ); ?>
     25            Calc::view( 'title', 'wprequal_amortize_title' );
     26            Calc::view( 'purchase-price' );
     27            Calc::view( 'down-payment' );
     28            Calc::view( 'loan-term' );
     29            Calc::view( 'interest-rate' ); ?>
    2630
    2731            <div class="amortization">
    2832
    2933                <div class="results">
    30                     <?php $this->view( 'payment' ); ?>
     34                    <?php Calc::view( 'payment' ); ?>
    3135
    3236                    <div class="principle wpq-col-12">
    33                         <?php _e( 'Principle:', 'wprequal' ); ?> <?php $this->currency( '<span></span>' ); ?>
     37                        <?php _e( 'Principle:', 'wprequal' ); ?> <?php Calc::currency( '<span></span>' ); ?>
    3438                    </div>
    3539                    <div class="interest wpq-col-12">
    36                         <?php _e( 'Interest:', 'wprequal' ); ?> <?php $this->currency( '<span></span>' ); ?>
     40                        <?php _e( 'Interest:', 'wprequal' ); ?> <?php Calc::currency( '<span></span>' ); ?>
    3741                    </div>
    3842                    <div class="balance wpq-col-12">
    39                         <?php _e( 'Balance:', 'wprequal' ); ?> <?php $this->currency( '<span></span>' ); ?>
     43                        <?php _e( 'Balance:', 'wprequal' ); ?> <?php Calc::currency( '<span></span>' ); ?>
    4044                    </div>
    4145
     
    4347                        <?php _e( 'Month:', 'wprequal' ); ?> <span></span>
    4448                    </div>
    45                     <?php $this->view( 'months' ); ?>
     49                    <?php Calc::view( 'months' ); ?>
    4650
    4751                </div>
  • wprequal/trunk/views/calc/button.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<button class="button calc-pop"><?php _e( 'Mortgage Calculator', 'wprequal' ); ?></button>
  • wprequal/trunk/views/calc/calc.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<!-- Start Calc Section -->
     
    1923        <div class="wpq-row"><?php
    2024
    21             $this->view( 'title', 'wprequal_calc_title' );
    22             $this->view( 'purchase-price' );
    23             $this->view( 'down-payment' );
    24             $this->view( 'loan-term' );
    25             $this->view( 'interest-rate' );
     25            Calc::view( 'title', 'wprequal_calc_title' );
     26            Calc::view( 'purchase-price' );
     27            Calc::view( 'down-payment' );
     28            Calc::view( 'loan-term' );
     29            Calc::view( 'interest-rate' );
    2630            if ( empty( $size ) ) {
    27                 $this->view( 'property-tax' );
    28                 $this->view( 'insurance' );
     31                Calc::view( 'property-tax' );
     32                Calc::view( 'insurance' );
    2933            }
    30             $this->view( 'payment' ); ?>
     34            Calc::view( 'payment' ); ?>
    3135
    3236        </div>
    3337
    3438        <?php if ( Core::status( 2 ) && 'checked' === get_option( 'wprequal_show_get_quote' ) ) {
    35             $this->view( 'get-quote' );
     39            Calc::view( 'get-quote' );
    3640        } ?>
    3741
  • wprequal/trunk/views/calc/down-payment.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
     17
    1418$label = get_option( 'wprequal_down_payment_label' ); ?>
    1519
     
    1721<div class="wpq-col-12 wpq-down-payment">
    1822    <span class="calc-label"><?php _e( $label, 'wprequal' ); ?></span>
    19     <?php $this->currency( '<span class="calc-value"></span>' ); ?>
    20     <input type="range" <?php $this->ranges( 'down_payment' ); ?> class="input-range calc-slider down-payment" name="lead[calc_fields][down_payment]"
     23    <?php Calc::currency( '<span class="calc-value"></span>' ); ?>
     24    <input type="range" <?php Calc::ranges( 'down_payment' ); ?> class="input-range calc-slider down-payment" name="lead[calc_fields][down_payment]"
    2125           aria-label="<?php esc_attr_e( $label ); ?>">
    2226</div>
  • wprequal/trunk/views/calc/focus.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<!-- Start Calc Section -->
     
    2125            <div class="wpq-col-md-6">
    2226
    23                 <?php $this->view( 'title', 'wprequal_focus_title' ); ?>
     27                <?php Calc::view( 'title', 'wprequal_focus_title' ); ?>
    2428
    2529                <div class="wpq-inputs">
    2630
    27                     <?php $this->view( 'purchase-price' );
    28                     $this->view( 'down-payment' );
    29                     $this->view( 'loan-term' );
    30                     $this->view( 'interest-rate' );
     31                    <?php Calc::view( 'purchase-price' );
     32                    Calc::view( 'down-payment' );
     33                    Calc::view( 'loan-term' );
     34                    Calc::view( 'interest-rate' );
    3135                    if ( empty( $size ) ) {
    32                         $this->view( 'property-tax' );
    33                         $this->view( 'insurance' );
     36                        Calc::view( 'property-tax' );
     37                        Calc::view( 'insurance' );
    3438                    } ?>
    3539
     
    4246                <div class="wpq-results">
    4347
    44                     <?php $this->view( 'payment' ); ?>
     48                    <?php Calc::view( 'payment' ); ?>
    4549
    4650                    <?php if ( $msg = get_option( 'wprequal_focus_msg' ) ) { ?>
     
    5256                    <div class="wpq-align-self-end">
    5357                        <?php if ( Core::status( 2 ) && 'checked' === get_option( 'wprequal_show_get_quote' ) ) {
    54                             $this->view( 'get-quote' );
     58                            Calc::view( 'get-quote' );
    5559                        } ?>
    5660                    </div>
  • wprequal/trunk/views/calc/get-quote.php

    r2315196 r2356316  
    1111
    1212namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
    1317
    1418$button_text = get_option( 'wprequal_get_quote_button_text', 'Get Quote' );
  • wprequal/trunk/views/calc/insurance.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
     17
    1418$label = get_option( 'wprequal_insurance_label' ); ?>
    1519
     
    1721<div class="wpq-col-12 wpq-insurance">
    1822    <span class="calc-label"><?php _e( $label, 'wprequal' ); ?></span>
    19     <?php $this->currency( '<span class="calc-value"></span>' ); ?><?php _e( ' /year', 'wprequal' ); ?>
    20     <input type="range" <?php $this->ranges( 'insurance' ); ?> class="input-range calc-slider insurance" name="lead[calc_fields][insurance]"
     23    <?php Calc::currency( '<span class="calc-value"></span>' ); ?><?php _e( ' /year', 'wprequal' ); ?>
     24    <input type="range" <?php Calc::ranges( 'insurance' ); ?> class="input-range calc-slider insurance" name="lead[calc_fields][insurance]"
    2125           aria-label="<?php esc_attr_e( $label ); ?>">
    2226</div>
  • wprequal/trunk/views/calc/interest-rate.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
     17
    1418$label = get_option( 'wprequal_rate_label' ); ?>
    1519
     
    1822    <span class="calc-label"><?php _e( $label, 'wprequal' ); ?></span>
    1923    <span class="calc-value"></span><?php _e( '%', 'wprequal' ); ?>
    20     <input type="range" <?php $this->ranges( 'rate' ); ?> class="input-range calc-slider interest-rate" name="lead[calc_fields][rate]"
     24    <input type="range" <?php Calc::ranges( 'rate' ); ?> class="input-range calc-slider interest-rate" name="lead[calc_fields][rate]"
    2125           aria-label="<?php esc_attr_e( $label ); ?>">
    2226</div>
  • wprequal/trunk/views/calc/loan-term.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
     17
    1418$label  = get_option( 'wprequal_term_label' );
    1519$suffix = get_option( 'wprequal_term_suffix', 'years' ); ?>
     
    1923    <span class="calc-label"><?php _e( $label, 'wprequal' ); ?></span>
    2024    <span class="calc-value"></span> <?php _e( $suffix, 'wprequal' ); ?>
    21     <input type="range" <?php $this->ranges( 'term' ); ?> class="input-range calc-slider loan-term" name="lead[calc_fields][term]"
     25    <input type="range" <?php Calc::ranges( 'term' ); ?> class="input-range calc-slider loan-term" name="lead[calc_fields][term]"
    2226           aria-label="<?php esc_attr_e( $label ); ?>">
    2327</div>
  • wprequal/trunk/views/calc/months.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
     17
    1418$label = get_option( 'wprequal_amortize_label' ); ?>
    1519
  • wprequal/trunk/views/calc/payment-inner.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<!-- Start Payment Inner -->
     
    1822    <span class="per-month"><?php _e( $before, 'wprequal' ); ?></span>
    1923
    20     <?php $this->currency( '<span class="calc-payment-amount"></span>' ); ?>
     24    <?php Calc::currency( '<span class="calc-payment-amount"></span>' ); ?>
    2125
    2226    <?php $after = apply_filters( 'wprequal_after_calc_payment', ' /month' ); ?>
  • wprequal/trunk/views/calc/payment.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<!-- Start Payment -->
    1519<div class="wpq-col-12">
    16     <?php if ( $view = apply_filters( 'wprequal_view', 'calc/payment-inner' ) ) {
    17         include $view;
    18     } ?>
     20    <?php view( 'calc', 'payment-inner'); ?>
    1921</div>
    2022<!-- End Payment -->
  • wprequal/trunk/views/calc/property-tax.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
     17
    1418$label = get_option( 'wprequal_tax_label' ); ?>
    1519
     
    1721<div class="wpq-col-12 wpq-property-tax">
    1822    <span class="calc-label"><?php _e( $label, 'wprequal' ); ?></span>
    19     <?php $this->currency( '<span class="calc-value"></span>' ); ?><?php _e( ' /year', 'wprequal' ); ?>
    20     <input type="range" <?php $this->ranges( 'tax' ); ?> class="input-range calc-slider property-tax" name="lead[calc_fields][tax]"
     23    <?php Calc::currency( '<span class="calc-value"></span>' ); ?><?php _e( ' /year', 'wprequal' ); ?>
     24    <input type="range" <?php Calc::ranges( 'tax' ); ?> class="input-range calc-slider property-tax" name="lead[calc_fields][tax]"
    2125           aria-label="<?php esc_attr_e( $label ); ?>">
    2226</div>
  • wprequal/trunk/views/calc/purchase-price.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
     17
    1418$label = get_option( 'wprequal_price_label' ); ?>
    1519
     
    1721<div class="wpq-col-12 wpq-purchase-price">
    1822    <span class="calc-label"><?php _e( $label, 'wprequal' ); ?></span>
    19     <?php $this->currency( '<span class="calc-value"></span>' ); ?>
    20     <input type="range" <?php $this->ranges( 'price' ); ?> class="input-range calc-slider purchase-price" name="lead[calc_fields][price]"
     23    <?php Calc::currency( '<span class="calc-value"></span>' ); ?>
     24    <input type="range" <?php Calc::ranges( 'price' ); ?> class="input-range calc-slider purchase-price" name="lead[calc_fields][price]"
    2125           aria-label="<?php esc_attr_e( $label ); ?>">
    2226</div>
  • wprequal/trunk/views/calc/title.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<!-- Start Calc Title -->
  • wprequal/trunk/views/contact/admin/checkbox.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
     17
    1418$input['input'] = 'checkbox'; ?>
    1519
    1620<li class="slide checkbox lead-field <?php esc_attr_e( $input['key'] ); ?>">
    1721
    18     <?php $this->view( $this->view_path, 'head', FALSE, $input ); ?>
     22    <?php ContactFormAdmin::view( 'head', $input ); ?>
    1923
    2024    <table class="form-table">
     
    2226        <tbody class="input-rows">
    2327
    24             <?php $this->view( $this->view_path, 'label', FALSE, $input ); ?>
    25             <?php $this->view( $this->view_path, 'required', FALSE, $input ); ?>
     28            <?php ContactFormAdmin::view( 'label', $input ); ?>
     29            <?php ContactFormAdmin::view( 'required', $input ); ?>
    2630
    2731        </tbody>
     
    2933        <tbody class="input-options">
    3034
    31             <?php $this->view( $this->view_path, 'options', FALSE, $input ); ?>
     35            <?php ContactFormAdmin::view( 'options', $input ); ?>
    3236
    3337        </tbody>
  • wprequal/trunk/views/contact/admin/comments.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<li class="slide comments <?php esc_attr_e( $input['key'] ); ?>">
    1519
    16     <?php $this->view( $this->view_path, 'head', FALSE, $input ); ?>
     20    <?php ContactFormAdmin::view( 'head', $input ); ?>
    1721
    1822    <table class="form-table">
     
    2024        <tbody class="input-labels">
    2125
    22             <?php $this->view( $this->view_path, 'label', FALSE, $input ); ?>
    23             <?php $this->view( $this->view_path, 'placeholder', FALSE, $input ); ?>
    24             <?php $this->view( $this->view_path, 'required', FALSE, $input ); ?>
     26            <?php ContactFormAdmin::view( 'label', $input ); ?>
     27            <?php ContactFormAdmin::view( 'placeholder', $input ); ?>
     28            <?php ContactFormAdmin::view( 'required', $input ); ?>
    2529
    2630        </tbody>
  • wprequal/trunk/views/contact/admin/contact-fields.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
    14 $inputs = $this->input_types(); ?>
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1517
    1618<div class="contact slide-options">
     
    1820    <?php foreach( $inputs as $id => $label ) { ?>
    1921
    20         <?php if( in_array( $id, $this->contact_fields() ) ) { ?>
     22        <?php if( in_array( $id, $contact_fields ) ) { ?>
    2123            <button class="option contact-option" id="<?php esc_attr_e( $id ); ?>"><?php esc_html_e( $label ); ?></button>
    2224        <?php } ?>
  • wprequal/trunk/views/contact/admin/default-value.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
     17
    1418$value = isset( $input['default_value'] ) ? $input['default_value'] : ''; ?>
    1519
  • wprequal/trunk/views/contact/admin/default.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
     17
    1418$value = empty( $input['default'] ) ? '' : $input['default']; ?>
    1519
  • wprequal/trunk/views/contact/admin/details.php

    r2350549 r2356316  
    1212namespace WPrequal\App;
    1313
    14 $details = ContactForm::get_details( get_the_ID() );
    15 
    16 extract( $details ); ?>
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1717
    1818<table class="form-table">
     
    6969            <?php } else { ?>
    7070
    71                 <?php $this->view( 'buttons', 'go-premium' ); ?>
     71                <?php view( 'buttons', 'go-premium' ); ?>
    7272                <input type="hidden" name="details[bcc_email]" value=""/>
    7373
     
    8888            <?php } else { ?>
    8989
    90                 <?php $this->view( 'buttons', 'go-premium' ); ?>
     90                <?php view( 'buttons', 'go-premium' ); ?>
    9191                <input type="hidden" name="details[sms_text]" value=""/>
    9292
  • wprequal/trunk/views/contact/admin/email-mask.php

    r2315196 r2356316  
    1111
    1212namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
    1317
    1418$options = array(
  • wprequal/trunk/views/contact/admin/email.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<li class="slide email <?php esc_attr_e( $input['key'] ); ?>">
    1519
    16     <?php $this->view( $this->view_path, 'head', FALSE, $input ); ?>
     20    <?php ContactFormAdmin::view( 'head', $input ); ?>
    1721
    1822    <table class="form-table">
     
    2024        <tbody class="input-labels">
    2125
    22             <?php $this->view( $this->view_path, 'label', FALSE, $input ); ?>
    23             <?php $this->view( $this->view_path, 'placeholder', FALSE, $input ); ?>
    24             <?php $this->view( $this->view_path, 'email-mask', FALSE, $input ); ?>
    25             <?php $this->view( $this->view_path, 'required', FALSE, $input ); ?>
     26            <?php ContactFormAdmin::view( 'label', $input ); ?>
     27            <?php ContactFormAdmin::view( 'placeholder', $input ); ?>
     28            <?php ContactFormAdmin::view( 'email-mask', $input ); ?>
     29            <?php ContactFormAdmin::view( 'required', $input ); ?>
    2630
    2731        </tbody>
  • wprequal/trunk/views/contact/admin/head.php

    r2315196 r2356316  
    88 */
    99
    10 namespace WPrequal\App; ?>
     10namespace WPrequal\App;
     11
     12if ( ! defined( 'ABSPATH' ) ) {
     13    die( 'Access denied!!' );
     14} ?>
    1115
    1216<div class="slide-head">
  • wprequal/trunk/views/contact/admin/hidden.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<li class="slide hidden lead-field <?php esc_attr_e( $input['key'] ); ?>">
    1519
    16     <?php $this->view( $this->view_path, 'head', FALSE, $input ); ?>
     20    <?php ContactFormAdmin::view( 'head', $input ); ?>
    1721
    1822    <table class="form-table">
     
    2024        <tbody class="input-labels">
    2125
    22             <?php $this->view( $this->view_path, 'label', FALSE, $input ); ?>
    23             <?php $this->view( $this->view_path, 'default-value', FALSE, $input ); ?>
     26            <?php ContactFormAdmin::view( 'label', $input ); ?>
     27            <?php ContactFormAdmin::view( 'default-value', $input ); ?>
    2428
    2529        </tbody>
  • wprequal/trunk/views/contact/admin/inputs.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
    14 $inputs = $this->get_inputs( get_the_ID() );
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
    1517
    1618wp_nonce_field( 'save_contact_inputs', 'save_contact_inputs_nonce' ); ?>
     
    1921
    2022    <?php foreach ( $inputs as $input ) { ?>
    21         <?php $this->view( $this->view_path, $input['type'], FALSE, $input ); ?>
     23        <?php ContactFormAdmin::view( $input['type'], $input ); ?>
    2224    <?php } ?>
    2325
  • wprequal/trunk/views/contact/admin/label.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
     17
    1418$label = empty( $input['label'] ) ? '' : $input['label']; ?>
    1519
  • wprequal/trunk/views/contact/admin/lead-fields.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
    14 $inputs = $this->input_types(); ?>
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1517
    1618<div class="lead-field slide-options">
     
    1820    <?php foreach( $inputs as $id => $label ) { ?>
    1921
    20         <?php if( ! in_array( $id, $this->contact_fields() ) ) { ?>
     22        <?php if( ! in_array( $id, $contact_fields ) ) { ?>
    2123            <button class="option" id="<?php esc_attr_e( $id ); ?>"><?php esc_html_e( $label ); ?></button>
    2224        <?php } ?>
  • wprequal/trunk/views/contact/admin/max.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
     17
    1418$value = empty( $input['max'] ) ? '' : $input['max']; ?>
    1519
  • wprequal/trunk/views/contact/admin/min.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
     17
    1418$value = empty( $input['min'] ) ? '' : $input['min']; ?>
    1519
  • wprequal/trunk/views/contact/admin/name.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
     17
    1418$fname = empty( $input['labels']['fname'] ) ? 'First' : $input['labels']['fname'];
    1519$lname = empty( $input['labels']['lname'] ) ? 'Last' : $input['labels']['lname'];
     
    1822<li class="slide name <?php esc_attr_e( $input['key'] ); ?> full-name">
    1923
    20     <?php $this->view( $this->view_path, 'head', FALSE, $input ); ?>
     24    <?php ContactFormAdmin::view( 'head', $input ); ?>
    2125
    2226    <table class="form-table">
     
    3640            </tr>
    3741
    38             <?php $this->view( $this->view_path, 'required', FALSE, $input ); ?>
     42            <?php ContactFormAdmin::view( 'required', $input ); ?>
    3943
    4044        </tbody>
  • wprequal/trunk/views/contact/admin/number.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<li class="slide number lead-field <?php esc_attr_e( $input['key'] ); ?>">
    1519
    16     <?php $this->view( $this->view_path, 'head', FALSE, $input ); ?>
     20    <?php ContactFormAdmin::view( 'head', $input ); ?>
    1721
    1822    <table class="form-table">
     
    2024        <tbody class="input-labels">
    2125
    22             <?php $this->view( $this->view_path, 'label', FALSE, $input ); ?>
    23             <?php $this->view( $this->view_path, 'min', FALSE, $input ); ?>
    24             <?php $this->view( $this->view_path, 'max', FALSE, $input ); ?>
    25             <?php $this->view( $this->view_path, 'step', FALSE, $input ); ?>
    26             <?php $this->view( $this->view_path, 'default', FALSE, $input ); ?>
    27             <?php $this->view( $this->view_path, 'required', FALSE, $input ); ?>
     26            <?php ContactFormAdmin::view( 'label', $input ); ?>
     27            <?php ContactFormAdmin::view( 'min', $input ); ?>
     28            <?php ContactFormAdmin::view( 'max', $input ); ?>
     29            <?php ContactFormAdmin::view( 'step', $input ); ?>
     30            <?php ContactFormAdmin::view( 'default', $input ); ?>
     31            <?php ContactFormAdmin::view( 'required', $input ); ?>
    2832
    2933        </tbody>
  • wprequal/trunk/views/contact/admin/options.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<tr class="contact-options">
  • wprequal/trunk/views/contact/admin/phone-mask.php

    r2315196 r2356316  
    1111
    1212namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
    1317
    1418$options = array(
  • wprequal/trunk/views/contact/admin/phone.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<li class="slide phone <?php esc_attr_e( $input['key'] ); ?>">
    1519
    16     <?php $this->view( $this->view_path, 'head', FALSE, $input ); ?>
     20    <?php ContactFormAdmin::view( 'head', $input ); ?>
    1721
    1822    <table class="form-table">
     
    2024        <tbody class="input-labels">
    2125
    22             <?php $this->view( $this->view_path, 'label', FALSE, $input ); ?>
    23             <?php $this->view( $this->view_path, 'placeholder', FALSE, $input ); ?>
    24             <?php $this->view( $this->view_path, 'phone-mask', FALSE, $input ); ?>
    25             <?php $this->view( $this->view_path, 'required', FALSE, $input ); ?>
     26            <?php ContactFormAdmin::view( 'label', $input ); ?>
     27            <?php ContactFormAdmin::view( 'placeholder', $input ); ?>
     28            <?php ContactFormAdmin::view( 'phone-mask', $input ); ?>
     29            <?php ContactFormAdmin::view( 'required', $input ); ?>
    2630
    2731        </tbody>
  • wprequal/trunk/views/contact/admin/placeholder.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<tr>
  • wprequal/trunk/views/contact/admin/radio.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
     17
    1418$input['input'] = 'radio'; ?>
    1519
    1620<li class="slide radio lead-field <?php esc_attr_e( $input['key'] ); ?>">
    1721
    18     <?php $this->view( $this->view_path, 'head', FALSE, $input ); ?>
     22    <?php ContactFormAdmin::view( 'head', $input ); ?>
    1923
    2024    <table class="form-table">
     
    2226        <tbody class="input-rows">
    2327
    24             <?php $this->view( $this->view_path, 'label', FALSE, $input ); ?>
    25             <?php $this->view( $this->view_path, 'required', FALSE, $input ); ?>
     28            <?php ContactFormAdmin::view( 'label', $input ); ?>
     29            <?php ContactFormAdmin::view( 'required', $input ); ?>
    2630
    2731        </tbody>
     
    2933        <tbody class="input-options">
    3034
    31             <?php $this->view( $this->view_path, 'options', FALSE, $input ); ?>
     35            <?php ContactFormAdmin::view( 'options', $input ); ?>
    3236
    3337        </tbody>
  • wprequal/trunk/views/contact/admin/range.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<li class="slide range lead-field <?php esc_attr_e( $input['key'] ); ?>">
    1519
    16     <?php $this->view( $this->view_path, 'head', FALSE, $input ); ?>
     20    <?php ContactFormAdmin::view( 'head', $input ); ?>
    1721
    1822    <table class="form-table">
     
    2024        <tbody class="input-labels">
    2125
    22             <?php $this->view( $this->view_path, 'label', FALSE, $input ); ?>
    23             <?php $this->view( $this->view_path, 'min', FALSE, $input ); ?>
    24             <?php $this->view( $this->view_path, 'max', FALSE, $input ); ?>
    25             <?php $this->view( $this->view_path, 'step', FALSE, $input ); ?>
    26             <?php $this->view( $this->view_path, 'default', FALSE, $input ); ?>
    27             <?php $this->view( $this->view_path, 'required', FALSE, $input ); ?>
     26            <?php ContactFormAdmin::view( 'label', $input ); ?>
     27            <?php ContactFormAdmin::view( 'min', $input ); ?>
     28            <?php ContactFormAdmin::view( 'max', $input ); ?>
     29            <?php ContactFormAdmin::view( 'step', $input ); ?>
     30            <?php ContactFormAdmin::view( 'default', $input ); ?>
     31            <?php ContactFormAdmin::view( 'required', $input ); ?>
    2832
    2933        </tbody>
  • wprequal/trunk/views/contact/admin/register-email.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<table class="form-table">
     
    1620    <tbody class="input-labels">
    1721
    18         <?php $this->view( $this->view_path, 'label', FALSE, $input ); ?>
    19         <?php $this->view( $this->view_path, 'placeholder', FALSE, $input ); ?>
    20         <?php $this->view( $this->view_path, 'email-mask', FALSE, $input ); ?>
    21         <?php $this->view( $this->view_path, 'required', FALSE, $input ); ?>
     22        <?php view( RegisterFormAdmin::view_path, 'label', [ 'input' => $input ] ); ?>
     23        <?php view( RegisterFormAdmin::view_path, 'placeholder', [ 'input' => $input ] ); ?>
     24        <?php view( RegisterFormAdmin::view_path, 'email-mask', [ 'input' => $input ] ); ?>
     25        <?php view( RegisterFormAdmin::view_path, 'required', [ 'input' => $input ] ); ?>
    2226
    2327    </tbody>
  • wprequal/trunk/views/contact/admin/register-input.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
    14 $input = $this->get_input( get_the_ID() );
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
    1517
    1618wp_nonce_field( 'save_register_inputs', 'save_register_inputs_nonce' );
    1719
    18 $this->view( 'contact/admin', 'register-email', FALSE, $input ); ?>
     20view( RegisterFormAdmin::view_path, 'register-email', [ 'input' => $input ] ); ?>
    1921
    2022<input type="hidden" name="input[<?php esc_attr_e( $input['key'] ); ?>][key]" value="<?php esc_attr_e( $input['key'] ); ?>">
    2123<input type="hidden" name="input[<?php esc_attr_e( $input['key'] ); ?>][type]" value="<?php esc_attr_e( $input['type'] ); ?>">
    22 <input type="hidden" name="input[<?php esc_attr_e( $input['key'] ); ?>][head]" value="<?php esc_attr_e( $input['head'] ); ?>" class="head">
    23 
  • wprequal/trunk/views/contact/admin/register-shortcode.php

    r2315196 r2356316  
    99 * @package WPrequal
    1010 */
     11
    1112namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
    1217
    1318$post_id = get_the_ID(); ?>
  • wprequal/trunk/views/contact/admin/required.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
     17
    1418$checked = ( isset( $input['required'] ) && 'checked' === $input['required'] )  ? 'checked' : ''; ?>
    1519
  • wprequal/trunk/views/contact/admin/section.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<li class="slide section lead-field <?php esc_attr_e( $input['key'] ); ?>">
    1519
    16     <?php $this->view( $this->view_path, 'head', FALSE, $input ); ?>
     20    <?php ContactFormAdmin::view( 'head', $input ); ?>
    1721
    1822    <table class="form-table">
     
    2024        <tbody class="input-labels">
    2125
    22             <?php $this->view( $this->view_path, 'label', FALSE, $input ); ?>
     26            <?php ContactFormAdmin::view( 'label', $input ); ?>
    2327
    2428        </tbody>
  • wprequal/trunk/views/contact/admin/select.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
    14 $input['input'] = 'radio'; ?>
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
     17
     18$input['input'] = 'select'; ?>
    1519
    1620<li class="slide select lead-field <?php esc_attr_e( $input['key'] ); ?>">
    1721
    18     <?php $this->view( $this->view_path, 'head', FALSE, $input ); ?>
     22    <?php ContactFormAdmin::view( 'head', $input ); ?>
    1923
    2024    <table class="form-table">
     
    2226        <tbody class="input-rows">
    2327
    24             <?php $this->view( $this->view_path, 'label', FALSE, $input ); ?>
    25             <?php $this->view( $this->view_path, 'required', FALSE, $input ); ?>
     28            <?php ContactFormAdmin::view( 'label', $input ); ?>
     29            <?php ContactFormAdmin::view( 'required', $input ); ?>
    2630
    2731        </tbody>
     
    2933        <tbody class="input-options">
    3034
    31             <?php $this->view( $this->view_path, 'options', FALSE, $input ); ?>
     35            <?php ContactFormAdmin::view( 'options', $input ); ?>
    3236
    3337        </tbody>
  • wprequal/trunk/views/contact/admin/shortcode.php

    r2315196 r2356316  
    99 * @package WPrequal
    1010 */
     11
    1112namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
    1217
    1318$post_id = get_the_ID(); ?>
  • wprequal/trunk/views/contact/admin/step.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
     17
    1418$value = empty( $input['step'] ) ? '' : $input['step']; ?>
    1519
  • wprequal/trunk/views/contact/admin/text.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<li class="slide text lead-field <?php esc_attr_e( $input['key'] ); ?>">
    1519
    16     <?php $this->view( $this->view_path, 'head', FALSE, $input ); ?>
     20    <?php ContactFormAdmin::view( 'head', $input ); ?>
    1721
    1822    <table class="form-table">
     
    2024        <tbody class="input-labels">
    2125
    22             <?php $this->view( $this->view_path, 'label', FALSE, $input ); ?>
    23             <?php $this->view( $this->view_path, 'placeholder', FALSE, $input ); ?>
    24             <?php $this->view( $this->view_path, 'required', FALSE, $input ); ?>
     26            <?php ContactFormAdmin::view( 'label', $input ); ?>
     27            <?php ContactFormAdmin::view( 'placeholder', $input ); ?>
     28            <?php ContactFormAdmin::view( 'required', $input ); ?>
    2529
    2630        </tbody>
  • wprequal/trunk/views/contact/admin/textarea.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<li class="slide textarea lead-field <?php esc_attr_e( $input['key'] ); ?>">
    1519
    16     <?php $this->view( $this->view_path, 'head', FALSE, $input ); ?>
     20    <?php ContactFormAdmin::view( 'head', $input ); ?>
    1721
    1822    <table class="form-table">
     
    2024        <tbody class="input-labels">
    2125
    22             <?php $this->view( $this->view_path, 'label', FALSE, $input ); ?>
    23             <?php $this->view( $this->view_path, 'placeholder', FALSE, $input ); ?>
    24             <?php $this->view( $this->view_path, 'required', FALSE, $input ); ?>
     26            <?php ContactFormAdmin::view( 'label', $input ); ?>
     27            <?php ContactFormAdmin::view( 'placeholder', $input ); ?>
     28            <?php ContactFormAdmin::view( 'required', $input ); ?>
    2529
    2630        </tbody>
  • wprequal/trunk/views/contact/form/checkbox.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
    14 $is_array = ( 1 === count( $input['options'] ) ) ? '' : '[]'; ?>
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
     17
     18$is_array = ( 1 === count( $options ) ) ? '' : '[]'; ?>
    1519
    1620<div class="wpq-col <?php esc_attr_e( $class ); ?>">
     
    1822    <fieldset>
    1923
    20         <?php if ( $view = apply_filters( 'wprequal_view', 'contact/form/legend' ) ) {
    21             include $view;
    22         } ?>
     24        <?php view( 'contact/form', 'legend', $args ); ?>
    2325
    24         <?php foreach ( $input['options'] as $option ) { ?>
     26        <?php foreach ( $options as $option ) { ?>
    2527
    2628            <?php $checked = isset( $option['checked'] ) ? 'checked' : ''; ?>
  • wprequal/trunk/views/contact/form/comments.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<div class="wpq-col <?php esc_attr_e( $class ); ?>">
    1519
    16     <?php if ( $view = apply_filters( 'wprequal_view', 'contact/form/label' ) ) {
    17         include $view;
    18     } ?>
     20    <?php view( 'contact/form', 'label', $args ); ?>
    1921
    2022    <textarea
    2123        name="lead[contact][comments]"
    2224        class="<?php esc_attr_e( $required ); ?> textarea wpq-input"
    23         placeholder="<?php esc_attr_e( $holder ); ?>"
     25        placeholder="<?php esc_attr_e( $placeholder ); ?>"
    2426        <?php printf( '%s', $label ); ?>
    2527    ></textarea>
  • wprequal/trunk/views/contact/form/contact-form.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<form class="wprequal-form contact-form">
    1519
    16     <?php if ( $view = apply_filters( 'wprequal_view', "contact/form/contact-inputs" ) ) {
    17         include $view;
    18     } ?>
     20    <?php view( 'contact/form', 'contact-inputs', [
     21        'inputs'  => $inputs,
     22        'details' => $details,
     23        'type'            => $type,
     24        'contact_form_id' => $contact_form_id
     25    ] ); ?>
    1926
    2027</form>
  • wprequal/trunk/views/contact/form/contact-inputs.php

    r2350549 r2356316  
    1212namespace WPrequal\App;
    1313
    14 foreach ( $inputs as $input ) {
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
    1517
    16     $label      = isset( $input['label'] ) ? $input['label'] : '';
    17     $class      = isset( $input['class'] ) ? $input['class'] : '';;
    18     $key        = isset( $input['key'] ) ? $input['key'] : '';
    19     $holder     = isset( $input['placeholder'] ) ? $input['placeholder'] : '';
    20     $required   = isset( $input['required'] ) ? 'wpq-required' : '';
    21     $value      = isset( $input['default_value'] ) ? $input['default_value'] : '';
    22     $type_label = isset( $input['type_label'] ) ? $input['type_label'] : '' ?>
     18foreach ( $inputs as $input ) { ?>
    2319
    2420    <div class="wpq-row">
    25         <?php if ( $view = apply_filters( 'wprequal_view', "contact/form/{$input['type']}" ) ) {
    26             include $view;
    27         } ?>
     21        <?php view( 'contact/form', $input['type'], $input ); ?>
    2822    </div>
    2923
     
    3630    <?php $button_action = empty( $args['button_action'] ) ? 'submit-button' : $args['button_action']; ?>
    3731
    38     <?php if ( $view = apply_filters( 'wprequal_view', "contact/form/$button_action" ) ) {
    39         include $view;
    40     } ?>
     32    <?php view( 'contact/form', $button_action, $details ); ?>
    4133
    4234</div>
     
    4638<?php $source_url = ( is_front_page() || is_home() ) ? home_url() : get_permalink(); ?>
    4739<input type="hidden" name="source_url" value="<?php esc_attr_e( $source_url ); ?>">
    48 <input type="hidden" name="contact_form_id" value="<?php esc_attr_e( $args['contact_form_id'] ); ?>">
     40<input type="hidden" name="contact_form_id" value="<?php esc_attr_e( $contact_form_id ); ?>">
    4941<input type="hidden" name="social_referrer" class="social_referrer cookie">
    5042<input type="hidden" name="param_referrer" class="param_referrer cookie">
    51 <input type="hidden" name="type" value ="<?php esc_attr_e( $args['type'] ); ?>"/>
     43<input type="hidden" name="type" value ="<?php esc_attr_e( $type ); ?>"/>
    5244<?php do_action( 'wprequal_contact_hidden_inputs' ); ?>
  • wprequal/trunk/views/contact/form/email-input.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
    14 $mask   = ( isset( $input['email_mask'] ) && 'yes' === $input['email_mask'] ) ? 'mask-email' : ''; ?>
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
     17
     18$mask = ( isset( $email_mask ) && 'yes' === $email_mask ) ? 'mask-email' : ''; ?>
    1519
    1620<input
     
    1822    name="lead[contact][email]"
    1923    class="<?php esc_attr_e( $required ); ?> text-input wpq-input <?php esc_attr_e( $mask ); ?>"
    20     placeholder="<?php esc_attr_e( $holder ); ?>"
     24    placeholder="<?php esc_attr_e( $placeholder ); ?>"
    2125    aria-label="Email"
    2226/>
  • wprequal/trunk/views/contact/form/email.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<div class="wpq-col <?php esc_attr_e( $class ); ?>">
    15     <?php if ( $view = apply_filters( 'wprequal_view', 'contact/form/label' ) ) {
    16         include $view;
    17     } ?>
    1819
    19     <?php if ( $view = apply_filters( 'wprequal_view', 'contact/form/email-input' ) ) {
    20         include $view;
    21     } ?>
     20    <?php view( 'contact/form', 'label', $args ); ?>
     21    <?php view( 'contact/form', 'email-input', $args ); ?>
     22
    2223</div>
  • wprequal/trunk/views/contact/form/hidden.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<div class="wpq-hidden">
  • wprequal/trunk/views/contact/form/label.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<div class="label">
  • wprequal/trunk/views/contact/form/legend.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<legend>
  • wprequal/trunk/views/contact/form/name.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
    14 $first    = isset( $input['labels']['fname'] ) ? $input['labels']['fname'] : '';
    15 $last     = isset( $input['labels']['lname'] ) ? $input['labels']['lname'] : ''; ?>
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
     17
     18$first = isset( $labels['fname'] ) ? $labels['fname'] : '';
     19$last  = isset( $labels['lname'] ) ? $labels['lname'] : ''; ?>
    1620
    1721<div class="wpq-col <?php esc_attr_e( $class ); ?>">
    1822
    19     <?php $label = $first; ?>
    20     <?php if ( $view = apply_filters( 'wprequal_view', 'contact/form/label' ) ) {
    21         include $view;
    22     } ?>
     23    <?php view( 'contact/form', 'label', [ 'label' => $first, 'required' => $required ] ); ?>
    2324
    2425    <input type="text" name="lead[contact][fname]" class="<?php esc_attr_e( $required ); ?> text-input wpq-input"
     
    2829<div class="wpq-col <?php esc_attr_e( $class ); ?>">
    2930
    30     <?php $label = $last; ?>
    31     <?php if ( $view = apply_filters( 'wprequal_view', 'contact/form/label' ) ) {
    32         include $view;
    33     } ?>
     31    <?php view( 'contact/form', 'label', [ 'label' => $last, 'required' => $required ] ); ?>
    3432
    3533    <input type="text" name="lead[contact][lname]" class="<?php esc_attr_e( $required ); ?> text-input wpq-input"
  • wprequal/trunk/views/contact/form/next-slide.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<div class="wpq-col wpq-p-4">
  • wprequal/trunk/views/contact/form/number.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<div class="wpq-col <?php esc_attr_e( $class ); ?>">
    1519
    16     <?php if ( $view = apply_filters( 'wprequal_view', 'contact/form/label' ) ) {
    17         include $view;
    18     } ?>
     20    <?php view( 'contact/form', 'label', $args ); ?>
    1921
    2022    <input
     
    2224        name="lead[fields][<?php esc_attr_e( $key ); ?>]"
    2325        class="<?php esc_attr_e( $required ); ?> text-input wpq-input"
    24         min="<?php esc_attr_e( $input['min'] ); ?>"
    25         max="<?php esc_attr_e( $input['max'] ); ?>"
    26         step="<?php esc_attr_e( $input['step'] ); ?>"
    27         value="<?php esc_attr_e( $input['default'] ); ?>"
     26        min="<?php esc_attr_e( $min ); ?>"
     27        max="<?php esc_attr_e( $max ); ?>"
     28        step="<?php esc_attr_e( $step ); ?>"
     29        value="<?php esc_attr_e( $default ); ?>"
    2830        aria-label="<?php esc_attr_e( $label ); ?>"
    2931    />
  • wprequal/trunk/views/contact/form/output.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<div class="label">
    1519    <?php printf( '%s', esc_html( $label ) ); ?>
    1620    <?php printf( '%s', empty( $required ) ? '' : '<span class="red">*</span>' ); ?>
    17     <?php printf( '<output class="output" for="%s">%s</output>', esc_attr( $randID ), esc_html( $input['default'] ) ); ?>
     21    <?php printf( '<output class="output" for="%s">%s</output>', esc_attr( $randID ), esc_html( $default ) ); ?>
    1822</div>
    1923
  • wprequal/trunk/views/contact/form/phone.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
    14 $mask = isset( $input['phone_mask'] )  ? $input['phone_mask']  : ''; ?>
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
     17
     18$mask = isset( $phone_mask )  ? $phone_mask  : ''; ?>
    1519
    1620<div class="wpq-col <?php esc_attr_e( $class ); ?>">
    1721
    18     <?php if ( $view = apply_filters( 'wprequal_view', 'contact/form/label' ) ) {
    19         include $view;
    20     } ?>
     22    <?php view( 'contact/form', 'label', $args ); ?>
    2123
    2224    <input
     
    2426        name="lead[contact][phone]"
    2527        class="<?php esc_attr_e( $required ); ?> text-input wpq-input mask-phone"
    26         placeholder="<?php esc_attr_e( $holder ); ?>"
     28        placeholder="<?php esc_attr_e( $placeholder ); ?>"
    2729        <?php if ( ! empty( $mask ) && 'no' !== $mask ) { ?>
    2830            data-phone-mask="<?php esc_attr_e( $mask ); ?>"
  • wprequal/trunk/views/contact/form/radio.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<div class="wpq-col <?php esc_attr_e( $class ); ?>">
     
    1620    <fieldset>
    1721
    18         <?php if ( $view = apply_filters( 'wprequal_view', 'contact/form/legend' ) ) {
    19             include $view;
    20         } ?>
     22        <?php view( 'contact/form', 'legend', $args ); ?>
    2123
    22         <?php foreach ( $input['options'] as $option ) { ?>
     24        <?php foreach ( $options as $option ) { ?>
    2325
    2426            <?php $checked = isset( $option['checked'] ) ? 'checked' : ''; ?>
  • wprequal/trunk/views/contact/form/range.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
    14 $randID = 'range-' . rand( 1, 99999 ); ?>
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
     17
     18$args['randID'] = $randID = 'range-' . rand( 1, 99999 ); ?>
    1519
    1620<div class="wpq-col <?php esc_attr_e( $class ); ?> range-wrap">
    1721
    18     <?php if ( $view = apply_filters( 'wprequal_view', 'contact/form/output' ) ) {
    19         include $view;
    20     } ?>
     22    <?php view( 'contact/form', 'output', $args ); ?>
    2123
    2224    <input
     
    2527        name="lead[fields][<?php esc_attr_e( $key ); ?>]"
    2628        class="<?php esc_attr_e( $required ); ?> range-input wpq-input"
    27         min="<?php esc_attr_e( $input['min'] ); ?>"
    28         max="<?php esc_attr_e( $input['max'] ); ?>"
    29         step="<?php esc_attr_e( $input['step'] ); ?>"
    30         value="<?php esc_attr_e( $input['default'] ); ?>"
     29        min="<?php esc_attr_e( $min ); ?>"
     30        max="<?php esc_attr_e( $max ); ?>"
     31        step="<?php esc_attr_e( $step ); ?>"
     32        value="<?php esc_attr_e( $default ); ?>"
    3133        aria-label="<?php esc_attr_e( $label ); ?>"
    3234    />
  • wprequal/trunk/views/contact/form/register-form.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
     17
    1418$required = ( isset( $input['required'] ) && 'checked' === $input['required'] ) ? 'wpq-required' : '';
    15 $holder   = isset( $input['placeholder'] ) ? $input['placeholder'] : '';
     19$placeholder   = isset( $input['placeholder'] ) ? $input['placeholder'] : '';
    1620$mask     = ( isset( $input['email_mask'] ) && 'yes' === $input['email_mask'] ) ? 'mask-email' : '';?>
    1721
     
    2428        name="lead[contact][email]"
    2529        class="<?php esc_attr_e( $required ); ?> text-input wpq-input <?php esc_attr_e( $mask ); ?>"
    26         placeholder="<?php esc_attr_e( $holder ); ?>"
     30        placeholder="<?php esc_attr_e( $placeholder ); ?>"
    2731        aria-label="Email"
    2832        id="register-email"
  • wprequal/trunk/views/contact/form/section.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<!-- Section <?php esc_html_e( $label ); ?> -->
  • wprequal/trunk/views/contact/form/select.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<div class="wpq-col <?php esc_attr_e( $class ); ?>">
    1519
    16     <?php if ( $view = apply_filters( 'wprequal_view', 'contact/form/label' ) ) {
    17         include $view;
    18     } ?>
     20    <?php view( 'contact/form', 'label', $args ); ?>
    1921
    2022    <select
     
    2426    >
    2527
    26         <?php foreach ( $input['options'] as $option ) { ?>
     28        <?php foreach ( $options as $option ) { ?>
    2729
    2830            <?php $selected = isset( $option['checked'] ) ? 'selected' : ''; ?>
  • wprequal/trunk/views/contact/form/submit-button.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<div class="wpq-col wpq-p-4">
    1519    <button class="wprequal-submit button" aria-label="Submit">
    16         <?php printf( '%s', $details['button_text'] ); ?>
     20        <?php printf( '%s', $button_text ); ?>
    1721    </button>
    1822</div>
  • wprequal/trunk/views/contact/form/text.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<div class="wpq-col <?php esc_attr_e( $class ); ?>">
    1519
    16     <?php if ( $view = apply_filters( 'wprequal_view', 'contact/form/label' ) ) {
    17         include $view;
    18     } ?>
     20    <?php view( 'contact/form', 'label', $args ); ?>
    1921
    2022    <input
     
    2224        name="lead[fields][<?php esc_attr_e( $key ); ?>]"
    2325        class="<?php esc_attr_e( $required ); ?> text-input wpq-input"
    24         placeholder="<?php esc_attr_e( $holder ); ?>"
     26        placeholder="<?php esc_attr_e( $placeholder ); ?>"
    2527        aria-label="<?php esc_attr_e( $label ); ?>"
    2628    />
  • wprequal/trunk/views/contact/form/textarea.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<div class="wpq-col <?php esc_attr_e( $class ); ?>">
    1519
    16     <?php if ( $view = apply_filters( 'wprequal_view', 'contact/form/label' ) ) {
    17         include $view;
    18     } ?>
     20    <?php view( 'contact/form', 'label', $args ); ?>
    1921
    2022    <textarea
    2123        name="lead[fields][<?php esc_attr_e( $key ); ?>]"
    2224        class="<?php esc_attr_e( $required ); ?> text-input wpq-input"
    23         placeholder="<?php esc_attr_e( $holder ); ?>"
     25        placeholder="<?php esc_attr_e( $placeholder ); ?>"
    2426        aria-label="<?php esc_attr_e( $label ); ?>"
    2527    ></textarea>
  • wprequal/trunk/views/contact/widget/contact-form.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
    14 $title   = ! empty( $instance['title'] )   ? $instance['title']   : '';
    15 $content = ! empty( $instance['content'] ) ? $instance['content'] : '';
    16 $post_id = isset( $instance['post_id'] ) ? $instance['post_id'] : '';
    17 
    18 $args = array(
    19     'post_type'         => 'wpq_contact_form',
    20     'name'              => $this->get_field_name( 'post_id' ),
    21     'class'             => 'post_id widefat',
    22     'id'                => 'post_id',
    23     'selected'          => $post_id,
    24     'show_option_none'  => __('Select One')
    25 ); ?>
    26 
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    2717
    2818<p>
    29     <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>">
     19    <label for="<?php echo esc_attr( $title_id ); ?>">
    3020        <?php esc_attr_e( 'Ttile:', 'wprequal' ); ?>
    3121    </label>
     
    3323    <input
    3424        class="widefat"
    35         id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"
    36         name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>"
     25        id="<?php echo esc_attr( $title_id ); ?>"
     26        name="<?php echo esc_attr( $title_name ); ?>"
    3727        type="text"
    3828        value="<?php echo esc_attr( $title ); ?>"
     
    4131
    4232<p>
    43     <label for="<?php echo esc_attr( $this->get_field_id( 'content' ) ); ?>">
     33    <label for="<?php echo esc_attr( $content_id ); ?>">
    4434        <?php esc_attr_e( 'Content:', 'wprequal' ); ?>
    4535    </label>
     
    4838        class="widefat"
    4939        rows="5"
    50         id="<?php echo esc_attr( $this->get_field_id( 'content' ) ); ?>"
    51         name="<?php echo esc_attr( $this->get_field_name( 'content' ) ); ?>"
     40        id="<?php echo esc_attr( $content_id ); ?>"
     41        name="<?php echo esc_attr( $content_name ); ?>"
    5242    ><?php echo esc_attr( $content ); ?></textarea>
    5343</p>
  • wprequal/trunk/views/contact/widget/register-form.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
    14 $title   = ! empty( $instance['title'] )   ? $instance['title']   : '';
    15 $content = ! empty( $instance['content'] ) ? $instance['content'] : '';
    16 $post_id = isset( $instance['post_id'] ) ? $instance['post_id'] : '';
    17 
    18 $args = array(
    19     'post_type'         => 'wpq_register_form',
    20     'name'              => $this->get_field_name( 'post_id' ),
    21     'class'             => 'post_id widefat',
    22     'id'                => 'post_id',
    23     'selected'          => $post_id,
    24     'show_option_none'  => __('Select One')
    25 ); ?>
    26 
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    2717
    2818<p>
    29     <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>">
     19    <label for="<?php echo esc_attr( $title_id ); ?>">
    3020        <?php esc_attr_e( 'Ttile:', 'wprequal' ); ?>
    3121    </label>
     
    3323    <input
    3424        class="widefat"
    35         id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"
    36         name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>"
     25        id="<?php echo esc_attr( $title_id ); ?>"
     26        name="<?php echo esc_attr( $title_name ); ?>"
    3727        type="text"
    3828        value="<?php echo esc_attr( $title ); ?>"
     
    4131
    4232<p>
    43     <label for="<?php echo esc_attr( $this->get_field_id( 'content' ) ); ?>">
     33    <label for="<?php echo esc_attr( $content_id ); ?>">
    4434        <?php esc_attr_e( 'Content:', 'wprequal' ); ?>
    4535    </label>
     
    4838        class="widefat"
    4939        rows="5"
    50         id="<?php echo esc_attr( $this->get_field_id( 'content' ) ); ?>"
    51         name="<?php echo esc_attr( $this->get_field_name( 'content' ) ); ?>"
     40        id="<?php echo esc_attr( $content_id ); ?>"
     41        name="<?php echo esc_attr( $content_name ); ?>"
    5242    ><?php echo esc_attr( $content ); ?></textarea>
    5343</p>
  • wprequal/trunk/views/email/notification.php

    r2350549 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
     17
     18extract( $contact ); ?>
    1319
    1420<html lang="en-US">
     
    147153                            <td id="<?php esc_attr_e( $key ); ?>">
    148154
    149                                 <?php if ( Core::status( 1 ) ) {
    150 
    151                                     esc_html_e( $value );
    152 
    153                                 } else {
    154 
    155                                     if ( $view = apply_filters( 'wprequal_view', 'buttons/go-premium' ) ) {
    156                                         include $view;
    157                                     }
    158 
    159                                 }  ?>
     155                                <?php Core::status( 1 ) ? esc_html_e( $value ) : view( 'buttons', 'go-premium' ); ?>
    160156
    161157                            </td>
  • wprequal/trunk/views/lead/contact.php

    r2350549 r2356316  
    1212namespace WPrequal\App;
    1313
    14 $values = get_post_meta( get_the_ID(), $this->contact_key, TRUE ) ?: array();
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
     17
    1518extract( $values );
    1619
  • wprequal/trunk/views/lead/export.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<h1><?php _e( 'Export Leads', 'wprequal' ); ?></h1>
    1519
    1620<?php if ( ! Core::status( 1 ) ) {
    17     $this->view( 'buttons', 'go-premium' );
     21    view( 'buttons', 'go-premium' );
    1822    return;
    19 }
    20 
    21 $access_token = Core::access_token();
    22 $href = admin_url( "/edit.php?post_type={$this->post_type}&page=export-leads&export_key={$access_token}" ); ?>
     23} ?>
    2324
    2425<div class="export-leads-wrapper">
  • wprequal/trunk/views/lead/fields.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
    14 $values = get_post_meta( get_the_ID(), $this->fields_key, TRUE ) ?: array();
    15 $labels = get_post_meta( get_the_ID(), $this->labels_key, TRUE ) ?: array(); ?>
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1617
    1718<div class="lead-fields">
     
    4647                    <?php } else {
    4748
    48                             $this->view( 'buttons', 'go-premium' );
     49                            view( 'buttons', 'go-premium' );
    4950
    5051                    }  ?>
  • wprequal/trunk/views/settings/checkbox.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<td>
  • wprequal/trunk/views/settings/hidden.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<input
  • wprequal/trunk/views/settings/input.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<td>
  • wprequal/trunk/views/settings/note.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
    1313
    14 <td><?php
    15     if ( ! empty( $setting['note'] ) ) {
    16         $note = $this->notes( $setting['note'] );
    17         printf( '%s', $note );
    18     } ?>
    19 </td>
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
     17
     18if ( ! empty( $note ) ) {
     19    printf( '<td>%s</td>', $note );
     20}
  • wprequal/trunk/views/settings/page.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<div class="wprequal-wrap">
     
    1822    do_action( 'wprequal_help_buttons' ); ?>
    1923
    20     <form method="post" action="options.php?<?php echo $this->active_tab; ?>=<?php echo $this->group; ?>">
     24    <form method="post" action="options.php?<?php esc_attr_e( $active_tab ); ?>=<?php esc_attr_e( $group ); ?>">
    2125
    2226        <table class="form-table">
    2327
    24             <tbody><?php
     28            <tbody>
    2529
    26                 $this->tabs();
     30                <?php echo $tabs;
    2731
    28                 settings_fields( $this->group );
     32                settings_fields( $group );
    2933                do_settings_fields( WPREQUAL_CAP, 'default' ); ?>
    3034
    3135            </tbody>
    3236
    33         </table><?php
     37        </table>
    3438
    35         submit_button(); ?>
     39        <?php submit_button(); ?>
    3640
    3741    </form>
  • wprequal/trunk/views/settings/select.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<td>
     
    1822        id="<?php printf( esc_attr__( '%s' ), $setting['key'] ); ?>"
    1923        class="<?php printf( esc_attr__( '%s' ), $setting['class'] ); ?>"
    20     ><?php
     24    >
    2125
    22         $values = is_object( $setting['values'] ) ? $setting['values'] : $this->get_values( $setting['values'] );
    23 
    24         foreach( $values as $key => $value ) {
     26        <?php foreach( $values as $key => $value ) {
    2527
    2628            $selected = $choice === $key ? 'selected' : '';
  • wprequal/trunk/views/settings/tabs.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<h2 class="nav-tab-wrapper"><?php
    1519
    16     $href = admin_url( "admin.php?page=" . WPREQUAL_OPTIONS . "&{$this->active_tab}=" );
    17 
    1820    foreach ( $tabs as $tab ) {
    1921
    20         $status = ( isset( $_GET[$this->active_tab] ) && $_GET[$this->active_tab] === $tab['id'] ) ? 'nav-tab-active' : $tab['status'];
     22        $status = ( isset( $_GET[$active_tab] ) && $_GET[$active_tab] === $tab['id'] ) ? 'nav-tab-active' : $tab['status'];
    2123
    2224        if ( Core::extend( $tab['extends'] ) ) { ?>
  • wprequal/trunk/views/survey/admin/amount.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
    1313
    14 <?php $this->view( 'survey', 'admin/slide-start' ); ?>
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
     17
     18<?php view( 'survey/admin', 'slide-start' ); ?>
    1519
    1620<tbody>
     
    6165</tbody>
    6266
    63 <?php $this->view( 'survey', 'admin/slide-end' ); ?>
     67<?php view( 'survey/admin', 'slide-end' ); ?>
  • wprequal/trunk/views/survey/admin/back-text.php

    r2315196 r2356316  
    1010 */
    1111namespace WPrequal\App;
     12
     13if ( ! defined( 'ABSPATH' ) ) {
     14    die( 'Access denied!!' );
     15}
    1216
    1317global $post;
  • wprequal/trunk/views/survey/admin/button.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<tr class="result">
  • wprequal/trunk/views/survey/admin/buttons.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
    1313
    14 <?php $this->view( 'survey', 'admin/slide-start' ); ?>
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
     17
     18<?php view( 'survey/admin', 'slide-start' ); ?>
    1519
    1620<tbody>
     
    2832<tbody class="button-tbody"></tbody>
    2933
    30 <?php $this->view( 'survey', 'admin/slide-end' ); ?>
     34<?php view( 'survey/admin', 'slide-end' ); ?>
  • wprequal/trunk/views/survey/admin/conditional-logic-result.php

    r2315196 r2356316  
    1010 */
    1111namespace WPrequal\App;
     12
     13if ( ! defined( 'ABSPATH' ) ) {
     14    die( 'Access denied!!' );
     15}
    1216
    1317$name = 'slide[{key}][logic][conditions][{randID}]'; ?>
  • wprequal/trunk/views/survey/admin/conditional-logic.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<tbody>
     
    6165    </tr>
    6266
    63     <?php $this->view( 'survey', 'inputs/conditional-logic-result' ); ?>
     67    <?php view( 'survey/inputs', 'conditional-logic-result' ); ?>
    6468
    6569</tbody>
  • wprequal/trunk/views/survey/admin/confirmation.php

    r2321931 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
    1313
    14 <?php $this->view( 'survey', 'admin/slide-start' ); ?>
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
     17
     18<?php view( 'survey/admin', 'slide-start' ); ?>
    1519
    1620<tbody>
     
    3034</tbody>
    3135
    32 <?php $this->view( 'survey', 'admin/slide-end' ); ?>
     36<?php view( 'survey/admin', 'slide-end' ); ?>
  • wprequal/trunk/views/survey/admin/contact.php

    r2321931 r2356316  
    1212namespace WPrequal\App;
    1313
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
     17
    1418$args = [
    1519    'post_type'        => 'wpq_contact_form',
     
    2024]; ?>
    2125
    22 <?php $this->view( 'survey', 'admin/slide-start' ); ?>
     26<?php view( 'survey/admin', 'slide-start' ); ?>
    2327
    2428<tbody>
     
    4448</tbody>
    4549
    46 <?php $this->view( 'survey', 'admin/slide-end' ); ?>
     50<?php view( 'survey/admin', 'slide-end' ); ?>
  • wprequal/trunk/views/survey/admin/fa-select.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<tr class="fa-select-row">
  • wprequal/trunk/views/survey/admin/icons.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
    1313
    14 <?php $this->view( 'survey', 'admin/slide-start' ); ?>
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
     17
     18<?php view( 'survey/admin', 'slide-start' ); ?>
    1519
    1620<tbody>
     
    2226        </th>
    2327
    24         <?php $fa_license = $this->fa_license(); ?>
    25         <?php $this->view( 'buttons', "$fa_license-fa-icons" ); ?>
     28        <?php $fa_license = SurveyFormAdmin::fa_license(); ?>
     29        <?php view( 'buttons', "$fa_license-fa-icons" ); ?>
    2630
    2731    </tr>
     
    3135<tbody class="fa-select-tbody"></tbody>
    3236
    33 <?php $this->view( 'survey', 'admin/slide-end' ); ?>
     37<?php view( 'survey/admin', 'slide-end' ); ?>
  • wprequal/trunk/views/survey/admin/processing.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
    1313
    14 <?php $this->view( 'survey', 'admin/slide-start' ); ?>
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
     17
     18<?php view( 'survey/admin', 'slide-start' ); ?>
    1519
    1620
    17 <?php $this->view( 'survey', 'admin/slide-end' ); ?>
     21<?php view( 'survey/admin', 'slide-end' ); ?>
  • wprequal/trunk/views/survey/admin/redirect.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
    1313
    14 <?php $this->view( 'survey', 'admin/slide-start' ); ?>
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
     17
     18<?php view( 'survey/admin', 'slide-start' ); ?>
    1519
    1620<tbody>
     
    114118</tbody>
    115119
    116 <?php $this->view( 'survey', 'admin/slide-end' ); ?>
     120<?php view( 'survey/admin', 'slide-end' ); ?>
  • wprequal/trunk/views/survey/admin/shortcode.php

    r2315196 r2356316  
    1111namespace WPrequal\App;
    1212
     13if ( ! defined( 'ABSPATH' ) ) {
     14    die( 'Access denied!!' );
     15}
     16
    1317$post_id = get_the_ID(); ?>
    1418
  • wprequal/trunk/views/survey/admin/slide-end.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418        <tbody>
    1519
    16             <?php $this->view( 'survey', 'admin/conditional-logic' ); ?>
     20            <?php view( 'survey/admin', 'conditional-logic' ); ?>
    1721
    1822        </tbody>
  • wprequal/trunk/views/survey/admin/slide-options.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<div class="survey slide-options">
  • wprequal/trunk/views/survey/admin/slide-start.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<li class="slide {type} {key}">
  • wprequal/trunk/views/survey/admin/slides.php

    r2321931 r2356316  
    1111
    1212namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
    1317
    1418global $post;
  • wprequal/trunk/views/survey/admin/styles.php

    r2315196 r2356316  
    1111
    1212namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
    1317
    1418// We add this here since this is a free feature and slides are premium.
  • wprequal/trunk/views/survey/admin/template.php

    r2315196 r2356316  
    99 * @package WPrequal
    1010 */
    11 namespace WPrequal\App; ?>
     11namespace WPrequal\App;
     12
     13if ( ! defined( 'ABSPATH' ) ) {
     14    die( 'Access denied!!' );
     15} ?>
    1216
    1317<div class="template">
  • wprequal/trunk/views/survey/admin/text.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
    1313
    14 <?php $this->view( 'survey', 'admin/slide-start' ); ?>
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
     17
     18<?php view( 'survey/admin', 'slide-start' ); ?>
    1519
    1620<tbody>
     
    3842</tbody>
    3943
    40 <?php $this->view( 'survey', 'admin/slide-end' ); ?>
     44<?php view( 'survey/admin', 'slide-end' ); ?>
  • wprequal/trunk/views/survey/form/amount.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<div class="amount wpq-col-12">
  • wprequal/trunk/views/survey/form/button.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418
  • wprequal/trunk/views/survey/form/confirmation.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16}
     17
    1418$content = apply_filters( 'wprequal_confirmation_content', '{editor}' ); ?>
    1519
  • wprequal/trunk/views/survey/form/contact.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<div class="survey-contact">{contact_form}</div>
  • wprequal/trunk/views/survey/form/form.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
    14 $rand    = mt_rand();
    15 $form_id = "wpq-{$rand}";
    16 $form    = array(
    17     'form_id'      => $form_id,
    18     'slides'       => $slides
    19 );
    20 
    21 $back_text = get_post_meta( $post_id, 'back_text', TRUE ) ?: ''; ?>
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    2217
    2318<script type="text/javascript">
     
    2722
    2823<style>
    29     <?php esc_attr_e( $this->styles( $post_id, $form_id ) ); ?>
     24    <?php esc_attr_e( $styles ); ?>
    3025</style>
    3126
    32 <form id="<?php esc_attr_e( $form_id ); ?>" class="<?php esc_attr_e( $this->classes( $post_id ) ); ?>" index="0" data-back-text="<?php esc_attr_e( $back_text ); ?>">
     27<form id="<?php esc_attr_e( $form['form_id'] ); ?>" class="<?php esc_attr_e( $classes ); ?>" index="0" data-back-text="<?php esc_attr_e( $back_text ); ?>">
    3328
    3429    <input type="hidden" name="survey_id" value="<?php esc_attr_e( $post_id ); ?>">
  • wprequal/trunk/views/survey/form/icon.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<div class="wpq-col">
  • wprequal/trunk/views/survey/form/popup.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<div class="wprequal-form-popup" style="height: 0px;overflow: hidden;">
    15     <?php $this->form( $post_id ); ?>
     19    <?php echo $form; ?>
    1620</div>
  • wprequal/trunk/views/survey/form/processing.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<div class="wpq-col-12">
  • wprequal/trunk/views/survey/form/slide.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<div class="slide {type} {key}">
  • wprequal/trunk/views/survey/form/text.php

    r2315196 r2356316  
    1010 */
    1111
    12 namespace WPrequal\App; ?>
     12namespace WPrequal\App;
     13
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    1317
    1418<div class="text wpq-col-12">
  • wprequal/trunk/views/survey/widget/form.php

    r2315196 r2356316  
    1212namespace WPrequal\App;
    1313
    14 $post_id = isset( $instance['post_id'] ) ? $instance['post_id'] : '';
    15 
    16 $args = array(
    17     'post_type' => 'wpq_survey_form',
    18     'name'      => $this->get_field_name( 'post_id' ),
    19     'class'     => 'post_id widefat',
    20     'id'        => 'post_id',
    21     'selected'  => $post_id
    22 ); ?>
     14if ( ! defined( 'ABSPATH' ) ) {
     15    die( 'Access denied!!' );
     16} ?>
    2317
    2418<p><label for="size"><?php _e( ' Survey Form', 'wprequal' ); ?></label>
  • wprequal/trunk/wprequal.php

    r2350557 r2356316  
    44Plugin URI:  https://wprequal.com
    55Description: Mortgage and Real Estate Lead Capture System
    6 Version:     7.7.8
     6Version:     7.7.9
    77Author:      WPrequal
    88Author URI:  https://wprequal.com
     
    3131use WPrequal\App\Nonce;
    3232
     33if ( ! defined( 'ABSPATH' ) ) {
     34    die( __( 'Access denied!!' ) );
     35}
     36
    3337$uploads = wp_get_upload_dir();
    3438
     
    4044
    4145$constants = array(
    42     'WPREQUAL_VERSION'            => '7.7.8',
     46    'WPREQUAL_VERSION'            => '7.7.9',
    4347    'WPREQOAL_PLUGIN'             => plugin_basename( __FILE__ ),
    4448    'WPREQUAL_OPTIONS'            => 'wprequal_options',
Note: See TracChangeset for help on using the changeset viewer.