cleanup
@ -33,7 +33,7 @@ if ( ! function_exists( 'trigger_pfadfinden_plugin_error' ) ) {
|
||||
// Check for suitable environment
|
||||
if ( defined( 'PHP_VERSION_ID' ) && PHP_VERSION_ID >= 50400 ) {
|
||||
// Register autoloader if updater plugin missing
|
||||
if ( ! class_exists( 'Shy\WordPress\Theme' ) ) {
|
||||
if ( ! class_exists( 'plugins\buena\use\shy-wordpress\src\Shy\WordPress\Theme' ) ) {
|
||||
if ( ! include_once __DIR__ . '/use/shy-wordpress/src/autoloader.php' ) {
|
||||
trigger_pfadfinden_plugin_error(
|
||||
__( 'Das Theme ist unvollständig und konnte nicht geladen werden. Neuinstallation müsste helfen.', 'buena-theme' ),
|
||||
@ -53,13 +53,13 @@ if ( defined( 'PHP_VERSION_ID' ) && PHP_VERSION_ID >= 50400 ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Pfadfinden\WordPress\BuenaTheme
|
||||
* @return \plugins\buena\src\Pfadfinden\WordPress\BuenaTheme
|
||||
*/
|
||||
function buena_get_theme()
|
||||
{
|
||||
static $theme = null;
|
||||
if (!$theme) {
|
||||
$theme = new ReflectionClass( 'Pfadfinden\WordPress\BuenaTheme' );
|
||||
$theme = new ReflectionClass( 'plugins\buena\src\Pfadfinden\WordPress\BuenaTheme' );
|
||||
$theme = $theme->newInstance();
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace Shy\WordPress;
|
||||
namespace plugins\buena\use\shy-wordpress\src\Shy\WordPress;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
use plugins\buena\use\shy/**
|
||||
* A composite option with a fixed number of suboptions and their default values.
|
||||
*/
|
||||
abstract class CompositeOption implements \ArrayAccess, \Countable, \IteratorAggregate
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Shy\WordPress;
|
||||
namespace plugins\buena\use\shy-wordpress\src\Shy\WordPress;
|
||||
|
||||
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace Shy\WordPress;
|
||||
namespace plugins\buena\use\shy-wordpress\src\Shy\WordPress;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
use plugins\buena\use\shy/**
|
||||
* Marker class for WordPress plugins.
|
||||
*/
|
||||
abstract class Plugin
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace Shy\WordPress;
|
||||
namespace plugins\buena\use\shy-wordpress\src\Shy\WordPress;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
use plugins\buena\use\shyuse plugins\buena\use\shy/**
|
||||
* Abstracts common functionality and escaping for the Settings API.
|
||||
*
|
||||
* TODO: Check slug and field names for illegal characters.
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace Shy\WordPress;
|
||||
namespace plugins\buena\use\shy-wordpress\src\Shy\WordPress;
|
||||
|
||||
|
||||
|
||||
abstract class Theme extends Plugin
|
||||
use plugins\buena\use\shyabstract class Theme extends Plugin
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Shy\WordPress\Tests;
|
||||
namespace plugins\buena\use\shy-wordpress\tests\Shy\WordPress\Tests;
|
||||
|
||||
use Shy\WordPress\HookableTrait;
|
||||
use wordpress\src\Shy\WordPress\HookableTrait;
|
||||
|
||||
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Shy\WordPress\Tests;
|
||||
namespace plugins\buena\use\shy-wordpress\tests\Shy\WordPress\Tests;
|
||||
|
||||
use Shy\WordPress\SettingsPage;
|
||||
use wordpress\src\Shy\WordPress\SettingsPage;
|
||||
use PHPUnit_Framework_MockObject_MockObject as MockObject;
|
||||
use PHPUnit_Framework_MockObject_Builder_InvocationMocker as BuilderInvocationMocker;
|
||||
|
||||
@ -15,13 +15,14 @@ class SettingsPageTest extends \WP_UnitTestCase
|
||||
*
|
||||
* @param string|null $slug
|
||||
* @param string $capability
|
||||
* @return SettingsPage|MockObject {
|
||||
*
|
||||
* @return wordpress\src\Shy\WordPress\SettingsPage|MockObject {
|
||||
* @method BuilderInvocationMocker method(string)
|
||||
* }
|
||||
*/
|
||||
protected function mockSettingsPage( $slug = null, $capability = 'manage_options' )
|
||||
{
|
||||
$builder = $this->getMockBuilder( 'Shy\WordPress\SettingsPage' )
|
||||
$builder = $this->getMockBuilder( 'plugins\buena\use\shy-wordpress\src\Shy\WordPress\SettingsPage' )
|
||||
->enableProxyingToOriginalMethods();
|
||||
|
||||
if ( null === $slug ) {
|
||||
@ -37,10 +38,10 @@ class SettingsPageTest extends \WP_UnitTestCase
|
||||
/**
|
||||
* Test reading defaults from the settings page.
|
||||
*
|
||||
* @covers SettingsPage::__construct()
|
||||
* @covers SettingsPage::getDefaults()
|
||||
* @covers SettingsPage::offsetExists()
|
||||
* @covers SettingsPage::offsetGet()
|
||||
* @covers wordpress\src\Shy\WordPress\SettingsPage::__construct()
|
||||
* @covers wordpress\src\Shy\WordPress\SettingsPage::getDefaults()
|
||||
* @covers wordpress\src\Shy\WordPress\SettingsPage::offsetExists()
|
||||
* @covers wordpress\src\Shy\WordPress\SettingsPage::offsetGet()
|
||||
* @expectedException OutOfBoundsException
|
||||
*/
|
||||
public function testReading()
|
||||
@ -63,7 +64,7 @@ class SettingsPageTest extends \WP_UnitTestCase
|
||||
/**
|
||||
* Test writing to the settings page.
|
||||
*
|
||||
* @covers SettingsPage::offsetSet()
|
||||
* @covers wordpress\src\Shy\WordPress\SettingsPage::offsetSet()
|
||||
* @expectedException OutOfBoundsException
|
||||
*/
|
||||
public function testWriting()
|
||||
@ -100,10 +101,10 @@ class SettingsPageTest extends \WP_UnitTestCase
|
||||
/**
|
||||
* Test whether the settings page can be showed.
|
||||
*
|
||||
* @covers SettingsPage::__construct()
|
||||
* @covers SettingsPage::getParentSlug()
|
||||
* @covers SettingsPage::getPageTitle()
|
||||
* @covers SettingsPage::getMenuTitle()
|
||||
* @covers wordpress\src\Shy\WordPress\SettingsPage::__construct()
|
||||
* @covers wordpress\src\Shy\WordPress\SettingsPage::getParentSlug()
|
||||
* @covers wordpress\src\Shy\WordPress\SettingsPage::getPageTitle()
|
||||
* @covers wordpress\src\Shy\WordPress\SettingsPage::getMenuTitle()
|
||||
*/
|
||||
public function testRegisterPage()
|
||||
{
|
||||
@ -124,7 +125,7 @@ class SettingsPageTest extends \WP_UnitTestCase
|
||||
|
||||
|
||||
/**
|
||||
* @covers SettingsPage::sanitizeOptions()
|
||||
* @covers wordpress\src\Shy\WordPress\SettingsPage::sanitizeOptions()
|
||||
*/
|
||||
public function testSanitize()
|
||||
{
|
||||
|
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 135 KiB |
Before Width: | Height: | Size: 783 B After Width: | Height: | Size: 783 B |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 332 KiB After Width: | Height: | Size: 332 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 148 B After Width: | Height: | Size: 148 B |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 379 B After Width: | Height: | Size: 379 B |
Before Width: | Height: | Size: 599 B After Width: | Height: | Size: 599 B |
Before Width: | Height: | Size: 639 B After Width: | Height: | Size: 639 B |
Before Width: | Height: | Size: 561 B After Width: | Height: | Size: 561 B |
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 119 KiB |
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 907 B After Width: | Height: | Size: 907 B |
Before Width: | Height: | Size: 545 B After Width: | Height: | Size: 545 B |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 336 KiB After Width: | Height: | Size: 336 KiB |
@ -1,12 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Pfadfinden\WordPress;
|
||||
namespace plugins\buena\src\Pfadfinden\WordPress;
|
||||
|
||||
use Shy\WordPress\CompositeOption;
|
||||
use Pfadfinden\WordPress\wordpress;
|
||||
use wordpress\src\Shy\WordPress\CompositeOption;
|
||||
|
||||
|
||||
|
||||
class BuenaSettings extends CompositeOption
|
||||
class BuenaSettings extends wordpress\src\Shy\WordPress\CompositeOption
|
||||
{
|
||||
public function __construct()
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Pfadfinden\WordPress;
|
||||
namespace plugins\buena\src\Pfadfinden\WordPress;
|
||||
|
||||
use Shy\WordPress\Administration\SettingsPage;
|
||||
use Shy\WordPress\Administration\CheckboxField;
|
@ -1,12 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace Pfadfinden\WordPress;
|
||||
namespace plugins\buena\src\Pfadfinden\WordPress;
|
||||
|
||||
use Shy\WordPress\Theme;
|
||||
use Pfadfinden\WordPress\wordpress;
|
||||
use plugins\buena\src\Pfadfinden\WordPress\BuenaSettings;
|
||||
use plugins\buena\src\Pfadfinden\WordPress\BuenaSettingsPage;
|
||||
use wordpress\src\Shy\WordPress\Theme;
|
||||
|
||||
|
||||
|
||||
class BuenaTheme extends Theme
|
||||
class BuenaTheme extends wordpress\src\Shy\WordPress\Theme
|
||||
{
|
||||
/**
|
||||
* @var BuenaSettings
|
||||
@ -234,7 +237,7 @@ class BuenaTheme extends Theme
|
||||
*/
|
||||
public function initAdministration()
|
||||
{
|
||||
if ( isset( $_GET['exp'] ) && class_exists( 'Pfadfinden\WordPress\BuenaSettingsPage' ) ) {
|
||||
if ( isset( $_GET['exp'] ) && class_exists( 'plugins\buena\src\Pfadfinden\WordPress\BuenaSettingsPage' ) ) {
|
||||
new BuenaSettingsPage( $this->settings );
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ if ( ! function_exists( 'trigger_pfadfinden_plugin_error' ) ) {
|
||||
// Check for suitable environment
|
||||
if ( defined( 'PHP_VERSION_ID' ) && PHP_VERSION_ID >= 50400 ) {
|
||||
// If we’re the first user of the library, use the bundled one
|
||||
if ( ! class_exists( 'Shy\WordPress\Plugin' ) ) {
|
||||
if ( ! class_exists( 'plugins\buena\use\shy-wordpress\src\Shy\WordPress\Plugin' ) ) {
|
||||
pfadfinden_theme_updater_load_textdomain();
|
||||
if ( ! include_once __DIR__ . '/use/shy-wordpress/src/autoloader.php' ) {
|
||||
trigger_pfadfinden_plugin_error(
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace Pfadfinden\WordPress;
|
||||
|
||||
use Shy\WordPress\Plugin;
|
||||
use wordpress\src\Shy\WordPress\Plugin;
|
||||
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ use Shy\WordPress\Plugin;
|
||||
*
|
||||
* @author Philipp Cordes <philipp.cordes@pfadfinden.de>
|
||||
*/
|
||||
class ThemeUpdaterPlugin extends Plugin
|
||||
class ThemeUpdaterPlugin extends wordpress\src\Shy\WordPress\Plugin
|
||||
{
|
||||
const ACTION_QUERY_THEMES = 'query_themes';
|
||||
const ACTION_FEATURE_LIST = 'feature_list';
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace Pfadfinden\WordPress;
|
||||
|
||||
use Shy\WordPress\SettingsPage;
|
||||
use wordpress\src\Shy\WordPress\SettingsPage;
|
||||
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ use Shy\WordPress\SettingsPage;
|
||||
*
|
||||
* @author Philipp Cordes <philipp.cordes@pfadfinden.de>
|
||||
*/
|
||||
class ThemeUpdaterSettings extends SettingsPage
|
||||
class ThemeUpdaterSettings extends wordpress\src\Shy\WordPress\SettingsPage
|
||||
{
|
||||
/**
|
||||
* Full path of plugin main file.
|
||||
|
@ -4,7 +4,7 @@ namespace Shy\WordPress;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
use plugins\buena\use\shy/**
|
||||
* A composite option with a fixed number of suboptions and their default values.
|
||||
*/
|
||||
abstract class CompositeOption implements \ArrayAccess, \Countable, \IteratorAggregate
|
||||
|
@ -4,7 +4,7 @@ namespace Shy\WordPress;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
use plugins\buena\use\shy/**
|
||||
* Marker class for WordPress plugins.
|
||||
*/
|
||||
abstract class Plugin
|
||||
|
@ -4,7 +4,7 @@ namespace Shy\WordPress;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
use plugins\buena\use\shyuse plugins\buena\use\shy/**
|
||||
* Abstracts common functionality and escaping for the Settings API.
|
||||
*
|
||||
* TODO: Check slug and field names for illegal characters.
|
||||
|
@ -4,7 +4,7 @@ namespace Shy\WordPress;
|
||||
|
||||
|
||||
|
||||
abstract class Theme extends Plugin
|
||||
use plugins\buena\use\shyabstract class Theme extends Plugin
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace Shy\WordPress\Tests;
|
||||
|
||||
use Shy\WordPress\HookableTrait;
|
||||
use wordpress\src\Shy\WordPress\HookableTrait;
|
||||
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace Shy\WordPress\Tests;
|
||||
|
||||
use Shy\WordPress\SettingsPage;
|
||||
use wordpress\src\Shy\WordPress\SettingsPage;
|
||||
use PHPUnit_Framework_MockObject_MockObject as MockObject;
|
||||
use PHPUnit_Framework_MockObject_Builder_InvocationMocker as BuilderInvocationMocker;
|
||||
|
||||
@ -15,13 +15,14 @@ class SettingsPageTest extends \WP_UnitTestCase
|
||||
*
|
||||
* @param string|null $slug
|
||||
* @param string $capability
|
||||
* @return SettingsPage|MockObject {
|
||||
*
|
||||
* @return wordpress\src\Shy\WordPress\SettingsPage|MockObject {
|
||||
* @method BuilderInvocationMocker method(string)
|
||||
* }
|
||||
*/
|
||||
protected function mockSettingsPage( $slug = null, $capability = 'manage_options' )
|
||||
{
|
||||
$builder = $this->getMockBuilder( 'Shy\WordPress\SettingsPage' )
|
||||
$builder = $this->getMockBuilder( 'plugins\buena\use\shy-wordpress\src\Shy\WordPress\SettingsPage' )
|
||||
->enableProxyingToOriginalMethods();
|
||||
|
||||
if ( null === $slug ) {
|
||||
@ -37,10 +38,10 @@ class SettingsPageTest extends \WP_UnitTestCase
|
||||
/**
|
||||
* Test reading defaults from the settings page.
|
||||
*
|
||||
* @covers SettingsPage::__construct()
|
||||
* @covers SettingsPage::getDefaults()
|
||||
* @covers SettingsPage::offsetExists()
|
||||
* @covers SettingsPage::offsetGet()
|
||||
* @covers wordpress\src\Shy\WordPress\SettingsPage::__construct()
|
||||
* @covers wordpress\src\Shy\WordPress\SettingsPage::getDefaults()
|
||||
* @covers wordpress\src\Shy\WordPress\SettingsPage::offsetExists()
|
||||
* @covers wordpress\src\Shy\WordPress\SettingsPage::offsetGet()
|
||||
* @expectedException OutOfBoundsException
|
||||
*/
|
||||
public function testReading()
|
||||
@ -63,7 +64,7 @@ class SettingsPageTest extends \WP_UnitTestCase
|
||||
/**
|
||||
* Test writing to the settings page.
|
||||
*
|
||||
* @covers SettingsPage::offsetSet()
|
||||
* @covers wordpress\src\Shy\WordPress\SettingsPage::offsetSet()
|
||||
* @expectedException OutOfBoundsException
|
||||
*/
|
||||
public function testWriting()
|
||||
@ -100,10 +101,10 @@ class SettingsPageTest extends \WP_UnitTestCase
|
||||
/**
|
||||
* Test whether the settings page can be showed.
|
||||
*
|
||||
* @covers SettingsPage::__construct()
|
||||
* @covers SettingsPage::getParentSlug()
|
||||
* @covers SettingsPage::getPageTitle()
|
||||
* @covers SettingsPage::getMenuTitle()
|
||||
* @covers wordpress\src\Shy\WordPress\SettingsPage::__construct()
|
||||
* @covers wordpress\src\Shy\WordPress\SettingsPage::getParentSlug()
|
||||
* @covers wordpress\src\Shy\WordPress\SettingsPage::getPageTitle()
|
||||
* @covers wordpress\src\Shy\WordPress\SettingsPage::getMenuTitle()
|
||||
*/
|
||||
public function testRegisterPage()
|
||||
{
|
||||
@ -124,7 +125,7 @@ class SettingsPageTest extends \WP_UnitTestCase
|
||||
|
||||
|
||||
/**
|
||||
* @covers SettingsPage::sanitizeOptions()
|
||||
* @covers wordpress\src\Shy\WordPress\SettingsPage::sanitizeOptions()
|
||||
*/
|
||||
public function testSanitize()
|
||||
{
|
||||
|