Skip to content

Latest commit

 

History

History
2252 lines (2252 loc) · 73 KB

ACTIONS-FILTERS.md

File metadata and controls

2252 lines (2252 loc) · 73 KB

Filters

File Filter Name Description
../admin/class-convertkit-admin-notices.php
  convertkit_admin_notices_output_ notice Define the text to output in an admin error notice.
../admin/section/class-convertkit-settings-base.php
  convertkit_settings_base_register_notices Register success and error notices for settings screens.
../admin/class-convertkit-admin-settings.php
  convertkit_plugin_screen_action_links Define links to display below the Plugin Name on the WP_List_Table at Plugins > Installed Plugins.
  convertkit_admin_settings_register_sections Registers settings sections at Settings > Kit.
../admin/class-convertkit-admin-post.php
  convertkit_admin_post_register_add_new_buttons Registers 'Add New' buttons for the given Post Type's admin screen.
../includes/functions.php
  convertkit_get_supported_post_types Defines the Post Types that support ConvertKit Forms.
  convertkit_shortcodes Registers shortcodes for the ConvertKit Plugin.
  convertkit_blocks Registers blocks for the ConvertKit Plugin.
  convertkit_get_block_formatters Registers block formatters in Gutenberg for the ConvertKit Plugin.
  convertkit_get_pre_publish_actions Registers pre-publish actions for the ConvertKit Plugin.
../includes/blocks/class-convertkit-block-content.php
  convertkit_block_content_render Filters the content in the ConvertKit Custom Content block/shortcode immediately before it is output.
../includes/blocks/class-convertkit-block-product.php
  convertkit_block_product_render Filter the block's content immediately before it is output.
../includes/blocks/class-convertkit-block-broadcasts.php
  convertkit_block_broadcasts_render Filter the block's content immediately before it is output.
  convertkit_block_broadcasts_render_ajax Filter the block's inner content immediately before it is output by AJAX, which occurs when pagination was clicked.
  convertkit_block_broadcasts_build_html_list_item Defines the HTML for an individual broadcast item in the Broadcasts block.
../includes/blocks/class-convertkit-block-form.php
  convertkit_block_form_render Filter the block's content immediately before it is output.
../includes/blocks/class-convertkit-block-form-trigger.php
  convertkit_block_form_trigger_render Filter the block's content immediately before it is output.
../includes/class-convertkit-post.php
  convertkit_post_settings Programmatically define ConvertKit settings for an individual Post, overriding those defined in the meta box.
  convertkit_post_get_default_settings The default settings, used to populate the Post's Settings when a Post has no Settings.
../includes/class-convertkit-term.php
  convertkit_term_get_default_settings The default settings, used to populate the Term's Settings when a Term has no Settings.
../includes/class-convertkit-settings-broadcasts.php
  convertkit_settings_broadcasts_get_defaults The default settings, used when the ConvertKit Broadcasts Settings haven't been saved e.g. on a new installation.
../includes/class-convertkit-settings-restrict-content.php
  convertkit_settings_restrict_content_get_defaults The default settings, used when the ConvertKit Restrict Content Settings haven't been saved e.g. on a new installation.
../includes/class-convertkit-user.php
  convertkit_user_get_default_settings The default settings, used to populate the User's Settings when a User has no Settings.
../includes/class-convertkit-gutenberg.php
  convertkit_admin_gutenberg_add_block_categories Adds block categories to the default Gutenberg Block Categories
../includes/integrations/contactform7/class-convertkit-contactform7-settings.php
  convertkit_contactform7_settings_get_defaults The default settings, used when Contact Form 7's Settings haven't been saved e.g. on a new installation or when the Contact Form 7 Plugin has just been activated for the first time.
../includes/integrations/forminator/class-convertkit-forminator-settings.php
  convertkit_forminator_settings_get_defaults The default settings, used when Forminator's Settings haven't been saved e.g. on a new installation or when the Forminator Plugin has just been activated for the first time.
../includes/integrations/wishlist/class-convertkit-wishlist-settings.php
  convertkit_wishlist_settings_get_defaults The default settings, used when WishList's Settings haven't been saved e.g. on a new installation or when the WishList Plugin has just been activated for the first time.
../includes/class-convertkit-output-restrict-content.php
  convertkit_output_restrict_content_get_resource_type Define the ConvertKit Resource Type that the visitor must be subscribed against to access this content, overriding the Post setting. Return false or an empty string to not restrict content.
  convertkit_output_restrict_content_get_resource_id Define the ConvertKit Resource ID that the visitor must be subscribed against to access this content, overriding the Post setting. Return 0 to not restrict content.
  convertkit_output_restrict_content_content_preview Define the output for the content preview when the visitor is not an authenticated subscriber.
  convertkit_output_restrict_content_call_to_action Define the output for the call to action, displayed below the content preview, when the visitor is not an authenticated subscriber.
  convertkit_output_restrict_content_is_crawler_permitted_user_agent_ip_ranges Define the permitted user agents and their IP address ranges that can bypass Restrict Content to index content for search engines.
../includes/class-convertkit-output.php
  convertkit_output_page_takeover_landing_page_id Define the ConvertKit Landing Page ID to display for the given Post ID, overriding the Post settings. Return false to not display any ConvertKit Landing Page.
  convertkit_output_append_form_to_content_form_id Define the ConvertKit Form ID to display for the given Post ID, overriding the Post, Category or Plugin settings. Return false to not display any ConvertKit Form.
  convertkit_frontend_append_form Filter the Post's Content, which includes a ConvertKit Form, immediately before it is output.
  convertkit_output_scripts_footer Define an array of scripts to output in the footer of the WordPress site.
  convertkit_output_script_footer Filter the form <script> key/value pairs immediately before the script is output.
../includes/class-convertkit-settings.php
  convertkit_settings_get_defaults The default settings, used when the ConvertKit Plugin Settings haven't been saved e.g. on a new installation.
../includes/class-wp-convertkit.php
  convertkit_is_admin_or_frontend_editor Filters whether the current request is a WordPress Administration / Frontend Editor request or not. Page Builders can set this to true to allow ConvertKit to load its administration functionality.
../includes/class-convertkit-resource-forms.php
  convertkit_resource_forms_output_script Filter the form <script> key/value pairs immediately before the script is output.
../includes/class-convertkit-broadcasts-importer.php
  convertkit_broadcasts_build_post_args Define the wp_insert_post() compatible arguments for importing a ConvertKit Broadcast to a new WordPress Post.
  convertkit_broadcasts_parse_broadcast_content Parses the given Broadcast's content, removing unnecessary HTML tags and styles.
  convertkit_broadcasts_parse_broadcast_content_permitted_html_tags Define the HTML tags to retain in the Broadcast Content.

convertkit_admin_notices_output_ notice admin/class-convertkit-admin-notices.php::87

Overview

Define the text to output in an admin error notice.

Parameters

Parameter Type Description
$notice string Admin notice name.

Usage

add_filter( 'convertkit_admin_notices_output_  notice', function( $output ) {
	// ... your code here
	// Return value
	return $output;
}, 10, 1 );

convertkit_settings_base_register_notices admin/section/class-convertkit-settings-base.php::173

Overview

Register success and error notices for settings screens.

Parameters

Parameter Type Description
$notices array Regsitered success and error notices.

Usage

add_filter( 'convertkit_settings_base_register_notices', function( $notices ) {
	// ... your code here
	// Return value
	return $notices;
}, 10, 1 );

Overview

Define links to display below the Plugin Name on the WP_List_Table at Plugins > Installed Plugins.

Parameters

Parameter Type Description
$links array HTML Links.

Usage

add_filter( 'convertkit_plugin_screen_action_links', function( $links ) {
	// ... your code here
	// Return value
	return $links;
}, 10, 1 );

convertkit_admin_settings_register_sections admin/class-convertkit-admin-settings.php::326

Overview

Registers settings sections at Settings > Kit.

Parameters

Parameter Type Description
$sections array Array of settings classes that handle individual tabs e.g. General, Tools etc.

Usage

add_filter( 'convertkit_admin_settings_register_sections', function( $sections ) {
	// ... your code here
	// Return value
	return $sections;
}, 10, 1 );

convertkit_admin_post_register_add_new_buttons admin/class-convertkit-admin-post.php::68

Overview

Registers 'Add New' buttons for the given Post Type's admin screen.

Parameters

Parameter Type Description
$buttons array Buttons.
$post_type string Post Type.

Usage

add_filter( 'convertkit_admin_post_register_add_new_buttons', function( $buttons, $post_type ) {
	// ... your code here
	// Return value
	return $buttons;
}, 10, 2 );

convertkit_get_supported_post_types includes/functions.php::140

Overview

Defines the Post Types that support ConvertKit Forms.

Parameters

Parameter Type Description
$post_types array Post Types

Usage

add_filter( 'convertkit_get_supported_post_types', function( $post_types ) {
	// ... your code here
	// Return value
	return $post_types;
}, 10, 1 );

convertkit_shortcodes includes/functions.php::179

Overview

Registers shortcodes for the ConvertKit Plugin.

Parameters

Parameter Type Description
$shortcodes array Shortcodes

Usage

add_filter( 'convertkit_shortcodes', function( $shortcodes ) {
	// ... your code here
	// Return value
	return $shortcodes;
}, 10, 1 );

convertkit_blocks includes/functions.php::203

Overview

Registers blocks for the ConvertKit Plugin.

Parameters

Parameter Type Description
$blocks array Blocks

Usage

add_filter( 'convertkit_blocks', function( $blocks ) {
	// ... your code here
	// Return value
	return $blocks;
}, 10, 1 );

convertkit_get_block_formatters includes/functions.php::227

Overview

Registers block formatters in Gutenberg for the ConvertKit Plugin.

Parameters

Parameter Type Description
$block_formatters array Block formatters.

Usage

add_filter( 'convertkit_get_block_formatters', function( $block_formatters ) {
	// ... your code here
	// Return value
	return $block_formatters;
}, 10, 1 );

convertkit_get_pre_publish_actions includes/functions.php::251

Overview

Registers pre-publish actions for the ConvertKit Plugin.

Parameters

Parameter Type Description
$pre_publish_panels array Pre-publish actions.

Usage

add_filter( 'convertkit_get_pre_publish_actions', function( $pre_publish_actions ) {
	// ... your code here
	// Return value
	return $pre_publish_actions;
}, 10, 1 );

convertkit_block_content_render includes/blocks/class-convertkit-block-content.php::283

Overview

Filters the content in the ConvertKit Custom Content block/shortcode immediately before it is output.

Parameters

Parameter Type Description
$content string Content
$atts array Block / Shortcode Attributes
$subscriber_id int ConvertKit Subscriber's ID
$tags array ConvertKit Subscriber's Tags
$tag array ConvertKit Subscriber's Tag that matches $atts['tag']

Usage

add_filter( 'convertkit_block_content_render', function( $content, $atts, $subscriber_id, $tags, $tag ) {
	// ... your code here
	// Return value
	return $content;
}, 10, 5 );

convertkit_block_product_render includes/blocks/class-convertkit-block-product.php::461

Overview

Filter the block's content immediately before it is output.

Parameters

Parameter Type Description
$html string ConvertKit Product button HTML.
$atts array Block Attributes.

Usage

add_filter( 'convertkit_block_product_render', function( $html, $atts ) {
	// ... your code here
	// Return value
	return $html;
}, 10, 2 );

convertkit_block_broadcasts_render includes/blocks/class-convertkit-block-broadcasts.php::621

Overview

Filter the block's content immediately before it is output.

Parameters

Parameter Type Description
$html string ConvertKit Broadcasts HTML.
$atts array Block Attributes.

Usage

add_filter( 'convertkit_block_broadcasts_render', function( $html, $atts ) {
	// ... your code here
	// Return value
	return $html;
}, 10, 2 );

convertkit_block_broadcasts_render_ajax includes/blocks/class-convertkit-block-broadcasts.php::536

Overview

Filter the block's inner content immediately before it is output by AJAX, which occurs when pagination was clicked.

Parameters

Parameter Type Description
$html string ConvertKit Broadcasts HTML.
$atts array Block Attributes.

Usage

add_filter( 'convertkit_block_broadcasts_render_ajax', function( $html, $atts ) {
	// ... your code here
	// Return value
	return $html;
}, 10, 2 );

convertkit_block_broadcasts_build_html_list_item includes/blocks/class-convertkit-block-broadcasts.php::702

Overview

Defines the HTML for an individual broadcast item in the Broadcasts block.

Parameters

Parameter Type Description
$html string HTML.
$broadcast array Broadcast.
$atts array Block attributes.

Usage

add_filter( 'convertkit_block_broadcasts_build_html_list_item', function( $html, $broadcast, $atts ) {
	// ... your code here
	// Return value
	return $html;
}, 10, 3 );

convertkit_block_form_render includes/blocks/class-convertkit-block-form.php::380

Overview

Filter the block's content immediately before it is output.

Parameters

Parameter Type Description
$form string ConvertKit Form HTML.
$atts array Block Attributes.
$form_id int Form ID.

Usage

add_filter( 'convertkit_block_form_render', function( $form, $atts, $form_id ) {
	// ... your code here
	// Return value
	return $form;
}, 10, 3 );

convertkit_block_form_trigger_render includes/blocks/class-convertkit-block-form-trigger.php::396

Overview

Filter the block's content immediately before it is output.

Parameters

Parameter Type Description
$html string ConvertKit Button HTML.
$atts array Block Attributes.

Usage

add_filter( 'convertkit_block_form_trigger_render', function( $html, $atts ) {
	// ... your code here
	// Return value
	return $html;
}, 10, 2 );

convertkit_post_settings includes/class-convertkit-post.php::85

Overview

Programmatically define ConvertKit settings for an individual Post, overriding those defined in the meta box.

Parameters

Parameter Type Description
$meta array Post Settings.
$post_id int Post ID.

Usage

add_filter( 'convertkit_post_settings', function( $meta, $post_id ) {
	// ... your code here
	// Return value
	return $meta;
}, 10, 2 );

convertkit_post_get_default_settings includes/class-convertkit-post.php::329

Overview

The default settings, used to populate the Post's Settings when a Post has no Settings.

Parameters

Parameter Type Description
$defaults array Default Settings.
$post_id int Post ID.

Usage

add_filter( 'convertkit_post_get_default_settings', function( $defaults, $post_id ) {
	// ... your code here
	// Return value
	return $defaults;
}, 10, 2 );

convertkit_term_get_default_settings includes/class-convertkit-term.php::198

Overview

The default settings, used to populate the Term's Settings when a Term has no Settings.

Parameters

Parameter Type Description
$defaults array Default Form

Usage

add_filter( 'convertkit_term_get_default_settings', function( $defaults ) {
	// ... your code here
	// Return value
	return $defaults;
}, 10, 1 );

convertkit_settings_broadcasts_get_defaults includes/class-convertkit-settings-broadcasts.php::252

Overview

The default settings, used when the ConvertKit Broadcasts Settings haven't been saved e.g. on a new installation.

Parameters

Parameter Type Description
$defaults array Default settings.

Usage

add_filter( 'convertkit_settings_broadcasts_get_defaults', function( $defaults ) {
	// ... your code here
	// Return value
	return $defaults;
}, 10, 1 );

convertkit_settings_restrict_content_get_defaults includes/class-convertkit-settings-restrict-content.php::229

Overview

The default settings, used when the ConvertKit Restrict Content Settings haven't been saved e.g. on a new installation.

Parameters

Parameter Type Description
$defaults array Default settings.

Usage

add_filter( 'convertkit_settings_restrict_content_get_defaults', function( $defaults ) {
	// ... your code here
	// Return value
	return $defaults;
}, 10, 1 );

convertkit_user_get_default_settings includes/class-convertkit-user.php::107

Overview

The default settings, used to populate the User's Settings when a User has no Settings.

Parameters

Parameter Type Description
$defaults array Default Settings.

Usage

add_filter( 'convertkit_user_get_default_settings', function( $defaults ) {
	// ... your code here
	// Return value
	return $defaults;
}, 10, 1 );

convertkit_admin_gutenberg_add_block_categories includes/class-convertkit-gutenberg.php::66

Overview

Adds block categories to the default Gutenberg Block Categories

Parameters

Parameter Type Description
$categories array Block Categories
$post WP_Post WordPress Post

Usage

add_filter( 'convertkit_admin_gutenberg_add_block_categories', function( $categories, $post ) {
	// ... your code here
	// Return value
	return $categories;
}, 10, 2 );

convertkit_contactform7_settings_get_defaults includes/integrations/contactform7/class-convertkit-contactform7-settings.php::149

Overview

The default settings, used when Contact Form 7's Settings haven't been saved e.g. on a new installation or when the Contact Form 7 Plugin has just been activated for the first time.

Parameters

Parameter Type Description
$defaults array Default Settings.

Usage

add_filter( 'convertkit_contactform7_settings_get_defaults', function( $defaults ) {
	// ... your code here
	// Return value
	return $defaults;
}, 10, 1 );

convertkit_forminator_settings_get_defaults includes/integrations/forminator/class-convertkit-forminator-settings.php::153

Overview

The default settings, used when Forminator's Settings haven't been saved e.g. on a new installation or when the Forminator Plugin has just been activated for the first time.

Parameters

Parameter Type Description
$defaults array Default Settings.

Usage

add_filter( 'convertkit_forminator_settings_get_defaults', function( $defaults ) {
	// ... your code here
	// Return value
	return $defaults;
}, 10, 1 );

convertkit_wishlist_settings_get_defaults includes/integrations/wishlist/class-convertkit-wishlist-settings.php::149

Overview

The default settings, used when WishList's Settings haven't been saved e.g. on a new installation or when the WishList Plugin has just been activated for the first time.

Parameters

Parameter Type Description
$defaults array Default Settings.

Usage

add_filter( 'convertkit_wishlist_settings_get_defaults', function( $defaults ) {
	// ... your code here
	// Return value
	return $defaults;
}, 10, 1 );

convertkit_output_restrict_content_get_resource_type includes/class-convertkit-output-restrict-content.php::716

Overview

Define the ConvertKit Resource Type that the visitor must be subscribed against to access this content, overriding the Post setting. Return false or an empty string to not restrict content.

Parameters

Parameter Type Description
Resource string $resource_type Type
$post_id int Post ID

Usage

add_filter( 'convertkit_output_restrict_content_get_resource_type', function( $resource_type, $post_id ) {
	// ... your code here
	// Return value
	return $resource_type;
}, 10, 2 );

convertkit_output_restrict_content_get_resource_id includes/class-convertkit-output-restrict-content.php::754

Overview

Define the ConvertKit Resource ID that the visitor must be subscribed against to access this content, overriding the Post setting. Return 0 to not restrict content.

Parameters

Parameter Type Description
$resource_id int Resource ID
$post_id int Post ID

Usage

add_filter( 'convertkit_output_restrict_content_get_resource_id', function( $resource_id, $post_id ) {
	// ... your code here
	// Return value
	return $resource_id;
}, 10, 2 );

convertkit_output_restrict_content_content_preview includes/class-convertkit-output-restrict-content.php::937

Overview

Define the output for the content preview when the visitor is not an authenticated subscriber.

Parameters

Parameter Type Description
$content_preview string Content preview.
$post_id int Post ID.

Usage

add_filter( 'convertkit_output_restrict_content_content_preview', function( $content_preview, $post_id ) {
	// ... your code here
	// Return value
	return $content_preview;
}, 10, 2 );

convertkit_output_restrict_content_call_to_action includes/class-convertkit-output-restrict-content.php::951

Overview

Define the output for the call to action, displayed below the content preview, when the visitor is not an authenticated subscriber.

Parameters

Parameter Type Description
$call_to_action string Call to Action.
$post_id int Post ID.

Usage

add_filter( 'convertkit_output_restrict_content_call_to_action', function( $call_to_action, $post_id ) {
	// ... your code here
	// Return value
	return $call_to_action;
}, 10, 2 );

convertkit_output_restrict_content_is_crawler_permitted_user_agent_ip_ranges includes/class-convertkit-output-restrict-content.php::1322

Overview

Define the permitted user agents and their IP address ranges that can bypass Restrict Content to index content for search engines.

Parameters

Parameter Type Description
$permitted array Permitted user agent and IP address ranges.

Usage

add_filter( 'convertkit_output_restrict_content_is_crawler_permitted_user_agent_ip_ranges', function( $permitted_user_agent_ip_ranges ) {
	// ... your code here
	// Return value
	return $permitted_user_agent_ip_ranges;
}, 10, 1 );

convertkit_output_page_takeover_landing_page_id includes/class-convertkit-output.php::205

Overview

Define the ConvertKit Landing Page ID to display for the given Post ID, overriding the Post settings. Return false to not display any ConvertKit Landing Page.

Parameters

Parameter Type Description
$landing_page_id int Landing Page ID
$post_id int Post ID

Usage

add_filter( 'convertkit_output_page_takeover_landing_page_id', function( $landing_page_id, $post_id ) {
	// ... your code here
	// Return value
	return $landing_page_id;
}, 10, 2 );

convertkit_output_append_form_to_content_form_id includes/class-convertkit-output.php::278

Overview

Define the ConvertKit Form ID to display for the given Post ID, overriding the Post, Category or Plugin settings. Return false to not display any ConvertKit Form.

Parameters

Parameter Type Description
$form_id bool|int Form ID
$post_id int Post ID

Usage

add_filter( 'convertkit_output_append_form_to_content_form_id', function( $form_id, $post_id ) {
	// ... your code here
	// Return value
	return $form_id;
}, 10, 2 );

convertkit_frontend_append_form includes/class-convertkit-output.php::389

Overview

Filter the Post's Content, which includes a ConvertKit Form, immediately before it is output.

Parameters

Parameter Type Description
$content string Post Content
$form string ConvertKit Form HTML
$post_id int Post ID
$form_id int ConvertKit Form ID
$form_position string Form Position setting for the Post's Type.

Usage

add_filter( 'convertkit_frontend_append_form', function( $content, $form, $post_id, $form_id, $form_position ) {
	// ... your code here
	// Return value
	return $content;
}, 10, 5 );

Overview

Define an array of scripts to output in the footer of the WordPress site.

Parameters

Parameter Type Description
$scripts array Scripts.

Usage

add_filter( 'convertkit_output_scripts_footer', function( $scripts ) {
	// ... your code here
	// Return value
	return $scripts;
}, 10, 1 );

Overview

Filter the form <script> key/value pairs immediately before the script is output.

Parameters

Parameter Type Description
$script array Form script key/value pairs to output as <script> tag.

Usage

add_filter( 'convertkit_output_script_footer', function( $script ) {
	// ... your code here
	// Return value
	return $script;
}, 10, 1 );

convertkit_settings_get_defaults includes/class-convertkit-settings.php::478

Overview

The default settings, used when the ConvertKit Plugin Settings haven't been saved e.g. on a new installation.

Parameters

Parameter Type Description
$defaults array Default Settings.

Usage

add_filter( 'convertkit_settings_get_defaults', function( $defaults ) {
	// ... your code here
	// Return value
	return $defaults;
}, 10, 1 );

convertkit_is_admin_or_frontend_editor includes/class-wp-convertkit.php::318

Overview

Filters whether the current request is a WordPress Administration / Frontend Editor request or not. Page Builders can set this to true to allow ConvertKit to load its administration functionality.

Parameters

Parameter Type Description
$is_admin_or_frontend_editor bool Is WordPress Administration / Frontend Editor request.

Usage

add_filter( 'convertkit_is_admin_or_frontend_editor', function( $is_admin_or_frontend_editor ) {
	// ... your code here
	// Return value
	return $is_admin_or_frontend_editor;
}, 10, 1 );

convertkit_resource_forms_output_script includes/class-convertkit-resource-forms.php::461

Overview

Filter the form <script> key/value pairs immediately before the script is output.

Parameters

Parameter Type Description
$script array Form script key/value pairs to output as <script> tag.

Usage

add_filter( 'convertkit_resource_forms_output_script', function( $script ) {
	// ... your code here
	// Return value
	return $script;
}, 10, 1 );

convertkit_broadcasts_build_post_args includes/class-convertkit-broadcasts-importer.php::359

Overview

Define the wp_insert_post() compatible arguments for importing a ConvertKit Broadcast to a new WordPress Post.

Parameters

Parameter Type Description
$post_args array Post arguments.
$broadcast array Broadcast.

Usage

add_filter( 'convertkit_broadcasts_build_post_args', function( $post_args, $broadcast ) {
	// ... your code here
	// Return value
	return $post_args;
}, 10, 2 );

convertkit_broadcasts_parse_broadcast_content includes/class-convertkit-broadcasts-importer.php::507

Overview

Parses the given Broadcast's content, removing unnecessary HTML tags and styles.

Parameters

Parameter Type Description
Parsed string $content Content.
$post_id int WordPress Post ID.
Broadcast string $broadcast_title Title.
$import_images bool Import images to Media Library.
$disable_styles bool Disable CSS styles in content.

Usage

add_filter( 'convertkit_broadcasts_parse_broadcast_content', function( $content, $post_id, $broadcast_content, $broadcast_title, $import_images, $disable_styles ) {
	// ... your code here
	// Return value
	return $content;
}, 10, 6 );

convertkit_broadcasts_parse_broadcast_content_permitted_html_tags includes/class-convertkit-broadcasts-importer.php::607

Overview

Define the HTML tags to retain in the Broadcast Content.

Parameters

Parameter Type Description
$permitted_html_tags array Permitted HTML Tags.

Usage

add_filter( 'convertkit_broadcasts_parse_broadcast_content_permitted_html_tags', function( $permitted_html_tags ) {
	// ... your code here
	// Return value
	return $permitted_html_tags;
}, 10, 1 );

Actions

File Filter Name Description
../admin/section/class-convertkit-settings-base.php
  convertkit_settings_base_render_before
  convertkit_settings_base_render_after
  convertkit_settings_base_sanitize_settings
../admin/section/class-convertkit-settings-tools.php
  convertkit_settings_base_render_before
  convertkit_settings_base_render_after
../admin/section/class-convertkit-settings-oauth.php
  convertkit_settings_base_render_before
  convertkit_settings_base_render_after
../admin/class-convertkit-admin-settings.php
  convertkit_admin_settings_enqueue_scripts Enqueue JavaScript for the Settings Screen at Settings > Kit
  convertkit_admin_settings_enqueue_styles Enqueue CSS for the Settings Screen at Settings > Kit
../admin/class-convertkit-admin-category.php
  convertkit_admin_category_enqueue_scripts
  convertkit_admin_category_enqueue_styles
../admin/class-convertkit-admin-post.php
  convertkit_admin_post_enqueue_scripts
  convertkit_admin_post_enqueue_styles
../admin/class-convertkit-admin-setup-wizard.php
  convertkit_admin_setup_wizard_process_form_ this-page_name Process submitted form data for the given setup wizard name and current step.
  convertkit_admin_setup_wizard_load_screen_data_ this-page_name Load any data into class variables for the given setup wizard name and current step.
../includes/pre-publish-actions/class-convertkit-pre-publish-action.php
  convertkit_pre_publish_action_run_ this-get_name Run this pre-publish action, as the WordPress Post has just transitioned to publish from another state.
../includes/class-convertkit-gutenberg.php
  convertkit_gutenberg_enqueue_scripts Enqueue any additional scripts for Gutenberg blocks that have been registered.
  convertkit_gutenberg_enqueue_styles
  convertkit_gutenberg_enqueue_scripts_editor_and_frontend
  convertkit_gutenberg_enqueue_styles_editor_and_frontend
../includes/class-convertkit-output.php
  convertkit_output_output_form
  convertkit_output_landing_page_before Perform any actions immediately prior to outputting the Landing Page. Caching and minification Plugins may need to hook here to prevent CSS / JS minification and lazy loading images, which can interfere with Landing Pages.
../includes/class-wp-convertkit.php
  convertkit_initialize_admin
  convertkit_initialize_admin_or_frontend_editor
  convertkit_initialize_cli_cron
  convertkit_initialize_frontend
  convertkit_initialize_global

convertkit_settings_base_render_before admin/section/class-convertkit-settings-base.php::202

Parameters

Parameter Type Description

Usage

do_action( 'convertkit_settings_base_render_before', function(  ) {
	// ... your code here
}, 10, 0 );

convertkit_settings_base_render_after admin/section/class-convertkit-settings-base.php::221

Parameters

Parameter Type Description

Usage

do_action( 'convertkit_settings_base_render_after', function(  ) {
	// ... your code here
}, 10, 0 );

convertkit_settings_base_sanitize_settings admin/section/class-convertkit-settings-base.php::683

Parameters

Parameter Type Description
$name Unknown N/A
$updated_settings Unknown N/A

Usage

do_action( 'convertkit_settings_base_sanitize_settings', function( $name, $updated_settings ) {
	// ... your code here
}, 10, 2 );

convertkit_settings_base_render_before admin/section/class-convertkit-settings-tools.php::307

Parameters

Parameter Type Description

Usage

do_action( 'convertkit_settings_base_render_before', function(  ) {
	// ... your code here
}, 10, 0 );

convertkit_settings_base_render_after admin/section/class-convertkit-settings-tools.php::321

Parameters

Parameter Type Description

Usage

do_action( 'convertkit_settings_base_render_after', function(  ) {
	// ... your code here
}, 10, 0 );

convertkit_settings_base_render_before admin/section/class-convertkit-settings-oauth.php::133

Parameters

Parameter Type Description

Usage

do_action( 'convertkit_settings_base_render_before', function(  ) {
	// ... your code here
}, 10, 0 );

convertkit_settings_base_render_after admin/section/class-convertkit-settings-oauth.php::143

Parameters

Parameter Type Description

Usage

do_action( 'convertkit_settings_base_render_after', function(  ) {
	// ... your code here
}, 10, 0 );

convertkit_admin_settings_enqueue_scripts admin/class-convertkit-admin-settings.php::68

Overview

Enqueue JavaScript for the Settings Screen at Settings > Kit

Parameters

Parameter Type Description
$section string Settings section / tab (general|tools|restrict-content).

Usage

do_action( 'convertkit_admin_settings_enqueue_scripts', function( $section ) {
	// ... your code here
}, 10, 1 );

convertkit_admin_settings_enqueue_styles admin/class-convertkit-admin-settings.php::99

Overview

Enqueue CSS for the Settings Screen at Settings > Kit

Parameters

Parameter Type Description
$section string Settings section / tab (general|tools|restrict-content).

Usage

do_action( 'convertkit_admin_settings_enqueue_styles', function( $section ) {
	// ... your code here
}, 10, 1 );

convertkit_admin_category_enqueue_scripts admin/class-convertkit-admin-category.php::62

Parameters

Parameter Type Description

Usage

do_action( 'convertkit_admin_category_enqueue_scripts', function(  ) {
	// ... your code here
}, 10, 0 );

convertkit_admin_category_enqueue_styles admin/class-convertkit-admin-category.php::93

Parameters

Parameter Type Description

Usage

do_action( 'convertkit_admin_category_enqueue_styles', function(  ) {
	// ... your code here
}, 10, 0 );

convertkit_admin_post_enqueue_scripts admin/class-convertkit-admin-post.php::117

Parameters

Parameter Type Description

Usage

do_action( 'convertkit_admin_post_enqueue_scripts', function(  ) {
	// ... your code here
}, 10, 0 );

convertkit_admin_post_enqueue_styles admin/class-convertkit-admin-post.php::140

Parameters

Parameter Type Description

Usage

do_action( 'convertkit_admin_post_enqueue_styles', function(  ) {
	// ... your code here
}, 10, 0 );

convertkit_admin_setup_wizard_process_form_ this-page_name admin/class-convertkit-admin-setup-wizard.php::209

Overview

Process submitted form data for the given setup wizard name and current step.

Parameters

Parameter Type Description
$step int Current step number.

Usage

do_action( 'convertkit_admin_setup_wizard_process_form_  this-page_name', function( $step ) {
	// ... your code here
}, 10, 1 );

convertkit_admin_setup_wizard_load_screen_data_ this-page_name admin/class-convertkit-admin-setup-wizard.php::272

Overview

Load any data into class variables for the given setup wizard name and current step.

Parameters

Parameter Type Description
$step int Current step number.

Usage

do_action( 'convertkit_admin_setup_wizard_load_screen_data_  this-page_name', function( $step ) {
	// ... your code here
}, 10, 1 );

convertkit_pre_publish_action_run_ this-get_name includes/pre-publish-actions/class-convertkit-pre-publish-action.php::179

Overview

Run this pre-publish action, as the WordPress Post has just transitioned to publish from another state.

Parameters

Parameter Type Description
$post WP_Post Post.

Usage

do_action( 'convertkit_pre_publish_action_run_  this-get_name', function(  ) {
	// ... your code here
}, 10, 0 );

convertkit_gutenberg_enqueue_scripts includes/class-convertkit-gutenberg.php::175

Overview

Enqueue any additional scripts for Gutenberg blocks that have been registered.

Parameters

Parameter Type Description
$blocks array ConvertKit Blocks.
$block_formatters array ConvertKit Block Formatters.

Usage

do_action( 'convertkit_gutenberg_enqueue_scripts', function( $blocks, $block_formatters ) {
	// ... your code here
}, 10, 2 );

convertkit_gutenberg_enqueue_styles includes/class-convertkit-gutenberg.php::199

Parameters

Parameter Type Description

Usage

do_action( 'convertkit_gutenberg_enqueue_styles', function(  ) {
	// ... your code here
}, 10, 0 );

convertkit_gutenberg_enqueue_scripts_editor_and_frontend includes/class-convertkit-gutenberg.php::223

Parameters

Parameter Type Description

Usage

do_action( 'convertkit_gutenberg_enqueue_scripts_editor_and_frontend', function(  ) {
	// ... your code here
}, 10, 0 );

convertkit_gutenberg_enqueue_styles_editor_and_frontend includes/class-convertkit-gutenberg.php::247

Parameters

Parameter Type Description

Usage

do_action( 'convertkit_gutenberg_enqueue_styles_editor_and_frontend', function(  ) {
	// ... your code here
}, 10, 0 );

convertkit_output_output_form includes/class-convertkit-output.php::160

Parameters

Parameter Type Description

Usage

do_action( 'convertkit_output_output_form', function(  ) {
	// ... your code here
}, 10, 0 );

convertkit_output_landing_page_before includes/class-convertkit-output.php::241

Overview

Perform any actions immediately prior to outputting the Landing Page. Caching and minification Plugins may need to hook here to prevent CSS / JS minification and lazy loading images, which can interfere with Landing Pages.

Parameters

Parameter Type Description
$landing_page string ConvertKit Landing Page HTML.
$landing_page_id int ConvertKit Landing Page ID.
$post_id int WordPress Page ID.

Usage

do_action( 'convertkit_output_landing_page_before', function( $landing_page, $landing_page_id, $post_id ) {
	// ... your code here
}, 10, 3 );

convertkit_initialize_admin includes/class-wp-convertkit.php::87

Parameters

Parameter Type Description

Usage

do_action( 'convertkit_initialize_admin', function(  ) {
	// ... your code here
}, 10, 0 );

convertkit_initialize_admin_or_frontend_editor includes/class-wp-convertkit.php::108

Parameters

Parameter Type Description

Usage

do_action( 'convertkit_initialize_admin_or_frontend_editor', function(  ) {
	// ... your code here
}, 10, 0 );

convertkit_initialize_cli_cron includes/class-wp-convertkit.php::129

Parameters

Parameter Type Description

Usage

do_action( 'convertkit_initialize_cli_cron', function(  ) {
	// ... your code here
}, 10, 0 );

convertkit_initialize_frontend includes/class-wp-convertkit.php::153

Parameters

Parameter Type Description

Usage

do_action( 'convertkit_initialize_frontend', function(  ) {
	// ... your code here
}, 10, 0 );

convertkit_initialize_global includes/class-wp-convertkit.php::197

Parameters

Parameter Type Description

Usage

do_action( 'convertkit_initialize_global', function(  ) {
	// ... your code here
}, 10, 0 );