Server IP : 15.235.198.142 / Your IP : 216.73.216.154 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ballsack 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/yme/wp-content/plugins/simply-static/src/handlers/ |
Upload File : |
<?php namespace Simply_Static; // Exit if accessed directly. if ( ! defined( 'ABSPATH' ) ) { exit; } class Page_Handler { /** * Page. * @var Page|null */ protected $page = null; /** * Constructor method. * * @param Page $page */ public function __construct( Page $page ) { $this->page = $page; } /** * Add query arguments in case it needs it. * * This way we know which page we are fetching in case we need a handler to run actions/filters. * * @param $url * * @return mixed */ public function prepare_url( $url ) { $url = add_query_arg( 'simply_static_page', $this->page->id, $url ); Util::debug_log( 'URL Prepared:' . $url ); return $url; } /** * Get Options Instance. * * @return \Simply_Static\Options|null */ public function get_options() { return Options::instance(); } /** * Run hooks on page request. * * Useful in case a type of page requires different hooks to be ran before the static page is generated. * * @return void */ public function run_hooks() { } public function after_file_fetch( $destination_dir ) {} public function get_path_info( $path_info ) { return $path_info; } public function get_relative_dir( $relative_dir ) { return $relative_dir; } }