]*>/i', '', $string); $string=preg_replace('/<\/'.$tag.'>/i', '', $string); return $string; } if ( ! function_exists( 'architecture_construction_excerpt_more' ) ) : /** * Replaces "[...]" (appended to automatically generated excerpts) with ... * */ function architecture_construction_excerpt_more($more) { return is_admin() ? $more : ' … '; } endif; add_filter( 'excerpt_more', 'architecture_construction_excerpt_more' ); if( ! function_exists( 'architecture_construction_footer_credit' ) ): /** * Footer Credits */ function architecture_construction_footer_credit(){ $architecture_construction_copyright_text = get_theme_mod( 'architecture_construction_footer_copyright_text' ); $architecture_construction_text = '
'; if( $architecture_construction_copyright_text ){ $architecture_construction_text .= wp_kses_post( $architecture_construction_copyright_text ); }else{ $architecture_construction_text .= esc_html__( '© ', 'architecture-construction' ) . date_i18n( esc_html__( 'Y', 'architecture-construction' ) ); $architecture_construction_text .= ' ' . esc_html( get_bloginfo( 'name' ) ) . ''. esc_html__( '. All Rights Reserved.', 'architecture-construction' ); } $architecture_construction_text .= ''; $architecture_construction_text .= ' ' . ARCHITECTURE_CONSTRUCTION_THEME_NAME . ' ' . esc_html__( 'By ', 'architecture-construction' ) . '' . '' . esc_html__( 'Themeignite', 'architecture-construction' ) . ''; $architecture_construction_text .= sprintf( esc_html__( ' Powered By %s', 'architecture-construction' ), 'WordPress.' ); if ( function_exists( 'the_privacy_policy_link' ) ) { $architecture_construction_text .= get_the_privacy_policy_link(); } $architecture_construction_text .= '
'; echo apply_filters( 'architecture_construction_footer_text', $architecture_construction_text ); } add_action( 'architecture_construction_footer', 'architecture_construction_footer_credit' ); endif; /** * Is Woocommerce activated */ if ( ! function_exists( 'architecture_construction_woocommerce_activated' ) ) { function architecture_construction_woocommerce_activated() { if ( class_exists( 'woocommerce' ) ) { return true; } else { return false; } } } if( ! function_exists( 'architecture_construction_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 architecture_construction_change_comment_form_default_fields( $fields ){ // get the current commenter if available $commenter = wp_get_current_commenter(); // core functionality $req = get_option( 'require_name_email' ); $aria_req = ( $req ? " aria-required='true'" : '' ); $required = ( $req ? " required" : '' ); $author = ( $req ? __( 'Name*', 'architecture-construction' ) : __( 'Name', 'architecture-construction' ) ); $email = ( $req ? __( 'Email*', 'architecture-construction' ) : __( 'Email', 'architecture-construction' ) ); // Change just the author field $fields['author'] = '

'; $fields['email'] = '

'; $fields['url'] = '

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

'; return $defaults; } endif; add_filter( 'comment_form_defaults', 'architecture_construction_change_comment_form_defaults' ); if( ! function_exists( 'architecture_construction_escape_text_tags' ) ) : /** * Remove new line tags from string * * @param $text * @return string */ function architecture_construction_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( 'architecture_construction_get_fallback_svg' ) ) : /** * Get Fallback SVG */ function architecture_construction_get_fallback_svg( $post_thumbnail ) { if( ! $post_thumbnail ){ return; } $architecture_construction_image_size = architecture_construction_get_image_sizes( $post_thumbnail ); if( $architecture_construction_image_size ){ ?>