Get admin page hook.
Slightly modified version of code from wp-admin/admin.php.

@param  string $page_hook
@return string
18484
protected function getAdminHook( $page_hook ) {
		global $pagenow, $plugin_page;

		$hook_suffix = '';
		if ( ! empty( $page_hook ) ) {
			$hook_suffix = $page_hook;
		} else if ( isset( $plugin_page ) ) {
			$hook_suffix = $plugin_page;
		} else if ( isset( $pagenow ) ) {
			$hook_suffix = $pagenow;
		}

		return $hook_suffix;
	}
429628
function rule_match_page_template( $match, $rule, $options )
	{
		$page_template = $options['page_template'];
		if( ! $page_template )
		{
			$page_template = get_post_meta( $options['post_id'], '_wp_page_template', true );
		}
		
		
		if( ! $page_template )
		{
			$post_type = $options['post_type'];

			if( !$post_type )
			{
				$post_type = get_post_type( $options['post_id'] );
			}
			
			if( $post_type == 'page' )
			{
				$page_template = "default";
			}
		}
		
		
		
        if($rule['operator'] == "==")
        {
        	$match = ( $page_template === $rule['value'] );
        }
        elseif($rule['operator'] == "!=")
        {
        	$match = ( $page_template !== $rule['value'] );
        }
                
        return $match;

	}
269075
public static function getChildPagesCount($page_id = null)
    {
        if (is_null($page_id)) {
            return null;
        }

        $children = PageManager::fetch(false, array('id'), array(
            sprintf('parent = %d', $page_id)
        ));
        $count = count($children);

        if ($count > 0) {
            foreach ($children as $c) {
                $count += self::getChildPagesCount($c['id']);
            }
        }

        return $count;
    }
159358
public function admin_ajax() {

		if ( false === headers_sent() ) {
			pods_session_start();

			header( 'Content-Type: text/html; charset=' . get_bloginfo( 'charset' ) );
		}

		// Sanitize input @codingStandardsIgnoreLine
		$params = pods_unslash( (array) $_POST );

		foreach ( $params as $key => $value ) {
			if ( 'action' === $key ) {
				continue;
			}

			unset( $params[ $key ] );

			$params[ str_replace( '_podsfix_', '', $key ) ] = $value;
		}

		$params = (object) $params;

		$component = $params->component;
		$method    = $params->method;

		if ( ! isset( $component ) || ! isset( $this->components[ $component ] ) || ! isset( $this->settings['components'][ $component ] ) ) {
			pods_error( 'Invalid AJAX request', $this );
		}

		if ( ! isset( $params->_wpnonce ) || false === wp_verify_nonce( $params->_wpnonce, 'pods-component-' . $component . '-' . $method ) ) {
			pods_error( 'Unauthorized request', $this );
		}

		// Cleaning up $params
		unset( $params->action, $params->component, $params->method, $params->_wpnonce );

		$params = (object) apply_filters( "pods_component_ajax_{$component}_{$method}", $params, $component, $method );

		$output = false;

		// Component init
		if ( isset( $this->components[ $component ]['object'] ) && method_exists( $this->components[ $component ]['object'], 'init' ) ) {
			$this->components[ $component ]['object']->init( $this->settings['components'][ $component ], $component );
		}

		if ( isset( $this->components[ $component ]['object'] ) && ! method_exists( $this->components[ $component ]['object'], 'ajax_' . $method ) && method_exists( $this, 'admin_ajax_' . $method ) ) {
			// Handle internal methods
			$output = call_user_func( array( $this, 'admin_ajax_' . $method ), $component, $params );
		} elseif ( ! isset( $this->components[ $component ]['object'] ) || ! method_exists( $this->components[ $component ]['object'], 'ajax_' . $method ) ) {
			// Make sure method exists
			pods_error( 'API method does not exist', $this );
		} else {
			// Dynamically call the component method
			$output = call_user_func( array( $this->components[ $component ]['object'], 'ajax_' . $method ), $params );
		}

		if ( ! is_bool( $output ) ) {
			// @codingStandardsIgnoreLine
			echo $output;
		}

		die();
		// KBAI!
	}
137625
public function extra_admin_pages( $admin_pages ) {
		$extra_admin_pages = [];
		foreach ( array_keys( self::$remote_management ) as $key ) {
			if ( ! empty( self::$options_remote[ $key ] ) ) {
				$extra_admin_pages = [ 'index.php' ];
				break;
			}
		}

		return array_merge( $admin_pages, $extra_admin_pages );
	}
1108517
def update_admin_page_links
      admin_page_links = []
      Pwb::Link.ordered_visible_admin.each do |link|
        admin_page_links.push link.as_json
      end
      configuration["admin_page_links"] = admin_page_links
      save!
      admin_page_links
    end
108758
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllPromotions(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllPromotions();
        }
    }
1234948
public function updatePage($page_id)
    {
        $data = [
            "name" => request()->name,
            "description" => request()->description,
            "amount" => request()->amount
        ];

        $this->setRequestOptions();
        return $this->setHttpResponse('/page/'.$page_id, 'PUT', $data)->getResponse();
    }
122137
protected function getPageAccessDenied()
    {
        $this->debug('Controller and action changed to: ' . implode("/", $this->pageAccessDenied));
        $this->request()->setController($this->pageAccessDenied[0]);
        $this->request()->setAction($this->pageAccessDenied[1]);
        if (isset($this->pageAccessDenied[3]))
            $this->request()->setModule($this->pageAccessDenied[3]);
        if (isset($this->pageAccessDenied[2]) && is_string($this->pageAccessDenied[2]))
            $this->request()->setModule($this->pageAccessDenied[2]);
        elseif (isset($this->pageAccessDenied[2]) && is_array($this->pageAccessDenied[2]) && !empty($this->pageAccessDenied[2]))
            $this->request()->setParams($this->pageAccessDenied[2]);
        return $this->getControllerClassFromNameAndModule($this->pageAccessDenied[0], $this->request()->getModule());
    }
113538
def get_admin_url(obj, page=None):
    """"""
    if obj is None:
        return None

    if page is None:
        page = "change"
    if page not in ADMIN_ALL_PAGES:
        raise ValueError("Invalid page name '{}'. Available pages are: {}.".format(page, ADMIN_ALL_PAGES))

    app_label = obj.__class__._meta.app_label
    object_name = obj.__class__._meta.object_name.lower()

    if page in ADMIN_GLOBAL_PAGES:
        url_name = page
    else:
        url_name = "{}_{}_{}".format(app_label, object_name, page)

    if page == "app_list":
        url_args = (app_label,)
    elif page == "view_on_site":
        content_type = ContentType.objects.get_for_model(obj.__class__)
        url_args = (content_type, obj._get_pk_val())
    elif page in ADMIN_DETAIL_PAGES:
        url_args = (obj._get_pk_val(),)
    else:
        url_args = None

    return reverse("admin:{}".format(url_name), args=url_args)
171245
public function editPage($page_id = null)
    {
        $this->setPage($page_id);
        $this->setTitleEditPage();
        $this->setBreadcrumbEditPage();

        $this->setData('page', $this->data_page);
        $this->setData('languages', $this->language->getList(array('enabled' => true)));

        $this->submitEditPage();
        $this->setDataImagesEditPage();
        $this->setDataCategoriesEditPage();
        $this->outputEditPage();
    }
426446
public function hook()
    {
        wp_enqueue_script('jquery');

        add_action('wp_head', array($this, 'printToken'));
        add_action('admin_head', array($this, 'printToken'));

        add_action('wp_footer', array($this, 'printAjaxHeader'));
        add_action('admin_footer', array($this, 'printAjaxHeader'));
    }
718001
public function getAdminWrapperAction()
    {
        $allowed = $this->cmsPermissionChecks->siteAdminCheck($this->currentSite);

        if (!$allowed) {
            return null;
        }

        /** @var RouteMatch $routeMatch */
        $routeMatch = $this->getEvent()->getRouteMatch();
        $siteId = $this->currentSite->getSiteId();
        $sourcePageName = $routeMatch->getParam('page', 'index');

        if ($sourcePageName instanceof Page) {
            $sourcePageName = $sourcePageName->getName();
        }

        $pageType = $routeMatch->getParam('pageType', 'n');

        $view = new ViewModel();
        $view->setVariable('restrictions', false);
        if ($this->cmsPermissionChecks->isPageRestricted($siteId, $pageType, $sourcePageName, 'read') == true) {
            $view->setVariable('restrictions', true);
        }

        $view->setVariable('adminMenu', $this->adminPanelConfig);
        $view->setTemplate('rcm-admin/admin/admin');

        return $view;
    }
758381
protected function getPageCache($cache_type)
    {
        $route_info = Lb::app()->getRouteInfo();
        $page_cache_key = implode('_', ['page_cache', $route_info['controller'], $route_info['action']]);
        return Lb::app()->getCache($page_cache_key, $cache_type);
    }
701492
protected function _get_page_template_files() {
		$page_template_files = [];

		foreach ( WP_View_Controller\Helper\config( 'page-templates' ) as $page_template_dir ) {
			foreach ( glob( get_theme_file_path( $page_template_dir . '/*' ) ) as $page_template_path ) {
				$name = basename( $page_template_path, '.php' );
				if ( 'blank' === $name || 'blank-fluid' === $name ) {
					continue;
				}
				if ( isset( $page_template_files[ $name ] ) ) {
					continue;
				}
				$page_template_files[ $name ] = $page_template_path;
			}
		}

		return $page_template_files;
	}
918796
public function edit($page_id)
    {
        $templates = $this->template->where('active', 1)->where('type', 'default')->get();
        $page = $this->page->getByIdWithBlocks($page_id);
        $pageViews = $this->template->getPageViews();
        return view('chuckcms::backend.pages.edit', compact('templates', 'page', 'pageViews'));
    }
1220877
function optionsframework_admin_bar() {

		$menu = $this->menu_settings();

		global $wp_admin_bar;

		if ( 'menu' == $menu['mode'] ) {
			$href = admin_url( 'admin.php?page=' . $menu['menu_slug'] );
		} else {
			$href = admin_url( 'themes.php?page=' . $menu['menu_slug'] );
		}

		$args = array(
			'parent' => 'appearance',
			'id' => 'of_theme_options',
			'title' => $menu['menu_title'],
			'href' => $href
		);

		$wp_admin_bar->add_menu( apply_filters( 'optionsframework_admin_bar', $args ) );
	}