. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Server IP : 104.21.41.133 / Your IP :
18.191.202.132 [
Web Server : LiteSpeed System : Linux altar63.supremepanel63.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 User : abranoticias ( 1103) PHP Version : 8.0.30 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/abranoticias/public_html/wp-content/plugins/anti-spam/libs/factory/pages/ |
Upload File : |
<?php /** * A group of classes and methods to create and manage pages. * * @author Alex Kovalev <alex.kovalevv@gmail.com> * @copyright (c) 2018, Webcraftic Ltd * * @package core * @since 1.0.0 */ // Exit if accessed directly if( !defined('ABSPATH') ) { exit; } add_action('admin_menu', 'Wbcr_FactoryPages475::actionAdminMenu'); add_action('network_admin_menu', 'Wbcr_FactoryPages475::actionAdminMenu'); if( !class_exists('Wbcr_FactoryPages475') ) { /** * A base class to manage pages. * * @since 1.0.0 */ class Wbcr_FactoryPages475 { /** * @var Wbcr_FactoryPages475_Page[] */ private static $pages = array(); /** * @param Wbcr_Factory475_Plugin $plugin * @param $class_name */ public static function register($plugin, $class_name) { if( !isset(self::$pages[$plugin->getPluginName()]) ) { self::$pages[$plugin->getPluginName()] = array(); } $page = new $class_name($plugin); if( is_multisite() && is_network_admin() && !$page->available_for_multisite ) { return; } self::$pages[$plugin->getPluginName()][] = $page; } public static function actionAdminMenu() { if( empty(self::$pages) ) { return; } foreach(self::$pages as $plugin_pages) { foreach($plugin_pages as $page) { $page->connect(); } } } public static function getPageUrl(Wbcr_Factory475_Plugin $plugin, $page_id, $args = array()) { if( isset(self::$pages[$plugin->getPluginName()]) ) { $pages = self::$pages[$plugin->getPluginName()]; foreach($pages as $page) { if( $page->id == $page_id ) { return $page->getBaseUrl($page_id, $args); } } } else { _doing_it_wrong(__METHOD__, __('You are trying to call this earlier than the plugin menu will be registered.'), '4.0.8'); } } /** * @param Wbcr_Factory475_Plugin $plugin * @return array */ public static function getIds($plugin) { if( !isset(self::$pages[$plugin->getPluginName()]) ) { return array(); } $result = array(); foreach(self::$pages[$plugin->getPluginName()] as $page) $result[] = $page->getResultId(); return $result; } } } if( !function_exists('wbcr_factory_pages_475_get_page_id') ) { /** * * @param Wbcr_Factory475_Plugin $plugin * @param string $page_id * @return string */ function wbcr_factory_pages_475_get_page_id($plugin, $page_id) { return $page_id . '-' . $plugin->getPluginName(); } }