Skip to content

Commit

Permalink
Merge pull request #466 from ConvertKit/update-readme-2.2
Browse files Browse the repository at this point in the history
Update readme file for 2.2.0
  • Loading branch information
n7studios authored May 4, 2023
2 parents 1a32295 + cee9cad commit eb81f0b
Show file tree
Hide file tree
Showing 4 changed files with 234 additions and 128 deletions.
148 changes: 109 additions & 39 deletions ACTIONS-FILTERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
<td>&nbsp;</td>
<td><a href="#convertkit_blocks"><code>convertkit_blocks</code></a></td>
<td>Registers blocks for the ConvertKit Plugin.</td>
</tr><tr>
<td>&nbsp;</td>
<td><a href="#convertkit_get_block_formatters"><code>convertkit_get_block_formatters</code></a></td>
<td>Registers block formatters in Gutenberg for the ConvertKit Plugin.</td>
</tr><tr>
<td colspan="3">../includes/blocks/class-convertkit-block-content.php</td>
</tr><tr>
Expand Down Expand Up @@ -63,17 +67,17 @@
<td><a href="#convertkit_block_form_render"><code>convertkit_block_form_render</code></a></td>
<td>Filter the block's content immediately before it is output.</td>
</tr><tr>
<td colspan="3">../includes/class-convertkit-post.php</td>
<td colspan="3">../includes/blocks/class-convertkit-block-form-trigger.php</td>
</tr><tr>
<td>&nbsp;</td>
<td><a href="#convertkit_post_get_default_settings"><code>convertkit_post_get_default_settings</code></a></td>
<td>The default settings, used to populate the Post's Settings when a Post has no Settings.</td>
<td><a href="#convertkit_block_form_trigger_render"><code>convertkit_block_form_trigger_render</code></a></td>
<td>Filter the block's content immediately before it is output.</td>
</tr><tr>
<td colspan="3">../includes/class-convertkit-post-type-product.php</td>
<td colspan="3">../includes/class-convertkit-post.php</td>
</tr><tr>
<td>&nbsp;</td>
<td><a href="#convertkit_post_type_product_register"><code>convertkit_post_type_product_register</code></a></td>
<td>Filter the arguments for registering the Products Custom Post Type</td>
<td><a href="#convertkit_post_get_default_settings"><code>convertkit_post_get_default_settings</code></a></td>
<td>The default settings, used to populate the Post's Settings when a Post has no Settings.</td>
</tr><tr>
<td colspan="3">../includes/class-convertkit-term.php</td>
</tr><tr>
Expand Down Expand Up @@ -134,6 +138,10 @@
<td>&nbsp;</td>
<td><a href="#convertkit_frontend_append_form"><code>convertkit_frontend_append_form</code></a></td>
<td>Filter the Post's Content, which includes a ConvertKit Form, immediately before it is output.</td>
</tr><tr>
<td>&nbsp;</td>
<td><a href="#convertkit_output_scripts_footer"><code>convertkit_output_scripts_footer</code></a></td>
<td>Define an array of scripts to output in the footer of the WordPress site.</td>
</tr><tr>
<td colspan="3">../includes/class-convertkit-settings.php</td>
</tr><tr>
Expand Down Expand Up @@ -310,6 +318,33 @@ add_filter( 'convertkit_blocks', function( $blocks ) {
return $blocks;
}, 10, 1 );
</pre>
<h3 id="convertkit_get_block_formatters">
convertkit_get_block_formatters
<code>includes/functions.php::219</code>
</h3><h4>Overview</h4>
<p>Registers block formatters in Gutenberg for the ConvertKit Plugin.</p><h4>Parameters</h4>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody><tr>
<td>$block_formatters</td>
<td>array</td>
<td>Block formatters.</td>
</tr>
</tbody>
</table><h4>Usage</h4>
<pre>
add_filter( 'convertkit_get_block_formatters', function( $block_formatters ) {
// ... your code here
// Return value
return $block_formatters;
}, 10, 1 );
</pre>
<h3 id="convertkit_block_content_render">
convertkit_block_content_render
<code>includes/blocks/class-convertkit-block-content.php::275</code>
Expand Down Expand Up @@ -481,11 +516,11 @@ add_filter( 'convertkit_block_form_render', function( $form, $atts, $form_id ) {
return $form;
}, 10, 3 );
</pre>
<h3 id="convertkit_post_get_default_settings">
convertkit_post_get_default_settings
<code>includes/class-convertkit-post.php::316</code>
<h3 id="convertkit_block_form_trigger_render">
convertkit_block_form_trigger_render
<code>includes/blocks/class-convertkit-block-form-trigger.php::378</code>
</h3><h4>Overview</h4>
<p>The default settings, used to populate the Post's Settings when a Post has no Settings.</p><h4>Parameters</h4>
<p>Filter the block's content immediately before it is output.</p><h4>Parameters</h4>
<table>
<thead>
<tr>
Expand All @@ -495,24 +530,28 @@ add_filter( 'convertkit_block_form_render', function( $form, $atts, $form_id ) {
</tr>
</thead>
<tbody><tr>
<td>$defaults</td>
<td>$html</td>
<td>string</td>
<td>ConvertKit Button HTML.</td>
</tr><tr>
<td>$atts</td>
<td>array</td>
<td>Default Settings.</td>
<td>Block Attributes.</td>
</tr>
</tbody>
</table><h4>Usage</h4>
<pre>
add_filter( 'convertkit_post_get_default_settings', function( $defaults ) {
add_filter( 'convertkit_block_form_trigger_render', function( $html, $atts ) {
// ... your code here
// Return value
return $defaults;
}, 10, 1 );
return $html;
}, 10, 2 );
</pre>
<h3 id="convertkit_post_type_product_register">
convertkit_post_type_product_register
<code>includes/class-convertkit-post-type-product.php::98</code>
<h3 id="convertkit_post_get_default_settings">
convertkit_post_get_default_settings
<code>includes/class-convertkit-post.php::316</code>
</h3><h4>Overview</h4>
<p>Filter the arguments for registering the Products Custom Post Type</p><h4>Parameters</h4>
<p>The default settings, used to populate the Post's Settings when a Post has no Settings.</p><h4>Parameters</h4>
<table>
<thead>
<tr>
Expand All @@ -522,17 +561,17 @@ add_filter( 'convertkit_post_get_default_settings', function( $defaults ) {
</tr>
</thead>
<tbody><tr>
<td>$args</td>
<td>$defaults</td>
<td>array</td>
<td>register_post_type() compatible arguments.</td>
<td>Default Settings.</td>
</tr>
</tbody>
</table><h4>Usage</h4>
<pre>
add_filter( 'convertkit_post_type_product_register', function( $args ) {
add_filter( 'convertkit_post_get_default_settings', function( $defaults ) {
// ... your code here
// Return value
return $args;
return $defaults;
}, 10, 1 );
</pre>
<h3 id="convertkit_term_get_default_settings">
Expand Down Expand Up @@ -703,7 +742,7 @@ add_filter( 'convertkit_wishlist_settings_get_defaults', function( $defaults ) {
</pre>
<h3 id="convertkit_output_restrict_content_get_resource_type">
convertkit_output_restrict_content_get_resource_type
<code>includes/class-convertkit-output-restrict-content.php::520</code>
<code>includes/class-convertkit-output-restrict-content.php::531</code>
</h3><h4>Overview</h4>
<p>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.</p><h4>Parameters</h4>
<table>
Expand Down Expand Up @@ -734,7 +773,7 @@ add_filter( 'convertkit_output_restrict_content_get_resource_type', function( $r
</pre>
<h3 id="convertkit_output_restrict_content_get_resource_id">
convertkit_output_restrict_content_get_resource_id
<code>includes/class-convertkit-output-restrict-content.php::556</code>
<code>includes/class-convertkit-output-restrict-content.php::567</code>
</h3><h4>Overview</h4>
<p>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.</p><h4>Parameters</h4>
<table>
Expand Down Expand Up @@ -765,7 +804,7 @@ add_filter( 'convertkit_output_restrict_content_get_resource_id', function( $res
</pre>
<h3 id="convertkit_output_page_takeover_landing_page_id">
convertkit_output_page_takeover_landing_page_id
<code>includes/class-convertkit-output.php::138</code>
<code>includes/class-convertkit-output.php::139</code>
</h3><h4>Overview</h4>
<p>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.</p><h4>Parameters</h4>
<table>
Expand Down Expand Up @@ -796,7 +835,7 @@ add_filter( 'convertkit_output_page_takeover_landing_page_id', function( $landin
</pre>
<h3 id="convertkit_output_append_form_to_content_form_id">
convertkit_output_append_form_to_content_form_id
<code>includes/class-convertkit-output.php::193</code>
<code>includes/class-convertkit-output.php::194</code>
</h3><h4>Overview</h4>
<p>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.</p><h4>Parameters</h4>
<table>
Expand Down Expand Up @@ -827,7 +866,7 @@ add_filter( 'convertkit_output_append_form_to_content_form_id', function( $form_
</pre>
<h3 id="convertkit_frontend_append_form">
convertkit_frontend_append_form
<code>includes/class-convertkit-output.php::257</code>
<code>includes/class-convertkit-output.php::258</code>
</h3><h4>Overview</h4>
<p>Filter the Post's Content, which includes a ConvertKit Form, immediately before it is output.</p><h4>Parameters</h4>
<table>
Expand Down Expand Up @@ -864,6 +903,33 @@ add_filter( 'convertkit_frontend_append_form', function( $content, $form, $post_
return $content;
}, 10, 4 );
</pre>
<h3 id="convertkit_output_scripts_footer">
convertkit_output_scripts_footer
<code>includes/class-convertkit-output.php::427</code>
</h3><h4>Overview</h4>
<p>Define an array of scripts to output in the footer of the WordPress site.</p><h4>Parameters</h4>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody><tr>
<td>$scripts</td>
<td>array</td>
<td>Scripts.</td>
</tr>
</tbody>
</table><h4>Usage</h4>
<pre>
add_filter( 'convertkit_output_scripts_footer', function( $scripts ) {
// ... your code here
// Return value
return $scripts;
}, 10, 1 );
</pre>
<h3 id="convertkit_settings_get_defaults">
convertkit_settings_get_defaults
<code>includes/class-convertkit-settings.php::274</code>
Expand Down Expand Up @@ -893,7 +959,7 @@ add_filter( 'convertkit_settings_get_defaults', function( $defaults ) {
</pre>
<h3 id="convertkit_is_admin_or_frontend_editor">
convertkit_is_admin_or_frontend_editor
<code>includes/class-wp-convertkit.php::306</code>
<code>includes/class-wp-convertkit.php::308</code>
</h3><h4>Overview</h4>
<p>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.</p><h4>Parameters</h4>
<table>
Expand Down Expand Up @@ -1076,7 +1142,7 @@ do_action( 'convertkit_settings_base_render_after', function( ) {
</pre>
<h3 id="convertkit_settings_base_render_before">
convertkit_settings_base_render_before
<code>admin/section/class-convertkit-settings-tools.php::327</code>
<code>admin/section/class-convertkit-settings-tools.php::339</code>
</h3><h4>Parameters</h4>
<table>
<thead>
Expand All @@ -1096,7 +1162,7 @@ do_action( 'convertkit_settings_base_render_before', function( ) {
</pre>
<h3 id="convertkit_settings_base_render_after">
convertkit_settings_base_render_after
<code>admin/section/class-convertkit-settings-tools.php::341</code>
<code>admin/section/class-convertkit-settings-tools.php::353</code>
</h3><h4>Parameters</h4>
<table>
<thead>
Expand Down Expand Up @@ -1286,7 +1352,7 @@ do_action( 'convertkit_admin_setup_wizard_load_screen_data_ this-page_name', fu
</pre>
<h3 id="convertkit_gutenberg_enqueue_scripts">
convertkit_gutenberg_enqueue_scripts
<code>includes/class-convertkit-gutenberg.php::157</code>
<code>includes/class-convertkit-gutenberg.php::163</code>
</h3><h4>Overview</h4>
<p>Enqueue any additional scripts for Gutenberg blocks that have been registered.</p><h4>Parameters</h4>
<table>
Expand All @@ -1301,17 +1367,21 @@ do_action( 'convertkit_admin_setup_wizard_load_screen_data_ this-page_name', fu
<td>$blocks</td>
<td>array</td>
<td>ConvertKit Blocks.</td>
</tr><tr>
<td>$block_formatters</td>
<td>array</td>
<td>ConvertKit Block Formatters.</td>
</tr>
</tbody>
</table><h4>Usage</h4>
<pre>
do_action( 'convertkit_gutenberg_enqueue_scripts', function( $blocks ) {
do_action( 'convertkit_gutenberg_enqueue_scripts', function( $blocks, $block_formatters ) {
// ... your code here
}, 10, 1 );
}, 10, 2 );
</pre>
<h3 id="convertkit_gutenberg_enqueue_styles">
convertkit_gutenberg_enqueue_styles
<code>includes/class-convertkit-gutenberg.php::181</code>
<code>includes/class-convertkit-gutenberg.php::187</code>
</h3><h4>Parameters</h4>
<table>
<thead>
Expand All @@ -1331,7 +1401,7 @@ do_action( 'convertkit_gutenberg_enqueue_styles', function( ) {
</pre>
<h3 id="convertkit_gutenberg_enqueue_scripts_editor_and_frontend">
convertkit_gutenberg_enqueue_scripts_editor_and_frontend
<code>includes/class-convertkit-gutenberg.php::205</code>
<code>includes/class-convertkit-gutenberg.php::211</code>
</h3><h4>Parameters</h4>
<table>
<thead>
Expand All @@ -1351,7 +1421,7 @@ do_action( 'convertkit_gutenberg_enqueue_scripts_editor_and_frontend', function(
</pre>
<h3 id="convertkit_gutenberg_enqueue_styles_editor_and_frontend">
convertkit_gutenberg_enqueue_styles_editor_and_frontend
<code>includes/class-convertkit-gutenberg.php::229</code>
<code>includes/class-convertkit-gutenberg.php::235</code>
</h3><h4>Parameters</h4>
<table>
<thead>
Expand All @@ -1371,7 +1441,7 @@ do_action( 'convertkit_gutenberg_enqueue_styles_editor_and_frontend', function(
</pre>
<h3 id="convertkit_output_output_form">
convertkit_output_output_form
<code>includes/class-convertkit-output.php::93</code>
<code>includes/class-convertkit-output.php::94</code>
</h3><h4>Parameters</h4>
<table>
<thead>
Expand Down Expand Up @@ -1471,7 +1541,7 @@ do_action( 'convertkit_initialize_frontend', function( ) {
</pre>
<h3 id="convertkit_initialize_global">
convertkit_initialize_global
<code>includes/class-wp-convertkit.php::186</code>
<code>includes/class-wp-convertkit.php::188</code>
</h3><h4>Parameters</h4>
<table>
<thead>
Expand Down
Loading

0 comments on commit eb81f0b

Please sign in to comment.