Filters are technically another type of “hook” — but instead of simply executing code like with an action hook, they allow us to filter a piece of data. Generally speaking, when a piece of data is passed through a filter, it gives you a chance to manipulate that data, before it gets used, executed, or printed out.
When working with filters, you have to be conscious of the data it's allowing you to filter into. If it's an array, then you want to make sure you still return an array where as if it's a string, then return a string.
Available Theme Filters
The below table list all of the available filters within the framework.
Menus
Name | Returns | Description |
---|---|---|
bne_btn_navbar_text | string | Changes the text used within the mobile nav button. This can also be set from Theme Options. |
bne_header_menu_location | string | The slug name of the custom menu. Defaults to header-menu |
bne_sticky_menu_location | string | The slug name of the custom menu. Defaults to header-menu |
bne_footer_menu_location | string | The slug name of the custom menu. Defaults to footer-menu |
Theme / Framework Options
Name | Returns | Description |
---|---|---|
bne_global_config | array | Allows disabling certain framework areas such as shortcodes, google fonts and the slider. |
bne_get_page_option | array | Allows changing page options such as sidebar layouts, breadcrumbs, and featured areas. |
bne_optionsframework_options_addon | array | Allows adding/editing the options available from Theme Options |
bne_google_font_api_key | string | Allows using an API key to use a current list of available google font names for typography options. |
bne_theme_tgm_include_plugins | array | Allows adding/removing recommended and required theme plugins within the admin. |
bne_recognized_font_styles | array | A list of font styles used in Theme Options |
bne_recognized_font_weights | array | A list of font weights used in Theme Options |
bne_recognized_background_repeats | array | A list of background repeat css styles used in Theme and Page Options |
bne_recognized_background_positions | array | A list of background position css styles used in Theme and Page Options |
bne_recognized_background_sizes | array | A list of background size css styles used in Theme and Page Options |
bne_recognized_background_attachments | array | A list of background attachment css styles used in Theme and Page Options |
bne_recognized_background_shade_opacity | array | A list of opacity levels used in Theme and Page Options |
bne_recognized_theme_colors | array | A list of background colors, specifically for buttons, used in Theme and Page Options |
Sidebar Layout
Name | Returns | Description |
---|---|---|
bne_sidebar_layout_responsive | string | The bootstrap responsive column breakpoints (xs, sm, lg, etc) |
bne_sidebar_layout_width | string | Must return as #-# (number dash number). Corresponds to the bootstrap column sizes. The two numbers must equal 12. |
bne_sidebar_layout_gutter | string | integer | a number equal to the total space between two columns. |
bne_get_right_sidebar_widget_area | string | Can be used to assign a different widget area for the right sidebar. |
bne_get_left_sidebar_widget_area | string | Can be used to assign a different widget area for the left sidebar. |
Breadcrumbs
Name | Returns | Description |
---|---|---|
bne_breadcrumb_trail_before | string | Allows adding content before home link |
bne_breadcrumb_trail_addon | string | Allows adding custom breadcrumbs for custom post types. |
bne_breadcrumb_trail_after | string | Allows adding content after the last link |
Post Meta
Name | Returns | Description |
---|---|---|
bne_excerpt_length | string | integer | The number of characters to show of the post excerpt. |
bne_meta_separator | string | The separator used between each post meta item. |
bne_meta_output | $meta | Allows completely changing the output of the post meta. |
Social
Name | Returns | Description |
---|---|---|
bne_get_share_button_links | array | Returns the available share buttons found at the end of blog post. |
bne_social_media_sources | array | The available social media profiles found in Theme Options and are sent to the [social_bar] shortcode |