16 add_action(
'init',
'gravityview_register_default_templates', 11 );
26 require_once
GRAVITYVIEW_DIR .
'includes/class-gravityview-template.php';
29 include_once $path .
'default-table/class-gravityview-default-template-table.php';
30 include_once $path .
'default-list/class-gravityview-default-template-list.php';
31 include_once $path .
'default-edit/class-gravityview-default-template-edit.php';
32 include_once $path .
'business-listings/class-gravityview-preset-business-listings.php';
33 include_once $path .
'business-data/class-gravityview-preset-business-data.php';
34 include_once $path .
'profiles/class-gravityview-preset-profiles.php';
35 include_once $path .
'staff-profiles/class-gravityview-preset-staff-profiles.php';
36 include_once $path .
'website-showcase/class-gravityview-preset-website-showcase.php';
37 include_once $path .
'issue-tracker/class-gravityview-preset-issue-tracker.php';
38 include_once $path .
'resume-board/class-gravityview-preset-resume-board.php';
39 include_once $path .
'job-board/class-gravityview-preset-job-board.php';
40 include_once $path .
'event-listings/class-gravityview-preset-event-listings.php';
45 add_action(
'init',
'gravityview_register_placeholder_templates', 2000 );
56 require_once
GRAVITYVIEW_DIR .
'includes/class-gravityview-placeholder-template.php';
59 'GravityView_DataTables_Template' => [
60 'slug' =>
'dt_placeholder',
61 'template_id' =>
'datatables_table',
63 'label' => __(
'DataTables Table',
'gv-datatables',
'gk-gravityview' ),
64 'description' => __(
'Display items in a dynamic table powered by DataTables.',
'gk-gravityview' ),
65 'logo' => plugins_url(
'assets/images/templates/logo-datatables.png',
GRAVITYVIEW_FILE ),
66 'buy_source' =>
'https://www.gravitykit.com/pricing/?utm_source=plugin&utm_medium=buy_now&utm_campaign=view_type&utm_term=datatables',
67 'preview' =>
'https://try.gravityview.co/demo/view/datatables/?utm_source=plugin&utm_medium=try_demo&utm_campaign=view_type&utm_term=datatables',
68 'license' => esc_html__(
'All Access',
'gk-gravityview' ),
70 'textdomain' =>
'gv-datatables|gk-datatables',
72 'GravityView_Maps_Template_Map_Default' => [
73 'slug' =>
'map_placeholder',
74 'template_id' =>
'map',
76 'label' => __(
'Map',
'gravityview-maps',
'gk-gravityview' ),
77 'description' => __(
'Display entries on a map.',
'gk-gravityview' ),
78 'logo' => plugins_url(
'assets/images/templates/default-map.png',
GRAVITYVIEW_FILE ),
79 'buy_source' =>
'https://www.gravitykit.com/pricing/?utm_source=plugin&utm_medium=buy_now&utm_campaign=view_type&utm_term=map',
80 'preview' =>
'https://try.gravityview.co/demo/view/map/?utm_source=plugin&utm_medium=try_demo&utm_campaign=view_type&utm_term=map',
81 'license' => esc_html__(
'All Access',
'gk-gravityview' ),
83 'textdomain' =>
'gravityview-maps|gk-gravitymaps',
85 'GravityView_DIY_Template' => [
86 'slug' =>
'diy_placeholder',
87 'template_id' =>
'diy',
88 'download_id' => 550152,
89 'label' => _x(
'DIY',
'DIY means "Do It Yourself"',
'gk-gravityview' ),
90 'description' => esc_html__(
'A flexible, powerful layout for designers & developers.',
'gk-gravityview' ),
91 'buy_source' =>
'https://www.gravitykit.com/pricing/?utm_source=plugin&utm_medium=buy_now&utm_campaign=view_type&utm_term=diy',
92 'logo' => plugins_url(
'assets/images/templates/logo-diy.png',
GRAVITYVIEW_FILE ),
93 'preview' =>
'https://try.gravityview.co/demo/view/diy/?utm_source=plugin&utm_medium=try_demo&utm_campaign=view_type&utm_term=diy',
94 'license' => esc_html__(
'All Access',
'gk-gravityview' ),
95 'textdomain' =>
'gravityview-diy|gk-diy',
99 if ( ! class_exists(
'GravityKitFoundation' ) ) {
103 $product_manager = GravityKitFoundation::licenses()->product_manager();
105 if ( ! $product_manager ) {
110 $products_data = $product_manager->get_products_data( [
'key_by' =>
'id' ] );
116 if (
GravityKit\
GravityView\Foundation\Helpers\Arr::get( $products_data,
"{$placeholder['download_id']}.active" ) ) {
121 $placeholder[
'type'] =
'custom';
122 $placeholder[
'included'] = ! empty( GravityKitFoundation::helpers()->array->get( $products_data,
"{$placeholder['download_id']}.licenses" ) );
const GRAVITYVIEW_DIR
"GRAVITYVIEW_DIR" "./" The absolute path to the plugin directory, with trailing slash ...
const GRAVITYVIEW_FILE
Full path to the GravityView file "GRAVITYVIEW_FILE" "./gravityview.php".
gravityview_register_placeholder_templates()
Register the placeholder templates to make it clear what layouts are available.
gravityview_register_default_templates()
Registers the default templates.