Plugin extension API - JoryHogeveen/off-canvas-sidebars GitHub Wiki

Filters

ocs_page_register_tabs

Register the plugin admin tabs.

@since   0.5
@param   array  $tabs  Tab instances.
@return  array  Array of tab instanced. Array key needs to be the tab ID.

ocs_page_form_action

Action URL for the setting page form.

@since   0.5
@param   string  $url  options.php
@return  string

ocs_page_form_do_submit

Add submit button to setting page.

@since   0.5
@param   bool   $true  True by default
@return  bool

ocs_page_form_do_settings_fields

Add settings fields to setting page.

@since   0.5
@param   bool   $true  True by default
@return  bool

ocs_page_form_do_sections

Add settings sections to setting page.

@since   0.5
@param   bool   $true  True by default
@return  bool

ocs_page_form_section_box_classes

Change the postbox classes for setting sections.

@since   0.5
@param   string  $classes  The default classes.
@param   array   $section
@param   string  $page
@return  string

ocs_settings_parse_input

Filter the form input data before validation with defaults.

@since   0.5
@param   array  $input    New form input.
@param   array  $current  Current settings.
@return  array

ocs_settings_validate_input

Filter the parsed form data. Note: Required

@since   0.5
@param   array  $data   Parsed input data.
@param   array  $input  Original input.
@return  array

ocs_settings_capability_{$tab_filter_name}

Change the capability required to access a setting tab.
Note: $tab_filter_name is normally the tab ID without ocs- prefix.

@since   0.5
@param   string  $capability  Default: `edit_theme_options`.
@return  string

Actions


off_canvas_sidebar_settings

Runs after the settings page is registered.

@since  0.5

off_canvas_sidebar_settings_{$tab_filter_name}

Runs after all tab settings are registered.
Note: $tab_filter_name is normally the tab ID without ocs- prefix.

@since  0.5

ocs_page_form_before

Runs before the settings page form is rendered.

@since  0.5

ocs_page_form

Hook in here to render within the settings form.

@since  0.5

ocs_page_form_after

Runs after the settings page form is rendered.

@since  0.5

ocs_page_form_section_before

Render before the section content.

@since   0.5
@param   array   $section
@param   string  $page

ocs_page_form_section_after

Render after the section content.

@since   0.5
@param   array   $section
@param   string  $page

ocs_page_form_section_table_before

Render before the section content table.

@since   0.5
@param   array   $section
@param   string  $page

ocs_page_form_section_table_after

Render after the section content table.

@since   0.5
@param   array   $section
@param   string  $page