Plugin Directory

Changeset 1415651


Ignore:
Timestamp:
05/12/2016 02:04:48 PM (10 years ago)
Author:
k00ni
Message:

PHP 5.2=>5.3; added admin-check in backend; improved test suite

  • added admin-check to prevent showing admin-related stuff to normal

users.

  • changed PHP version due a vendor which needs it (PHP CURL CLASS)
Location:
fixed-menu-anchor/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • fixed-menu-anchor/trunk/admin/settings.php

    r1368514 r1415651  
    88 * Admin area
    99 */
     10
     11 // stop execution if user is not a super admin
     12 if (false == is_super_admin()) {
     13     echo 'Access denied.';
     14     exit;
     15 }
    1016
    1117$licenseHandler = new LicenseHandler(new \Curl\Curl());
  • fixed-menu-anchor/trunk/composer.json

    r1407635 r1415651  
    22    "name": "plugins-first/fixed-menu-anchor",
    33    "require": {
    4         "php": ">=5.2.0",
     4        "php": ">=5.3.0",
    55        "hamcrest/hamcrest-php": "1.*",
    66        "php-curl-class/php-curl-class": "4.*",
     
    88    },
    99    "require-dev": {
    10         "brain/monkey": "1.*",
    11         "phpunit/phpunit": "4.*"
     10        "phpunit/phpunit": "4.*",
     11        "plugins-first/plugin-test-helper": "0.1.*"
    1212    },
    1313    "prefer-stable": true,
    1414    "autoload": {
    1515        "psr-4": {
    16             "PluginsFirst\\": ["src/PluginsFirst/"]
     16            "PluginsFirst\\": ["src/PluginsFirst/", "tests/src/PluginsFirst/"]
    1717        }
    1818    }
  • fixed-menu-anchor/trunk/fixed-menu-anchor.php

    r1407639 r1415651  
    88 * Plugin Name: Fixed Menu Anchor
    99 * Plugin URI: https://wordpress.org/plugins/fixed-menu-anchor
    10  * Version: 2.1.3.1
     10 * Version: 2.2
    1111 * Description: Having problems with a fixed header/menu which overlaps the target of an anchor? Use this plugin to jump just before the target so that the fixed header/menu does not overlap anymore.
    1212 * Author: Konrad Abicht, Marc Sauerwald
     
    1818
    1919if (!defined('FIXEDMENUANCHOR_VERSION')) {
    20     define('FIXEDMENUANCHOR_VERSION', '2.1');
     20    define('FIXEDMENUANCHOR_VERSION', '2.2');
    2121}
    2222
     
    8080    function fixedMenuAnchor_adminInit()
    8181    {
     82        // stop execution if user is not a super admin
     83        if (false == is_super_admin()) {
     84            return false;
     85        }
     86
    8287        // add Plugins1st button to admin main menu
    8388        add_submenu_page(
  • fixed-menu-anchor/trunk/phpunit.xml

    r1368514 r1415651  
    1 <phpunit bootstrap="tests/bootstrap.php"
     1<phpunit bootstrap="vendor/autoload.php"
    22    backupGlobals="false"
    33    colors="true"
  • fixed-menu-anchor/trunk/readme.txt

    r1407446 r1415651  
    33Tags: anchor, fixed menu, fixed header, sticky header, sticky menu, cookie banner
    44Requires at least: 4.3
    5 Tested up to: 4.5.1
     5Tested up to: 4.5.2
    66Stable tag: trunk
    77License: GPLv2 or later
  • fixed-menu-anchor/trunk/tests/src/PluginsFirst/FixedMenuAnchor/Test/LicenseHandlerTest.php

    r1373131 r1415651  
    66use PluginsFirst\FixedMenuAnchor\LicenseHandler;
    77use PluginsFirst\FixedMenuAnchor\Test\Helper\CurlStub;
     8use PluginsFirst\PluginTestHelper\UnitTestCase;
    89
    910class LicenseHandlerTest extends UnitTestCase
  • fixed-menu-anchor/trunk/tests/src/PluginsFirst/FixedMenuAnchor/Test/SettingsTest.php

    r1368514 r1415651  
    55use Brain\Monkey;
    66use PluginsFirst\FixedMenuAnchor\Settings;
     7use PluginsFirst\PluginTestHelper\UnitTestCase;
    78use RedBeanPHP\R;
    89
  • fixed-menu-anchor/trunk/vendor/composer/autoload_psr4.php

    r1407446 r1415651  
    77
    88return array(
    9     'PluginsFirst\\' => array($baseDir . '/src/PluginsFirst'),
     9    'PluginsFirst\\' => array($baseDir . '/src/PluginsFirst', $baseDir . '/tests/src/PluginsFirst'),
    1010    'Curl\\' => array($vendorDir . '/php-curl-class/php-curl-class/src/Curl'),
    1111);
  • fixed-menu-anchor/trunk/vendor/composer/autoload_real.php

    r1407636 r1415651  
    2424        spl_autoload_unregister(array('ComposerAutoloaderInit92164ae0f85f37d3b0adcd04485e4c2f', 'loadClassLoader'));
    2525
    26         $useStaticLoader = false;
    27 
     26        $useStaticLoader = false; // PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
    2827        if ($useStaticLoader) {
    2928            require_once __DIR__ . '/autoload_static.php';
    3029
    31             call_user_func(\Composer\Autoload\ComposerStaticInit8e93f8d684fca3db9937aa8a30bd926c::getInitializer($loader));
     30            call_user_func(\Composer\Autoload\ComposerStaticInit92164ae0f85f37d3b0adcd04485e4c2f::getInitializer($loader));
    3231        } else {
    3332            $map = require __DIR__ . '/autoload_namespaces.php';
     
    5049
    5150        if ($useStaticLoader) {
    52             $includeFiles = Composer\Autoload\ComposerStaticInit8e93f8d684fca3db9937aa8a30bd926c::$files;
     51            $includeFiles = Composer\Autoload\ComposerStaticInit92164ae0f85f37d3b0adcd04485e4c2f::$files;
    5352        } else {
    5453            $includeFiles = require __DIR__ . '/autoload_files.php';
    5554        }
    5655        foreach ($includeFiles as $fileIdentifier => $file) {
    57             composerRequire8e93f8d684fca3db9937aa8a30bd926c($fileIdentifier, $file);
     56            composerRequire92164ae0f85f37d3b0adcd04485e4c2f($fileIdentifier, $file);
    5857        }
    5958
     
    6261}
    6362
    64 function composerRequire8e93f8d684fca3db9937aa8a30bd926c($fileIdentifier, $file)
     63function composerRequire92164ae0f85f37d3b0adcd04485e4c2f($fileIdentifier, $file)
    6564{
    6665    if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
Note: See TracChangeset for help on using the changeset viewer.