本文整理汇总了PHP中acf_form_head函数的典型用法代码示例。如果您正苦于以下问题:PHP acf_form_head函数的具体用法?PHP acf_form_head怎么用?PHP acf_form_head使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了acf_form_head函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ecs_econsult_acf_form_head
function ecs_econsult_acf_form_head()
{
$page = get_field('option_emailconsule_page', 'option');
if (is_page($page->ID)) {
acf_form_head();
}
}
示例2: acf_contact_display_form_head
function acf_contact_display_form_head()
{
global $post;
if (has_shortcode($post->post_content, 'acf_contact')) {
acf_form_head();
}
}
示例3: do_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();
}
示例4: load_acf_components
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');
}
}
示例5: init_acfHeader
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();
}
}
}
示例6: soloUsuarioRegistrado
<?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
示例7: wa_fronted_acf_form
/**
* 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();
}
}
示例8: buddyforms_acf_front_js_css_enqueue
/**
* 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'));
}
示例9: panel_load
function panel_load()
{
acf_form_head();
// enqueue scripts
wp_enqueue_script('live-edit-admin');
wp_enqueue_style('live-edit-admin');
}
示例10: template_redirect
/**
* 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();
}
}
示例11: add_acf_variables
public function add_acf_variables()
{
acf_form_head();
}
示例12: template_include
/**
* 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;
}
开发者ID:jupitercow,项目名称:sewn-in-subscription-management,代码行数:20,代码来源:sewn-in-subscription-management.php