source/php/Helper/Post.php
public static function isArchive()
    {
        global $archive;
        global $post;

        if (defined('DOING_AJAX') && DOING_AJAX) {
            $archive = !is_numeric($_POST['id']) ? $_POST['id'] : '';
        }

        if (substr($archive, 0, 8) == 'archive-' || is_search()) {
            return $archive;
        }

        if (is_archive() && (is_object($post) && $post->post_type == 'post')) {
            return 'archive';
        } elseif (is_search() || (is_object($post) && is_post_type_archive($post->post_type))) {
            return 'archive-' . $post->post_type;
        } elseif (isset($_GET['id']) && $_GET['id'] == 'author') {
            return 'author';
        }

        return false;
    }
public static function isArchive()
    {
        global $archive;
        global $post;

        if (defined('DOING_AJAX') && DOING_AJAX) {
            $archive = !is_numeric($_POST['id']) ? $_POST['id'] : '';
        }

        if (substr($archive, 0, 8) == 'archive-' || is_search()) {
            return $archive;
        }

        if (is_archive() && (is_object($post) && $post->post_type == 'post')) {
            return 'archive';
        } elseif (is_search() || (is_object($post) && is_post_type_archive($post->post_type))) {
            return 'archive-' . $post->post_type;
        } elseif (isset($_GET['id']) && $_GET['id'] == 'author') {
            return 'author';
        }

        return false;
    }
public static function isArchive ( ) { global $ archive ; global $ post ; if ( defined ( 'DOING_AJAX' ) && DOING_AJAX ) { $ archive = ! is_numeric ( $ _POST [ 'id' ] ) ? $ _POST [ 'id' ] : '' ; } if ( substr ( $ archive , 0 , 8 ) == 'archive-' || is_search ( ) ) { return $ archive ; } if ( is_archive ( ) && ( is_object ( $ post ) && $ post -> post_type == 'post' ) ) { return 'archive' ; } elseif ( is_search ( ) || ( is_object ( $ post ) && is_post_type_archive ( $ post -> post_type ) ) ) { return 'archive-' . $ post -> post_type ; } elseif ( isset ( $ _GET [ 'id' ] ) && $ _GET [ 'id' ] == 'author' ) { return 'author' ; } return false ; }
Verifies if the current page is an archive or search result page
@return boolean
Verifies if the current page is an archive or search result page