]*>/i', '', $string); $string=preg_replace('/<\/'.$tag.'>/i', '', $string); return $string; } if ( ! function_exists( 'business_solutions_excerpt_more' ) ) : /** * Replaces "[...]" (appended to automatically generated excerpts) with ... * */ function business_solutions_excerpt_more($more) { return is_admin() ? $more : ' … '; } endif; add_filter( 'excerpt_more', 'business_solutions_excerpt_more' ); if( ! function_exists( 'business_solutions_footer_credit' ) ): /** * Footer Credits */ function business_solutions_footer_credit() { // Check if footer copyright is enabled $business_solutions_show_footer_copyright = get_theme_mod( 'business_solutions_footer_setting', true ); if ( ! $business_solutions_show_footer_copyright ) { return; // Exit if disabled } $business_solutions_copyright_text = get_theme_mod('business_solutions_footer_copyright_text'); $business_solutions_text = '
'; if ($business_solutions_copyright_text) { $business_solutions_text .= wp_kses_post($business_solutions_copyright_text); } else { $business_solutions_text .= esc_html__('© ', 'business-solutions') . date_i18n(esc_html__('Y', 'business-solutions')); $business_solutions_text .= ' ' . esc_html(get_bloginfo('name')) . '' . esc_html__('. All Rights Reserved.', 'business-solutions'); } $business_solutions_text .= ''; $business_solutions_text .= ' ' . BUSINESS_SOLUTIONS_THEME_NAME . '' . esc_html__(' By ', 'business-solutions') . '' . esc_html__('Themeignite', 'business-solutions') . '.'; /* translators: %s: link to WordPress.org */ $business_solutions_text .= sprintf(esc_html__(' Powered By %s', 'business-solutions'), 'WordPress.'); if (function_exists('the_privacy_policy_link')) { $business_solutions_text .= get_the_privacy_policy_link(); } $business_solutions_text .= '
'; echo apply_filters('business_solutions_footer_text', $business_solutions_text); } add_action('business_solutions_footer', 'business_solutions_footer_credit'); endif; /** * Is Woocommerce activated */ if ( ! function_exists( 'business_solutions_woocommerce_activated' ) ) { function business_solutions_woocommerce_activated() { if ( class_exists( 'woocommerce' ) ) { return true; } else { return false; } } } if( ! function_exists( 'business_solutions_change_comment_form_default_fields' ) ) : /** * Change Comment form default fields i.e. author, email & url. * https://blog.josemcastaneda.com/2016/08/08/copy-paste-hurting-theme/ */ function business_solutions_change_comment_form_default_fields( $fields ){ // get the current commenter if available $business_solutions_commenter = wp_get_current_commenter(); // core functionality $req = get_option( 'require_name_email' ); $business_solutions_aria_req = ( $req ? " aria-required='true'" : '' ); $business_solutions_required = ( $req ? " required" : '' ); $business_solutions_author = ( $req ? __( 'Name*', 'business-solutions' ) : __( 'Name', 'business-solutions' ) ); $business_solutions_email = ( $req ? __( 'Email*', 'business-solutions' ) : __( 'Email', 'business-solutions' ) ); // Change just the author field $fields['author'] = '

'; $fields['email'] = '

'; $fields['url'] = '

'; return $fields; } endif; add_filter( 'comment_form_default_fields', 'business_solutions_change_comment_form_default_fields' ); if( ! function_exists( 'business_solutions_change_comment_form_defaults' ) ) : /** * Change Comment Form defaults * https://blog.josemcastaneda.com/2016/08/08/copy-paste-hurting-theme/ */ function business_solutions_change_comment_form_defaults( $defaults ){ $defaults['comment_field'] = '

'; return $defaults; } endif; add_filter( 'comment_form_defaults', 'business_solutions_change_comment_form_defaults' ); if( ! function_exists( 'business_solutions_escape_text_tags' ) ) : /** * Remove new line tags from string * * @param $text * @return string */ function business_solutions_escape_text_tags( $text ) { return (string) str_replace( array( "\r", "\n" ), '', strip_tags( $text ) ); } endif; if( ! function_exists( 'wp_body_open' ) ) : /** * Fire the wp_body_open action. * Added for backwards compatibility to support pre 5.2.0 WordPress versions. */ function wp_body_open() { /** * Triggered after the opening tag. */ do_action( 'wp_body_open' ); } endif; if ( ! function_exists( 'business_solutions_get_fallback_svg' ) ) : /** * Get Fallback SVG */ function business_solutions_get_fallback_svg( $business_solutions_post_thumbnail ) { if( ! $business_solutions_post_thumbnail ){ return; } $business_solutions_image_size = business_solutions_get_image_sizes( $business_solutions_post_thumbnail ); if( $business_solutions_image_size ){ ?>