/** * @since 2.0.0 * @access public * * @param array $data * * @throws \Exception */ public function __construct( array $data = [] ) { if ( $data ) { $template = get_post_meta( $data['post_id'], '_wp_page_template', true ); if ( empty( $template ) ) { $template = 'default'; } $data['settings']['template'] = $template; } parent::__construct( $data ); } protected function get_remote_library_config() { $config = parent::get_remote_library_config(); $config['category'] = ''; $config['type'] = 'page'; $config['default_route'] = 'templates/pages'; return $config; } }