public static function loadResources() { if (WsdUtil::canLoad()) { wp_enqueue_style('wss-css-base', WsdUtil::cssUrl('styles.base.css')); wp_enqueue_style('wss-css-alerts', WsdUtil::cssUrl('styles.alerts.css')); wp_enqueue_style('wss-css-general', WsdUtil::cssUrl('styles.general.css')); wp_enqueue_style('wss-css-status', WsdUtil::cssUrl('styles.status.css')); wp_enqueue_script('wss-js-util', WsdUtil::jsUrl('wsd-util.js'), array('jquery')); } }
/** * make sure we can display any of the plugin's pages * @return bool */ function wpsCanDisplayPage() { if (!WsdUtil::canLoad()) { return false; } if (!WsdUtil::isAdministrator()) { return false; } if (!wpsIsValidInstall()) { wpsDisplayInstallErrorNotices(); return false; } return true; }
<?php if (!WsdUtil::canLoad()) { return; } if (!WsdUtil::isAdministrator()) { return; } $progress = WsdWPScanSettings::getSetting('SCAN_PROGRESS'); if ($progress == WsdWPScanSettings::SCAN_PROGRESS_NONE) { $currentlyScanning = 'nothing'; } elseif ($progress == WsdWPScanSettings::SCAN_PROGRESS_ROOT) { $currentlyScanning = '<strong>root</strong> directory'; } elseif ($progress == WsdWPScanSettings::SCAN_PROGRESS_ADMIN) { $currentlyScanning = '<strong>wp-admin</strong> directory'; } elseif ($progress == WsdWPScanSettings::SCAN_PROGRESS_CONTENT) { $currentlyScanning = '<strong>wp-content</strong> directory'; } elseif ($progress == WsdWPScanSettings::SCAN_PROGRESS_INCLUDES) { $currentlyScanning = '<strong>wp-includes</strong> directory'; } ?> <style type="text/css"> #progressBar { width: 400px; padding: 0 0; line-height: normal; } #step { display:block; background: #e0e0e0; border: solid 1px #bebebe;padding: 3px 0; margin: 0 0; line-height: normal; text-align: center;} #step span { font-weight: 800; color: #000; font-size: 12px; } </style> <h3 style="margin-bottom: 2px;">Scan State: In Progress</h3> <hr style="height:1px; color: #eee; margin-top: 0; width: 75%;"/> <div id="progressBar"><p id="step"><span></span></p></div>