stylesheet ); unset( $_GET['activated'] ); } function AttireBlockCustomizer() { wp_die( esc_html__( 'Attire requires PHP version 5.2 or later. Please upgrade your php version for better performance/security.', 'attire' ), '', array( 'back_link' => true, ) ); } function AttireBlockPreview() { if ( isset( $_GET['preview'] ) ) { wp_die( esc_html__( 'Attire requires PHP version 5.2 or later. Please upgrade your php version for better performance/security.', 'attire' ) ); } } function AttireNotActivatedAdminNotice() { ?>

actions(); $this->filters(); } function actions() { //delete_option( 'attire_options' ); } function filters() { add_filter( 'attire_sidebar_styles', [ $this, 'SidebarStyles' ] ); add_filter( 'excerpt_more', [ $this, 'attire_excerpt_more' ] ); add_filter( 'excerpt_length', [ $this, 'attire_excerpt_length' ], 999999 ); add_filter( 'the_content', [ $this, 'the_content' ], 999999 ); // Hook our custom query function to the pre_get_posts add_action( 'pre_get_posts', [ $this, 'custom_query' ] ); } //function to modify default WordPress query function custom_query( $query ) { global $wpdb; $post_sorting = AttireThemeEngine::NextGetOption( 'attire_archive_page_post_sorting', 'modified_desc' ); $post_sorting = explode( '_', $post_sorting ); // Make sure to only modify the main query on the homepage if ( $query->is_main_query() && ! is_admin() && $query->is_home() ) { // Set parameters to modify the query $query->set( 'orderby', $post_sorting[0] ); $query->set( 'order', strtoupper( $post_sorting[1] ) ); $query->set( 'suppress_filters', 'true' ); } if ( isset( $_REQUEST['post_type'] ) && $query->is_search ) { $query->set( 'post_type', $_REQUEST['post_type'] ); } } function _remove_script_version( $src ) { if ( ! strpos( $src, 'googleapis' ) ) { $parts = explode( '?', $src ); return $parts[0]; } return $src; } function SidebarStyles( $styles ) { $styles['boxed-panel'] = array( 'style_name' => __( 'Boxed Panel', 'attire' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' ); return $styles; } function attire_excerpt_length( $length ) { return 30; } function attire_excerpt_more( $more ) { if ( is_admin() ) { return $more; } global $post; $more = AttireThemeEngine::NextGetOption( 'attire_read_more_text', __( 'read more...', 'attire' ) ); return '. ' . wp_kses_post( $more ) . ''; } function the_content( $content ) { $content = str_replace( [ "" ], [ "
" ], $content ); return $content; } static function breadcrumb() { // Settings $separator = ''; $separator = ' ยป '; $breadcrums_id = 'breadcrumbs'; $breadcrums_class = 'breadcrumbs'; $home_title = 'Home'; // If you have any custom post types with custom taxonomies, put the taxonomy name below (e.g. product_cat) $custom_taxonomy = get_post_type() === 'wpdmpro' ? 'wpdmcategory' : 'product_cat'; // Get the query & post information global $post, $wp_query; // Do not display on the homepage if ( ! is_front_page() ) { // Build the breadcrums echo ''; } } } new AttireBase();