Actions -------------------- themerex_action_before_init_theme Do theme specific actions before theme init. For example - add/remove theme options, shortcodes settings, etc. Attention! Priority 1 reserved for the functions, where add theme specific actions and filters handlers, register templates, etc. Priority 2 reserved for the functions, where create theme options Priority 3 reserved for the functions, where add/delete/change theme options array and other global arrays themerex_action_init_theme Load theme options and do theme specific actions while theme init. themerex_action_after_init_theme Do theme specific actions after theme init. Place here actions, that need get_theme_option() and/or get_custom_option() themerex_action_add_styles Add theme specific stylesheet files themerex_action_add_responsive Add theme specific responsive stylesheet files themerex_action_add_scripts Add theme specific script files themerex_action_add_scripts_inline Add theme specific inline scripts into tag 'script' in the footer themerex_action_blog_scripts($style) Add template specific script files. Used in the template file themerex_action_load_main_options Fired after loading main Theme options to add theme specific options themerex_action_load_custom_options Fired after loading custom (from post, page, category, etc.) options to add theme specific options themerex_action_compile less Fired after saving color schemes, theme options, etc. to recompile .less files themerex_action_shortcodes_list Fired after create shortcodes list themerex_action_shortcodes_list_vc Fired after map shortcodes list for WPBakery PageBuilder themerex_action_taxonomy_before_show_meta_box($tax_type, $tax_obj) Fired before show custom options block for the taxonomy $tax_type - current taxonomy slug $tax_obj - taxonomy term object or taxonomy slug (if just create new taxonomy) themerex_action_taxonomy_after_show_meta_box($tax_type, $tax_obj) Fired after show custom options block for the taxonomy $tax_type - current taxonomy slug $tax_obj - taxonomy term object or taxonomy slug (if just create new taxonomy) themerex_action_taxonomy_before_show_custom_field($tax_type, $tax_obj, $option, $id, $value) Fired before show custom option field for the taxonomy $tax_type - current taxonomy slug $tax_obj - taxonomy term object or taxonomy slug (if just create new taxonomy) $option - array with field's settings from Theme Options $id - field id in theme options $value - current value of the field themerex_action_taxonomy_after_show_custom_field($tax_type, $tax_obj, $option, $id, $value) Fired after show custom options field for the taxonomy $tax_type - current taxonomy slug $tax_obj - taxonomy term object or taxonomy slug (if just create new taxonomy) $option - array with field's settings from Theme Options $id - field id in theme options $value - current value of the field themerex_action_post_before_show_meta_box($post_type, $post_id) Fired before show custom options block for the post $post_type - current post_type $post_id - edited post id themerex_action_post_after_show_meta_box($post_type, $post_id) Fired after show custom options block for the post $post_type - current post_type $post_id - edited post id themerex_action_post_before_show_custom_field($post_type, $post_id, $option, $id, $value) Fired before show custom option field for the post $post_type - current post_type $post_id - edited post id $option - array with field's settings from Theme Options $id - field id in theme options $value - current value of the field themerex_action_post_after_show_custom_field($$post_type, $post_id, $option, $id, $value) Fired after show custom options field for the post $post_type - current post_type $post_id - edited post id $option - array with field's settings from Theme Options $id - field id in theme options $value - current value of the field themerex_action_importer_params($importer) Used to add checkboxes in the params section in the one-click importer themerex_action_importer_export($importer) Prepare data with exported records for theme specific post types and plugins themerex_action_importer_export_fields($importer) Display fileds with exported records for theme specific post types and plugins themerex_action_importer_clear_tables($importer) Clear tables from exists records for theme specific post types and plugins before start import themerex_action_importer_import($importer) Start import theme specific post types and plugins themerex_action_importer_after_import_posts($importer) Do plugins- and custom post-types specific actions after posts import is finished Filters -------------------- themerex_filter_save_options( $options, $override, $slug ) Make theme specific actions while save theme ($override='general'), post ($override='post'), page ($override='page') or category ($override='category') options. If $slug not empty - save inheritance template options themerex_filter_save_custom_colors( $data ) Make theme specific actions while save color schemes. themerex_filter_save_custom_fonts( $data ) Make theme specific actions while save custom fonts settings. themerex_filter_theme_options_is_used( $options, $flag ) Return flag - does we need Theme options section on this post, page, category, etc. themerex_filter_get_custom_option( $val, $name ) Return theme specific custom option value for the option with $name themerex_filter_show_custom_field( $output, $id, $field, $value ) Add custom field layout to the theme options themerex_filter_taxonomy_load_custom_options($opt, $tax_type, $tax_obj) Fired before return loaded from database taxonomy custom options $opt - loaded options $tax_type - taxonomy slug $tax_obj - taxonomy term object or taxonomy slug (if just create new taxonomy) themerex_filter_taxonomy_save_custom_options($opt, $tax_type, $term_id) Fired before save taxonomy custom options into database $opt - custom options to save $tax_type - taxonomy slug $term_id - taxonomy term id themerex_filter_taxonomy_show_custom_field_option($option, $id, $tax_type, $tax_obj) Fired before use taxonomy custom option to show field. You can add/change settings in the option array $option - array with field's settings from Theme Options $id - field id in theme options $tax_type - current taxonomy slug $tax_obj - taxonomy term object or taxonomy slug (if just create new taxonomy) themerex_filter_taxonomy_show_custom_field_value($value, $option, $id, $tax_type, $tax_obj) Fired before use taxonomy custom option value to show field. You can change this value $value - current value of the field $option - array with field's settings from Theme Options $id - field id in theme options $tax_type - current taxonomy slug $tax_obj - taxonomy term object or taxonomy slug (if just create new taxonomy) themerex_filter_post_load_custom_options($opt, $post_type, $post_id) $opt - loaded options $post_type - type of the post $post_id - post ID themerex_filter_post_save_custom_options($opt, $post_type, $post_id) $opt - custom options to save $post_type - type of the post $post_id - post ID themerex_filter_post_show_custom_field_option($option, $id, $post_type, $post_id) Fired before use post custom option to show field. You can add/change settings in the option array $option - array with field's settings from Theme Options $id - field id in theme options $post_type - type of the post $post_id - post ID themerex_filter_post_show_custom_field_value($value, $option, $id, $post_type, $post_id) Fired before use post custom option value to show field. You can change this value $value - current value of the field $option - array with field's settings from Theme Options $id - field id in theme options $post_type - type of the post $post_id - post ID themerex_filter_get_blog_type($type, $query) Return theme specific page slug (if any) or leave $type unchanged, if it is standard framework page. Fired when breadcrumbs and page title will be showed. themerex_filter_get_blog_title($title, $page) Return theme specific page title (if any) or leave $title unchanged, if it is standard framework page. Fired when breadcrumbs and page title will be showed. themerex_filter_get_stream_page_id($id, $page) Return theme specific page ID for the all posts page (streampage). Fired when breadcrumbs and page title will be showed. themerex_filter_get_stream_page_link($url, $page) Return theme specific page URL for the all posts page (streampage). Fired when breadcrumbs and page title will be showed. themerex_filter_get_stream_page_title($title, $page) Return theme specific page title for the all posts page (streampage). Fired when breadcrumbs and page title will be showed. themerex_filter_get_current_taxonomy($tax, $page) Return theme specific taxonomy name (slug) (if any) or leave $tax unchanged, if it is standard framework page. Fired when breadcrumbs will be showed. themerex_filter_is_taxonomy($tax, $query) Return theme specific taxonomy name (slug) if current page is taxonomy page. themerex_filter_get_period_links($link, $page) Return theme specific breadcrumbs links to the parent period (month, year). Fired when breadcrumbs will be showed. themerex_filter_detect_inheritance_key Detect current page (mode) and return correspond inheritance key themerex_filter_detect_template_page_id($id, $key) Detect current page (mode) and return correspond template page id by inheritance key themerex_filter_detect_template_slug($slug, $key) Detect current page (mode) and return correspond template slug by inheritance key themerex_filter_calendar_get_prev_month($prev_obj, $options) Return object { month: xx, year: xxxx, done: array('post_type', 'post_type' ...) } with previous month with posts. 'done' - array with processed post_types (handler will add correspond post type in this array). $options = array( posts_types: allowed posts types, year: current year, month: current_month, last_day: last day in the current month ) themerex_filter_calendar_get_next_month($next_obj, $options) Return object { month: xx, year: xxxx, done: array('post_type', 'post_type' ...) } with next month with posts. 'done' - array with processed post_types (handler will add correspond post type in this array). $options = array( posts_types: allowed posts types, year: current year, month: current_month, last_day: last day in the current month ) themerex_filter_calendar_get_curr_month_posts($posts, $options) Return object { done: array('post_type', 'post_type' ...), link: day link, titles: post's title from current day (if one post pusblished) or posts number (if 2+ posts published in this day), posts: array( post_id: post's ID, post_title: post's title, post_type: post's type, post_date: post's publish date (or start event date for custom post types), post_link: post's permalink ) } with previous month with posts. 'done' - array with processed post_types (handler will add correspond post type in this array). $options = array( posts_types: allowed posts types, year: current year, month: current_month, last_day: last day in the current month ) themerex_filter_add_theme_menus( $menus ) To register theme specific nav menus themerex_filter_update_notifier( $options ) Change theme specific settings (theme name, folder, path to xml-file with dummy data) for the update notifier themerex_filter_required_plugins( $plugins ) Add/Remove required/recommended plugins into list for TGM Activation Plugin themerex_filter_importer_options( $options ) Change options for Dummy Data Importer themerex_filter_importer_required_plugins( $not_installed, $importer ) Check if required plugin is installed for Dummy Data Importer themerex_filter_add_theme_sidebars( $sidebars_list ) Add/remove theme specific sidebars into list. List = array( 'sidebar_slug' => wp_kses_data( __('Sidebar title', 'themerex'), ... ) ) themerex_filter_sc_clear_around( $text ) Clear spaces, tabs,
,
,