-
-
Notifications
You must be signed in to change notification settings - Fork 4
Actions & Filters
Change the before and after hooks with filters. This will disable the option on the settings page.
@since 0.3
@param string $hook The hook name/identifier
@return string $hook
Change the before and after hook priority.
Default priorities:
-
ocs_website_before_hook_priority
: 5 -
ocs_website_after_hook_priority
: 50 (in case ofwp_footer
: -50)
@since 0.5.3
@param int $priority The hook priority
@return int $priority
Filter the classes for a sidebar
@since 0.3
@see OCS_Off_Canvas_Sidebars_Settings::$default_sidebar_settings for the sidebar settings
@param array $classes Classes
@param string $sidebar_id The ID of this sidebar as configured in: Appearances > Off-Canvas Sidebars > Sidebars
@param array $sidebar_data The sidebar settings
@return array $classes
Filter the register_sidebar arguments
Please note that the ID will be overwritten!
@since 0.3
@see https://codex.wordpress.org/Function_Reference/register_sidebar
@see OCS_Off_Canvas_Sidebars_Settings::$default_sidebar_settings for the sidebar settings
@param array $args The register_sidebar() arguments
@param string $sidebar_id The ID of this sidebar as configured in: Appearances > Off-Canvas Sidebars > Sidebars
@param array $sidebar_data The sidebar settings
@return array $args
Filter nav menu arguments
Please note that the ID will be overwritten!
@since 0.3
@see https://developer.wordpress.org/reference/functions/wp_nav_menu/
@see OCS_Off_Canvas_Sidebars_Settings::$default_sidebar_settings for the sidebar settings
@param array $args The wp_nav_menu() arguments
@param string $sidebar_id The ID of this sidebar as configured in: Appearances > Off-Canvas Sidebars > Sidebars
@param array $sidebar_data The sidebar settings
@return array $args
Filter whether an off-canvas sidebar should be rendered.
@since 0.5.2
@param bool $enabled True if the sidebar is enabled in the sidebar settings, false otherwise.
@param string $sidebar_id The ID of this sidebar as configured in: Appearances > Off-Canvas Sidebars > Sidebars
@param array $sidebar_data The sidebar settings
@return bool
Change the default settings.
@since 0.5.6
@param array $settings The default settings.
@return array
Change the default sidebar settings.
@since 0.5.6
@param array $settings The default sidebar settings.
@return array
Modify the inline styles.
@since 0.5.8
@param string $css The rendered inline styles.
@param string $prefix The CSS prefix.
@return string
Add content before the site container
Add content before other content in the site container
Add content after other content in the site container
Add content after the site container
Add content before or after an off canvas sidebar
@since 0.3
@see OCS_Off_Canvas_Sidebars_Settings::$default_sidebar_settings for the sidebar settings
@param string $sidebar_id The ID of this sidebar as configured in: Appearances > Off-Canvas Sidebars > Sidebars
@param array $sidebar_data The sidebar settings
Action to hook into the sidebar content instead of using a WP Sidebar of WP Menu
@since 0.3
@see OCS_Off_Canvas_Sidebars_Settings::$default_sidebar_settings for the sidebar settings
@param string $sidebar_id The ID of this sidebar as configured in: Appearances > Off-Canvas Sidebars > Sidebars
@param array $sidebar_data The sidebar settings