mirror of
https://github.com/felixfoertsch/wordpress-dev-env.git
synced 2026-04-18 15:28:44 +02:00
Initial commit
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
namespace WCFE\Services\Editor\MenuPages\Editor;
|
||||
|
||||
# MVC Framework
|
||||
use WPPFW\MVC\MVCViewDispatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class Editor extends MVCViewDispatcher {}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
namespace WCFE\Services\Editor\MenuPages\Editor;
|
||||
|
||||
# Menu Page Service Framework
|
||||
use WPPFW\Services\Dashboard\Menu\MenuPage;
|
||||
use WPPFW\Http\Url;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class Page extends MenuPage {
|
||||
|
||||
/**
|
||||
* put your comment there...
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
parent::__construct
|
||||
(
|
||||
'WPCF Editor',
|
||||
'Wordpress Config File Editor',
|
||||
( is_multisite() ? 'manage_network' : 'administrator' ),
|
||||
WP_PLUGIN_URL . '/wp-config-file-editor/Modules/Editor/View/Editor/Media/Images/dashboard-menu-icon.png'
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* put your comment there...
|
||||
*
|
||||
*/
|
||||
public function getUrl()
|
||||
{
|
||||
|
||||
$urlMethod = is_multisite() ? 'network_admin_url' : 'admin_url';
|
||||
|
||||
return new Url( $urlMethod( 'admin.php' ) , $this->getRouteParams() );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
namespace WCFE\Services\Editor\MenuPages\Editor;
|
||||
|
||||
# Menu Page Service Framework
|
||||
use WPPFW\Services\Dashboard\Menu\SubMenuPage;
|
||||
use WPPFW\Http\Url;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class RawEdit extends SubMenuPage {
|
||||
|
||||
/**
|
||||
* put your comment there...
|
||||
*
|
||||
* @param mixed $editFormMenu
|
||||
* @return RawEdit
|
||||
*/
|
||||
public function __construct( $editFormMenu )
|
||||
{
|
||||
|
||||
parent::__construct
|
||||
(
|
||||
'Raw Editing',
|
||||
'Independently edit wp-config.php file',
|
||||
( is_multisite() ? 'manage_network' : 'administrator' )
|
||||
);
|
||||
|
||||
# Add under wcfe dashboard menu
|
||||
$this->setParent( $editFormMenu );
|
||||
}
|
||||
|
||||
/**
|
||||
* put your comment there...
|
||||
*
|
||||
*/
|
||||
public function getUrl()
|
||||
{
|
||||
|
||||
$urlMethod = is_multisite() ? 'network_admin_url' : 'admin_url';
|
||||
|
||||
return new Url( $urlMethod( 'admin.php' ) , $this->getRouteParams() );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
namespace WCFE\Services\Editor\MultiSiteTools;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class MultiSiteNetworkPageTools
|
||||
extends \WPPFW\Services\ServiceObject
|
||||
implements \WPPFW\Services\IReachableServiceObject
|
||||
{
|
||||
|
||||
/**
|
||||
* put your comment there...
|
||||
*
|
||||
*/
|
||||
public function getUrl()
|
||||
{
|
||||
return home_url( 'network.php' );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
namespace WCFE\Services\Editor\MultiSiteTools;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class Proxy extends \WPPFW\Services\ProxyBase
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
namespace WCFE\Services\Editor\MultiSiteTools;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class Service extends \WPPFW\Services\ServiceBase {
|
||||
|
||||
/**
|
||||
* put your comment there...
|
||||
*
|
||||
* @var mixed
|
||||
*/
|
||||
protected static $instance;
|
||||
|
||||
/**
|
||||
* put your comment there...
|
||||
*
|
||||
*/
|
||||
public function _checkIfNetworkSetupPage()
|
||||
{
|
||||
if ( defined( 'WP_INSTALLING_NETWORK' ) &&
|
||||
WP_INSTALLING_NETWORK )
|
||||
{
|
||||
|
||||
add_action( 'admin_print_footer_scripts', array( $this, '_printScripts' ) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* put your comment there...
|
||||
*
|
||||
*/
|
||||
public function _printScripts( )
|
||||
{
|
||||
if ( network_domain_check() )
|
||||
{
|
||||
|
||||
$this->hoohMap[ current_filter() ] = $this->serviceObjects[ 0 ];
|
||||
|
||||
$this->createServiceFront( new Proxy() );
|
||||
|
||||
$this->dispatch();
|
||||
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* put your comment there...
|
||||
*
|
||||
*/
|
||||
public static function & run()
|
||||
{
|
||||
if ( ! self::$instance )
|
||||
{
|
||||
|
||||
self::$instance = new Service( \WCFE\Plugin::me(), array( new MultiSiteNetworkPageTools() ) );
|
||||
|
||||
self::$instance->start();
|
||||
|
||||
}
|
||||
|
||||
|
||||
return self::$instance;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* put your comment there...
|
||||
*
|
||||
*/
|
||||
public function & start()
|
||||
{
|
||||
|
||||
# Start service
|
||||
add_action( 'admin_init', array( & $this, '_checkIfNetworkSetupPage' ) );
|
||||
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
namespace WCFE\Services\Editor\MultiSiteTools;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class ServiceFront extends \WPPFW\MVC\MVCViewDispatcher
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
# Define namespace
|
||||
namespace WCFE\Services\Editor\Services\Editor;
|
||||
|
||||
# Ajax service Framework
|
||||
use WPPFW\Services\Dashboard\Ajax\AjaxAccessPoint;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class Ajax extends AjaxAccessPoint {}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
# Define namespace
|
||||
namespace WCFE\Services\Editor\Services\Editor;
|
||||
|
||||
# Ajax service Framework
|
||||
use WPPFW\Services\Dashboard\Ajax\AjaxAccessPoint;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class AjaxViews extends AjaxAccessPoint {}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
# Define namespace
|
||||
namespace WCFE\Services\Editor\Services\Editor;
|
||||
|
||||
# MVC Dispatcher framework
|
||||
use WPPFW\MVC\MVCDispatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class Service extends MVCDispatcher {}
|
||||
Reference in New Issue
Block a user