Lead_Capture implements Registerable, Standard_Service, Conditional
Handles lead capture functionality.
Tags
Interfaces, Classes and Traits
- Registerable
- Standard_Service
- Conditional
Table of Contents
- $cookie_expiration : mixed
- $cookie_name : mixed
- add_lead_capture_class_to_link() : string
- Add a lead capture class on download links.
- add_lead_capture_css_class() : string
- Add a CSS class on the download buttons for lead capture.
- add_lead_capture_form() : mixed
- Add lead capture form HTML to the page.
- add_lead_capture_to_grid_download_links() : array<string|int, mixed>
- Add a lead capture class on download links in the grid layout.
- bypass_for_logged_in_users() : mixed
- Checks if it is to bypass logged in users.
- enqueue_scripts() : mixed
- Enqueue lead capture scripts and styles.
- is_lead_capture_active() : mixed
- Checks if lead capture feature is active.
- is_lead_captured() : mixed
- Checks if lead has already been captured.
- is_required() : mixed
- {@inheritdoc}
- lead_capture() : mixed
- Get the data from the lead capture form.
- lead_capture_form() : mixed
- Render the user form.
- lead_capture_set_cookie() : mixed
- Get the data from the lead capture form.
- register() : mixed
- {@inheritdoc}
Properties
$cookie_expiration
private
mixed
$cookie_expiration
= 10 * YEAR_IN_SECONDS
Tags
$cookie_name
private
mixed
$cookie_name
= 'dlp_lead_captured'
Tags
Methods
add_lead_capture_class_to_link()
Add a lead capture class on download links.
public
add_lead_capture_class_to_link(string $title, object $post, string $link_type) : string
Parameters
- $title : string
-
The HTML link.
- $post : object
-
The document.
- $link_type : string
-
The type of link.
Tags
Return values
string —The modified HTML link.
add_lead_capture_css_class()
Add a CSS class on the download buttons for lead capture.
public
add_lead_capture_css_class(string $button_class, string $type) : string
Parameters
- $button_class : string
-
The CSS class for the button.
- $type : string
-
The type of button.
Tags
Return values
string —The modified CSS class.
add_lead_capture_form()
Add lead capture form HTML to the page.
public
add_lead_capture_form() : mixed
Tags
Return values
mixed —add_lead_capture_to_grid_download_links()
Add a lead capture class on download links in the grid layout.
public
add_lead_capture_to_grid_download_links(array<string|int, mixed> $templates, object $document, object $args) : array<string|int, mixed>
Parameters
- $templates : array<string|int, mixed>
-
The HTML code for all template elements.
- $document : object
-
The document.
- $args : object
-
Arguments.
Tags
Return values
array<string|int, mixed> —The modified templates HTML code.
bypass_for_logged_in_users()
Checks if it is to bypass logged in users.
public
bypass_for_logged_in_users() : mixed
Tags
Return values
mixed —enqueue_scripts()
Enqueue lead capture scripts and styles.
public
enqueue_scripts() : mixed
Tags
Return values
mixed —is_lead_capture_active()
Checks if lead capture feature is active.
public
is_lead_capture_active() : mixed
Tags
Return values
mixed —is_lead_captured()
Checks if lead has already been captured.
public
is_lead_captured() : mixed
Tags
Return values
mixed —is_required()
{@inheritdoc}
public
is_required() : mixed
Tags
Return values
mixed —lead_capture()
Get the data from the lead capture form.
public
lead_capture() : mixed
Tags
Return values
mixed —lead_capture_form()
Render the user form.
public
static lead_capture_form() : mixed
Tags
Return values
mixed —lead_capture_set_cookie()
Get the data from the lead capture form.
public
lead_capture_set_cookie() : mixed
Tags
Return values
mixed —register()
{@inheritdoc}
public
register() : mixed