Wordpress++

This commit is contained in:
nikolark committed 2015-08-22 18:55:55 +02:00
1 parent 790f1487a2
commit 3f49ab1747
610 files changed
+58979 -36562

No files matched your search

+47 -12
View File
@@ -11,6 +11,8 @@
*
* @since 2.7.0
*
* @staticvar array $column_headers
*
* @param string|WP_Screen $screen The screen you want the headers for
* @return array Containing the headers in the format id => UI String
*/
@@ -60,6 +62,8 @@ function get_hidden_columns( $screen ) {
*
* @since 2.7.0
*
* @global array $wp_meta_boxes
*
* @param WP_Screen $screen
*/
function meta_box_prefs( $screen ) {
@@ -73,9 +77,12 @@ function meta_box_prefs( $screen ) {
$hidden = get_hidden_meta_boxes($screen);
foreach ( array_keys($wp_meta_boxes[$screen->id]) as $context ) {
foreach ( array_keys($wp_meta_boxes[$screen->id][$context]) as $priority ) {
foreach ( $wp_meta_boxes[$screen->id][$context][$priority] as $box ) {
foreach ( array_keys( $wp_meta_boxes[ $screen->id ] ) as $context ) {
foreach ( array( 'high', 'core', 'default', 'low' ) as $priority ) {
if ( ! isset( $wp_meta_boxes[ $screen->id ][ $context ][ $priority ] ) ) {
continue;
}
foreach ( $wp_meta_boxes[ $screen->id ][ $context ][ $priority ] as $box ) {
if ( false == $box || ! $box['title'] )
continue;
// Submit box cannot be hidden
@@ -162,6 +169,8 @@ function add_screen_option( $option, $args = array() ) {
*
* @since 3.1.0
*
* @global WP_Screen $current_screen
*
* @return WP_Screen Current screen object
*/
function get_current_screen() {
@@ -179,7 +188,7 @@ function get_current_screen() {
* @since 3.0.0
*
* @param mixed $hook_name Optional. The hook name (also known as the hook suffix) used to determine the screen,
* or an existing screen object.
* or an existing screen object.
*/
function set_current_screen( $hook_name = '' ) {
WP_Screen::get( $hook_name )->set_current_screen();
@@ -323,6 +332,11 @@ final class WP_Screen {
/**
* Stores old string-based help.
*
* @static
* @access private
*
* @var array
*/
private static $_old_compat_help = array();
@@ -339,8 +353,11 @@ final class WP_Screen {
* The screen object registry.
*
* @since 3.3.0
* @var array
*
* @static
* @access private
*
* @var array
*/
private static $_registry = array();
@@ -368,12 +385,15 @@ final class WP_Screen {
* @since 3.3.0
* @access public
*
* @static
*
* @global string $hook_suffix
*
* @param string|WP_Screen $hook_name Optional. The hook name (also known as the hook suffix) used to determine the screen.
* Defaults to the current $hook_suffix global.
* Defaults to the current $hook_suffix global.
* @return WP_Screen Screen object.
*/
public static function get( $hook_name = '' ) {
if ( $hook_name instanceof WP_Screen ) {
return $hook_name;
}
@@ -529,6 +549,10 @@ final class WP_Screen {
*
* @see set_current_screen()
* @since 3.3.0
*
* @global WP_Screen $current_screen
* @global string $taxnow
* @global string $typenow
*/
public function set_current_screen() {
global $current_screen, $taxnow, $typenow;
@@ -560,9 +584,8 @@ final class WP_Screen {
* @since 3.5.0
*
* @param string $admin The admin to check against (network | user | site).
* If empty any of the three admins will result in true.
* @return boolean True if the screen is in the indicated admin, false otherwise.
*
* If empty any of the three admins will result in true.
* @return bool True if the screen is in the indicated admin, false otherwise.
*/
public function in_admin( $admin = null ) {
if ( empty( $admin ) )
@@ -578,6 +601,8 @@ final class WP_Screen {
*
* @since 3.3.0
*
* @static
*
* @param WP_Screen $screen A screen object.
* @param string $help Help text.
*/
@@ -787,6 +812,8 @@ final class WP_Screen {
* This will trigger the deprecated filters for backwards compatibility.
*
* @since 3.3.0
*
* @global string $screen_layout_columns
*/
public function render_screen_meta() {
@@ -947,18 +974,24 @@ final class WP_Screen {
<div id="screen-meta-links">
<?php if ( $this->get_help_tabs() ) : ?>
<div id="contextual-help-link-wrap" class="hide-if-no-js screen-meta-toggle">
<a href="#contextual-help-wrap" id="contextual-help-link" class="show-settings" aria-controls="contextual-help-wrap" aria-expanded="false"><?php _e( 'Help' ); ?></a>
<button type="button" id="contextual-help-link" class="button show-settings" aria-controls="contextual-help-wrap" aria-expanded="false"><?php _e( 'Help' ); ?></button>
</div>
<?php endif;
if ( $this->show_screen_options() ) : ?>
<div id="screen-options-link-wrap" class="hide-if-no-js screen-meta-toggle">
<a href="#screen-options-wrap" id="show-settings-link" class="show-settings" aria-controls="screen-options-wrap" aria-expanded="false"><?php _e( 'Screen Options' ); ?></a>
<button type="button" id="show-settings-link" class="button show-settings" aria-controls="screen-options-wrap" aria-expanded="false"><?php _e( 'Screen Options' ); ?></button>
</div>
<?php endif; ?>
</div>
<?php
}
/**
*
* @global array $wp_meta_boxes
*
* @return bool
*/
public function show_screen_options() {
global $wp_meta_boxes;
@@ -1017,6 +1050,8 @@ final class WP_Screen {
* Render the screen options tab.
*
* @since 3.3.0
*
* @global array $wp_meta_boxes
*/
public function render_screen_options() {
global $wp_meta_boxes;