Example #1
0
// Check if using Wordpress version 3.7 or higher
$version_gt_37 = PT_CV_Functions::wp_version_compare('3.7');
$settings = array();
// Id of current view
$id = 0;
// Check if this is edit View page
if (!empty($_GET['id'])) {
    $id = esc_sql($_GET['id']);
    if ($id) {
        // Get View settings
        global $pt_cv_admin_settings;
        $pt_cv_admin_settings = $settings = PT_CV_Functions::view_get_settings($id);
    }
}
// Submit handle
PT_CV_Functions::view_submit();
?>

<div class="wrap form-horizontal pt-wrap">
	<?php 
do_action(PT_CV_PREFIX_ . 'admin_view_header');
?>

	<h2><?php 
echo esc_html($id ? __('Edit View', PT_CV_TEXTDOMAIN) : get_admin_page_title());
?>
</h2>

	<?php 
if ($id) {
    ?>