Overview

Packages

  • ACF
  • Automation
    • Actions
    • Activation
    • LeadProfile
    • Menus
    • Queries
    • Rules
    • Triggers
  • CTA
    • Activation
    • AJAXListeners
    • Cloning
    • Core
    • Display
    • EditPage
    • Enqueues
    • GPLSettings
    • LeadsProfile
    • Loading
    • Menus
    • Notices
    • PlacementMetabox
    • PostType
    • Templates
    • Tracking
    • Variations
    • YOAST
  • InboundPro
    • Activation
    • AdminAJAX
    • AutoLoading
    • Cron
    • DataInterface
    • FieldMapping
    • Funnels
    • InboundNowAPI
    • Installer
    • LeadStatuses
    • Menus
    • Notifications
    • Ouath
    • Reports
    • Settings
    • Tracking
    • Translations
    • Updates
  • LandingPages
    • Activation
    • DataInterfaces
    • Management
    • Menus
    • NeedsAttention
    • Notices
    • Sidebars
    • Templates
    • Tracking
    • Variations
    • WelcomeScreen
    • Widgets
  • Leads
    • Activation
    • Akismet
    • BranchControl
    • BulkActions
    • Dashboard
    • Management
    • Notifications
    • Settings
    • Tracking
    • UserProfile
    • WPLogin
  • Mailer
    • Activation
    • Admin
    • ClickTracking
    • DataInterface
    • InboundForms
    • Leads
    • Management
    • Notifications
    • Scheduling
    • Sending
    • Settings
    • ShortcodesAndTokens
    • SparkPost
    • Templates
    • Unsubscribes
    • Variations
    • YoastSEO
  • None
  • Shared
    • APIs
    • CPT
    • DatabaseRoutines
    • DebugTricks
    • DoubleOptin
    • EventManagement
    • FieldMapping
    • InboundForms
    • LeadSorage
    • MarketingButton
    • Menus
    • Notifications
    • Shortcodes
    • ShortcodesAndTokens
    • StandAloneLicensing
    • Tracking
    • VisualEditor
  • xDepreciated

Classes

  • Inbound_Mailer_ACF
  • Inbound_Shared_ACF_BootStrap
  • Inbound_Template_Utils
  • Landing_Pages_ACF
  • Overview
  • Package
  • Class

Class Landing_Pages_ACF

Class ifor integrating landingpage CPT with ACF4 & ACF5

Package: ACF
Located at core/landing-pages/classes/class.acf-integration.php
Methods summary
public
# __construct( )

Initialize Landing_Pages_ACF Class

Initialize Landing_Pages_ACF Class

public static
# load_hooks( )

Load Hooks & Filters

Load Hooks & Filters

public static mixed
# define_location_rule_types( $choices )

Parameters

$choices

Returns

mixed
public static
# define_location_rule_values( $choices )
public static
# reposition_acf_fields( )

Adds javascript to make sure ACF fields load inside template container

Adds javascript to make sure ACF fields load inside template container

public static
# save_acf_fields( $landing_page_id )

Compiles ACF Meta Data into a singular json pair for variation support

Compiles ACF Meta Data into a singular json pair for variation support

Parameters

$landing_page_id
public static
# restore_acf_values( $post_id, $revision_id )

Restore landing page ACF values from revision

Restore landing page ACF values from revision

Parameters

$post_id
$revision_id
public static mixed
# add_revision_fields( $fields )

Adds revision fields to revisions screen

Adds revision fields to revisions screen

Parameters

$fields

Returns

mixed
public static
# add_revision_field_values( $value, $field, $revision )
public static mixed
# format_value( $value, $post_id, $field )

Although unused at the moment, this method can be used for filtering the return value with ACF5 fields

Although unused at the moment, this method can be used for filtering the return value with ACF5 fields

Parameters

$value
$post_id
$field

Returns

mixed
public static
# load_value( MIXED $value, INT $post_id, ARRAY $field )

Finds the correct value given the variation

Finds the correct value given the variation

Parameters

$value
contains the non-variation value
$post_id
ID of landing page being loaded
$field
wide array of data belonging to custom field (not leveraged in this method)

Returns

MIXED $new_value value mapped to variation.
public static
# load_legacy_value( MIXED $value, INT $post_id, ARRAY $field )

Finds the correct value given the variation - uses legacy meta system

Finds the correct value given the variation - uses legacy meta system

Parameters

$value
contains the non-variation value
$post_id
ID of landing page being loaded
$field
wide array of data belonging to custom field (not leveraged in this method)

Returns

MIXED $new_value value mapped to variation.
public static
# search_field_array( ARRAY $array, STRING $field )

Searches ACF variation array and returns the correct field value given the field key

Searches ACF variation array and returns the correct field value given the field key

Parameters

$array
of custom field keys and values stored for variation
$field
$needle acf form field key

Returns


$feild value
public static
# get_repeater_layouts( $array )

Searches an array assumed to be a repeater field dataset and returns an array of repeater field layout definitions

Searches an array assumed to be a repeater field dataset and returns an array of repeater field layout definitions

Retuns

ARRAY $fields this array will either be empty of contain repeater field layout definitions.
public static
# get_repeater_values( $array, $field, $needle )

Searches an array assumed to be a repeater field dataset and returns an array of repeater field layout definitions

Searches an array assumed to be a repeater field dataset and returns an array of repeater field layout definitions

Retuns

ARRAY $fields this array will either be empty of contain repeater field layout definitions.
public static
# load_acf_on_template( $allow, $rule, $args )

Check if current post is a landing page using an ACF powered template

Check if current post is a landing page using an ACF powered template

Filter

acf/location/rule_match/template_id

Returns

BOOL declaring if current page is a landing page with an ACF template loaded or not
public static mixed
# get_image_id_from_url( $url )

Parameters

$url

Returns

mixed
public static
# acf_get_registered_field( $field )
public static
# acf_free_value_formatting( $value, $field )

Correct return value formatting when Pro is NOT installed

Correct return value formatting when Pro is NOT installed

public static mixed
# acf_check_if_acf4( $value, $field )

checks template data type

checks template data type

Parameters

$value
$field

Returns

mixed
public static boolean|integer|string
# key_search( $array, $field, boolean|false $get_parent = false , mixed $last_key = false )

This is a complicated array search method for working with ACF repeater fields.

This is a complicated array search method for working with ACF repeater fields.

Parameters

$array
$field
$get_parent
if get_parent is set to true to will return the parent field group key of the repeater fields
$last_key
placeholder for storing the last key...

Returns

boolean|integer|string
public static
# handle_tab( )

Select tab that was selected in last edit session of the post.

Select tab that was selected in last edit session of the post.

  • If the time the same post that was last edited lies within the time the transient exists, the last selected tab will be selected via JavaScript.
  • If a new post is opened for editing, the current tab will be overwritten.
public static
# ajax_acf_save_current_tab( )
Properties summary
public static string $_transient_name

Name under which the transient for the current tab will be saved.

Name under which the transient for the current tab will be saved.

# 'acf_current_tab'
public static integer $_transient_minutes

Number of minutes the transient will be saved.

Number of minutes the transient will be saved.

# 5
Inbound Pro Plugin - PHP Codex API documentation generated by ApiGen