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
| Property | Type | Description |
|---|---|---|
$_title | string | Name of the plugin in gravitykit.com |
$_version | string | Version number of the plugin |
$_item_id | int | The ID of the download on gravitykit.com |
$_text_domain | string | Translation textdomain |
$_min_gravityview_version | string | Minimum version of GravityView the Extension requires |
$_min_php_version | string | Minimum version of GravityView the Extension requires |
$_remote_update_url | string | The URL to fetch license info from. Do not change unless you know what you're doing. |
$_author | string | Author of plugin, sent when fetching license info. |
Methods
| Method | Description |
|---|---|
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
- Check
wp-content/languages/gravityview/folder and load usingload_textdomain() - Check
wp-content/plugins/gravityview/languages/folder forgravityview-[locale].mofile and load usingload_textdomain() - Load default file using
load_plugin_textdomain()fromwp-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
| Name | Type | Default | Description |
|---|---|---|---|
$notice | array | [] | 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
| Name | Type | Default | Description |
|---|---|---|---|
$post_id | int | Post ID |
Returns
void
Source: lib/class-gravityview-extension.php:276