5 if ( ! defined(
'GRAVITYVIEW_DIR' ) ) {
20 private static $__instance = null;
51 public static function get() {
52 if ( ! self::$__instance instanceof
self ) {
53 self::$__instance =
new self;
55 return self::$__instance;
64 require_once dirname( __FILE__ ) .
'/class-gv-plugin.php';
65 Plugin::get()->register_activation_hooks();
74 self::$__instance = $this;
86 $this->plugin = Plugin::get();
89 require_once $this->plugin->dir(
'future/includes/class-gv-logger.php' );
99 require_once $this->plugin->dir(
'future/includes/class-gv-utils.php' );
102 require_once $this->plugin->dir(
'future/includes/class-gv-settings.php' );
103 require_once $this->plugin->dir(
'future/includes/class-gv-settings-view.php' );
106 require_once $this->plugin->dir(
'future/includes/class-gv-request.php' );
108 if ( Request::is_admin() ) {
115 require_once $this->plugin->dir(
'includes/import-functions.php' );
116 require_once $this->plugin->dir(
'includes/helper-functions.php' );
117 require_once $this->plugin->dir(
'includes/class-common.php');
118 require_once $this->plugin->dir(
'includes/connector-functions.php');
119 require_once $this->plugin->dir(
'includes/class-gravityview-compatibility.php' );
120 require_once $this->plugin->dir(
'includes/class-gravityview-roles-capabilities.php' );
121 require_once $this->plugin->dir(
'includes/class-gravityview-admin-notices.php' );
122 require_once $this->plugin->dir(
'includes/class-admin.php' );
123 require_once $this->plugin->dir(
'includes/class-post-types.php');
124 require_once $this->plugin->dir(
'includes/class-cache.php');
129 require_once $this->plugin->dir(
'future/includes/class-gv-extension.php' );
130 require_once $this->plugin->dir(
'future/includes/class-gv-widget.php' );
133 $this->plugin->include_legacy_core();
141 if ( ! $this->plugin->is_compatible() ) {
142 $this->log->error(
'GravityView 2.0 is not compatible with this environment. Stopped loading.' );
147 require_once $this->plugin->dir(
'future/includes/class-gv-view.php' );
148 add_action(
'init', array(
'\GV\View',
'register_post_type' ) );
149 add_action(
'init', array(
'\GV\View',
'add_rewrite_endpoint' ) );
150 add_filter(
'map_meta_cap', array(
'\GV\View',
'restrict' ), 11, 4 );
151 add_action(
'template_redirect', array(
'\GV\View',
'template_redirect' ) );
152 add_action(
'the_content', array(
'\GV\View',
'content' ) );
155 require_once $this->plugin->dir(
'future/includes/class-gv-entry.php' );
156 add_action(
'init', array(
'\GV\Entry',
'add_rewrite_endpoint' ) );
159 require_once $this->plugin->dir(
'future/includes/rest/class-gv-rest-core.php' );
160 add_action(
'rest_api_init', array(
'\GV\REST\Core',
'init' ) );
163 add_action(
'gform_entry_created', array(
'\GravityView_API',
'entry_create_custom_slug' ), 10, 2 );
166 require_once $this->plugin->dir(
'future/includes/class-gv-shortcode.php' );
167 require_once $this->plugin->dir(
'future/includes/class-gv-shortcode-gravityview.php' );
168 require_once $this->plugin->dir(
'future/includes/class-gv-shortcode-gventry.php' );
169 require_once $this->plugin->dir(
'future/includes/class-gv-shortcode-gvfield.php' );
170 require_once $this->plugin->dir(
'future/includes/class-gv-shortcode-gvlogic.php' );
171 add_action(
'init', array(
'\GV\Shortcodes\gravityview',
'add' ) );
172 add_action(
'init', array(
'\GV\Shortcodes\gventry',
'add' ) );
173 add_action(
'init', array(
'\GV\Shortcodes\gvfield',
'add' ) );
174 add_action(
'init', array(
'\GV\Shortcodes\gvlogic',
'add' ) );
177 require_once $this->plugin->dir(
'future/includes/class-gv-oembed.php' );
178 add_action(
'init', array(
'\GV\oEmbed',
'init' ), 11 );
181 require_once $this->plugin->dir(
'future/includes/class-gv-source.php' );
182 require_once $this->plugin->dir(
'future/includes/class-gv-source-internal.php' );
183 require_once $this->plugin->dir(
'future/includes/class-gv-form.php' );
184 require_once $this->plugin->dir(
'future/includes/class-gv-form-gravityforms.php' );
187 require_once $this->plugin->dir(
'future/includes/class-gv-form-join.php' );
190 require_once $this->plugin->dir(
'future/includes/class-gv-entry-gravityforms.php' );
191 require_once $this->plugin->dir(
'future/includes/class-gv-entry-multi.php' );
194 require_once $this->plugin->dir(
'future/includes/class-gv-context.php' );
195 require_once $this->plugin->dir(
'future/includes/class-gv-context-template.php' );
198 require_once $this->plugin->dir(
'future/includes/class-gv-field.php' );
199 require_once $this->plugin->dir(
'future/includes/class-gv-field-gravityforms.php' );
200 require_once $this->plugin->dir(
'future/includes/class-gv-field-internal.php' );
203 require_once $this->plugin->dir(
'future/includes/class-gv-collection.php' );
204 require_once $this->plugin->dir(
'future/includes/class-gv-collection-form.php' );
205 require_once $this->plugin->dir(
'future/includes/class-gv-collection-field.php' );
206 require_once $this->plugin->dir(
'future/includes/class-gv-collection-entry.php' );
207 require_once $this->plugin->dir(
'future/includes/class-gv-collection-widget.php' );
208 require_once $this->plugin->dir(
'future/includes/class-gv-collection-view.php' );
211 require_once $this->plugin->dir(
'future/includes/class-gv-collection-entry-filter.php' );
212 require_once $this->plugin->dir(
'future/includes/class-gv-collection-entry-sort.php' );
213 require_once $this->plugin->dir(
'future/includes/class-gv-collection-entry-offset.php' );
216 require_once $this->plugin->dir(
'future/includes/class-gv-renderer.php' );
217 require_once $this->plugin->dir(
'future/includes/class-gv-renderer-view.php' );
218 require_once $this->plugin->dir(
'future/includes/class-gv-renderer-entry.php' );
219 require_once $this->plugin->dir(
'future/includes/class-gv-renderer-entry-edit.php' );
220 require_once $this->plugin->dir(
'future/includes/class-gv-renderer-field.php' );
223 require_once $this->plugin->dir(
'future/includes/class-gv-template.php' );
224 require_once $this->plugin->dir(
'future/includes/class-gv-template-view.php' );
225 require_once $this->plugin->dir(
'future/includes/class-gv-template-entry.php' );
226 require_once $this->plugin->dir(
'future/includes/class-gv-template-field.php' );
227 require_once $this->plugin->dir(
'future/includes/class-gv-template-legacy-override.php' );
230 require_once $this->plugin->dir(
'future/includes/class-gv-wrappers.php' );
233 require_once $this->plugin->dir(
'future/includes/gutenberg/class-gv-gutenberg-blocks.php' );
235 require_once $this->plugin->dir(
'includes/class-gravityview-powered-by.php' );
238 add_action(
'clean_post_cache',
'\GV\View::_flush_cache' );
246 do_action(
'gravityview/loaded' );
263 if ( is_null( $views ) ) {
264 $views = new \GV\Wrappers\views();
If this file is called directly, abort.
If this file is called directly, abort.
init()
Early initialization.
If this file is called directly, abort.
If this file is called directly, abort.
static bootstrap()
Very early initialization.
__get( $key)
Wrapper magic.