/** * Render About page. * * @return void */ public static function about() { // Instantiate form object $form = WR_CF_Form::get_instance('wr_contactform_about_us'); // Render HTML form $form->render('about-us'); }
/** * Render configuration page. * * @return void */ public static function render() { // Init HTML form $form = WR_CF_Form::get_instance('wr_contactform_configuration', self::$fields); // Setup vertical tabs add_action('wr_form_post_render', array(__CLASS__, 'wr_form_post_render')); // Render HTML form $form->render('settings'); }
/** * Render custom meta box. * * @param WP_Post $post The object for the current post/page. * * @return void */ public static function print_submission_detail_html($post) { $fieldsFormAction = self::wr_contactform_get_field(); if (is_object($post)) { if (!empty($fieldsFormAction['fields'])) { foreach ($fieldsFormAction['fields'] as $key => $value) { // Get field data $fieldsFormAction['fields'][$key]['value'] = get_post_meta($post->ID, $key, true); } } } // Init HTML form $form = WR_CF_Form::get_instance('wr_contactform_submission_detail', $fieldsFormAction); // Render HTML form $form->render('submission-detail'); }
/** * Render custom meta box. * * @param WP_Post $post The object for the current post/page. * * @return void */ public static function print_form_settings_html($post) { $fieldsFormSettings = self::wr_contactform_get_field(); if (is_object($post)) { foreach ($fieldsFormSettings['fields'] as $key => $value) { // Get field data $value = get_post_meta($post->ID, $key, true); if (!empty($value)) { $fieldsFormSettings['fields'][$key]['value'] = get_post_meta($post->ID, $key, true); } } } // Init HTML form $form = WR_CF_Form::get_instance('wr_contactform_meta_box', $fieldsFormSettings); // Render HTML form $form->render('contactform-settings'); }