]*?>.*?@si', '@<[\/\!]*?[^<>]*?>@si', '@]*?>.*?@siU', '@@' ); $str = preg_replace( $search, '', $str ); $str = esc_attr( $str ); $str = stripslashes( $str ); $str = str_replace( array( "\r", "\n" ), ' ', $str ); $str = str_replace( array( "·", "…", "€", "­" ), "", $str ); return $str; } /* * Get amount of indexed products */ static public function get_indexed_products_count() { global $wpdb; $table_name = $wpdb->prefix . AWS_INDEX_TABLE_NAME; $indexed_products = 0; if ( $wpdb->get_var( "SHOW TABLES LIKE '{$table_name}'" ) === $table_name ) { $sql = "SELECT FOUND_ROWS() as rows FROM {$table_name} GROUP BY ID;"; $indexed_products = $wpdb->query( $sql ); } return $indexed_products; } } endif;