Sunrise: Class reference – Properties

meta array

Plugin meta. Parsed from main plugin file

basename string

Plugin basename. Example value: plugin-folder/example-plugin.php

slug string

Short plugin name. Based on plugin name from meta section. Example value: pluginname

version string

Plugin version. Based on version from meta section. Example value: 1.0.0

textdomain string

Plugin textdomain. Based on textdomainfrom meta section. Example value: example-plugin-textdomain

name string

Full plugin name. Based on plugin name from meta section. Example value: Plugin name

includes string

Relative path to the plugin includes directory. Example values: includesincludes/core (any folder you want)

views string

Relative path to the plugin views directory. Example values: inc/viewscore/views (any folder you want)

assets string

Relative path to the plugin assets directory. Example values: assetsfiles/assets (any folder you want)

url string

Absolute URL to plugin directory (without trailing slash). Example value:

admin_url string

Absolute URL to plugin options page. Example values:

option string

Option name in wp_options table. This option holds all plugin settings. Example value: pluginname_options

options array

Array with options set. Contains all fields on plugin options page. Example value:

      'type' => 'opentab',
      'name' => 'General options'

args array

Parameters of class constructor. Example value:

   'includes' => 'inc',
   'views' => 'inc/views',
   'assets' => 'assets'

settings array

Options page configuration. Example value:

   'parent' => 'options-general.php',
   'menu_title' => 'Plugin name',
   'page_title' => 'Plugin name',
   'capability' => 'manage_options',
   'link' => true

How to use properties

$plugin_example = new Sunrise_Plugin_Framework_2( __FILE__ );
echo $plugin_example->version;
// Will output something like '1.0.0'