'; $args['after_title'] = ''; } return $args; } add_filter( 'themify_after_page_title_parse_args', 'themify_theme_restaurant_page_title' ); /** * Add fancy heading styles to post titles * * @since 1.1 */ function themify_theme_restaurant_post_title( $args ) { global $themify; if ( ( isset( $themify->post_layout ) && $themify->post_layout === 'list-post' ) || ( is_singular() && $args['tag'] === 'h1' ) ) { $args=themify_theme_restaurant_page_title($args); } return $args; } add_filter( 'themify_post_title_args', 'themify_theme_restaurant_post_title' ); /** * Add fancy heading styles to Fancy Heading module */ function themify_theme_restaurant_fancy_heading_template( $args, $slug = '' ) { /* when using custom icon, use module's template instead */ if ( $slug !== 'fancy-heading' || ! empty( $args['mod_settings']['icon'] ) || ! empty( $args['mod_settings']['image'] ) || ! empty( $args['mod_settings']['path'] ) ) { return $args; } $args['mod_settings']['heading']=!empty($args['mod_settings']['heading'])?$args['mod_settings']['heading']:''; unset($args['mod_settings']['heading_link']); $args['mod_settings']['heading']=sprintf(' %s ',$args['mod_settings']['heading']); return $args; } add_filter( 'themify_builder_module_render_vars', 'themify_theme_restaurant_fancy_heading_template', 10, 2 ); /** * Add fancy heading styles to Fancy Heading module - Frontend Builder */ function themify_theme_restaurant_active_vars( $vars, $context ) { if ( $context === 'visual' ) { themify_enque_script( 'themify-restaurant-script', THEME_URI . '/skins/restaurant/js/builder.js', Themify_Enqueue_Assets::$themeVersion, [ 'themify-builder-app-js' ] ); } return $vars; } add_action( 'themify_builder_active_vars', 'themify_theme_restaurant_active_vars', 10, 2 );