<?php
/** Do NOT include the opening php tag */


add_filter( 'btc/filter/integrations/all', 'btc_register_integration_wordpress_pages' );
/**
 * Plugin: Builder Template Categories - Register custom integration.
 *
 * @author David Decker - DECKERWEB
 * @link https://gist.github.com/deckerweb/dd00884e81783e7d21046ae0a72ed683
 *
 * @param  array $integrations Holds array of all registered integrations.
 * @return array Tweaked array of registered integrations.
 */
function btc_register_integration_wordpress_pages( array $integrations ) {

	$post_type = 'page';

	$submenu_hook = 'edit.php?post_type=' . $post_type;

	$template_label = 'template';	// or: library, layout, element, popup, lightbox, block, listing, post-type

	$integrations[ 'your-custom-handle-lowercase' ] = array(
		'label'          => __( 'WordPress Pages as Templates', 'your-textdomain' ),
		'submenu_hook'   => $submenu_hook,
		'post_type'      => $post_type,
		'template_label' => $template_label,
		'admin_url'      => 'edit.php?post_type=' . $post_type,
	);

	return $integrations;

}  // end function