Documentation

graphic_data_plugin.php

The plugin bootstrap file

This file is read by WordPress to generate the plugin information in the plugin admin area. This file also includes all of the dependencies used by the plugin, registers the activation and deactivation functions, and defines a function that starts the plugin.

Tags
link
https://github.com/ioos/sanctuarywatch_graphicdata
wordpress-plugin

Plugin Name: Graphic Data Plugin Plugin URI: hhttps://github.com/ioos/sanctuarywatch_graphicdata Description: This plugin customizes a Wordpress installation for the requirements of the Graphic Data framework. Version: 1.3.3 Author: Graphic Data Team Author URI: https://www.noaa.gov License: GPL-2.0+ License URI: http://www.gnu.org/licenses/gpl-2.0.txt Text Domain: graphic_data_plugin Requires Plugins: svg-support Domain Path: /languages

Table of Contents

Constants

GRAPHIC_DATA_DATA_DIR  = \WP_CONTENT_DIR . '/data'
The data directory inside of wp-content
GRAPHIC_DATA_DATA_URL  = \content_url('data')
GRAPHIC_DATA_PLUGIN_DIR  = \plugin_dir_path(__FILE__)
The directory path of the plugin.
GRAPHIC_DATA_PLUGIN_VERSION  = $graphic_data_plugin_data['Version']

Functions

graphic_data_activate()  : mixed
Plugin activation callback.
graphic_data_ensure_public_data_dir()  : void
Ensure the public data directory exists with correct permissions.
graphic_data_plugin_run()  : mixed
Begins execution of the plugin.

Constants

GRAPHIC_DATA_DATA_DIR

The data directory inside of wp-content

public mixed GRAPHIC_DATA_DATA_DIR = \WP_CONTENT_DIR . '/data'

GRAPHIC_DATA_PLUGIN_DIR

The directory path of the plugin.

public mixed GRAPHIC_DATA_PLUGIN_DIR = \plugin_dir_path(__FILE__)

GRAPHIC_DATA_PLUGIN_VERSION

public mixed GRAPHIC_DATA_PLUGIN_VERSION = $graphic_data_plugin_data['Version']

Functions

graphic_data_ensure_public_data_dir()

Ensure the public data directory exists with correct permissions.

graphic_data_ensure_public_data_dir() : void

Creates GRAPHIC_DATA_DATA_DIR if it does not already exist, sets directory permissions to 0755, and drops an index.php guard file to prevent directory browsing while still allowing direct file access.

On failure the error is persisted to the 'graphic_data_data_dir_error' option so it can be surfaced via admin notices; on success that option is deleted.

Tags
since
1.0.0

graphic_data_plugin_run()

Begins execution of the plugin.

graphic_data_plugin_run() : mixed

Since everything within the plugin is registered via hooks, then kicking off the plugin from this point in the file does not affect the page life cycle.


        
On this page

Search results