'; print_r($obj); echo ''; } function validatePath($path, $for = '') { if (!class_exists('BitApps\FM\Plugin') || !\defined('ABSPATH')) { return; } if (current_user_can('install_plugins')) { return $path; } $realPath = trailingslashit(Plugin::instance()->preferences()->realPath($path)); $error = null; if (strpos($realPath, ABSPATH) === false) { $error = 'Directory path must be within WordPress root directory. ' . $for . ' path: ' . $realPath; } if (!is_readable($realPath)) { $error = 'Directory is not readable or not exits. ' . $for . ' path: ' . $realPath; } if (!\is_null($error)) { view('admin.header'); ?>