Check if this is the current page.
@return boolean
558805
public function isSelected()
    {
        if (!is_null($this->isSelected))
            return $this->isSelected;
        if (is_string($this->url) && $this->url == \mpf\WebApp::get()->request()->getCurrentURL()) {
            return true;
        } elseif (is_array($this->url)) {
            $controller = isset($this->url[0]) ? $this->url[0] : 'home';
            if ($controller != \mpf\WebApp::get()->request()->getController()) {
                return false;
            }

            if ($this->getModule() != \mpf\WebApp::get()->request()->getModule()) {
                return false; // different module;
            }
            if (\mpf\WebApp::get()->getController()) {
                $action = isset($this->url[1]) ? $this->url[1] : \mpf\WebApp::get()->getController()->defaultAction;
                return ($action == \mpf\WebApp::get()->getController()->getActiveAction());
            }
        }
        return false;
    }
206118
public function hasPrevPost()
    {
        return ($this->prevPost && $this->prevPost->ID !== $this->get('ID')) ? true : false;
    }
1042337
function is_activation_page() {
            if ( $this->_menu->is_main_settings_page() ) {
                return true;
            }

            if ( ! $this->is_activation_mode() ) {
                return false;
            }

            // Check if current page is matching the activation page.
            return $this->is_matching_url( $this->get_activation_url() );
        }
254579
public function current_action()
    {
        if (isset($_REQUEST['action']) && -1 != $_REQUEST['action']) {
            return $_REQUEST['action'];
        }

        if (isset($_REQUEST['action2']) && -1 != $_REQUEST['action2']) {
            return $_REQUEST['action2'];
        }

        return false;
    }
401028
protected function getCurrentPageAncestry()
    {
        $tools = ViewTools::singleton();
        
        if (($page = Director::get_current_page()) && $page instanceof Page) {
            return $tools->array2att($tools->getAncestorClassNames($page, Page::class));
        }
    }
351839
public function checkPageSubjectInUrl() {
        if ($this->checkPageSubjectDefined()) {

            $url_segment             = $this->owner->URLSegment;
            $pagesubject_url_segment = $this->owner->generateURLSegment($this->owner->SEOPageSubject);

            if (preg_match('/' . preg_quote($pagesubject_url_segment, '/') . '/i', $url_segment)) {
                return true;
            }
            else {
                return false;
            }
        }
        return false;

    }
438337
public static function currentPage() {
		$uri = static::to(static::detectPath());
		foreach ($_GET as $k => $v) {
			$uri->param($k, $v);
		}

		return $uri;
	}
777410
static function get_current_page() {
            if ( ! isset( self::$_pagenow ) ) {
                global $pagenow;
                if ( empty( $pagenow ) && is_admin() && is_multisite() ) {
                    /**
                     * It appears that `$pagenow` is not yet initialized in some network admin pages when this method
                     * is called, so initialize it here using some pieces of code from `wp-includes/vars.php`.
                     *
                     * @author Leo Fajardo (@leorw)
                     * @since 2.2.3
                     */
                    if ( is_network_admin() ) {
                        preg_match( '#/wp-admin/network/?(.*?)$#i', $_SERVER['PHP_SELF'], $self_matches );
                    } else if ( is_user_admin() ) {
                        preg_match( '#/wp-admin/user/?(.*?)$#i', $_SERVER['PHP_SELF'], $self_matches );
                    } else {
                        preg_match( '#/wp-admin/?(.*?)$#i', $_SERVER['PHP_SELF'], $self_matches );
                    }

                    $pagenow = $self_matches[1];
                    $pagenow = trim( $pagenow, '/' );
                    $pagenow = preg_replace( '#\?.*?$#', '', $pagenow );
                    if ( '' === $pagenow || 'index' === $pagenow || 'index.php' === $pagenow ) {
                        $pagenow = 'index.php';
                    } else {
                        preg_match( '#(.*?)(/|$)#', $pagenow, $self_matches );
                        $pagenow = strtolower( $self_matches[1] );
                        if ( '.php' !== substr($pagenow, -4, 4) )
                            $pagenow .= '.php'; // for Options +Multiviews: /wp-admin/themes/index.php (themes.php is queried)
                    }
                }

                self::$_pagenow = $pagenow;

                if ( self::is_ajax() &&
                     'admin-ajax.php' === $pagenow
                ) {
                    $referer = fs_get_raw_referer();

                    if ( is_string( $referer ) ) {
                        $parts = explode( '?', $referer );

                        self::$_pagenow = basename( $parts[0] );
                    }
                }
            }

            return self::$_pagenow;
        }
709195
public function is_current_section()
    {
        if( !isset( $this->active ) )
        {
            $this->active = filter_input(INPUT_GET, 'section') == $this->get_slug();
        }
        return $this->active;
    }
1215993
public function isSection()
    {
        $is_curr = $this->isCurrent();
        $curr = Director::get_current_page();

        return $is_curr || (
            ($curr instanceof CatalogueCategory || $curr instanceof CatalogueProduct) && in_array($this->owner->ID, $curr->getAncestors()->column())
        );
    }
1186794
public function current()
    {
        // Getting the first page
        if ($this->currentPage === null) {
            $data = $this->api->searchWithBody($this->body);
            if (isset($data['next_page_token'])) {
                $this->nextPage = $data['next_page_token'];
            }

            return $data;
        }

        // Getting another page
        $body = array_merge($this->body, ['pagetoken' => $this->currentPage]);
        $data = $this->api->searchWithBody($body);
        if (isset($data['next_page_token'])) {
            $this->nextPage = $data['next_page_token'];
        } else {
            $this->nextPage = null;
        }

        return $data;
    }
699339
public function isInCurrentDocument()
    {
        return (
            $this->mergedUri->getScheme() === $this->originUri->getScheme()
            &&
            $this->mergedUri->getHost() === $this->originUri->getHost()
            &&
            $this->mergedUri->getPort() === $this->originUri->getPort()
            &&
            $this->mergedUri->getPath() === $this->originUri->getPath()
            &&
            $this->mergedUri->getQuery() === $this->originUri->getQuery()
        );
    }
462861
private function currentMobile()
    {
        if (!$this->MobileDetect || !($this->MobileDetect instanceof \Mobile_Detect)) {
            return false;
        }

        //for phones only, not tablets
        //create your own Strategy if needed, and change this functionality
        return $this->MobileDetect->isMobile() && !$this->MobileDetect->isTablet();
    }
465438
public function current()
    {
        if (array_key_exists($this->position, $this->results)) {
            return $this->results[$this->position];
        }
    }
1072193
protected function currentUrlMatches()
    {
        if ($this->url() == Request::url()) { // If URLs are equal, always return true
            return true;
        }

        if ($this->activeUrlPattern) { // If pattern was set, see if it matches
            $pattern = ltrim(preg_replace('/\/\*/', '(/.*)?', $this->activeUrlPattern), '/');
            return preg_match("@^{$pattern}\z@", Request::path());
        }

        return false; // No match
    }
608637
public function getActPage()
    {
        $lastPage = $this->getPagesCount();
        $currentPage = parent::getActPage();

        if ($currentPage >= $lastPage) {
            $currentPage = $lastPage - 1;
        }

        return $currentPage;
    }
615096
public function getCurrentPage()
    {
        $page = (int) $this->request->getParam(self::PAGE_PARM_NAME);
        return $page ? $page : 1;
    }