PHP Класс Alternative_Heap

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$instance

Открытые методы

Метод Описание
__construct ( )
clone_wp_tables ( $alt_heap ) Clones all WordPress original tables to an alternative heap namespace
create_alt_plugins_dir ( $alt_heap = "" ) Create a new plugins directory with symlinks to live plugins
delete_alt_plugins_dirs ( $alt_heap = "" ) Deletes the temp plugins dir for an alternative heap
delete_tmp_wp_tables ( $alt_heap = "" ) Delete temp tables from an alternative heap namespace
fix_plugins_url ( $url, $path = "", $plugin = "" ) plugins_url() fix
get_alt_plugins_dirs ( $alt_heap = "" ) Returns existing alt plugins dir(s) as an array. If $alt_heap is defined, we return only that alt dir
get_alt_prefix ( $alt_heap = "" ) Returns the table prefix for an alternative heap
get_alt_suffix ( $alt_heap = "" ) Returns the plugins dir suffix for an alternative heap
get_tmp_wp_tables ( $alt_heap = "" ) Gets all our alternative WordPress tables
get_wp_tables ( ) Gets all the live WordPress prefixed tables (not our alternative ones)
init ( )
maybe_create_alt_heap ( ) if $_GET[alt_heap] is defined and (@TODO: user has permissions), create that heap and return to it
render_alternative_heap_indicator ( ) Display a notice at the bottom of the window when in an alternative heap

Описание методов

__construct() публичный Метод

public __construct ( )

clone_wp_tables() публичный Метод

Clones all WordPress original tables to an alternative heap namespace
public clone_wp_tables ( $alt_heap )

create_alt_plugins_dir() публичный Метод

Create a new plugins directory with symlinks to live plugins
public create_alt_plugins_dir ( $alt_heap = "" )

delete_alt_plugins_dirs() публичный Метод

Deletes the temp plugins dir for an alternative heap
public delete_alt_plugins_dirs ( $alt_heap = "" )

delete_tmp_wp_tables() публичный Метод

Delete temp tables from an alternative heap namespace
public delete_tmp_wp_tables ( $alt_heap = "" )

fix_plugins_url() публичный Метод

When symlinked, the plugins still think they are being run in their realpath. This may cause issues for plugins_url since plugin_basename will not work correctly. Since we can't hook directly there, we'll do it in here.
public fix_plugins_url ( $url, $path = "", $plugin = "" )

get_alt_plugins_dirs() публичный статический Метод

Returns existing alt plugins dir(s) as an array. If $alt_heap is defined, we return only that alt dir
public static get_alt_plugins_dirs ( $alt_heap = "" )

get_alt_prefix() публичный статический Метод

Returns the table prefix for an alternative heap
public static get_alt_prefix ( $alt_heap = "" )

get_alt_suffix() публичный статический Метод

Returns the plugins dir suffix for an alternative heap
public static get_alt_suffix ( $alt_heap = "" )

get_tmp_wp_tables() публичный статический Метод

Gets all our alternative WordPress tables
public static get_tmp_wp_tables ( $alt_heap = "" )

get_wp_tables() публичный статический Метод

Gets all the live WordPress prefixed tables (not our alternative ones)
public static get_wp_tables ( )

init() публичный статический Метод

public static init ( )

maybe_create_alt_heap() публичный Метод

if $_GET[alt_heap] is defined and (@TODO: user has permissions), create that heap and return to it

render_alternative_heap_indicator() публичный Метод

Display a notice at the bottom of the window when in an alternative heap

Описание свойств

$instance публичное статическое свойство

public static $instance