cleanup
This commit is contained in:
1 parent
b5112ab12e
commit
ba736ef661
63 files changed
+65
-59
No files matched your search
+3
-3
@@ -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()
|
||||
{
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+4
-3
@@ -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
-1
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Pfadfinden\WordPress;
|
||||
namespace plugins\buena\src\Pfadfinden\WordPress;
|
||||
|
||||
use Shy\WordPress\Administration\SettingsPage;
|
||||
use Shy\WordPress\Administration\CheckboxField;
|
||||
+7
-4
@@ -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 );
|
||||
}
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -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.
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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()
|
||||
{
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace Shy\WordPress\Tests;
|
||||
|
||||
use Shy\WordPress\HookableTrait;
|
||||
use wordpress\src\Shy\WordPress\HookableTrait;
|
||||
|
||||
|
||||
|
||||
|
||||
+14
-13
@@ -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()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user