namespace WPForms\Integrations\DefaultContent;
use WPForms\Integrations\IntegrationInterface;
class DefaultContent implements IntegrationInterface {
* Indicate if current integration is allowed to load.
public function allow_load() {
return get_option( 'fresh_site' ) && $pagenow === 'customize.php';
add_filter( 'get_theme_starter_content', [ $this, 'modify_starter_content' ], 1000, 2 );
* Append education text to Contact page content.
* @param array $content Array of starter content.
* @param array $config Array of theme-specific starter content configuration.
public function modify_starter_content( $content, $config ) {
if ( ! isset( $content['posts']['contact'] ) ) {
$content['posts']['contact']['post_content'] .= sprintf(
"<!-- wp:paragraph -->\n<p>%s</p>\n<!-- /wp:paragraph -->",
sprintf( /* translators: %s - forms overview page URL. */
_x( 'Create your <a href="%s" target="_blank" rel="noopener noreferrer">contact form</a> with WPForms in minutes.', 'Theme starter content', 'wpforms-lite' ),
esc_url( admin_url( 'admin.php?page=wpforms-overview' ) )