function ecs_econsult_acf_form_head() { $page = get_field('option_emailconsule_page', 'option'); if (is_page($page->ID)) { acf_form_head(); } }
function acf_contact_display_form_head() { global $post; if (has_shortcode($post->post_content, 'acf_contact')) { acf_form_head(); } }
function do_acf_form_head() { // Bail if not logged in or not able to post if (!(is_user_logged_in() || current_user_can('edit_posts'))) { return; } acf_form_head(); }
function load_acf_components() { global $post; if (is_single() && in_array($post->post_type, array('organizations', 'objects', 'persons', 'cases'))) { acf_form_head(); $path_to_plugin = trailingslashit(plugin_dir_url(__FILE__)); wp_enqueue_style('acf_fix', $path_to_plugin . 'assets/css/acf_fix.css', false, false, 'all'); } }
function init_acfHeader() { global $post; if ($post->post_type == 'page' || $_GET['pid'] != '' || $post->post_type == 'post') { $args_id = afd_form_permision(); $display_form_checkbox = get_post_meta($args_id[0], '_meta_afd_form_render_box_key', true); define("ACF_FRONTEND_DISPLAY", $display_form_checkbox); $rule = get_post_meta($args_id[0], 'rule', true); if ($rule['param'] != 'post') { $display_form_checkbox == 'false'; } if ($display_form_checkbox == 'true') { acf_form_head(); } } }
<?php /** * Template Name: Registro API */ soloUsuarioRegistrado(); acf_form_head(); $user_ID = get_current_user_id(); get_header(); ?> <!-- CONTENIDO --> <section class="content registro-api"> <?php while (have_posts()) { the_post(); ?> <h1 class="title"><?php the_title(); ?> </h1> <?php the_content(); ?> <?php // Formulario ACF
/** * Outputs necessary ACF form head function * @param mixed $options either false or json encoded options */ public function wa_fronted_acf_form($options) { if (function_exists('acf_form_head') && $options !== false) { acf_form_head(); } }
/** * Enqueue the needed JS for the frontend * * @package buddyforms_acf * @since 0.1 */ function buddyforms_acf_front_js_css_enqueue() { wp_enqueue_style('wp-color-picker'); wp_enqueue_script('iris', admin_url('js/iris.min.js'), array('jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch'), false, 1); wp_enqueue_script('wp-color-picker', admin_url('js/color-picker.min.js'), array('iris'), false, 1); $colorpicker_l10n = array('clear' => __('Clear'), 'defaultString' => __('Default'), 'pick' => __('Select Color')); wp_localize_script('wp-color-picker', 'wpColorPickerL10n', $colorpicker_l10n); if (function_exists('acf_form_head')) { acf_form_head(); } // dequeue wp styling wp_dequeue_style(array('colors-fresh')); }
function panel_load() { acf_form_head(); // enqueue scripts wp_enqueue_script('live-edit-admin'); wp_enqueue_style('live-edit-admin'); }
/** * Redirect the pages depending on if the user is logged in or not. * * @author Jake Snyder * @since 1.0.0 * @return string $content The post content for login page with the login form a */ public function template_redirect() { if (array_key_exists(get_query_var('pagename'), $this->settings['pages'])) { $redirect = false; if ('register' == get_query_var('pagename') && is_user_logged_in()) { $redirect = apply_filters('acf/' . "{$this->prefix}/register/redirect/register", home_url('/profile/')); } if ('profile' == get_query_var('pagename') && !is_user_logged_in()) { $redirect = apply_filters("{$this->prefix}/register/redirect/profile", wp_login_url()); } if ($redirect) { wp_redirect($redirect); } // Load the acf form head acf_form_head(); } }
public function add_acf_variables() { acf_form_head(); }
/** * Make sure that the fake page uses the page templates and not single * * @author Jake Snyder * @since 0.1 * @param string $template Template file path * @return array $template */ public function template_include($template) { global $wp, $wp_query; if (is_page() && array_key_exists(strtolower($wp->request), $this->settings['pages'])) { acf_form_head(); $new_template = locate_template(array('page-' . $wp->request . '.php', 'page.php')); if ($new_template) { return $new_template; } } return $template; }