| Server IP : 185.238.73.232 / Your IP : 216.73.216.218 Web Server : Apache/2.4.58 (Ubuntu) OpenSSL/3.0.13 System : Linux srv.gornicki-invest.pl 6.8.0-137-generic #137-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 17 20:28:23 UTC 2026 x86_64 User : strzepo ( 1014) PHP Version : 8.2.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,exec,system,passthru,shell_exec,proc_open,popen MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /home/strzepo/web/ps1271.com/public_html/wp-content/plugins1/meta-box/inc/ |
Upload File : |
<?php
/**
* Load plugin's files with check for installing it as a standalone plugin or
* a module of a theme / plugin. If standalone plugin is already installed, it
* will take higher priority.
*/
class RWMB_Loader {
protected function constants() {
// Script version, used to add version for scripts and styles.
define( 'RWMB_VER', '5.6.18' );
list( $path, $url ) = self::get_path( dirname( __DIR__ ) );
// Plugin URLs, for fast enqueuing scripts and styles.
define( 'RWMB_URL', $url );
define( 'RWMB_JS_URL', trailingslashit( RWMB_URL . 'js' ) );
define( 'RWMB_CSS_URL', trailingslashit( RWMB_URL . 'css' ) );
// Plugin paths, for including files.
define( 'RWMB_DIR', $path );
define( 'RWMB_INC_DIR', trailingslashit( RWMB_DIR . 'inc' ) );
}
/**
* Get plugin base path and URL.
* The method is static and can be used in extensions.
*
* @link https://deluxeblogtips.com/get-url-of-php-file-in-wordpress/
* @param string $path Base folder path.
* @return array Path and URL.
*/
public static function get_path( string $path = '' ) : array {
// Plugin base path.
$path = wp_normalize_path( untrailingslashit( $path ) );
$themes_dir = wp_normalize_path( untrailingslashit( dirname( get_stylesheet_directory() ) ) );
// Default URL.
$url = plugins_url( '', $path . '/' . basename( $path ) . '.php' );
// Included into themes.
if (
0 !== strpos( $path, wp_normalize_path( WP_PLUGIN_DIR ) )
&& 0 !== strpos( $path, wp_normalize_path( WPMU_PLUGIN_DIR ) )
&& 0 === strpos( $path, $themes_dir )
) {
$themes_url = untrailingslashit( dirname( get_stylesheet_directory_uri() ) );
$url = str_replace( $themes_dir, $themes_url, $path );
}
$path = trailingslashit( $path );
$url = trailingslashit( $url );
return [ $path, $url ];
}
/**
* Bootstrap the plugin.
*/
public function init() {
$this->constants();
// PSR-4 autoload.
$psr4_autoload = dirname( __DIR__ ) . '/vendor/autoload.php';
if ( file_exists( $psr4_autoload ) ) {
require $psr4_autoload;
}
// Register autoload for classes.
require_once RWMB_INC_DIR . 'autoloader.php';
$autoloader = new RWMB_Autoloader();
$autoloader->add( RWMB_INC_DIR, 'RW_' );
$autoloader->add( RWMB_INC_DIR, 'RWMB_' );
$autoloader->add( RWMB_INC_DIR . 'about', 'RWMB_' );
$autoloader->add( RWMB_INC_DIR . 'fields', 'RWMB_', '_Field' );
$autoloader->add( RWMB_INC_DIR . 'walkers', 'RWMB_Walker_' );
$autoloader->add( RWMB_INC_DIR . 'interfaces', 'RWMB_', '_Interface' );
$autoloader->add( RWMB_INC_DIR . 'storages', 'RWMB_', '_Storage' );
$autoloader->add( RWMB_INC_DIR . 'helpers', 'RWMB_Helpers_' );
$autoloader->add( RWMB_INC_DIR . 'update', 'RWMB_Update_' );
$autoloader->register();
// Plugin core.
$core = new RWMB_Core();
$core->init();
$shortcode = new RWMB_Shortcode();
$shortcode->init();
// Validation module.
new RWMB_Validation();
$sanitizer = new RWMB_Sanitizer();
$sanitizer->init();
$media_modal = new RWMB_Media_Modal();
$media_modal->init();
// WPML Compatibility.
$wpml = new RWMB_WPML();
$wpml->init();
// Update.
$update_option = new \MetaBox\Updater\Option();
$update_checker = new \MetaBox\Updater\Checker( $update_option );
$update_checker->init();
$update_settings = new \MetaBox\Updater\Settings( $update_checker, $update_option );
$update_settings->init();
$update_notification = new \MetaBox\Updater\Notification( $update_checker, $update_option );
$update_notification->init();
if ( is_admin() ) {
$about = new RWMB_About( $update_checker );
$about->init();
new RWMB_Dashboard( 'http://feeds.feedburner.com/metaboxio', 'https://metabox.io/blog/', [
'title' => 'Meta Box',
'dismiss_tooltip' => esc_html__( 'Dismiss all Meta Box news', 'meta-box' ),
'dismiss_confirm' => esc_html__( 'Are you sure to dismiss all Meta Box news?', 'meta-box' ),
] );
}
// Public functions.
require_once RWMB_INC_DIR . 'functions.php';
}
}