public static function post_options($values) { $post_types = FrmProAppHelper::get_custom_post_types(); if (!$post_types) { return; } $post_type = FrmProFormsHelper::post_type($values); $taxonomies = get_object_taxonomies($post_type); $echo = true; $show_post_type = false; if (isset($values['fields']) and $values['fields']) { foreach ($values['fields'] as $field) { if (!$show_post_type and $field['post_field'] != '') { $show_post_type = true; } } } if ($show_post_type) { $values['create_post'] = true; } $form_id = (int) $_GET['id']; $display = FrmProDisplay::get_form_custom_display($form_id); if ($display) { $display = FrmProDisplaysHelper::setup_edit_vars($display, true); } require FrmAppHelper::plugin_path() . '/pro/classes/views/frmpro-forms/post_options.php'; }
function form($form_action, $args = array()) { global $wpdb; extract($args); $post_types = FrmProAppHelper::get_custom_post_types(); if (!$post_types) { return; } $post_type = FrmProFormsHelper::post_type($args['values']['id']); $taxonomies = get_object_taxonomies($post_type); $action_control = $this; $echo = true; $form_id = $form->id; $display = false; $displays = array(); $display_ids = FrmDb::get_col($wpdb->postmeta, array('meta_key' => 'frm_form_id', 'meta_value' => $form_id), 'post_ID'); if ($display_ids) { $query_args = array('pm.meta_key' => 'frm_show_count', 'post_type' => 'frm_display', 'pm.meta_value' => array('dynamic', 'calendar', 'one'), 'p.post_status' => array('publish', 'private'), 'p.ID' => $display_ids); $displays = FrmDb::get_results($wpdb->posts . ' p LEFT JOIN ' . $wpdb->postmeta . ' pm ON (p.ID = pm.post_ID)', $query_args, 'p.ID, p.post_title', array('order_by' => 'p.post_title ASC')); if (isset($form_action->post_content['display_id'])) { // get view from settings if (is_numeric($form_action->post_content['display_id'])) { $display = FrmProDisplay::getOne($form_action->post_content['display_id'], false, true); } } else { if (!is_numeric($form_action->post_content['post_content']) && !empty($display_ids)) { // get auto view $display = FrmProDisplay::get_form_custom_display($form_id); if ($display) { $display = FrmProDisplaysHelper::setup_edit_vars($display, true); } } } } // Get array of all custom fields $custom_fields = array(); if (isset($form_action->post_content['post_custom_fields'])) { foreach ($form_action->post_content['post_custom_fields'] as $custom_field_opts) { if (isset($custom_field_opts['meta_name'])) { $custom_fields[] = $custom_field_opts['meta_name']; } unset($custom_field_opts); } } unset($display_ids); include dirname(__FILE__) . '/post_options.php'; }
public static function add_form_msg_options($values) { global $frm_vars; $post_types = FrmProAppHelper::get_custom_post_types(); require FrmAppHelper::plugin_path() . '/pro/classes/views/frmpro-forms/add_form_msg_options.php'; }
function post_options($values) { global $frm_ajax_url; $post_types = FrmProAppHelper::get_custom_post_types(); if (!$post_types) { return; } $post_type = FrmProForm::post_type($values); if (function_exists('get_object_taxonomies')) { $taxonomies = get_object_taxonomies($post_type); } $echo = true; $show_post_type = false; if (isset($values['fields']) and $values['fields']) { foreach ($values['fields'] as $field) { if (!$show_post_type and $field['post_field'] != '') { $show_post_type = true; } } } if ($show_post_type) { $values['create_post'] = true; } require FRMPRO_VIEWS_PATH . '/frmpro-forms/post_options.php'; }
function post_options($values) { global $frm_ajax_url; $post_types = FrmProAppHelper::get_custom_post_types(); if (!$post_types) { return; } $post_type = FrmProForm::post_type($values); if (function_exists('get_object_taxonomies')) { $taxonomies = get_object_taxonomies($post_type); } $echo = true; $show_post_type = false; if (isset($values['fields']) and $values['fields']) { foreach ($values['fields'] as $field) { if (!$show_post_type and $field['post_field'] != '') { $show_post_type = true; } } } if ($show_post_type) { $values['create_post'] = true; } $form_id = (int) $_GET['id']; $display = FrmProDisplay::getAll("form_id={$form_id} and show_count in ('single', 'dynamic', 'calendar')", '', ' LIMIT 1'); require FRMPRO_VIEWS_PATH . '/frmpro-forms/post_options.php'; }