Skip to main content

GravityView_Extension

Extend this class to create a GravityView extension that gets updates from gravitykit.com

Since: 1.1

Source: lib/class-gravityview-extension.php:17

Details

  • Kind: class
  • Namespace: (global)

Properties

PropertyTypeDescription
$_titlestringName of the plugin in gravitykit.com
$_versionstringVersion number of the plugin
$_item_idintThe ID of the download on gravitykit.com
$_text_domainstringTranslation textdomain
$_min_gravityview_versionstringMinimum version of GravityView the Extension requires
$_min_php_versionstringMinimum version of GravityView the Extension requires
$_remote_update_urlstringThe URL to fetch license info from. Do not change unless you know what you're doing.
$_authorstringAuthor of plugin, sent when fetching license info.

Methods

MethodDescription
add_metabox_tab()If Extension overrides tab_settings() and passes its own tab, add it to the tabbed settings metabox
load_plugin_textdomain()Load translations for the extension
settings()Register the updater for the Extension using GravityView license information
admin_notice()Outputs the admin notices generated by the plugin
add_notice()Add a notice to be displayed in the admin.
add_hooks()Extensions should override this hook to add their hooks instead of
save_post()Store the filter settings in the _gravityview_filters post meta

Method Reference

add_metabox_tab()

function add_metabox_tab()

If Extension overrides tab_settings() and passes its own tab, add it to the tabbed settings metabox

Returns

  • void

Since: 1.8 ((Extension version 1.0.7))

Source: lib/class-gravityview-extension.php:112

load_plugin_textdomain()

public function load_plugin_textdomain()

Load translations for the extension

  1. Check wp-content/languages/gravityview/ folder and load using load_textdomain()
  2. Check wp-content/plugins/gravityview/languages/ folder for gravityview-[locale].mo file and load using load_textdomain()
  3. Load default file using load_plugin_textdomain() from wp-content/plugins/gravityview/languages/

Returns

  • void

Source: lib/class-gravityview-extension.php:159

settings()

public function settings()

Register the updater for the Extension using GravityView license information

Returns

  • void

Source: lib/class-gravityview-extension.php:217

admin_notice()

public function admin_notice()

Outputs the admin notices generated by the plugin

Returns

  • void

Source: lib/class-gravityview-extension.php:230

add_notice()

public static function add_notice( $notice=[] )

Add a notice to be displayed in the admin.

Parameters

NameTypeDefaultDescription
$noticearray[]Array with class and message keys. The message is not escaped.

Source: lib/class-gravityview-extension.php:252

add_hooks()

public function add_hooks()

Extensions should override this hook to add their hooks instead of

Source: lib/class-gravityview-extension.php:269

save_post()

public function save_post( $post_id )

Store the filter settings in the _gravityview_filters post meta

Parameters

NameTypeDefaultDescription
$post_idintPost ID

Returns

  • void

Source: lib/class-gravityview-extension.php:276