- Formularios de contacto

- Tipos de letra nuevos
- Apariencia en menú nueva

git-svn-id: https://192.168.0.254/svn/Proyectos.OriginalHouse_Web/trunk@72 54e8636e-a86c-764f-903d-b964358a1ae2
This commit is contained in:
David Arranz 2013-08-09 09:00:31 +00:00
parent d775abd340
commit c8b709b374
1580 changed files with 269836 additions and 52659 deletions

View File

@ -15,4 +15,3 @@ define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */
require('./wp-blog-header.php');
?>

View File

@ -1,8 +1,47 @@
WordPress - Web publishing software
Copyright 2011 by the contributors
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
This program incorporates work covered by the following copyright and
permission notices:
b2 is (c) 2001, 2002 Michel Valdrighi - m@tidakada.com -
http://tidakada.com
Wherever third party code has been used, credit has been given in the code's
comments.
b2 is released under the GPL
and
WordPress - Web publishing software
Copyright 2003-2010 by the contributors
WordPress is released under the GPL
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110, USA
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@ -279,3 +318,10 @@ POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
WRITTEN OFFER
The source code for any program binaries or compressed scripts that are
included with WordPress can be freely obtained at the following URL:
http://wordpress.org/download/source/

View File

@ -1,5 +0,0 @@
copy.src.files=false
copy.src.target=
index.file=index.php
run.as=LOCAL
url=http://localhost/originalhouse/

View File

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1">
<file>
<url>wp-content/plugins/thecartpress/customposttypes/ProductCustomPostType.class.php</url>
<line>180</line>
</file>
</editor-bookmarks>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/1">
<file>file:/D:/Trabajo/OriginalHouse/trunk/src/wp-content/themes/originalhouse/index.php</file>
<file>file:/D:/Trabajo/OriginalHouse/trunk/src/wp-includes/general-template.php</file>
<file>file:/D:/Trabajo/OriginalHouse/trunk/src/wp-content/themes/originalhouse/header.php</file>
<file>file:/D:/Trabajo/OriginalHouse/trunk/src/wp-content/themes/originalhouse/functions/admin-functions.php</file>
<file>file:/D:/Trabajo/OriginalHouse/trunk/src/wp-content/plugins/thecartpress/customposttypes/ProductCustomPostType.class.php</file>
<file>file:/D:/Trabajo/OriginalHouse/trunk/src/wp-content/plugins/tubepress/sys/ui/themes/default/gallery.tpl.php</file>
<file>file:/D:/Trabajo/OriginalHouse/trunk/src/wp-content/themes/originalhouse/style.css</file>
<file>file:/D:/Trabajo/OriginalHouse/trunk/src/wp-content/themes/originalhouse/custom.css</file>
<file>file:/D:/Trabajo/OriginalHouse/trunk/src/wp-content/plugins/tubepress/sys/ui/themes/default/style.css</file>
<file>file:/D:/Trabajo/OriginalHouse/trunk/src/wp-content/themes/originalhouse/custom_ie7.css</file>
</open-files>
</project-private>

View File

@ -1,7 +0,0 @@
include.path=${php.global.include.path}
php.version=PHP_5
source.encoding=ISO-8859-1
src.dir=.
tags.asp=false
tags.short=true
web.root=.

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.php.project</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/php-project/1">
<name>Original House</name>
</data>
</configuration>
</project>

110
src/readme.html Normal file
View File

@ -0,0 +1,110 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>WordPress &#8250; Léeme</title>
<link rel="stylesheet" href="wp-admin/css/install.css?ver=20100228" type="text/css" />
</head>
<body>
<h1 id="logo">
<a href="http://wordpress.org/"><img alt="WordPress" src="wp-admin/images/wordpress-logo.png" width="250" height="68" /></a>
<br /> Version 3.5
</h1>
<p style="text-align: center">Plataforma Semántica de Publicación Personal</p>
<h1>Para empezar</h1>
<p>Te damos la bienvenida. WordPress es un proyecto muy especial para mí. Cada desarrollador o colaborador a&ntilde;ade algo único a la mezcla, y juntos vamos creando algo hermoso de lo que me enorgullece formar parte. Se han dedicado miles de horas a WordPress y nos seguimos empleando en mejorarlo cada día. Gracias por hacerlo parte de tu mundo.</p>
<p style="text-align: right">&#8212; Matt Mullenweg</p>
<h1>Instalación: la famosa Instalación en 5 minutos</h1>
<ol>
<li>Unzip the package in an empty directory and upload everything.</li>
<li>Abre <span class="file"><a href="wp-admin/install.php">wp-admin/install.php</a></span> desde tu navegador. Se abrirá un proceso que te guiará para crear el archivo <code>wp-config.php</code> con los detalles de conexión a tu base de datos.
<ol>
<li>Si esto no funciona, no te preocupes. No funciona en todos los alojamientos. Abre <code>wp-config-sample.php</code> con un editor de texto como WordPad o similar y añade los detalles de tu base de datos.</li>
<li>Guarda el archivo como <code>wp-config.php</code> y súbelo.</li>
<li>Abre <span class="file"><a href="wp-admin/install.php">wp-admin/install.php</a></span> en tu navegador.</li>
</ol>
</li>
<li>Una vez completado el archivo de configuración, el instalador creará las tablas necesarias para tu blog en la base de datos. Si apareciera algún error, chequea de nuevo tu archivo <code>wp-config.php</code> y vuelve a intentarlo. Si falla de nuevo, por favor visita los <a href="http://es.forums.wordpress.org/" title="Foros de soporte WordPress.org">foros de soporte</a> con toda la información que puedas conseguir.</li>
<li><strong>Si no incluiste una contraseña, utiliza la que se te habrá enviado por correo electrónico.</strong> Si no proporcionaste un nombre de usuario, éste será <code>admin</code>.</li>
<li>El instalador debería enviarte a la <a href="wp-login.php">página de login</a>. Accede con el nombre de usuario y contraseña que seleccionaste durante la instalación. Si la contraseña fue generada por el sistema, puedes hacer clic en 'Perfil' para modificarla.</li>
</ol>
<h1>Actualizar</h1>
<h2>Usar el Actualizador automático</h2>
<p>Si estás actualizando desde la versión 2.7 o superior puedes usar el actualizador automático:</p>
<ol>
<li>Abre <span class="file"><a href="wp-admin/update-core.php">wp-admin/update-core.php</a></span> en tu navegador y sigue las instrucciones.</li>
<li>¿Querías más? ¡Eso es todo!</li>
</ol>
<h2>Actualizar manualmente:</h2>
<ol>
<li>Antes de actualizar nada, asegúrate de tener copias de seguridad de cualquier archivo que hayas modificado, como <code>index.php</code>.</li>
<li>Elimina tus archivos de WP anteriores, guardando aquellos que hayas modificado.</li>
<li>Sube los nuevos archivos a tu servidor.</li>
<li>Dirige tu navegador a <span class="file"><a href="wp-admin/upgrade.php">/wp-admin/upgrade.php</a></span>.</li>
</ol>
<h2>Cambios en las plantillas</h2>
<p>Si has modificado tus plantillas, es posible que debas hacerles algunos cambios cuando actualices entre versiones mayores. </p>
<h1>Migrar desde otros sistemas</h1>
<p>WordPress puede <a href="http://codex.wordpress.org/Importing_Content">importar contenido de otros sistemas</a>. Lo primero que tienes que hacer es instalar WordPress y ponerlo en marcha como se ha descrito arriba, y luego usar <a href="wp-admin/import.php" title="Importar a WordPress">nuestras herramientas de importación</a>.</p>
<h1>Requisitos del sistema</h1>
<ul>
<li><a href="http://php.net/">PHP</a> versión <strong>5.2.4</strong> o superior.</li>
<li><a href="http://www.mysql.com/">MySQL</a> versión <strong>5.0</strong> o superior.</li>
</ul>
<h2>Recomendaciones del sistema</h2>
<ul>
<li>El módulo de Apache <a href="http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html">mod_rewrite</a>.</li>
<li>Un enlace a <a href="http://wordpress.org/">http://wordpress.org</a> en tu sitio.</li>
</ul>
<h1>Recursos en la red</h1>
<p>Si alguna de tus preguntas no encuentra respuesta en este documento, te sugerimos que aproveches los numerosos recursos de WordPress en la red:</p>
<dl>
<dt><a href="http://codex.wordpress.org/">El Codex de WordPress </a></dt>
<dd>El Codex es la enciclopedia de todo lo relacionado con WordPress. Es la fuente de información más detallada disponible sobre WordPress. </dd>
<dt><a href="http://wordpress.org/news/">El blog de WordPress</a></dt>
<dd>Aquí encontrarás las últimas actualizaciones y noticias acerca de WordPress. Las noticias recientes sobre WordPress aparecerán en tu escritorio por defecto.</dd>
<dt><a href="http://planet.wordpress.org/">WordPress Planet </a></dt>
<dd>El WordPress Planet (Planeta WordPress) es un agregador de noticias que recopila entradas de blogs de WordPress por toda la web. </dd>
<dt><a href="http://wordpress.org/support/">Foros de ayuda de WordPress</a></dt>
<dd>Si has buscado por todas partes pero sigues sin encontrar la respuesta, en los foros de ayuda, muy activos, cuentas con una amplia comunidad deseosa de ayudar. Para ayudarles a ayudarte, asegúrate de usar un título descriptivo e incluir en tu pregunta tantos detalles como te sea posible. </dd>
<dt><a href="http://es.forums.wordpress.org/">Foros de ayuda de WordPress en español</a></dt>
<dd>También puedes acceder a los foros específicos para español. </dd>
<dt><a href="http://codex.wordpress.org/IRC">Canal IRC de WordPress</a></dt>
<dd>Por último, existe un canal de chat utilizado por la gente que usa Wordpress para intercambiar opiniones y eventualmente solicitar ayuda. La página del wiki que ves arriba podrá orientarte. (<a href="irc://irc.freenode.net/wordpress">irc.freenode.net #wordpress</a>)</dd>
</dl>
<h1><abbr title="eXtensible Markup Language">XML</abbr>-<abbr title="Remote Procedure Call">RPC</abbr> y Atom</h1>
<p>Ahora puedes publicar en tu blog de WordPress con herramientas como <a href="http://download.live.com/writer">Windows Live Writer</a>, <a href="http://illuminex.com/ecto/">Ecto</a>, <a href="http://bloggar.com/">w.bloggar</a>, <a href="http://radio.userland.com">Radio Userland</a> (es decir, puedes utilizar la función de blog por e-mail de Radio Userland), <a href="http://www.newzcrawler.com/">NewzCrawler</a>, y otras herramientas compatibles con las API (en inglés, Interfaz de Programación de la Aplicación) de blog. :) Puedes ampliar la información en <a href="http://codex.wordpress.org/XML-RPC_Support">XML-RPC support en el Codex</a>.</p>
<h1>Publicar por correo</h1>
<p>¡Puedes publicar desde tu cliente de correo! Para configurar esto ve a tu pantalla de &quot;Escritura&quot; y rellena los detalles de conexión para tpu cuenta <abbr title="Post Office Protocol version 3">POP3</abbr> secreta. Necesitarás también configurar <code>wp-mail.php</code> para que se ejecute periódicamente y así chequear tu cuenta de correo para publicar nuevos artículos. Puedes hacerlo utilizando <a href="http://en.wikipedia.org/wiki/Cron">cron</a>, o si tu alojamiento no lo soporta puedes buscar algunos servicios de monitorización de sitios web y hacer que chequeen la dirección de tu <code>wp-mail.php</code>.</p>
<p> Publicar es sencillo: cualquier mensaje que envíes a la dirección especificada será publicado, con el asunto como título. Por eso es mejor mantener en privado la dirección. El script <em>borrará</em> los mensajes una vez publicados. </p>
<h1>Roles de usuario</h1>
<p>Hemos introducido un sistema flexible de perfiles de usuario en la versión 2.0. Puedes <a href="http://codex.wordpress.org/Roles_and_Capabilities">leer más sobre los roles en el Codex</a>.</p>
<h1>Final Notes</h1>
<ul>
<li>Si tienes alguna sugerencia, idea, comentario, o si encuentras (ejem) un fallo, únete a nosotros en los <a href="http://wordpress.org/support/">Foros de soporte</a>.</li>
<li>WordPress tiene ahora una robusta API de plugins que facilita la ampliación del código. Si eres un desarrollador interesado en utilizarla, mira la <a href="http://codex.wordpress.org/Plugin_API">documentación para plugins en el Codex</a>. En la mayoría de los casos, no tendrás que modificar nada del código central.</li>
</ul>
<h1>Comparte tu afición</h1>
<p>WordPress no cuenta con campañas de publicidad multimillonarias ni promotores famosos, pero tiene algo aún mejor: tú. Si disfrutas con WordPress, por favor, piensa en decírselo a un amigo, instalárselo a alguien menos entendido que tú o escribir al autor de un artículo que pase de nosotros.</p>
<p>WordPress es la continuación oficial de <a href="http://cafelog.com/">b2/caf&#233;log</a>, de Michel V. El trabajo se ha continuado gracias a los <a href="http://wordpress.org/about/">desarrolladores de WordPress</a>. Si quieres apoyar a WordPress puedes <a href="http://wordpress.org/donate/" title="Donaciones a WordPress">dar un donativo</a>.</p>
<h1>Licencia</h1>
<p>WordPress se distribuye bajo la <abbr title="Licencia Pública de GNU">GPL</abbr>v2 (ver la <a href="licencia.txt">licencia</a>).</p>
</body>
</html>

6
src/robots.txt Normal file
View File

@ -0,0 +1,6 @@
User-Agent: *
Allow: /wp-content/uploads/
Disallow: /wp-content/plugins/
Disallow: /wp-content/themes/
Disallow: /wp-includes/
Disallow: /wp-admin/

View File

@ -1,4 +1,12 @@
<?php
/**
* Confirms that the activation key that is sent in an email after a user signs
* up for a new blog matches the key for that user and then displays confirmation.
*
* @package WordPress
*/
/** Define ABSPATH as this file's directory */
define( 'WP_INSTALLING', true );
/** Sets up the WordPress Environment. */
@ -16,11 +24,21 @@ if ( is_object( $wp_object_cache ) )
do_action( 'activate_header' );
/**
* Adds an action hook specific to this page that fires on wp_head
*
* @since MU
*/
function do_activate_header() {
do_action( 'activate_wp_head' );
}
add_action( 'wp_head', 'do_activate_header' );
/**
* Loads styles specific to this page.
*
* @since MU
*/
function wpmu_activate_stylesheet() {
?>
<style type="text/css">
@ -63,9 +81,9 @@ get_header();
<?php
echo '<p class="lead-in">';
if ( $signup->domain . $signup->path == '' ) {
printf( __('Your account has been activated. You may now <a href="%1$s">log in</a> to the site using your chosen username of &#8220;%2$s&#8221;. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.'), network_site_url( 'wp-login.php', 'login' ), $signup->user_login, $signup->user_email, network_site_url( 'wp-login.php?action=lostpassword', 'login' ) );
printf( __('Your account has been activated. You may now <a href="%1$s">log in</a> to the site using your chosen username of &#8220;%2$s&#8221;. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.'), network_site_url( 'wp-login.php', 'login' ), $signup->user_login, $signup->user_email, wp_lostpassword_url() );
} else {
printf( __('Your site at <a href="%1$s">%2$s</a> is active. You may now log in to your site using your chosen username of &#8220;%3$s&#8221;. Please check your email inbox at %4$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%5$s">reset your password</a>.'), 'http://' . $signup->domain, $signup->domain, $signup->user_login, $signup->user_email, network_site_url( 'wp-login.php?action=lostpassword' ) );
printf( __('Your site at <a href="%1$s">%2$s</a> is active. You may now log in to your site using your chosen username of &#8220;%3$s&#8221;. Please check your email inbox at %4$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%5$s">reset your password</a>.'), 'http://' . $signup->domain, $signup->domain, $signup->user_login, $signup->user_email, wp_lostpassword_url() );
}
echo '</p>';
} else {
@ -77,7 +95,7 @@ get_header();
} else {
extract($result);
$url = get_blogaddress_by_id( (int) $blog_id);
$user = new WP_User( (int) $user_id);
$user = get_userdata( (int) $user_id);
?>
<h2><?php _e('Your account is now active!'); ?></h2>

View File

@ -0,0 +1,264 @@
<?php
/**
* WordPress Installer
*
* @package WordPress
* @subpackage Administration
*/
// Sanity check.
if ( false ) {
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Error: PHP is not running</title>
</head>
<body>
<h1 id="logo"><img alt="WordPress" src="images/wordpress-logo.png" /></h1>
<h2>Error: PHP is not running</h2>
<p>WordPress requires that your web server is running PHP. Your server does not have PHP installed, or PHP is turned off.</p>
</body>
</html>
<?php
}
/**
* We are installing WordPress.
*
* @since 1.5.1
* @var bool
*/
define( 'WP_INSTALLING', true );
/** Load WordPress Bootstrap */
require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
/** Load WordPress Administration Upgrade API */
require_once( dirname( __FILE__ ) . '/includes/upgrade.php' );
/** Load wpdb */
require_once(dirname(dirname(__FILE__)) . '/wp-includes/wp-db.php');
$step = isset( $_GET['step'] ) ? $_GET['step'] : 0;
/**
* Display install header.
*
* @since 2.5.0
* @package WordPress
* @subpackage Installer
*/
function display_header() {
header( 'Content-Type: text/html; charset=utf-8' );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php _e( 'WordPress &rsaquo; Installation' ); ?></title>
<?php wp_admin_css( 'install', true ); ?>
</head>
<body>
<h1 id="logo"><img alt="WordPress" src="images/wordpress-logo.png" /></h1>
<?php
} // end display_header()
/**
* Display installer setup form.
*
* @since 2.8.0
* @package WordPress
* @subpackage Installer
*/
function display_setup_form( $error = null ) {
global $wpdb;
$user_table = ( $wpdb->get_var("SHOW TABLES LIKE '$wpdb->users'") != null );
// Ensure that Blogs appear in search engines by default
$blog_public = 1;
if ( ! empty( $_POST ) )
$blog_public = isset( $_POST['blog_public'] );
$weblog_title = isset( $_POST['weblog_title'] ) ? trim( stripslashes( $_POST['weblog_title'] ) ) : '';
$user_name = isset($_POST['user_name']) ? trim( stripslashes( $_POST['user_name'] ) ) : 'admin';
$admin_password = isset($_POST['admin_password']) ? trim( stripslashes( $_POST['admin_password'] ) ) : '';
$admin_email = isset( $_POST['admin_email'] ) ? trim( stripslashes( $_POST['admin_email'] ) ) : '';
if ( ! is_null( $error ) ) {
?>
<p class="message"><?php printf( __( '<strong>ERROR</strong>: %s' ), $error ); ?></p>
<?php } ?>
<form id="setup" method="post" action="install.php?step=2">
<table class="form-table">
<tr>
<th scope="row"><label for="weblog_title"><?php _e( 'Site Title' ); ?></label></th>
<td><input name="weblog_title" type="text" id="weblog_title" size="25" value="<?php echo esc_attr( $weblog_title ); ?>" /></td>
</tr>
<tr>
<th scope="row"><label for="user_name"><?php _e('Username'); ?></label></th>
<td>
<?php
if ( $user_table ) {
_e('User(s) already exists.');
} else {
?><input name="user_name" type="text" id="user_login" size="25" value="<?php echo esc_attr( sanitize_user( $user_name, true ) ); ?>" />
<p><?php _e( 'Usernames can have only alphanumeric characters, spaces, underscores, hyphens, periods and the @ symbol.' ); ?></p>
<?php
} ?>
</td>
</tr>
<?php if ( ! $user_table ) : ?>
<tr>
<th scope="row">
<label for="admin_password"><?php _e('Password, twice'); ?></label>
<p><?php _e('A password will be automatically generated for you if you leave this blank.'); ?></p>
</th>
<td>
<input name="admin_password" type="password" id="pass1" size="25" value="" />
<p><input name="admin_password2" type="password" id="pass2" size="25" value="" /></p>
<div id="pass-strength-result"><?php _e('Strength indicator'); ?></div>
<p><?php _e('Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! " ? $ % ^ &amp; ).'); ?></p>
</td>
</tr>
<?php endif; ?>
<tr>
<th scope="row"><label for="admin_email"><?php _e( 'Your E-mail' ); ?></label></th>
<td><input name="admin_email" type="text" id="admin_email" size="25" value="<?php echo esc_attr( $admin_email ); ?>" />
<p><?php _e( 'Double-check your email address before continuing.' ); ?></p></td>
</tr>
<tr>
<td colspan="2"><label><input type="checkbox" name="blog_public" value="1" <?php checked( $blog_public ); ?> /> <?php _e( 'Allow my site to appear in search engines like Google and Technorati.' ); ?></label></td>
</tr>
</table>
<p class="step"><input type="submit" name="Submit" value="<?php esc_attr_e( 'Install WordPress' ); ?>" class="button" /></p>
</form>
<?php
} // end display_setup_form()
// Let's check to make sure WP isn't already installed.
if ( is_blog_installed() ) {
display_header();
die( '<h1>' . __( 'Already Installed' ) . '</h1><p>' . __( 'You appear to have already installed WordPress. To reinstall please clear your old database tables first.' ) . '</p><p class="step"><a href="../wp-login.php" class="button">' . __('Log In') . '</a></p></body></html>' );
}
$php_version = phpversion();
$mysql_version = $wpdb->db_version();
$php_compat = version_compare( $php_version, $required_php_version, '>=' );
$mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' );
if ( !$mysql_compat && !$php_compat )
$compat = sprintf( __('You cannot install because <a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version );
elseif ( !$php_compat )
$compat = sprintf( __('You cannot install because <a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.'), $wp_version, $required_php_version, $php_version );
elseif ( !$mysql_compat )
$compat = sprintf( __('You cannot install because <a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires MySQL version %2$s or higher. You are running version %3$s.'), $wp_version, $required_mysql_version, $mysql_version );
if ( !$mysql_compat || !$php_compat ) {
display_header();
die('<h1>' . __('Insufficient Requirements') . '</h1><p>' . $compat . '</p></body></html>');
}
switch($step) {
case 0: // Step 1
case 1: // Step 1, direct link.
display_header();
?>
<h1><?php _e( 'Welcome' ); ?></h1>
<p><?php printf( __( 'Welcome to the famous five minute WordPress installation process! You may want to browse the <a href="%s">ReadMe documentation</a> at your leisure. Otherwise, just fill in the information below and you&#8217;ll be on your way to using the most extendable and powerful personal publishing platform in the world.' ), '../readme.html' ); ?></p>
<h1><?php _e( 'Information needed' ); ?></h1>
<p><?php _e( 'Please provide the following information. Don&#8217;t worry, you can always change these settings later.' ); ?></p>
<?php
display_setup_form();
break;
case 2:
if ( ! empty( $wpdb->error ) )
wp_die( $wpdb->error->get_error_message() );
display_header();
// Fill in the data we gathered
$weblog_title = isset( $_POST['weblog_title'] ) ? trim( stripslashes( $_POST['weblog_title'] ) ) : '';
$user_name = isset($_POST['user_name']) ? trim( stripslashes( $_POST['user_name'] ) ) : 'admin';
$admin_password = isset($_POST['admin_password']) ? $_POST['admin_password'] : '';
$admin_password_check = isset($_POST['admin_password2']) ? $_POST['admin_password2'] : '';
$admin_email = isset( $_POST['admin_email'] ) ?trim( stripslashes( $_POST['admin_email'] ) ) : '';
$public = isset( $_POST['blog_public'] ) ? (int) $_POST['blog_public'] : 0;
// check e-mail address
$error = false;
if ( empty( $user_name ) ) {
// TODO: poka-yoke
display_setup_form( __('you must provide a valid username.') );
$error = true;
} elseif ( $user_name != sanitize_user( $user_name, true ) ) {
display_setup_form( __('the username you provided has invalid characters.') );
$error = true;
} elseif ( $admin_password != $admin_password_check ) {
// TODO: poka-yoke
display_setup_form( __( 'your passwords do not match. Please try again' ) );
$error = true;
} else if ( empty( $admin_email ) ) {
// TODO: poka-yoke
display_setup_form( __( 'you must provide an e-mail address.' ) );
$error = true;
} elseif ( ! is_email( $admin_email ) ) {
// TODO: poka-yoke
display_setup_form( __( 'that isn&#8217;t a valid e-mail address. E-mail addresses look like: <code>username@example.com</code>' ) );
$error = true;
}
if ( $error === false ) {
$wpdb->show_errors();
$result = wp_install($weblog_title, $user_name, $admin_email, $public, '', $admin_password);
extract( $result, EXTR_SKIP );
?>
<h1><?php _e( 'Success!' ); ?></h1>
<p><?php _e( 'WordPress has been installed. Were you expecting more steps? Sorry to disappoint.' ); ?></p>
<table class="form-table">
<tr>
<th><?php _e( 'Username' ); ?></th>
<td><code><?php echo esc_html( sanitize_user( $user_name, true ) ); ?></code></td>
</tr>
<tr>
<th><?php _e( 'Password' ); ?></th>
<td><?php
if ( ! empty( $password ) && empty($admin_password_check) )
echo '<code>'. esc_html($password) .'</code><br />';
echo "<p>$password_message</p>"; ?>
</td>
</tr>
</table>
<p class="step"><a href="../wp-login.php" class="button"><?php _e( 'Log In' ); ?></a></p>
<?php
}
break;
}
?>
<script type="text/javascript">var t = document.getElementById('weblog_title'); if (t){ t.focus(); }</script>
<script type="text/javascript" src="../wp-includes/js/jquery/jquery.js"></script>
<script type="text/javascript" src="js/password-strength-meter.js"></script>
<script type="text/javascript" src="js/user-profile.js"></script>
<script type="text/javascript" src="../wp-includes/js/l10n.js"></script>
<script type='text/javascript'>
/* <![CDATA[ */
var pwsL10n = {
empty: "<?php echo esc_js( __( 'Strength indicator' ) ); ?>",
short: "<?php echo esc_js( __( 'Very weak' ) ); ?>",
bad: "<?php echo esc_js( __( 'Weak' ) ); ?>",
good: "<?php echo esc_js( _x( 'Medium', 'password strength' ) ); ?>",
strong: "<?php echo esc_js( __( 'Strong' ) ); ?>",
mismatch: "<?php echo esc_js( __( 'Mismatch' ) ); ?>"
};
try{convertEntities(pwsL10n);}catch(e){};
/* ]]> */
</script>
</body>
</html>

172
src/wp-admin/about.php Normal file
View File

@ -0,0 +1,172 @@
<?php
/**
* About This Version administration panel.
*
* @package WordPress
* @subpackage Administration
*/
/** WordPress Administration Bootstrap */
require_once( './admin.php' );
$title = __( 'About' );
list( $display_version ) = explode( '-', $wp_version );
include( ABSPATH . 'wp-admin/admin-header.php' );
?>
<div class="wrap about-wrap">
<h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
<div class="about-text"><?php printf( __( 'Thank you for updating to the latest version! WordPress %s is more polished and enjoyable than ever before. We hope you like it.' ), $display_version ); ?></div>
<div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
<h2 class="nav-tab-wrapper">
<a href="about.php" class="nav-tab nav-tab-active">
<?php _e( 'What&#8217;s New' ); ?>
</a><a href="credits.php" class="nav-tab">
<?php _e( 'Credits' ); ?>
</a><a href="freedoms.php" class="nav-tab">
<?php _e( 'Freedoms' ); ?>
</a>
</h2>
<div class="changelog point-releases">
<h3><?php echo _n( 'Maintenance and Security Release', 'Maintenance and Security Releases', 2 ); ?></h3>
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.', 12 ), '3.5.2', number_format_i18n( 12 ) ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'http://codex.wordpress.org/Version_3.5.2' ); ?>
</p>
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.', 37 ), '3.5.1', number_format_i18n( 37 ) ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'http://codex.wordpress.org/Version_3.5.1' ); ?>
</p>
</div>
<div class="changelog">
<h3><?php _e( 'New Media Manager' ); ?></h3>
<div class="feature-section col two-col">
<img alt="" src="<?php echo esc_url( admin_url( 'images/screenshots/about-media.png' ) ); ?>" class="image-100" />
<div>
<h4><?php _e( 'Beautiful Interface' ); ?></h4>
<p><?php _e( 'Adding media has been streamlined with an all-new experience, making it a breeze to upload files and place them into your posts.' ); ?></p>
</div>
<div class="last-feature">
<h4><?php _e( 'Picturesque Galleries' ); ?></h4>
<p><?php _e( 'Creating image galleries is faster with drag and drop reordering, inline caption editing, and simplified controls for layout.' ); ?></p>
</div>
</div>
</div>
<div class="changelog">
<h3><?php _e( 'New Default Theme' ); ?></h3>
<div class="feature-section images-stagger-right">
<img alt="" src="<?php echo esc_url( admin_url( 'images/screenshots/about-twenty-twelve.png' ) ); ?>" class="image-66" />
<h4><?php _e( 'Introducing Twenty Twelve' ); ?></h4>
<p><?php _e( 'The newest default theme for WordPress is simple, flexible, and elegant.' ); ?></p>
<p><?php _e( 'What makes it really shine are the design details, like the gorgeous Open Sans typeface and a fully responsive design that looks great on any device.' ); ?></p>
<p><?php _e( 'Naturally, Twenty Twelve supports all the theme features youve come to know and love, but it is also designed to be as great for a website as it is for a blog.' ); ?></p>
</div>
</div>
<div class="changelog">
<h3><?php _e( 'Retina Ready' ); ?></h3>
<div class="feature-section images-stagger-right">
<img alt="" src="<?php echo esc_url( admin_url( 'images/screenshots/about-retina.png' ) ); ?>" class="image-66" />
<h4><?php _e( 'So Sharp You Can&#8217;t See the Pixels' ); ?></h4>
<p><?php _e( 'The WordPress dashboard now looks beautiful on high-resolution screens like those found on the iPad, Kindle Fire HD, Nexus 10, and MacBook Pro with Retina Display. Icons and other visual elements are crystal clear and full of detail.' ); ?></p>
</div>
</div>
<div class="changelog">
<h3><?php _e( 'Smoother Experience' ); ?></h3>
<div class="feature-section images-stagger-right">
<img alt="" src="<?php echo esc_url( admin_url( 'images/screenshots/about-color-picker.png' ) ); ?>" class="image-30" />
<h4><?php _e( 'Better Accessibility' ); ?></h4>
<p><?php _e( 'WordPress supports more usage modes than ever before. Screenreaders, touch devices, and mouseless workflows all have improved ease of use and accessibility.' ); ?></p>
<h4><?php _e( 'More Polish' ); ?></h4>
<p><?php _e( 'A number of screens and controls have been refined. For example, a new color picker makes it easier for you to choose that perfect shade of blue.' ); ?></p>
</div>
</div>
<div class="changelog">
<h3><?php _e( 'Under the Hood' ); ?></h3>
<div class="feature-section col three-col">
<div>
<h4><?php _e( 'Meta Query Additions' ); ?></h4>
<p><?php _e( 'The <code>WP_Comment_Query</code> and <code>WP_User_Query</code> classes now support meta queries just like <code>WP_Query.</code> Meta queries now support querying for objects without a particular meta key.' ); ?></p>
</div>
<div>
<h4><?php _e( 'Post Objects' ); ?></h4>
<p><?php _e( 'Post objects are now instances of a <code>WP_Post</code> class, which improves performance by loading selected properties on demand.' ); ?></p>
</div>
<div class="last-feature">
<h4><?php _e( 'Image Editing API' ); ?></h4>
<p><?php _e( 'The <code>WP_Image_Editor</code> class abstracts image editing functionality such as cropping and scaling, and uses ImageMagick when available.' ); ?></p>
</div>
</div>
<div class="feature-section col three-col">
<div>
<h4><?php _e( 'Multisite Improvements' ); ?></h4>
<p><?php _e( '<code>switch_to_blog()</code> is now significantly faster and more reliable.' ); ?></p>
</div>
<div>
<h4><?php _e( 'XML-RPC API' ); ?></h4>
<p><?php printf( __( 'The <a href="%s">WordPress API</a> is now always enabled, and supports fetching users, editing profiles, managing post revisions, and searching posts.' ), __( 'http://codex.wordpress.org/XML-RPC_WordPress_API' ) ); ?></p>
</div>
<div class="last-feature">
<h4><?php _e( 'External Libraries' ); ?></h4>
<p><?php printf( __( 'WordPress now includes the <a href="%1$s">Underscore</a> and <a href="%2$s">Backbone</a> JavaScript libraries. TinyMCE, jQuery, jQuery UI, and SimplePie have all been updated to the latest versions.' ), 'http://underscorejs.org/', 'http://backbonejs.org/' ); ?></p>
</div>
</div>
</div>
<div class="return-to-dashboard">
<?php if ( current_user_can( 'update_core' ) && isset( $_GET['updated'] ) ) : ?>
<a href="<?php echo esc_url( self_admin_url( 'update-core.php' ) ); ?>"><?php
is_multisite() ? _e( 'Return to Updates' ) : _e( 'Return to Dashboard &rarr; Updates' );
?></a> |
<?php endif; ?>
<a href="<?php echo esc_url( self_admin_url() ); ?>"><?php
is_blog_admin() ? _e( 'Go to Dashboard &rarr; Home' ) : _e( 'Go to Dashboard' ); ?></a>
</div>
</div>
<?php
include( ABSPATH . 'wp-admin/admin-footer.php' );
// These are strings we may use to describe maintenance/security releases, where we aim for no new strings.
return;
_n_noop( 'Maintenance Release', 'Maintenance Releases' );
_n_noop( 'Security Release', 'Security Releases' );
_n_noop( 'Maintenance and Security Release', 'Maintenance and Security Releases' );
/* translators: 1: WordPress version number. */
_n_noop( '<strong>Version %1$s</strong> addressed a security issue.',
'<strong>Version %1$s</strong> addressed some security issues.' );
/* translators: 1: WordPress version number, 2: plural number of bugs. */
_n_noop( '<strong>Version %1$s</strong> addressed %2$s bug.',
'<strong>Version %1$s</strong> addressed %2$s bugs.' );
/* translators: 1: WordPress version number, 2: plural number of bugs. Singular security issue. */
_n_noop( '<strong>Version %1$s</strong> addressed a security issue and fixed %2$s bug.',
'<strong>Version %1$s</strong> addressed a security issue and fixed %2$s bugs.' );
/* translators: 1: WordPress version number, 2: plural number of bugs. More than one security issue. */
_n_noop( '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.' );
__( 'For more information, see <a href="%s">the release notes</a>.' );

File diff suppressed because it is too large Load Diff

View File

@ -15,21 +15,12 @@ if ( !defined('ABSPATH') )
<div class="clear"></div></div><!-- wpbody -->
<div class="clear"></div></div><!-- wpcontent -->
<div id="footer">
<div id="wpfooter">
<?php do_action( 'in_admin_footer' ); ?>
<p id="footer-left" class="alignleft"><?php
$upgrade = apply_filters( 'update_footer', '' );
$footer_text = array(
'<span id="footer-thankyou">' . __( 'Thank you for creating with <a href="http://wordpress.org/">WordPress</a>.' ) . '</span>',
__( '<a href="http://codex.wordpress.org/">Documentation</a>' ),
sprintf( __( '<a href="%s">Freedoms</a>' ), admin_url( 'freedoms.php' ) ),
__('<a href="http://wordpress.org/support/forum/4">Feedback</a>'),
sprintf(__('<a href="%s">Credits</a>'), admin_url('credits.php') ),
);
echo apply_filters( 'admin_footer_text', implode( ' &bull; ', $footer_text ) );
unset( $footer_text );
echo apply_filters( 'admin_footer_text', '<span id="footer-thankyou">' . __( 'Thank you for creating with <a href="http://wordpress.org/">WordPress</a>.' ) . '</span>' );
?></p>
<p id="footer-upgrade" class="alignright"><?php echo $upgrade; ?></p>
<p id="footer-upgrade" class="alignright"><?php echo apply_filters( 'update_footer', '' ); ?></p>
<div class="clear"></div>
</div>
<?php

View File

@ -13,4 +13,3 @@ _deprecated_file( basename(__FILE__), '2.5', 'wp-admin/includes/admin.php' );
/** WordPress Administration API: Includes all Administration functions. */
require_once(ABSPATH . 'wp-admin/includes/admin.php');
?>

View File

@ -10,6 +10,14 @@
if ( ! defined( 'WP_ADMIN' ) )
require_once( './admin.php' );
// In case admin-header.php is included in a function.
global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow, $wp_version,
$current_site, $update_title, $total_update_count, $parent_file;
// Catch plugins that include admin-header.php before admin.php completes.
if ( empty( $current_screen ) )
set_current_screen();
get_admin_page_title();
$title = esc_html( strip_tags( $title ) );
@ -29,47 +37,29 @@ $admin_title = apply_filters( 'admin_title', $admin_title, $title );
wp_user_settings();
_wp_admin_html_begin();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
<title><?php echo $admin_title; ?></title>
<?php
wp_admin_css( 'global' );
wp_admin_css();
wp_admin_css( 'colors' );
wp_admin_css( 'ie' );
if ( is_multisite() )
wp_admin_css( 'ms' );
wp_enqueue_style( 'colors' );
wp_enqueue_style( 'ie' );
wp_enqueue_script('utils');
$admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
?>
<script type="text/javascript">
//<![CDATA[
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
var userSettings = {
'url': '<?php echo SITECOOKIEPATH; ?>',
'uid': '<?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user->ID; ?>',
'time':'<?php echo time() ?>'
},
ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>',
var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>',
pagenow = '<?php echo $current_screen->id; ?>',
typenow = '<?php if ( isset($current_screen->post_type) ) echo $current_screen->post_type; ?>',
typenow = '<?php echo $current_screen->post_type; ?>',
adminpage = '<?php echo $admin_body_class; ?>',
thousandsSeparator = '<?php echo addslashes( $wp_locale->number_format['thousands_sep'] ); ?>',
decimalPoint = '<?php echo addslashes( $wp_locale->number_format['decimal_point'] ); ?>',
isRtl = <?php echo (int) is_rtl(); ?>;
//]]>
</script>
<?php
if ( in_array( $pagenow, array('post.php', 'post-new.php') ) ) {
wp_enqueue_script('quicktags');
}
do_action('admin_enqueue_scripts', $hook_suffix);
do_action("admin_print_styles-$hook_suffix");
do_action('admin_print_styles');
@ -81,130 +71,60 @@ do_action('admin_head');
if ( get_user_setting('mfold') == 'f' )
$admin_body_class .= ' folded';
if ( !get_user_setting('unfold') )
$admin_body_class .= ' auto-fold';
if ( is_admin_bar_showing() )
$admin_body_class .= ' admin-bar';
if ( is_rtl() )
$admin_body_class .= ' rtl';
$admin_body_class .= ' branch-' . str_replace( '.', '-', floatval( $wp_version ) );
$admin_body_class .= ' branch-' . str_replace( array( '.', ',' ), '-', floatval( $wp_version ) );
$admin_body_class .= ' version-' . str_replace( '.', '-', preg_replace( '/^([.0-9]+).*/', '$1', $wp_version ) );
$admin_body_class .= ' admin-color-' . sanitize_html_class( get_user_option( 'admin_color' ), 'fresh' );
$admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
if ( $is_iphone ) { ?>
<style type="text/css">.row-actions{visibility:visible;}</style>
<?php } ?>
if ( wp_is_mobile() )
$admin_body_class .= ' mobile';
$admin_body_class .= ' no-customize-support';
?>
</head>
<body class="wp-admin no-js <?php echo apply_filters( 'admin_body_class', '' ) . " $admin_body_class"; ?>">
<body class="wp-admin wp-core-ui no-js <?php echo apply_filters( 'admin_body_class', '' ) . " $admin_body_class"; ?>">
<script type="text/javascript">
//<![CDATA[
(function(){
var c = document.body.className;
c = c.replace(/no-js/, 'js');
document.body.className = c;
})();
//]]>
document.body.className = document.body.className.replace('no-js','js');
</script>
<?php
// If the customize-loader script is enqueued, make sure the customize
// body classes are correct as early as possible.
if ( wp_script_is( 'customize-loader', 'queue' ) && current_user_can( 'edit_theme_options' ) )
wp_customize_support_script();
?>
<div id="wpwrap">
<a tabindex="1" href="#wpbody-content" class="screen-reader-shortcut"><?php _e('Skip to main content'); ?></a>
<?php require(ABSPATH . 'wp-admin/menu-header.php'); ?>
<div id="wpcontent">
<div id="wphead">
<?php
if ( is_network_admin() )
$blog_name = sprintf( __('%s Network Admin'), esc_html($current_site->site_name) );
elseif ( is_user_admin() )
$blog_name = sprintf( __('%s Global Dashboard'), esc_html($current_site->site_name) );
else
$blog_name = get_bloginfo('name', 'display');
if ( '' == $blog_name ) {
$blog_name = __( 'Visit Site' );
} else {
$blog_name_excerpt = wp_html_excerpt($blog_name, 40);
if ( $blog_name != $blog_name_excerpt )
$blog_name_excerpt = trim($blog_name_excerpt) . '&hellip;';
$blog_name = $blog_name_excerpt;
unset($blog_name_excerpt);
}
$title_class = '';
if ( function_exists('mb_strlen') ) {
if ( mb_strlen($blog_name, 'UTF-8') > 30 )
$title_class = 'class="long-title"';
} else {
if ( strlen($blog_name) > 30 )
$title_class = 'class="long-title"';
}
?>
<img id="header-logo" src="<?php echo esc_url( includes_url( 'images/blank.gif' ) ); ?>" alt="" width="16" height="16" />
<h1 id="site-heading" <?php echo $title_class ?>>
<a href="<?php echo trailingslashit( get_bloginfo( 'url' ) ); ?>" title="<?php esc_attr_e('Visit Site') ?>">
<span id="site-title"><?php echo $blog_name ?></span>
</a>
</h1>
<?php
do_action('in_admin_header');
$links = array();
// Generate user profile and info links.
$links[5] = sprintf( __('Howdy, %1$s'), $user_identity );
$links[8] = '<a href="profile.php" title="' . esc_attr__('Edit your profile') . '">' . __('Your Profile') . '</a>';
if ( is_multisite() && is_super_admin() ) {
if ( !is_network_admin() )
$links[10] = '<a href="' . network_admin_url() . '" title="' . ( ! empty( $update_title ) ? $update_title : esc_attr__('Network Admin') ) . '">' . __('Network Admin') . ( ! empty( $total_update_count ) ? ' (' . number_format_i18n( $total_update_count ) . ')' : '' ) . '</a>';
else
$links[10] = '<a href="' . get_dashboard_url( get_current_user_id() ) . '" title="' . esc_attr__('Site Admin') . '">' . __('Site Admin') . '</a>';
}
$links[15] = '<a href="' . wp_logout_url() . '" title="' . esc_attr__('Log Out') . '">' . __('Log Out') . '</a>';
$links = apply_filters( 'admin_user_info_links', $links, $current_user );
ksort( $links );
// Trim whitespace and pipes from links, then convert to list items.
$links = array_map( 'trim', $links, array_fill( 0, count( $links ), " |\n\t" ) );
$howdy = array_shift( $links );
$links_no_js = implode( ' | ', $links );
$links_js = '<li>' . implode( '</li><li>', $links ) . '</li>';
?>
<div id="wphead-info">
<div id="user_info">
<p class="hide-if-js"><?php echo "$howdy | $links_no_js"; ?></p>
<div class="hide-if-no-js">
<p><?php echo $howdy; ?></p>
<div id="user_info_arrow"></div>
<div id="user_info_links_wrap"><div id="user_info_links">
<ul><?php echo $links_js; ?></ul>
</div></div>
</div>
</div>
</div>
</div>
<div id="wpbody">
<?php
unset($title_class, $blog_name, $total_update_count, $update_title);
$current_screen->parent_file = $parent_file;
$current_screen->parent_base = preg_replace('/\?.*$/', '', $parent_file);
$current_screen->parent_base = str_replace('.php', '', $current_screen->parent_base);
$current_screen->set_parentage( $parent_file );
?>
<div id="wpbody-content">
<div id="wpbody-content" aria-label="<?php esc_attr_e('Main content'); ?>" tabindex="0">
<?php
screen_meta($current_screen);
$current_screen->render_screen_meta();
if ( is_network_admin() )
do_action('network_admin_notices');

View File

@ -29,5 +29,3 @@ if ( !empty($_REQUEST['action']) )
$action .= '_' . $_REQUEST['action'];
do_action($action);
?>

View File

@ -12,16 +12,16 @@
* @since 2.3.2
*/
if ( ! defined('WP_ADMIN') )
define('WP_ADMIN', TRUE);
define('WP_ADMIN', true);
if ( ! defined('WP_NETWORK_ADMIN') )
define('WP_NETWORK_ADMIN', FALSE);
define('WP_NETWORK_ADMIN', false);
if ( ! defined('WP_USER_ADMIN') )
define('WP_USER_ADMIN', FALSE);
define('WP_USER_ADMIN', false);
if ( ! WP_NETWORK_ADMIN && ! WP_USER_ADMIN ) {
define('WP_BLOG_ADMIN', TRUE);
define('WP_BLOG_ADMIN', true);
}
if ( isset($_GET['import']) && !defined('WP_LOAD_IMPORTERS') )
@ -29,8 +29,10 @@ if ( isset($_GET['import']) && !defined('WP_LOAD_IMPORTERS') )
require_once(dirname(dirname(__FILE__)) . '/wp-load.php');
nocache_headers();
if ( get_option('db_upgraded') ) {
$wp_rewrite->flush_rules();
flush_rewrite_rules();
update_option( 'db_upgraded', false );
/**
@ -39,7 +41,7 @@ if ( get_option('db_upgraded') ) {
* @since 2.8
*/
do_action('after_db_upgrade');
} elseif ( get_option('db_version') != $wp_db_version ) {
} elseif ( get_option('db_version') != $wp_db_version && empty($_POST) ) {
if ( !is_multisite() ) {
wp_redirect(admin_url('upgrade.php?_wp_http_referer=' . urlencode(stripslashes($_SERVER['REQUEST_URI']))));
exit;
@ -51,6 +53,7 @@ if ( get_option('db_upgraded') ) {
* @since 2.8.4b
*/
$c = get_blog_count();
// If 50 or fewer sites, run every time. Else, run "about ten percent" of the time. Shh, don't check that math.
if ( $c <= 50 || ( $c > 50 && mt_rand( 0, (int)( $c / 50 ) ) == 1 ) ) {
require_once( ABSPATH . WPINC . '/http.php' );
$response = wp_remote_get( admin_url( 'upgrade.php?step=1' ), array( 'timeout' => 120, 'httpversion' => '1.1' ) );
@ -65,8 +68,6 @@ require_once(ABSPATH . 'wp-admin/includes/admin.php');
auth_redirect();
nocache_headers();
// Schedule trash collection
if ( !wp_next_scheduled('wp_scheduled_delete') && !defined('WP_INSTALLING') )
wp_schedule_event(time(), 'daily', 'wp_scheduled_delete');
@ -79,7 +80,6 @@ $time_format = get_option('time_format');
wp_reset_vars(array('profile', 'redirect', 'redirect_url', 'a', 'text', 'trackback', 'pingback'));
wp_enqueue_script( 'common' );
wp_enqueue_script( 'jquery-color' );
$editing = false;
@ -88,13 +88,13 @@ if ( isset($_GET['page']) ) {
$plugin_page = plugin_basename($plugin_page);
}
if ( isset($_GET['post_type']) )
$typenow = sanitize_key($_GET['post_type']);
if ( isset( $_REQUEST['post_type'] ) && post_type_exists( $_REQUEST['post_type'] ) )
$typenow = $_REQUEST['post_type'];
else
$typenow = '';
if ( isset($_GET['taxonomy']) )
$taxnow = sanitize_key($_GET['taxonomy']);
if ( isset( $_REQUEST['taxonomy'] ) && taxonomy_exists( $_REQUEST['taxonomy'] ) )
$taxnow = $_REQUEST['taxonomy'];
else
$taxnow = '';
@ -153,7 +153,6 @@ if ( isset($plugin_page) ) {
if ( validate_file($plugin_page) )
wp_die(__('Invalid plugin page'));
if ( !( file_exists(WP_PLUGIN_DIR . "/$plugin_page") && is_file(WP_PLUGIN_DIR . "/$plugin_page") ) && !( file_exists(WPMU_PLUGIN_DIR . "/$plugin_page") && is_file(WPMU_PLUGIN_DIR . "/$plugin_page") ) )
wp_die(sprintf(__('Cannot load %s.'), htmlentities($plugin_page)));
@ -183,15 +182,13 @@ if ( isset($plugin_page) ) {
exit;
}
// Allow plugins to define importers as well
if ( !isset($wp_importers) || !isset($wp_importers[$importer]) || ! is_callable($wp_importers[$importer][2])) {
if (! file_exists(ABSPATH . "wp-admin/import/$importer.php")) {
wp_redirect( admin_url( 'import.php?invalid=' . $importer ) );
exit;
}
include(ABSPATH . "wp-admin/import/$importer.php");
if ( ! isset($wp_importers[$importer]) || ! is_callable($wp_importers[$importer][2]) ) {
wp_redirect( admin_url( 'import.php?invalid=' . $importer ) );
exit;
}
do_action( 'load-importer-' . $importer );
$parent_file = 'tools.php';
$submenu_file = 'import.php';
$title = __('Import');
@ -211,8 +208,7 @@ if ( isset($plugin_page) ) {
include(ABSPATH . 'wp-admin/admin-footer.php');
// Make sure rules are flushed
global $wp_rewrite;
$wp_rewrite->flush_rules(false);
flush_rewrite_rules(false);
exit();
} else {
@ -234,5 +230,3 @@ if ( isset($plugin_page) ) {
if ( !empty($_REQUEST['action']) )
do_action('admin_action_' . $_REQUEST['action']);
?>

View File

@ -13,21 +13,35 @@ if ( defined('ABSPATH') )
else
require_once('../wp-load.php');
// Flash often fails to send cookies with the POST or upload, so we need to pass it in GET or POST instead
if ( is_ssl() && empty($_COOKIE[SECURE_AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
$_COOKIE[SECURE_AUTH_COOKIE] = $_REQUEST['auth_cookie'];
elseif ( empty($_COOKIE[AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
$_COOKIE[AUTH_COOKIE] = $_REQUEST['auth_cookie'];
if ( empty($_COOKIE[LOGGED_IN_COOKIE]) && !empty($_REQUEST['logged_in_cookie']) )
$_COOKIE[LOGGED_IN_COOKIE] = $_REQUEST['logged_in_cookie'];
unset($current_user);
require_once('./admin.php');
if ( ! ( isset( $_REQUEST['action'] ) && 'upload-attachment' == $_REQUEST['action'] ) ) {
// Flash often fails to send cookies with the POST or upload, so we need to pass it in GET or POST instead
if ( is_ssl() && empty($_COOKIE[SECURE_AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
$_COOKIE[SECURE_AUTH_COOKIE] = $_REQUEST['auth_cookie'];
elseif ( empty($_COOKIE[AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
$_COOKIE[AUTH_COOKIE] = $_REQUEST['auth_cookie'];
if ( empty($_COOKIE[LOGGED_IN_COOKIE]) && !empty($_REQUEST['logged_in_cookie']) )
$_COOKIE[LOGGED_IN_COOKIE] = $_REQUEST['logged_in_cookie'];
unset($current_user);
}
header('Content-Type: text/plain; charset=' . get_option('blog_charset'));
require_once('./admin.php');
if ( !current_user_can('upload_files') )
wp_die(__('You do not have permission to upload files.'));
header('Content-Type: text/html; charset=' . get_option('blog_charset'));
if ( isset( $_REQUEST['action'] ) && 'upload-attachment' === $_REQUEST['action'] ) {
define( 'DOING_AJAX', true );
include ABSPATH . 'wp-admin/includes/ajax-actions.php';
send_nosniff_header();
nocache_headers();
wp_ajax_upload_attachment();
die( '0' );
}
// just fetch the detail form for that attachment
if ( isset($_REQUEST['attachment_id']) && ($id = intval($_REQUEST['attachment_id'])) && $_REQUEST['fetch'] ) {
$post = get_post( $id );
@ -37,19 +51,36 @@ if ( isset($_REQUEST['attachment_id']) && ($id = intval($_REQUEST['attachment_id
if ( ! current_user_can( $post_type_object->cap->edit_post, $id ) )
wp_die( __( 'You are not allowed to edit this item.' ) );
if ( 2 == $_REQUEST['fetch'] ) {
add_filter('attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2);
echo get_media_item($id, array( 'send' => false, 'delete' => true ));
} else {
add_filter('attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2);
echo get_media_item($id);
switch ( $_REQUEST['fetch'] ) {
case 3 :
if ( $thumb_url = wp_get_attachment_image_src( $id, 'thumbnail', true ) )
echo '<img class="pinkynail" src="' . esc_url( $thumb_url[0] ) . '" alt="" />';
echo '<a class="edit-attachment" href="' . esc_url( get_edit_post_link( $id ) ) . '" target="_blank">' . _x( 'Edit', 'media item' ) . '</a>';
$title = $post->post_title ? $post->post_title : wp_basename( $post->guid ); // title shouldn't ever be empty, but use filename just in cas.e
echo '<div class="filename new"><span class="title">' . esc_html( wp_html_excerpt( $title, 60 ) ) . '</span></div>';
break;
case 2 :
add_filter('attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2);
echo get_media_item($id, array( 'send' => false, 'delete' => true ));
break;
default:
add_filter('attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2);
echo get_media_item($id);
break;
}
exit;
}
check_admin_referer('media-form');
$id = media_handle_upload('async-upload', $_REQUEST['post_id']);
$post_id = 0;
if ( isset( $_REQUEST['post_id'] ) ) {
$post_id = absint( $_REQUEST['post_id'] );
if ( ! get_post( $post_id ) || ! current_user_can( 'edit_post', $post_id ) )
$post_id = 0;
}
$id = media_handle_upload( 'async-upload', $post_id );
if ( is_wp_error($id) ) {
echo '<div class="error-div">
<a class="dismiss" href="#" onclick="jQuery(this).parents(\'div.media-item\').slideUp(200, function(){jQuery(this).remove();});">' . __('Dismiss') . '</a>
@ -66,5 +97,3 @@ if ( $_REQUEST['short'] ) {
$type = $_REQUEST['type'];
echo apply_filters("async_upload_{$type}", $id);
}
?>

View File

@ -45,8 +45,15 @@ switch( $action ) {
case 'editcomment' :
$title = __('Edit Comment');
add_contextual_help( $current_screen, '<p>' . __( 'You can edit the information left in a comment if needed. This is often useful when you notice that a commenter has made a typographical error.' ) . '</p>' .
'<p>' . __( 'You can also moderate the comment from this screen using the Status box, where you can also change the timestamp of the comment.' ) . '</p>' .
get_current_screen()->add_help_tab( array(
'id' => 'overview',
'title' => __('Overview'),
'content' =>
'<p>' . __( 'You can edit the information left in a comment if needed. This is often useful when you notice that a commenter has made a typographical error.' ) . '</p>' .
'<p>' . __( 'You can also moderate the comment from this screen using the Status box, where you can also change the timestamp of the comment.' ) . '</p>'
) );
get_current_screen()->set_help_sidebar(
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
'<p>' . __( '<a href="http://codex.wordpress.org/Administration_Screens#Comments" target="_blank">Documentation on Comments</a>' ) . '</p>' .
'<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
@ -58,7 +65,7 @@ case 'editcomment' :
$comment_id = absint( $_GET['c'] );
if ( !$comment = get_comment( $comment_id ) )
comment_footer_die( __('Oops, no comment with this ID.') . sprintf(' <a href="%s">'.__('Go back').'</a>!', 'javascript:history.go(-1)') );
comment_footer_die( __('Oops, no comment with this ID.') . sprintf(' <a href="%s">' . __('Go back') . '</a>.', 'javascript:history.go(-1)') );
if ( !current_user_can( 'edit_comment', $comment_id ) )
comment_footer_die( __('You are not allowed to edit this comment.') );
@ -212,7 +219,7 @@ case 'unapprovecomment' :
$noredir = isset($_REQUEST['noredir']);
if ( !$comment = get_comment($comment_id) )
comment_footer_die( __('Oops, no comment with this ID.') . sprintf(' <a href="%s">'.__('Go back').'</a>!', 'edit-comments.php') );
comment_footer_die( __('Oops, no comment with this ID.') . sprintf(' <a href="%s">' . __('Go back') . '</a>.', 'edit-comments.php') );
if ( !current_user_can( 'edit_comment', $comment->comment_ID ) )
comment_footer_die( __('You are not allowed to edit comments on this post.') );
@ -285,5 +292,3 @@ default:
} // end switch
include('./admin-footer.php');
?>

View File

@ -10,39 +10,6 @@
require_once( './admin.php' );
$title = __( 'Credits' );
$parent_file = 'index.php';
add_contextual_help($current_screen,
'<p>' . __('Each name or handle is a link to that person&#8217;s profile in the WordPress.org community directory.') . '</p>' .
'<p>' . __('You can register your own profile at <a href="http://wordpress.org/support/register.php" target="_blank">this link</a> to start contributing.') . '</p>' .
'<p>' . __('WordPress always needs more people to report bugs, patch bugs, test betas, work on UI design, translate strings, write documentation, and add questions/answers/suggestions to the Support Forums. Join in!') . '</p>' .
'<p><strong>' . __('For more information:') . '</strong></p>' .
'<p>' . __('<a href="http://codex.wordpress.org/Contributing_to_WordPress" target="_blank">Documentation on Contributing to WordPress</a>') . '</p>' .
'<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
);
add_action( 'admin_head', '_wp_credits_add_css' );
function _wp_credits_add_css() { ?>
<style type="text/css">
div.wrap { max-width: 750px }
h3.wp-people-group, p.wp-credits-list { clear: both; }
ul.compact { margin-bottom: 0 }
<?php if ( is_rtl() ) { ?>
ul.wp-people-group { margin-bottom: 30px; float: right; clear: both; }
li.wp-person { float: right; height: 70px; width: 220px; margin-left: 10px; }
li.wp-person img.gravatar { float: right; margin-left: 10px; margin-bottom: 10px; }
<?php } else { ?>
li.wp-person { float: left; margin-right: 10px; }
li.wp-person img.gravatar { float: left; margin-right: 10px; margin-bottom: 10px; }
<?php } ?>
li.wp-person img.gravatar { width: 60px; height: 60px; }
ul.compact li.wp-person img.gravatar { width: 30px; height: 30px; }
li.wp-person { height: 70px; width: 220px; }
ul.compact li.wp-person { height: 40px; width: auto; white-space: nowrap }
li.wp-person a.web { font-size: 16px; text-decoration: none; }
</style>
<?php }
function wp_credits() {
global $wp_version;
@ -50,7 +17,9 @@ function wp_credits() {
$results = get_site_transient( 'wordpress_credits_' . $locale );
if ( ! is_array( $results ) ) {
if ( ! is_array( $results )
|| ( isset( $results['data']['version'] ) && strpos( $wp_version, $results['data']['version'] ) !== 0 )
) {
$response = wp_remote_get( "http://api.wordpress.org/core/credits/1.0/?version=$wp_version&locale=$locale" );
if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) )
@ -61,7 +30,7 @@ function wp_credits() {
if ( ! is_array( $results ) )
return false;
set_site_transient( 'wordpress_credits_' . $locale, $results, 86400 ); // One day
set_site_transient( 'wordpress_credits_' . $locale, $results, DAY_IN_SECONDS );
}
return $results;
@ -75,26 +44,42 @@ function _wp_credits_build_object_link( &$data ) {
$data = '<a href="' . esc_url( $data[1] ) . '">' . $data[0] . '</a>';
}
include( './admin-header.php' );
list( $display_version ) = explode( '-', $wp_version );
include( ABSPATH . 'wp-admin/admin-header.php' );
?>
<div class="wrap">
<?php screen_icon(); ?>
<h2><?php _e( 'WordPress Credits' ); ?></h2>
<div class="wrap about-wrap">
<h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
<div class="about-text"><?php printf( __( 'Thank you for updating to the latest version! WordPress %s is more polished and enjoyable than ever before. We hope you like it.' ), $display_version ); ?></div>
<div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
<h2 class="nav-tab-wrapper">
<a href="about.php" class="nav-tab">
<?php _e( 'What&#8217;s New' ); ?>
</a><a href="credits.php" class="nav-tab nav-tab-active">
<?php _e( 'Credits' ); ?>
</a><a href="freedoms.php" class="nav-tab">
<?php _e( 'Freedoms' ); ?>
</a>
</h2>
<?php
$credits = wp_credits();
if ( ! $credits ) {
echo '<p>' . sprintf( __( 'WordPress is created by a <a href="%1$s">worldwide team</a> of passionate individuals. <a href="%2$s">Get involved in WordPress</a>.' ),
echo '<p class="about-description">' . sprintf( __( 'WordPress is created by a <a href="%1$s">worldwide team</a> of passionate individuals. <a href="%2$s">Get involved in WordPress</a>.' ),
'http://wordpress.org/about/',
/* translators: Url to the codex documentation on contributing to WordPress used on the credits page */
__( 'http://codex.wordpress.org/Contributing_to_WordPress' ) ) . '</p>';
include( './admin-footer.php' );
include( ABSPATH . 'wp-admin/admin-footer.php' );
exit;
}
echo '<p>' . __( 'WordPress is created by a worldwide team of passionate individuals. We couldn&#8217;t possibly list them all, but here some of the most influential people currently involved with the project:' ) . "</p>\n";
echo '<p class="about-description">' . __( 'WordPress is created by a worldwide team of passionate individuals.' ) . "</p>\n";
$gravatar = is_ssl() ? 'https://secure.gravatar.com/avatar/' : 'http://0.gravatar.com/avatar/';
@ -109,7 +94,7 @@ foreach ( $credits['groups'] as $group_slug => $group_data ) {
$title = translate( $group_data['name'] );
}
echo '<h3 class="wp-people-group">' . $title . "</h3>\n";
echo '<h4 class="wp-people-group">' . $title . "</h4>\n";
}
if ( ! empty( $group_data['shuffle'] ) )
@ -135,7 +120,7 @@ foreach ( $credits['groups'] as $group_slug => $group_data ) {
echo '<img src="' . $gravatar . $person_data[1] . '?s=' . $size . '" class="gravatar" alt="' . esc_attr( $person_data[0] ) . '" /></a>' . "\n\t";
echo '<a class="web" href="' . sprintf( $credits['data']['profiles'], $person_data[2] ) . '">' . $person_data[0] . "</a>\n\t";
if ( ! $compact )
echo '<br /><span class="title">' . translate( $person_data[3] ) . "</span>\n";
echo '<span class="title">' . translate( $person_data[3] ) . "</span>\n";
echo "</li>\n";
}
echo "</ul>\n";
@ -151,18 +136,21 @@ foreach ( $credits['groups'] as $group_slug => $group_data ) {
</div>
<?php
include( './admin-footer.php' );
include( ABSPATH . 'wp-admin/admin-footer.php' );
return;
// These are strings returned by the API that we want to be translatable
__( 'Project Leaders' );
__( 'Extended Core Team' );
__( 'Core Developers' );
__( 'Recent Rockstars' );
__( 'Core Contributors to WordPress %s' );
__( 'Contributing Developers' );
__( 'Cofounder, Project Lead' );
__( 'Lead Developer' );
__( 'User Experience Lead' );
__( 'Core Developer' );
__( 'Core Committer' );
__( 'Guest Committer' );
__( 'Developer' );
@ -171,6 +159,3 @@ __( 'XML-RPC' );
__( 'Internationalization' );
__( 'External Libraries' );
__( 'Icon Design' );
__( 'Blue Color Scheme' );
?>

View File

@ -0,0 +1,27 @@
.wp-color-result {
margin: 0 0 6px 6px;
padding-left: 0;
padding-right: 30px;
}
.wp-color-result:after {
border-radius: 0 0 1px 1px;
border-left: 0;
border-right: 1px solid #bbb;
left: auto;
right: 0;
}
.wp-color-result:hover {
border-color: #aaa;
}
.wp-color-result:hover:after {
border-left: 0;
border-right: 1px solid #999;
}
.wp-picker-container .button {
margin-left: 0;
margin-right: 6px;
}

View File

@ -0,0 +1 @@
.wp-color-result{margin:0 0 6px 6px;padding-left:0;padding-right:30px}.wp-color-result:after{border-radius:0 0 1px 1px;border-left:0;border-right:1px solid #bbb;left:auto;right:0}.wp-color-result:hover{border-color:#aaa}.wp-color-result:hover:after{border-left:0;border-right:1px solid #999}.wp-picker-container .button{margin-left:0;margin-right:6px}

View File

@ -0,0 +1,107 @@
.wp-color-picker {
width: 80px;
}
.wp-picker-container .hidden {
display: none;
}
.wp-color-result {
background-color: #f9f9f9;
border: 1px solid #bbb;
border-radius: 2px;
cursor: pointer;
display: inline-block;
height: 22px;
margin: 0 6px 6px 0px;
position: relative;
top: 1px;
user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-webkit-user-select: none;
vertical-align: bottom;
display: inline-block;
padding-left: 30px;
}
.wp-color-result:after {
background: #f3f3f3;
background-image: -webkit-gradient(linear, left top, left bottom, from(#fefefe), to(#f4f4f4));
background-image: -webkit-linear-gradient(top, #fefefe, #f4f4f4);
background-image: -moz-linear-gradient(top, #fefefe, #f4f4f4);
background-image: -o-linear-gradient(top, #fefefe, #f4f4f4);
background-image: linear-gradient(to bottom, #fefefe, #f4f4f4);
color: #333;
text-shadow: 0 1px 0 #fff;
border-radius: 0 1px 1px 0;
border-left: 1px solid #bbb;
content: attr( title );
display: block;
font-size: 11px;
line-height: 22px;
padding: 0 6px;
position: relative;
right: 0;
text-align: center;
top: 0;
}
.wp-color-result:hover {
border-color: #aaa;
-webkit-box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.2 );
box-shadow: 0 1px 1px rgba( 0, 0, 0, 0.1 );
}
.wp-color-result:hover:after {
color: #222;
border-color: #aaa;
border-left: 1px solid #999;
}
.wp-color-result.wp-picker-open {
top: 0;
}
.wp-color-result.wp-picker-open:after {
content: attr( data-current );
}
.wp-picker-container, .wp-picker-container:active {
display: inline-block;
outline: 0;
}
.wp-color-result:focus {
border-color: #888;
-webkit-box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.2 );
box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.2 );
}
.wp-color-result:focus:after {
border-color: #888;
}
.wp-picker-open + .wp-picker-input-wrap {
display: inline-block;
vertical-align: top;
}
.wp-picker-container .button {
margin-left: 6px;
}
.wp-picker-container .iris-square-slider .ui-slider-handle:focus {
background-color: #555
}
.wp-picker-container .iris-picker {
border-color: #dfdfdf;
margin-top: 6px;
}
input[type="text"].iris-error {
background-color: #ffebe8;
border-color: #c00;
color: #000;
}

1
src/wp-admin/css/color-picker.min.css vendored Normal file
View File

@ -0,0 +1 @@
.wp-color-picker{width:80px}.wp-picker-container .hidden{display:none}.wp-color-result{background-color:#f9f9f9;border:1px solid #bbb;border-radius:2px;cursor:pointer;display:inline-block;height:22px;margin:0 6px 6px 0;position:relative;top:1px;user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;vertical-align:bottom;display:inline-block;padding-left:30px}.wp-color-result:after{background:#f3f3f3;background-image:-webkit-gradient(linear,left top,left bottom,from(#fefefe),to(#f4f4f4));background-image:-webkit-linear-gradient(top,#fefefe,#f4f4f4);background-image:-moz-linear-gradient(top,#fefefe,#f4f4f4);background-image:-o-linear-gradient(top,#fefefe,#f4f4f4);background-image:linear-gradient(to bottom,#fefefe,#f4f4f4);color:#333;text-shadow:0 1px 0 #fff;border-radius:0 1px 1px 0;border-left:1px solid #bbb;content:attr(title);display:block;font-size:11px;line-height:22px;padding:0 6px;position:relative;right:0;text-align:center;top:0}.wp-color-result:hover{border-color:#aaa;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.2);box-shadow:0 1px 1px rgba(0,0,0,0.1)}.wp-color-result:hover:after{color:#222;border-color:#aaa;border-left:1px solid #999}.wp-color-result.wp-picker-open{top:0}.wp-color-result.wp-picker-open:after{content:attr(data-current)}.wp-picker-container,.wp-picker-container:active{display:inline-block;outline:0}.wp-color-result:focus{border-color:#888;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.2);box-shadow:0 1px 2px rgba(0,0,0,0.2)}.wp-color-result:focus:after{border-color:#888}.wp-picker-open+.wp-picker-input-wrap{display:inline-block;vertical-align:top}.wp-picker-container .button{margin-left:6px}.wp-picker-container .iris-square-slider .ui-slider-handle:focus{background-color:#555}.wp-picker-container .iris-picker{border-color:#dfdfdf;margin-top:6px}input[type="text"].iris-error{background-color:#ffebe8;border-color:#c00;color:#000}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
src/wp-admin/css/colors-fresh.min.css vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,85 @@
.control-section .customize-section-title {
font-family: Tahoma, Arial, sans-serif;
}
.customize-section-title:after {
right: auto;
left: 20px;
}
#customize-header-actions .button-primary {
float: left;
}
#customize-header-actions .spinner {
float: left;
margin-right: 0;
margin-left: 4px;
}
.customize-control {
float: right;
}
.customize-control-radio input,
.customize-control-checkbox input {
margin-right: 0;
margin-left: 5px;
}
/*
* Dropdowns
*/
.customize-section .dropdown {
float: right;
}
.customize-section .dropdown-content {
float: right;
margin-right: 0px;
margin-left: 16px;
-webkit-border-radius: 0 3px 3px 0;
border-radius: 0 3px 3px 0;
}
.customize-control .dropdown-arrow {
right: auto;
left: 0;
border-color: #ccc;
border-style: solid;
border-width: 1px 0 1px 1px;
-webkit-border-radius: 3px 0 0 3px;
border-radius: 3px 0 0 3px;
}
.customize-control .dropdown-arrow:after {
right: auto;
left: 4px;
}
/*
* Color Picker
*/
.customize-control-color .dropdown {
margin-right: 0;
margin-left: 5px;
}
.customize-section input[type="text"].color-picker-hex {
float: right;
}
/*
* Image Picker
*/
.customize-section .customize-control-image .actions {
text-align: left;
}
.customize-control-image .library,
.customize-control-image .actions,
.customize-section .customize-control-image .library ul,
.customize-section .customize-control-image .library li,
.customize-section .customize-control-image .library-content {
float: right;
}

View File

@ -0,0 +1 @@
.control-section .customize-section-title{font-family:Tahoma,Arial,sans-serif}.customize-section-title:after{right:auto;left:20px}#customize-header-actions .button-primary{float:left}#customize-header-actions .spinner{float:left;margin-right:0;margin-left:4px}.customize-control{float:right}.customize-control-radio input,.customize-control-checkbox input{margin-right:0;margin-left:5px}.customize-section .dropdown{float:right}.customize-section .dropdown-content{float:right;margin-right:0;margin-left:16px;-webkit-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.customize-control .dropdown-arrow{right:auto;left:0;border-color:#ccc;border-style:solid;border-width:1px 0 1px 1px;-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.customize-control .dropdown-arrow:after{right:auto;left:4px}.customize-control-color .dropdown{margin-right:0;margin-left:5px}.customize-section input[type="text"].color-picker-hex{float:right}.customize-section .customize-control-image .actions{text-align:left}.customize-control-image .library,.customize-control-image .actions,.customize-section .customize-control-image .library ul,.customize-section .customize-control-image .library li,.customize-section .customize-control-image .library-content{float:right}

View File

@ -0,0 +1,527 @@
body {
overflow: hidden;
}
#customize-controls a {
text-decoration: none;
}
.customize-section {
border-top: 1px solid #fff;
border-bottom: 1px solid #dfdfdf;
margin: 0;
}
.control-section.customize-section:hover,
.control-section.customize-section.open {
border-top-color: #808080;
}
.control-section.customize-section:hover {
border-bottom-color: #6d6d6d;
}
.customize-section.open:hover {
border-bottom-color: #dfdfdf;
}
.customize-section:last-child {
box-shadow: 0 1px 0 0px #fff;
}
.customize-section-title {
margin: 0;
padding: 15px 20px;
position: relative;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
.customize-section-title:focus {
outline: none;
}
.cannot-expand .customize-section-title {
cursor: auto;
}
.customize-section-content {
display: none;
padding: 10px 20px 15px;
overflow: hidden;
}
.control-section .customize-section-title {
padding: 10px 20px;
font-size: 15px;
font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
font-weight: normal;
text-shadow: 0 1px 0 #fff;
background: #f5f5f5;
background-image: -webkit-gradient(linear, left bottom, left top, from(#eee), to(#f5f5f5));
background-image: -webkit-linear-gradient(bottom, #eee, #f5f5f5);
background-image: -moz-linear-gradient(bottom, #eee, #f5f5f5);
background-image: -o-linear-gradient(bottom, #eee, #f5f5f5);
background-image: linear-gradient(to top, #eee, #f5f5f5);
}
.control-section:hover .customize-section-title,
.control-section .customize-section-title:hover,
.control-section.open .customize-section-title,
.control-section .customize-section-title:focus {
color: #fff;
text-shadow: 0 -1px 0 #333;
background: #808080;
background-image: -webkit-gradient(linear, left bottom, left top, from(#6d6d6d), to(#808080));
background-image: -webkit-linear-gradient(bottom, #6d6d6d, #808080);
background-image: -moz-linear-gradient(bottom, #6d6d6d, #808080);
background-image: -o-linear-gradient(bottom, #6d6d6d, #808080);
background-image: linear-gradient(to top, #6d6d6d, #808080);
}
.control-section.open .customize-section-title {
border-bottom: 1px solid #6d6d6d;
}
.customize-section.open .customize-section-content {
display: block;
background: #fdfdfd;
}
.customize-section-title:after {
content: '';
width: 0;
height: 0;
border-color: #ccc transparent;
border-style: solid;
border-width: 6px 6px 0;
position: absolute;
top: 25px;
right: 20px;
z-index: 1;
}
.cannot-expand .customize-section-title:after {
display: none;
}
.customize-section-title:hover:after,
.customize-section-title:focus:after {
border-color: #aaa transparent;
}
.control-section .customize-section-title:hover:after,
.control-section .customize-section-title:focus:after {
border-color: #eee transparent;
}
.control-section .customize-section-title:after {
top: 15px;
}
#customize-info .customize-section-content {
background: transparent;
}
#customize-info .preview-notice {
font-size: 13px;
line-height: 24px;
color: #999;
}
#customize-info .theme-name {
font-size: 20px;
font-weight: 200;
line-height: 24px;
color: #333;
display: block;
text-shadow: 0 1px 0 #fff;
}
#customize-info .theme-screenshot {
width: 258px;
border: 1px solid #ccc;
}
#customize-info .theme-description {
margin-top: 1em;
color: #777;
line-height: 20px;
}
#customize-controls .submit {
text-align: center;
}
#customize-theme-controls > ul,
#customize-theme-controls .customize-section-content {
margin: 0;
}
#customize-header-actions .button-primary {
float: right;
margin-top: 10px;
}
#customize-header-actions .spinner {
margin-top: 16px;
margin-right: 4px;
}
.saving #customize-header-actions .spinner {
display: block;
}
.customize-control {
width: 100%;
float: left;
clear: both;
margin-bottom: 8px;
}
.customize-control-title {
display: block;
line-height: 24px;
font-weight: bold;
}
.customize-control select,
.customize-control input[type="text"],
.customize-control input[type="radio"],
.customize-control input[type="checkbox"],
.customize-control-color .color-picker,
.customize-control-checkbox label,
.customize-control-upload div {
line-height: 28px;
}
.customize-control input[type="text"] {
width: 98%;
line-height: 18px;
margin: 0;
}
.customize-control select {
min-width: 50%;
max-width: 100%;
height: 28px;
line-height: 28px;
}
.customize-control-checkbox input {
margin-right: 5px;
}
.customize-control-radio {
padding: 5px 0 10px;
}
.customize-control-radio .customize-control-title {
margin-bottom: 0;
line-height: 22px;
}
.customize-control-radio label {
line-height: 20px;
}
.customize-control-radio input {
margin-right: 5px;
}
#customize-preview iframe {
width: 100%;
height: 100%;
}
/*
* Style for custom settings
*/
/*
* Dropdowns
*/
.customize-section .dropdown {
float: left;
display: block;
position: relative;
cursor: pointer;
-webkit-border-radius: 3px;
border-radius: 3px;
}
.customize-section .dropdown-content {
overflow: hidden;
float: left;
min-width: 30px;
height: 16px;
line-height: 16px;
margin-right: 16px;
padding: 4px 5px;
background-color: #eee;
border: 1px solid #ccc;
-webkit-border-radius: 3px 0 0 3px;
border-radius: 3px 0 0 3px;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
.customize-control .dropdown-arrow {
position: absolute;
top: 0;
bottom: 0;
right: 0;
width: 15px;
border-color: #ccc;
border-style: solid;
border-width: 1px 1px 1px 0;
-webkit-border-radius: 0 3px 3px 0;
border-radius: 0 3px 3px 0;
}
.customize-control .dropdown-arrow:after {
content: '';
width: 0;
height: 0;
border-color: #ccc transparent;
border-style: solid;
border-width: 4px 4px 0 4px;
position: absolute;
top: 50%;
margin-top: -1px;
right: 4px;
z-index: 1;
}
.customize-section .dropdown:hover .dropdown-content,
.customize-control .dropdown:hover .dropdown-arrow {
border-color: #aaa;
}
.customize-section .dropdown:hover .dropdown-arrow:after {
border-color: #aaa transparent;
}
.customize-control .dropdown-status {
display: none;
max-width: 112px;
color: #777;
}
/*
* Color Picker
*/
.customize-control-color .color-picker-hex {
display: none;
}
.customize-control-color.open .color-picker-hex {
display: block;
}
.customize-control-color .dropdown {
margin-right: 5px;
margin-bottom: 5px;
}
.customize-control-color .dropdown .dropdown-content {
background-color: #fff;
border: 1px solid rgba( 0, 0, 0, 0.15 );
}
.customize-control-color .dropdown:hover .dropdown-content {
border-color: rgba( 0, 0, 0, 0.25 );
}
.customize-section input[type="text"].color-picker-hex {
width: 65px;
font-family: monospace;
text-align: center;
line-height: 16px;
}
/* The centered cursor overlaps the placeholder in webkit. Hide it when selected. */
.customize-section input[type="text"].color-picker-hex:focus::-webkit-input-placeholder {
color: transparent;
}
.customize-section input[type="text"].color-picker-hex:-moz-placeholder {
color: #999;
}
/*
* Image Picker
*/
.customize-control-image .library,
.customize-control-image .actions {
display: none;
float: left;
width: 100%;
}
.customize-control-image.open .library,
.customize-control-image.open .actions {
display: block;
}
.customize-section .customize-control-image .dropdown-content {
height: auto;
min-height: 24px;
min-width: 40px;
padding: 0;
}
.customize-section .customize-control-image .dropdown-status {
padding: 4px 5px;
}
.customize-section .customize-control-image .preview-thumbnail img {
display: block;
width: 100%;
max-width: 122px;
max-height: 98px;
margin: 0 auto;
}
.customize-section .customize-control-image .actions {
text-align: right;
}
.customize-section .customize-control-image .library ul {
border-bottom: 1px solid #dfdfdf;
float: left;
width: 100%;
margin: 10px 0 0;
}
.customize-section .customize-control-image .library li {
color: #999;
float: left;
padding: 3px 5px;
margin: 0;
border-style: solid;
border-color: transparent;
border-width: 1px 1px 0 1px;
}
.customize-section .customize-control-image .library li.library-selected {
margin-bottom: -1px;
padding-bottom: 4px;
color: #777;
background: #fdfdfd;
border-color: #dfdfdf;
-webkit-border-radius: 3px 3px 0 0;
border-radius: 3px 3px 0 0 ;
}
.customize-section .customize-control-image .library-content {
display: none;
width: 100%;
float: left;
padding: 10px 0;
}
.customize-section .customize-control-image .library-content.library-selected {
display: block;
}
.customize-section .customize-control-image .library .thumbnail {
display: block;
width: 100%;
}
.customize-section .customize-control-image .library .thumbnail:hover img {
border-color: #21759b;
}
.customize-section .customize-control-image .library .thumbnail img {
display: block;
max-width: 90%;
max-height: 80px;
margin: 5px auto;
padding: 4px;
background: #fff;
border: 1px solid #dfdfdf;
}
.customize-section .customize-control-upload .upload-fallback,
.customize-section .customize-control-image .upload-fallback {
display: none;
}
.customize-section .customize-control-upload .upload-dropzone,
.customize-section .customize-control-image .upload-dropzone {
display: none;
padding: 15px 10px;
border: 3px dashed #dfdfdf;
margin: 5px auto;
text-align: center;
color: #777;
position: relative;
cursor: default;
}
.customize-section .customize-control-upload .upload-dropzone.supports-drag-drop,
.customize-section .customize-control-image .upload-dropzone.supports-drag-drop {
display: block;
-webkit-transition: border-color 0.1s;
-moz-transition: border-color 0.1s;
-ms-transition: border-color 0.1s;
-o-transition: border-color 0.1s;
transition: border-color 0.1s;
}
.customize-section .customize-control-upload .library ul li,
.customize-section .customize-control-image .library ul li {
cursor: pointer;
}
.customize-section .customize-control-upload .upload-dropzone.supports-drag-drop.drag-over,
.customize-section .customize-control-image .upload-dropzone.supports-drag-drop.drag-over {
border-color: #83b4d8;
}
/**
* iOS can't scroll iframes,
* instead it expands the iframe size to match the size of the content
*/
.ios .wp-full-overlay {
position: relative;
}
.ios #customize-preview {
position: relative;
}
.ios #customize-controls .wp-full-overlay-sidebar-content {
-webkit-overflow-scrolling: touch;
}
/**
* Handle cheaters.
*/
body.cheatin {
min-width: 0;
background: #f9f9f9;
padding: 50px;
}
body.cheatin p {
max-width: 700px;
margin: 0 auto;
padding: 2em;
font-size: 14px;
background: #fff;
border: 1px solid #dfdfdf;
-webkit-border-radius: 3px;
border-radius: 3px;
}

File diff suppressed because one or more lines are too long

View File

@ -1,32 +1,52 @@
.farbtastic {
position: relative;
}
.farbtastic * {
position: absolute;
cursor: crosshair;
}
.farbtastic, .farbtastic .wheel {
.farbtastic,
.farbtastic .wheel {
width: 195px;
height: 195px;
}
.farbtastic .color, .farbtastic .overlay {
.farbtastic .color,
.farbtastic .overlay {
top: 47px;
left: 47px;
width: 101px;
height: 101px;
}
.farbtastic .wheel {
background: url(../images/wheel.png) no-repeat;
width: 195px;
height: 195px;
}
.farbtastic .overlay {
background: url(../images/mask.png) no-repeat;
}
.farbtastic .marker {
width: 17px;
height: 17px;
margin: -8px 0 0 -8px;
overflow: hidden;
background: url(../images/marker.png) no-repeat;
}
}
/* farbtastic-rtl */
.rtl .farbtastic .color,
.rtl .farbtastic .overlay {
left: 0;
right: 47px;
}
.rtl .farbtastic .marker {
margin: -8px -8px 0 0;
}

View File

@ -1 +1,240 @@
html{direction:ltr;}body{direction:rtl;}* html #wpcontent #adminmenu .wp-has-submenu .wp-menu-toggle{background:url(../images/menu-bits-rtl.gif?ver=20100531) no-repeat scroll right -109px;}* html #wpcontent #adminmenu li.wp-has-current-submenu .wp-menu-toggle{background:url(../images/menu-bits-rtl.gif?ver=20100531) no-repeat scroll right -206px;}* html #adminmenu{margin-left:0;margin-right:-80px;}* html div.folded #adminmenu{margin-left:0;margin-right:-22px;}#wpcontent #adminmenu .wp-submenu li.wp-submenu-head{padding:3px 10px 4px 4px;}.inline-edit-row fieldset label span.title{float:right;}.inline-edit-row fieldset label span.input-text-wrap{margin-right:0;}p.search-box{float:left;}* html #poststuff h2{margin-right:0;}#bh{margin:7px 10px 0 0;float:left;}#user_info+div#favorite-actions{right:auto;left:15px;}#wphead-info{float:left;}div#dashboard-widgets{padding-right:0;padding-left:1px;}.tagchecklist span a{margin:4px -9px 0 0;}.widefat th input{margin:0 5px 0 0;}#TB_window{width:670px;position:absolute;top:50%;left:50%;margin-right:335px!important;}#dashboard_plugins{direction:ltr;}#dashboard_plugins h3.hndle{direction:rtl;}#dashboard_incoming_links ul li,#dashboard_secondary ul li,#dashboard_primary ul li,p.row-actions{width:100%;}#favorite-inside{position:absolute;right:0;}#post-status-info{height:25px;}#screen-meta{position:static;}p.submit{height:22px;}.inner-sidebar{position:static;}form#widgets-filter{position:static;}* html .meta-box-sortables .postbox .handlediv{background:transparent url(../images/menu-bits-rtl-vs.gif) no-repeat scroll right -111px;}.menu-max-depth-0 #menu-management{width:460px;}.menu-max-depth-1 #menu-management{width:490px;}.menu-max-depth-2 #menu-management{width:520px;}.menu-max-depth-3 #menu-management{width:550px;}.menu-max-depth-4 #menu-management{width:580px;}.menu-max-depth-5 #menu-management{width:610px;}.menu-max-depth-6 #menu-management{width:640px;}.menu-max-depth-7 #menu-management{width:670px;}.menu-max-depth-8 #menu-management{width:700px;}.menu-max-depth-9 #menu-management{width:730px;}.menu-max-depth-10 #menu-management{width:760px;}.menu-max-depth-11 #menu-management{width:790px;}.menu-item-depth-0{margin-left:0;}.menu-item-depth-1{margin-left:-30px;}.menu-item-depth-2{margin-left:-60px;}.menu-item-depth-3{margin-left:-90px;}.menu-item-depth-4{margin-left:-120px;}.menu-item-depth-5{margin-left:-150px;}.menu-item-depth-6{margin-left:-180px;}.menu-item-depth-7{margin-left:-210px;}.menu-item-depth-8{margin-left:-240px;}.menu-item-depth-9{margin-left:-270px;}.menu-item-depth-10{margin-left:-300px;}.menu-item-depth-11{margin-left:-330px;}#menu-to-edit li dl{padding:0!important;margin:0!important;}.ui-sortable-helper .menu-item-transport{margin-top:13px;}.ui-sortable-helper .menu-item-transport .menu-item-transport{margin-top:0;}.sortable-placeholder{margin-top:0!important;margin-left:0!important;margin-bottom:13px!important;padding:0!important;}.auto-add-pages{clear:both;float:none;}#nav-menus-frame .open-label span{float:none;display:inline-block;}#nav-menus-frame .delete-action{float:none;}
body {
direction: rtl;
width: 99.5%;
}
.rtl #adminmenuback {
left: auto;
right: 0;
background-image: none;
}
.rtl #adminmenuback,
.rtl #adminmenuwrap {
border-width: 0 0 0 1px;
}
#plupload-upload-ui {
zoom: 1;
}
.post-com-count-wrapper a.post-com-count {
float: none;
}
#adminmenu .wp-submenu ul {
width: 99%;
}
#adminmenu .wp-submenu .wp-submenu .wp-submenu,
#adminmenu .wp-menu-open .wp-submenu .wp-submenu {
border: 1px solid #dfdfdf;
}
.folded #adminmenu .wp-submenu {
right: 30px;
}
#wpcontent #adminmenu .wp-submenu li.wp-submenu-head {
padding: 3px 10px 4px 4px;
}
div.quicktags-toolbar input {
min-width: 0;
}
.inline-edit-row fieldset label span.title {
float: right;
}
.inline-edit-row fieldset label span.input-text-wrap {
margin-right: 0;
}
p.search-box {
float: left;
}
#bh {
margin: 7px 10px 0 0;
float: left;
}
.postbox div.inside,
.wp-editor-wrap .wp-editor-container .wp-editor-area,
#nav-menu-theme-locations .howto select {
width: 97.5%;
}
/* without this dashboard widgets appear in one column for some screen widths */
div#dashboard-widgets {
padding-right: 0;
padding-left: 1px;
}
.tagchecklist span a {
margin: 4px -9px 0 0;
}
.widefat th input {
margin: 0 5px 0 0;
}
/* ---------- add by navid */
#TB_window {
width: 670px;
position: absolute;
top: 50%;
left: 50%;
margin-right: 335px !important;
}
#dashboard_plugins {
direction: ltr;
}
#dashboard_plugins h3.hndle {
direction: rtl;
}
#dashboard_incoming_links ul li,
#dashboard_secondary ul li,
#dashboard_primary ul li,
p.row-actions {
width: 100%;
}
#post-status-info {
height: 25px;
}
p.submit { /* quick edit and reply in edit-comments.php */
height:22px;
}
.available-theme .action-links li {
padding-left: 7px;
margin-left: 7px;
}
form#widgets-filter { /* fix widget page */
position: static;
}
/* nav menus
.menu-max-depth-0 #menu-management { width: 460px; }
.menu-max-depth-1 #menu-management { width: 490px; }
.menu-max-depth-2 #menu-management { width: 520px; }
.menu-max-depth-3 #menu-management { width: 550px; }
.menu-max-depth-4 #menu-management { width: 580px; }
.menu-max-depth-5 #menu-management { width: 610px; }
.menu-max-depth-6 #menu-management { width: 640px; }
.menu-max-depth-7 #menu-management { width: 670px; }
.menu-max-depth-8 #menu-management { width: 700px; }
.menu-max-depth-9 #menu-management { width: 730px; }
.menu-max-depth-10 #menu-management { width: 760px; }
.menu-max-depth-11 #menu-management { width: 790px; }
*/
.menu-item-depth-0 { margin-left: 0px; }
.menu-item-depth-1 { margin-left: -30px; }
.menu-item-depth-2 { margin-left: -60px; }
.menu-item-depth-3 { margin-left: -90px; }
.menu-item-depth-4 { margin-left: -120px; }
.menu-item-depth-5 { margin-left: -150px; }
.menu-item-depth-6 { margin-left: -180px; }
.menu-item-depth-7 { margin-left: -210px; }
.menu-item-depth-8 { margin-left: -240px; }
.menu-item-depth-9 { margin-left: -270px; }
.menu-item-depth-10 { margin-left: -300px; }
.menu-item-depth-11 { margin-left: -330px; }
/*
#menu-to-edit li dl {
padding: 0 !important;
margin: 0 !important;
}
.ui-sortable-helper .menu-item-transport {
margin-top: 13px;
}
.ui-sortable-helper .menu-item-transport .menu-item-transport {
margin-top: 0;
}
*/
#menu-management,
.nav-menus-php .menu-edit,
#nav-menu-header .submitbox {
zoom: 1;
}
.nav-menus-php label {
max-width: 90% !important;
}
p.button-controls,
.nav-menus-php .tabs-panel {
max-width: 90%;
}
.nav-menus-php .major-publishing-actions .publishing-action {
float: none;
}
#wpbody #nav-menu-header label {
float: none;
}
#nav-menu-header {
margin-top: -10px;
}
#nav-menu-footer {
margin-bottom: -20px;
}
#update-nav-menu .publishing-action {
max-width: 200px;
}
#nav-menus-frame #update-nav-menu .delete-action {
margin-top: -25px;
float: left;
}
#menu-to-edit li {
margin-top: -10px;
margin-bottom: -10px;
}
.sortable-placeholder {
margin-top: 0 !important;
margin-left: 0 !important;
margin-bottom: 13px !important;
padding: 0 !important;
}
.auto-add-pages {
clear: both;
float: none;
}
#nav-menus-frame .open-label span {
float: none;
display: inline-block;
}
#nav-menus-frame .delete-action {
float: none;
}
#title-wrap #title-prompt-text {
right: 0;
}
.screen-reader-text {
right: auto;
text-indent: -1000em;
}

1
src/wp-admin/css/ie-rtl.min.css vendored Normal file
View File

@ -0,0 +1 @@
body{direction:rtl;width:99.5%}.rtl #adminmenuback{left:auto;right:0;background-image:none}.rtl #adminmenuback,.rtl #adminmenuwrap{border-width:0 0 0 1px}#plupload-upload-ui{zoom:1}.post-com-count-wrapper a.post-com-count{float:none}#adminmenu .wp-submenu ul{width:99%}#adminmenu .wp-submenu .wp-submenu .wp-submenu,#adminmenu .wp-menu-open .wp-submenu .wp-submenu{border:1px solid #dfdfdf}.folded #adminmenu .wp-submenu{right:30px}#wpcontent #adminmenu .wp-submenu li.wp-submenu-head{padding:3px 10px 4px 4px}div.quicktags-toolbar input{min-width:0}.inline-edit-row fieldset label span.title{float:right}.inline-edit-row fieldset label span.input-text-wrap{margin-right:0}p.search-box{float:left}#bh{margin:7px 10px 0 0;float:left}.postbox div.inside,.wp-editor-wrap .wp-editor-container .wp-editor-area,#nav-menu-theme-locations .howto select{width:97.5%}div#dashboard-widgets{padding-right:0;padding-left:1px}.tagchecklist span a{margin:4px -9px 0 0}.widefat th input{margin:0 5px 0 0}#TB_window{width:670px;position:absolute;top:50%;left:50%;margin-right:335px!important}#dashboard_plugins{direction:ltr}#dashboard_plugins h3.hndle{direction:rtl}#dashboard_incoming_links ul li,#dashboard_secondary ul li,#dashboard_primary ul li,p.row-actions{width:100%}#post-status-info{height:25px}p.submit{height:22px}.available-theme .action-links li{padding-left:7px;margin-left:7px}form#widgets-filter{position:static}.menu-item-depth-0{margin-left:0}.menu-item-depth-1{margin-left:-30px}.menu-item-depth-2{margin-left:-60px}.menu-item-depth-3{margin-left:-90px}.menu-item-depth-4{margin-left:-120px}.menu-item-depth-5{margin-left:-150px}.menu-item-depth-6{margin-left:-180px}.menu-item-depth-7{margin-left:-210px}.menu-item-depth-8{margin-left:-240px}.menu-item-depth-9{margin-left:-270px}.menu-item-depth-10{margin-left:-300px}.menu-item-depth-11{margin-left:-330px}#menu-management,.nav-menus-php .menu-edit,#nav-menu-header .submitbox{zoom:1}.nav-menus-php label{max-width:90%!important}p.button-controls,.nav-menus-php .tabs-panel{max-width:90%}.nav-menus-php .major-publishing-actions .publishing-action{float:none}#wpbody #nav-menu-header label{float:none}#nav-menu-header{margin-top:-10px}#nav-menu-footer{margin-bottom:-20px}#update-nav-menu .publishing-action{max-width:200px}#nav-menus-frame #update-nav-menu .delete-action{margin-top:-25px;float:left}#menu-to-edit li{margin-top:-10px;margin-bottom:-10px}.sortable-placeholder{margin-top:0!important;margin-left:0!important;margin-bottom:13px!important;padding:0!important}.auto-add-pages{clear:both;float:none}#nav-menus-frame .open-label span{float:none;display:inline-block}#nav-menus-frame .delete-action{float:none}#title-wrap #title-prompt-text{right:0}.screen-reader-text{right:auto;text-indent:-1000em}

File diff suppressed because one or more lines are too long

1
src/wp-admin/css/ie.min.css vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -1 +1,261 @@
html{background:#f9f9f9;}body{background:#fff;color:#333;font-family:sans-serif;margin:2em auto;width:700px;padding:1em 2em;-moz-border-radius:11px;-khtml-border-radius:11px;-webkit-border-radius:11px;border-radius:11px;border:1px solid #dfdfdf;}a{color:#2583ad;text-decoration:none;}a:hover{color:#d54e21;}h1{border-bottom:1px solid #dadada;clear:both;color:#666;font:24px Georgia,"Times New Roman",Times,serif;margin:5px 0 0 -4px;padding:0;padding-bottom:7px;}h2{font-size:16px;}p,li,dd,dt{padding-bottom:2px;font-size:12px;line-height:18px;}code,.code{font-size:13px;}ul,ol,dl{padding:5px 5px 5px 22px;}a img{border:0;}abbr{border:0;font-variant:normal;}#logo{margin:6px 0 14px 0;border-bottom:none;text-align:center;}.step{margin:20px 0 15px;}.step,th{text-align:left;padding:0;}.submit input,.button,.button-secondary{font-family:sans-serif;text-decoration:none;font-size:14px!important;line-height:16px;padding:6px 12px;cursor:pointer;border:1px solid #bbb;color:#464646;-moz-border-radius:15px;-khtml-border-radius:15px;-webkit-border-radius:15px;border-radius:15px;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;-khtml-box-sizing:content-box;box-sizing:content-box;}.button:hover,.button-secondary:hover,.submit input:hover{color:#000;border-color:#666;}.button,.submit input,.button-secondary{background:#f2f2f2 url(../images/white-grad.png) repeat-x scroll left top;}.button:active,.submit input:active,.button-secondary:active{background:#eee url(../images/white-grad-active.png) repeat-x scroll left top;}textarea{border:1px solid #bbb;-moz-border-radius:3px;-khtml-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;}.form-table{border-collapse:collapse;margin-top:1em;width:100%;}.form-table td{margin-bottom:9px;padding:10px;border-bottom:8px solid #fff;font-size:12px;}.form-table th{font-size:13px;text-align:left;padding:16px 10px 10px 10px;border-bottom:8px solid #fff;width:130px;vertical-align:top;}.form-table tr{background:#f3f3f3;}.form-table code{line-height:18px;font-size:18px;}.form-table p{margin:4px 0 0 0;font-size:11px;}.form-table input{line-height:20px;font-size:15px;padding:2px;}.form-table th p{font-weight:normal;}#error-page{margin-top:50px;}#error-page p{font-size:12px;line-height:18px;margin:25px 0 20px;}#error-page code,.code{font-family:Consolas,Monaco,monospace;}#pass-strength-result{background-color:#eee;border-color:#ddd!important;border-style:solid;border-width:1px;margin:5px 5px 5px 1px;padding:5px;text-align:center;width:200px;display:none;}#pass-strength-result.bad{background-color:#ffb78c;border-color:#ff853c!important;}#pass-strength-result.good{background-color:#ffec8b;border-color:#fc0!important;}#pass-strength-result.short{background-color:#ffa0a0;border-color:#f04040!important;}#pass-strength-result.strong{background-color:#c3ff88;border-color:#8dff1c!important;}.message{border:1px solid #e6db55;padding:.3em .6em;margin:5px 0 15px;background-color:#ffffe0;}
html {
background: #f9f9f9;
}
body {
background: #fff;
color: #333;
font-family: sans-serif;
margin: 2em auto;
padding: 1em 2em;
-webkit-border-radius: 3px;
border-radius: 3px;
border: 1px solid #dfdfdf;
max-width: 700px;
}
a {
color: #21759b;
text-decoration: none;
}
a:hover {
color: #d54e21;
}
h1 {
border-bottom: 1px solid #dadada;
clear: both;
color: #666;
font: 24px Georgia, "Times New Roman", Times, serif;
margin: 30px 0 0 0;
padding: 0;
padding-bottom: 7px;
}
h2 {
font-size: 16px;
}
p, li, dd, dt {
padding-bottom: 2px;
font-size: 14px;
line-height: 1.5;
}
code, .code {
font-size: 14px;
}
ul, ol, dl {
padding: 5px 5px 5px 22px;
}
a img {
border:0
}
abbr {
border: 0;
font-variant: normal;
}
#logo {
margin: 6px 0 14px 0;
border-bottom: none;
text-align:center
}
#logo a {
background-image: url('../images/wordpress-logo.png?ver=20120216');
background-size: 274px 63px;
background-position: top center;
background-repeat: no-repeat;
height: 67px;
text-indent: -9999px;
outline: none;
overflow: hidden;
display: block;
}
@media print,
(-o-min-device-pixel-ratio: 5/4),
(-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 120dpi) {
#logo a {
background-image: url('../images/wordpress-logo-2x.png?ver=20120412');
background-size: 274px 63px;
}
}
.step {
margin: 20px 0 15px;
}
.step, th {
text-align: left;
padding: 0;
}
.step .button-large {
font-size: 14px;
}
textarea {
border: 1px solid #dfdfdf;
-webkit-border-radius: 3px;
border-radius: 3px;
font-family: sans-serif;
width: 695px;
}
.form-table {
border-collapse: collapse;
margin-top: 1em;
width: 100%;
}
.form-table td {
margin-bottom: 9px;
padding: 10px 20px 10px 0;
border-bottom: 8px solid #fff;
font-size: 14px;
vertical-align: top
}
.form-table th {
font-size: 14px;
text-align: left;
padding: 16px 20px 10px 0;
border-bottom: 8px solid #fff;
width: 140px;
vertical-align: top;
}
.form-table code {
line-height: 18px;
font-size: 14px;
}
.form-table p {
margin: 4px 0 0 0;
font-size: 11px;
}
.form-table input {
line-height: 20px;
font-size: 15px;
padding: 2px;
border: 1px #dfdfdf solid;
-webkit-border-radius: 3px;
border-radius: 3px;
font-family: sans-serif;
}
.form-table input[type=text],
.form-table input[type=password] {
width: 206px;
}
.form-table th p {
font-weight: normal;
}
.form-table.install-success td {
vertical-align: middle;
padding: 16px 20px 10px 0;
}
.form-table.install-success td p {
margin: 0;
font-size: 14px;
}
.form-table.install-success td code {
margin: 0;
font-size: 18px;
}
#error-page {
margin-top: 50px;
}
#error-page p {
font-size: 14px;
line-height: 18px;
margin: 25px 0 20px;
}
#error-page code, .code {
font-family: Consolas, Monaco, monospace;
}
#pass-strength-result {
background-color: #eee;
border-color: #ddd !important;
border-style: solid;
border-width: 1px;
margin: 5px 5px 5px 0;
padding: 5px;
text-align: center;
width: 200px;
display: none;
}
#pass-strength-result.bad {
background-color: #ffb78c;
border-color: #ff853c !important;
}
#pass-strength-result.good {
background-color: #ffec8b;
border-color: #ffcc00 !important;
}
#pass-strength-result.short {
background-color: #ffa0a0;
border-color: #f04040 !important;
}
#pass-strength-result.strong {
background-color: #c3ff88;
border-color: #8dff1c !important;
}
.message {
border: 1px solid #e6db55;
padding: 0.3em 0.6em;
margin: 5px 0 15px;
background-color: #ffffe0;
}
/* install-rtl */
body.rtl {
font-family: Tahoma, arial;
}
.rtl h1 {
font-family: arial;
margin: 5px -4px 0 0;
}
.rtl ul,
.rtl ol {
padding: 5px 22px 5px 5px;
}
.rtl .step,
.rtl th,
.rtl .form-table th {
text-align: right;
}
.rtl .submit input,
.rtl .button,
.rtl .button-secondary {
margin-right: 0;
}
.rtl #dbname,
.rtl #uname,
.rtl #pwd,
.rtl #dbhost,
.rtl #prefix,
.rtl #user_login,
.rtl #admin_email,
.rtl #pass1,
.rtl #pass2 {
direction: ltr;
}

1
src/wp-admin/css/install.min.css vendored Normal file
View File

@ -0,0 +1 @@
html{background:#f9f9f9}body{background:#fff;color:#333;font-family:sans-serif;margin:2em auto;padding:1em 2em;-webkit-border-radius:3px;border-radius:3px;border:1px solid #dfdfdf;max-width:700px}a{color:#21759b;text-decoration:none}a:hover{color:#d54e21}h1{border-bottom:1px solid #dadada;clear:both;color:#666;font:24px Georgia,"Times New Roman",Times,serif;margin:30px 0 0 0;padding:0;padding-bottom:7px}h2{font-size:16px}p,li,dd,dt{padding-bottom:2px;font-size:14px;line-height:1.5}code,.code{font-size:14px}ul,ol,dl{padding:5px 5px 5px 22px}a img{border:0}abbr{border:0;font-variant:normal}#logo{margin:6px 0 14px 0;border-bottom:0;text-align:center}#logo a{background-image:url('../images/wordpress-logo.png?ver=20120216');background-size:274px 63px;background-position:top center;background-repeat:no-repeat;height:67px;text-indent:-9999px;outline:0;overflow:hidden;display:block}@media print,(-o-min-device-pixel-ratio:5/4),(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){#logo a{background-image:url('../images/wordpress-logo-2x.png?ver=20120412');background-size:274px 63px}}.step{margin:20px 0 15px}.step,th{text-align:left;padding:0}.step .button-large{font-size:14px}textarea{border:1px solid #dfdfdf;-webkit-border-radius:3px;border-radius:3px;font-family:sans-serif;width:695px}.form-table{border-collapse:collapse;margin-top:1em;width:100%}.form-table td{margin-bottom:9px;padding:10px 20px 10px 0;border-bottom:8px solid #fff;font-size:14px;vertical-align:top}.form-table th{font-size:14px;text-align:left;padding:16px 20px 10px 0;border-bottom:8px solid #fff;width:140px;vertical-align:top}.form-table code{line-height:18px;font-size:14px}.form-table p{margin:4px 0 0 0;font-size:11px}.form-table input{line-height:20px;font-size:15px;padding:2px;border:1px #dfdfdf solid;-webkit-border-radius:3px;border-radius:3px;font-family:sans-serif}.form-table input[type=text],.form-table input[type=password]{width:206px}.form-table th p{font-weight:normal}.form-table.install-success td{vertical-align:middle;padding:16px 20px 10px 0}.form-table.install-success td p{margin:0;font-size:14px}.form-table.install-success td code{margin:0;font-size:18px}#error-page{margin-top:50px}#error-page p{font-size:14px;line-height:18px;margin:25px 0 20px}#error-page code,.code{font-family:Consolas,Monaco,monospace}#pass-strength-result{background-color:#eee;border-color:#ddd!important;border-style:solid;border-width:1px;margin:5px 5px 5px 0;padding:5px;text-align:center;width:200px;display:none}#pass-strength-result.bad{background-color:#ffb78c;border-color:#ff853c!important}#pass-strength-result.good{background-color:#ffec8b;border-color:#fc0!important}#pass-strength-result.short{background-color:#ffa0a0;border-color:#f04040!important}#pass-strength-result.strong{background-color:#c3ff88;border-color:#8dff1c!important}.message{border:1px solid #e6db55;padding:.3em .6em;margin:5px 0 15px;background-color:#ffffe0}body.rtl{font-family:Tahoma,arial}.rtl h1{font-family:arial;margin:5px -4px 0 0}.rtl ul,.rtl ol{padding:5px 22px 5px 5px}.rtl .step,.rtl th,.rtl .form-table th{text-align:right}.rtl .submit input,.rtl .button,.rtl .button-secondary{margin-right:0}.rtl #dbname,.rtl #uname,.rtl #pwd,.rtl #dbhost,.rtl #prefix,.rtl #user_login,.rtl #admin_email,.rtl #pass1,.rtl #pass2{direction:ltr}

View File

@ -1 +1,71 @@
body#media-upload ul#sidemenu{left:auto;right:0;}#search-filter{text-align:left;}.align .field label{padding:0 28px 0 0;margin:0 0 0 1em;}.image-align-none-label,.image-align-left-label,.image-align-center-label,.image-align-right-label{background-position:center right;}tr.image-size div.image-size-item{float:right;}tr.image-size label{margin:0 1em 0 0;}.crunching{text-align:left;margin-right:0;margin-left:5px;}button.dismiss{right:auto;left:5px;}.file-error{margin:0 50px 5px 0;}.progress{left:auto;right:0;}.describe td{padding:0 0 0 5px;}.bar{border-right-width:0;border-left-width:3px;border-right-style:none;border-left-style:solid;}#media-upload .media-upload-form p{margin:0 0 1em 1em;}#media-upload .describe th.label{text-align:right;}.menu_order{float:left;}.media-upload-form label.form-help,td.help,#media-upload p.help,#media-upload label.help{font-family:Tahoma,Arial;}#gallery-settings #basic th.label{padding:5px 0 5px 5px;}#gallery-settings .title,h3.media-title{font-family:Tahoma,Arial;}#gallery-settings .describe th.label{text-align:right;}#gallery-settings label,#gallery-settings legend{margin-right:0;margin-left:15px;}#gallery-settings .align .field label{margin:0 0 0 1.5em;}#sort-buttons{margin:3px 0 -8px 25px;text-align:left;}#sort-buttons #asc,#sort-buttons #showall{padding-left:0;padding-right:5px;}#sort-buttons span{margin-right:0;margin-left:25px;}
body#media-upload ul#sidemenu {
left: auto;
right: 0;
}
#search-filter {
text-align: left;
}
/* specific to the image upload form */
.align .field label {
padding: 0 23px 0 0;
margin: 0 3px 0 1em;
}
.image-align-none-label, .image-align-left-label, .image-align-center-label, .image-align-right-label {
background-position: center right;
}
tr.image-size label {
margin: 0 5px 0 0;
}
.file-error {
margin: 0 50px 5px 0;
}
.progress {
left: auto;
right: 0;
}
.describe td {
padding: 0 0 0 5px;
}
/* Specific to Uploader */
#media-upload .describe th.label {
text-align: right;
}
.menu_order {
float: left;
}
.media-upload-form label.form-help, td.help, #media-upload p.help, #media-upload label.help {
font-family: Tahoma, Arial;
}
#gallery-settings #basic th.label {
padding: 5px 0 5px 5px;
}
#gallery-settings .title, h3.media-title {
font-family: Tahoma, Arial;
}
#gallery-settings .describe th.label {
text-align: right;
}
#gallery-settings label,
#gallery-settings legend {
margin-right: 0;
margin-left: 15px;
}
#gallery-settings .align .field label {
margin: 0 3px 0 1em;
}
#sort-buttons {
margin: 3px 0 -8px 25px;
text-align: left;
}
#sort-buttons #asc,
#sort-buttons #showall {
padding-left: 0;
padding-right: 5px;
}
#sort-buttons span {
margin-right: 0;
margin-left: 25px;
}

1
src/wp-admin/css/media-rtl.min.css vendored Normal file
View File

@ -0,0 +1 @@
body#media-upload ul#sidemenu{left:auto;right:0}#search-filter{text-align:left}.align .field label{padding:0 23px 0 0;margin:0 3px 0 1em}.image-align-none-label,.image-align-left-label,.image-align-center-label,.image-align-right-label{background-position:center right}tr.image-size label{margin:0 5px 0 0}.file-error{margin:0 50px 5px 0}.progress{left:auto;right:0}.describe td{padding:0 0 0 5px}#media-upload .describe th.label{text-align:right}.menu_order{float:left}.media-upload-form label.form-help,td.help,#media-upload p.help,#media-upload label.help{font-family:Tahoma,Arial}#gallery-settings #basic th.label{padding:5px 0 5px 5px}#gallery-settings .title,h3.media-title{font-family:Tahoma,Arial}#gallery-settings .describe th.label{text-align:right}#gallery-settings label,#gallery-settings legend{margin-right:0;margin-left:15px}#gallery-settings .align .field label{margin:0 3px 0 1em}#sort-buttons{margin:3px 0 -8px 25px;text-align:left}#sort-buttons #asc,#sort-buttons #showall{padding-left:0;padding-right:5px}#sort-buttons span{margin-right:0;margin-left:25px}

View File

@ -1 +1,353 @@
div#media-upload-header{margin:0;padding:0 5px;font-weight:bold;position:relative;border-bottom-width:1px;border-bottom-style:solid;}body#media-upload ul#sidemenu{font-weight:normal;margin:0 5px;left:0;bottom:-1px;float:none;overflow:hidden;}div#media-upload-error{margin:1em;font-weight:bold;}form{margin:1em;}#search-filter{text-align:right;}th{position:relative;}.media-upload-form label.form-help,td.help{font-family:sans-serif;font-style:italic;font-weight:normal;}.media-upload-form p.help{margin:0;padding:0;}.media-upload-form fieldset{width:100%;border:none;text-align:justify;margin:0 0 1em 0;padding:0;}.image-align-none-label{background:url(../images/align-none.png) no-repeat center left;}.image-align-left-label{background:url(../images/align-left.png) no-repeat center left;}.image-align-center-label{background:url(../images/align-center.png) no-repeat center left;}.image-align-right-label{background:url(../images/align-right.png) no-repeat center left;}tr.image-size td{width:460px;}tr.image-size div.image-size-item{float:left;width:25%;margin:0;}#library-form .progress,#gallery-form .progress,.insert-gallery,.describe.startopen,.describe.startclosed{display:none;}.media-item .thumbnail{max-width:128px;max-height:128px;}thead.media-item-info tr{background-color:transparent;}thead.media-item-info th,thead.media-item-info td{border:none;margin:0;}.form-table thead.media-item-info{border:8px solid #fff;}abbr.required{text-decoration:none;border:none;}.describe label{display:inline;}.describe td{vertical-align:middle;padding:0 5px 8px 0;}.describe td.error{padding:2px 8px;}.describe td.A1{width:132px;}.describe input[type="text"],.describe textarea{width:460px;border-width:1px;border-style:solid;}.hidden{height:0;width:0;overflow:hidden;border:none;}#media-upload p.ml-submit{padding:1em 0;}#media-upload p.help,#media-upload label.help{font-family:sans-serif;font-style:italic;font-weight:normal;}#media-upload tr.image-size td.field{text-align:center;}#media-upload #media-items{border-width:1px;border-style:solid;border-bottom:none;width:623px;}#media-upload .media-item{border-bottom-width:1px;border-bottom-style:solid;min-height:36px;width:100%;}#media-upload .ui-sortable .media-item{cursor:move;}.filename{line-height:36px;padding:0 10px;overflow:hidden;}#media-upload .describe{width:100%;clear:both;cursor:default;}#media-upload .slidetoggle{border-top-width:1px;border-top-style:solid;}#media-upload .describe th.label{padding-top:.2em;text-align:left;min-width:120px;}#media-upload tr.align td.field{text-align:center;}#media-upload tr.image-size{margin-bottom:1em;height:3em;}#media-upload #filter{width:623px;}#media-upload #filter .subsubsub{margin:8px 0;}#filter .tablenav select{border-style:solid;border-width:1px;padding:2px;vertical-align:top;width:auto;}#media-upload .del-attachment{display:none;margin:5px 0;}.menu_order{float:right;font-size:11px;margin:10px 10px 0;}.menu_order_input{border:1px solid #ddd;font-size:10px;padding:1px;width:23px;}.ui-sortable-helper{background-color:#fff;border:1px solid #aaa;opacity:.6;filter:alpha(opacity=60);}#media-upload th.order-head{width:20%;text-align:center;}#media-upload th.actions-head{width:25%;text-align:center;}#media-upload a.wp-post-thumbnail{margin:0 20px;}#media-items a.delete{display:block;float:right;}#media-upload .widefat{width:626px;border-style:solid solid none;}.sorthelper{height:37px;width:623px;display:block;}#gallery-settings th.label{width:160px;}#gallery-settings #basic th.label{padding:5px 5px 5px 0;}#gallery-settings .title{clear:both;padding:0 0 3px;font-size:1.6em;border-bottom:1px solid #DADADA;}h3.media-title{font-size:1.6em;}h4.media-sub-title{border-bottom:1px solid #DADADA;font-size:1.3em;margin:12px;padding:0 0 3px;}#gallery-settings .title,h3.media-title,h4.media-sub-title{font-family:Georgia,"Times New Roman",Times,serif;font-weight:normal;color:#5A5A5A;}#gallery-settings .describe td{vertical-align:middle;height:3em;}#gallery-settings .describe th.label{padding-top:.5em;text-align:left;}#gallery-settings .describe{padding:5px;width:615px;clear:both;cursor:default;}#gallery-settings .describe select{width:15em;}#gallery-settings .describe select option,#gallery-settings .describe td{padding:0;}#gallery-settings label,#gallery-settings legend{font-size:13px;color:#464646;margin-right:15px;}#gallery-settings .align .field label{margin:0 1.5em 0 0;}#gallery-settings p.ml-submit{border-top:1px solid #dfdfdf;}#gallery-settings select#columns{width:6em;}#sort-buttons{font-size:.8em;margin:3px 25px -8px 0;text-align:right;max-width:625px;}#sort-buttons a{text-decoration:none;}#sort-buttons #asc,#sort-buttons #showall{padding-left:5px;}#sort-buttons span{margin-right:25px;}
/* Styles for the media library iframe (not used on the Library screen) */
div#media-upload-header {
margin: 0;
padding: 5px 5px 0;
font-weight: bold;
position: relative;
border-bottom-width: 1px;
border-bottom-style: solid;
}
body#media-upload ul#sidemenu {
font-weight: normal;
margin: 0 5px;
left: 0;
bottom: -1px;
float: none;
overflow: hidden;
}
form {
margin: 1em;
}
#search-filter {
text-align: right;
}
th {
position: relative;
}
.media-upload-form label.form-help, td.help {
font-family: sans-serif;
font-style: italic;
font-weight: normal;
}
.media-upload-form p.help {
margin: 0;
padding: 0;
}
.media-upload-form fieldset {
width: 100%;
border: none;
text-align: justify;
margin: 0 0 1em 0;
padding: 0;
}
/* specific to the image upload form */
.image-align-none-label {
background: url(../images/align-none.png) no-repeat center left;
}
.image-align-left-label {
background: url(../images/align-left.png) no-repeat center left;
}
.image-align-center-label {
background: url(../images/align-center.png) no-repeat center left;
}
.image-align-right-label {
background: url(../images/align-right.png) no-repeat center left;
}
tr.image-size td {
width: 460px;
}
tr.image-size div.image-size-item {
margin: 0 0 5px;
}
#library-form .progress,
#gallery-form .progress,
.insert-gallery,
.describe.startopen,
.describe.startclosed {
display: none;
}
.media-item .thumbnail {
max-width: 128px;
max-height: 128px;
}
thead.media-item-info tr {
background-color: transparent;
}
.form-table thead.media-item-info {
border: 8px solid #fff;
}
abbr.required {
text-decoration: none;
border: none;
}
.describe label {
display: inline;
}
.describe td.error {
padding: 2px 8px;
}
.describe td.A1 {
width: 132px;
}
.describe input[type="text"],
.describe textarea {
width: 460px;
border-width: 1px;
border-style: solid;
}
/* Specific to Uploader */
#media-upload p.ml-submit {
padding: 1em 0;
}
#media-upload p.help,
#media-upload label.help {
font-family: sans-serif;
font-style: italic;
font-weight: normal;
}
#media-upload .ui-sortable .media-item {
cursor: move;
}
#media-upload tr.image-size {
margin-bottom: 1em;
height: 3em;
}
#media-upload #filter {
width: 623px;
}
#media-upload #filter .subsubsub {
margin: 8px 0;
}
#filter .tablenav select {
border-style: solid;
border-width: 1px;
padding: 2px;
vertical-align: top;
width: auto;
}
#media-upload .del-attachment {
display: none;
margin: 5px 0;
}
.menu_order {
float: right;
font-size: 11px;
margin: 10px 10px 0;
}
.menu_order_input {
border: 1px solid #ddd;
font-size: 10px;
padding: 1px;
width: 23px;
}
.ui-sortable-helper {
background-color: #fff;
border: 1px solid #aaa;
opacity: 0.6;
filter: alpha(opacity=60);
}
#media-upload th.order-head {
width: 20%;
text-align: center;
}
#media-upload th.actions-head {
width: 25%;
text-align: center;
}
#media-upload a.wp-post-thumbnail {
margin: 0 20px;
}
#media-upload .widefat {
width: 626px;
border-style: solid solid none;
}
.sorthelper {
height: 37px;
width: 623px;
display: block;
}
#gallery-settings th.label {
width: 160px;
}
#gallery-settings #basic th.label {
padding: 5px 5px 5px 0;
}
#gallery-settings .title {
clear: both;
padding: 0 0 3px;
font-size: 1.6em;
border-bottom: 1px solid #DADADA;
}
h3.media-title {
font-size: 1.6em;
}
h4.media-sub-title {
border-bottom: 1px solid #DADADA;
font-size: 1.3em;
margin: 12px;
padding: 0 0 3px;
}
#gallery-settings .title,
h3.media-title,
h4.media-sub-title {
font-family: Georgia,"Times New Roman",Times,serif;
font-weight: normal;
color: #5A5A5A;
}
#gallery-settings .describe td {
vertical-align: middle;
height: 3em;
}
#gallery-settings .describe th.label {
padding-top: .5em;
text-align: left;
}
#gallery-settings .describe {
padding: 5px;
width: 615px;
clear: both;
cursor: default;
}
#gallery-settings .describe select {
width: 15em;
}
#gallery-settings .describe select option,
#gallery-settings .describe td {
padding: 0;
}
#gallery-settings label,
#gallery-settings legend {
font-size: 13px;
color: #464646;
margin-right: 15px;
}
#gallery-settings .align .field label {
margin: 0 1em 0 3px;
}
#gallery-settings p.ml-submit {
border-top: 1px solid #dfdfdf;
}
#gallery-settings select#columns {
width: 6em;
}
#sort-buttons {
font-size: 0.8em;
margin: 3px 25px -8px 0;
text-align: right;
max-width: 625px;
}
#sort-buttons a {
text-decoration: none;
}
#sort-buttons #asc,
#sort-buttons #showall {
padding-left: 5px;
}
#sort-buttons span {
margin-right: 25px;
}
p.media-types {
margin: 1em;
}
tr.not-image {
display: none;
}
table.not-image tr.not-image {
display: table-row;
}
table.not-image tr.image-only {
display: none;
}
/**
* HiDPI Displays
*/
@media print,
(-o-min-device-pixel-ratio: 5/4),
(-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 120dpi) {
.image-align-none-label {
background-image: url("../images/align-none-2x.png?ver=20120916");
background-size: 21px 15px;
}
.image-align-left-label {
background-image: url("../images/align-left-2x.png?ver=20120916");
background-size: 22px 15px;
}
.image-align-center-label {
background-image: url("../images/align-center-2x.png?ver=20120916");
background-size: 21px 15px;
}
.image-align-right-label {
background-image: url("../images/align-right-2x.png?ver=20120916");
background-size: 22px 15px;
}
}

1
src/wp-admin/css/media.min.css vendored Normal file
View File

@ -0,0 +1 @@
div#media-upload-header{margin:0;padding:5px 5px 0;font-weight:bold;position:relative;border-bottom-width:1px;border-bottom-style:solid}body#media-upload ul#sidemenu{font-weight:normal;margin:0 5px;left:0;bottom:-1px;float:none;overflow:hidden}form{margin:1em}#search-filter{text-align:right}th{position:relative}.media-upload-form label.form-help,td.help{font-family:sans-serif;font-style:italic;font-weight:normal}.media-upload-form p.help{margin:0;padding:0}.media-upload-form fieldset{width:100%;border:0;text-align:justify;margin:0 0 1em 0;padding:0}.image-align-none-label{background:url(../images/align-none.png) no-repeat center left}.image-align-left-label{background:url(../images/align-left.png) no-repeat center left}.image-align-center-label{background:url(../images/align-center.png) no-repeat center left}.image-align-right-label{background:url(../images/align-right.png) no-repeat center left}tr.image-size td{width:460px}tr.image-size div.image-size-item{margin:0 0 5px}#library-form .progress,#gallery-form .progress,.insert-gallery,.describe.startopen,.describe.startclosed{display:none}.media-item .thumbnail{max-width:128px;max-height:128px}thead.media-item-info tr{background-color:transparent}.form-table thead.media-item-info{border:8px solid #fff}abbr.required{text-decoration:none;border:0}.describe label{display:inline}.describe td.error{padding:2px 8px}.describe td.A1{width:132px}.describe input[type="text"],.describe textarea{width:460px;border-width:1px;border-style:solid}#media-upload p.ml-submit{padding:1em 0}#media-upload p.help,#media-upload label.help{font-family:sans-serif;font-style:italic;font-weight:normal}#media-upload .ui-sortable .media-item{cursor:move}#media-upload tr.image-size{margin-bottom:1em;height:3em}#media-upload #filter{width:623px}#media-upload #filter .subsubsub{margin:8px 0}#filter .tablenav select{border-style:solid;border-width:1px;padding:2px;vertical-align:top;width:auto}#media-upload .del-attachment{display:none;margin:5px 0}.menu_order{float:right;font-size:11px;margin:10px 10px 0}.menu_order_input{border:1px solid #ddd;font-size:10px;padding:1px;width:23px}.ui-sortable-helper{background-color:#fff;border:1px solid #aaa;opacity:.6;filter:alpha(opacity=60)}#media-upload th.order-head{width:20%;text-align:center}#media-upload th.actions-head{width:25%;text-align:center}#media-upload a.wp-post-thumbnail{margin:0 20px}#media-upload .widefat{width:626px;border-style:solid solid none}.sorthelper{height:37px;width:623px;display:block}#gallery-settings th.label{width:160px}#gallery-settings #basic th.label{padding:5px 5px 5px 0}#gallery-settings .title{clear:both;padding:0 0 3px;font-size:1.6em;border-bottom:1px solid #dadada}h3.media-title{font-size:1.6em}h4.media-sub-title{border-bottom:1px solid #dadada;font-size:1.3em;margin:12px;padding:0 0 3px}#gallery-settings .title,h3.media-title,h4.media-sub-title{font-family:Georgia,"Times New Roman",Times,serif;font-weight:normal;color:#5a5a5a}#gallery-settings .describe td{vertical-align:middle;height:3em}#gallery-settings .describe th.label{padding-top:.5em;text-align:left}#gallery-settings .describe{padding:5px;width:615px;clear:both;cursor:default}#gallery-settings .describe select{width:15em}#gallery-settings .describe select option,#gallery-settings .describe td{padding:0}#gallery-settings label,#gallery-settings legend{font-size:13px;color:#464646;margin-right:15px}#gallery-settings .align .field label{margin:0 1em 0 3px}#gallery-settings p.ml-submit{border-top:1px solid #dfdfdf}#gallery-settings select#columns{width:6em}#sort-buttons{font-size:.8em;margin:3px 25px -8px 0;text-align:right;max-width:625px}#sort-buttons a{text-decoration:none}#sort-buttons #asc,#sort-buttons #showall{padding-left:5px}#sort-buttons span{margin-right:25px}p.media-types{margin:1em}tr.not-image{display:none}table.not-image tr.not-image{display:table-row}table.not-image tr.image-only{display:none}@media print,(-o-min-device-pixel-ratio:5/4),(-webkit-min-device-pixel-ratio:1.25),(min-resolution:120dpi){.image-align-none-label{background-image:url("../images/align-none-2x.png?ver=20120916");background-size:21px 15px}.image-align-left-label{background-image:url("../images/align-left-2x.png?ver=20120916");background-size:22px 15px}.image-align-center-label{background-image:url("../images/align-center-2x.png?ver=20120916");background-size:21px 15px}.image-align-right-label{background-image:url("../images/align-right-2x.png?ver=20120916");background-size:22px 15px}}

File diff suppressed because one or more lines are too long

1
src/wp-admin/css/wp-admin-rtl.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
src/wp-admin/css/wp-admin.min.css vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -53,6 +53,9 @@ class Custom_Background {
function __construct($admin_header_callback = '', $admin_image_div_callback = '') {
$this->admin_header_callback = $admin_header_callback;
$this->admin_image_div_callback = $admin_image_div_callback;
add_action( 'admin_menu', array( $this, 'init' ) );
add_action( 'wp_ajax_set-background-image', array( $this, 'wp_set_background_image' ) );
}
/**
@ -80,15 +83,25 @@ class Custom_Background {
* @since 3.0.0
*/
function admin_load() {
add_contextual_help( $this->page, '<p>' . __( 'You can customize the look of your site without touching any of your theme&#8217;s code by using a custom background. Your background can be an image or a color.' ) . '</p>' .
'<p>' . __( 'To use a background image, simply upload it, then choose your display options below. You can display a single instance of your image, or tile it to fill the screen. You can have your background fixed in place, so your site content moves on top of it, or you can have it scroll with your site.' ) . '</p>' .
'<p>' . __( 'You can also choose a background color. If you know the hexadecimal code for the color you want, enter it in the Color field. If not, click on the Select a Color link, and a color picker will allow you to choose the exact shade you want.' ) . '</p>' .
'<p>' . __( 'Don&#8217;t forget to click on the Save Changes button when you are finished.' ) . '</p>' .
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
'<p>' . __( '<a href="http://codex.wordpress.org/Appearance_Background_Screen" target="_blank">Documentation on Custom Background</a>' ) . '</p>' .
'<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>' );
get_current_screen()->add_help_tab( array(
'id' => 'overview',
'title' => __('Overview'),
'content' =>
'<p>' . __( 'You can customize the look of your site without touching any of your theme&#8217;s code by using a custom background. Your background can be an image or a color.' ) . '</p>' .
'<p>' . __( 'To use a background image, simply upload it or choose an image that has already been uploaded to your Media Library by clicking the &#8220;Choose Image&#8221; button. You can display a single instance of your image, or tile it to fill the screen. You can have your background fixed in place, so your site content moves on top of it, or you can have it scroll with your site.' ) . '</p>' .
'<p>' . __( 'You can also choose a background color by clicking the Select Color button and either typing in a legitimate HTML hex value, e.g. &#8220;#ff0000&#8221; for red, or by choosing a color using the color picker.' ) . '</p>' .
'<p>' . __( 'Don&#8217;t forget to click on the Save Changes button when you are finished.' ) . '</p>'
) );
get_current_screen()->set_help_sidebar(
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
'<p>' . __( '<a href="http://codex.wordpress.org/Appearance_Background_Screen" target="_blank">Documentation on Custom Background</a>' ) . '</p>' .
'<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
);
wp_enqueue_media();
wp_enqueue_script('custom-background');
wp_enqueue_style('farbtastic');
wp_enqueue_style('wp-color-picker');
}
/**
@ -115,6 +128,7 @@ class Custom_Background {
set_theme_mod('background_image', '');
set_theme_mod('background_image_thumb', '');
$this->updated = true;
wp_safe_redirect( $_POST['_wp_http_referer'] );
return;
}
@ -190,15 +204,15 @@ if ( $bgcolor = get_background_color() )
if ( get_background_image() ) {
// background-image URL must be single quote, see below
$background_styles .= ' background-image: url(\'' . get_theme_mod('background_image_thumb', '') . '\');'
$background_styles .= ' background-image: url(\'' . set_url_scheme( get_theme_mod( 'background_image_thumb', get_background_image() ) ) . '\');'
. ' background-repeat: ' . get_theme_mod('background_repeat', 'repeat') . ';'
. ' background-position: top ' . get_theme_mod('background_position_x', 'left');
}
?>
<div id="custom-background-image" style="<?php echo $background_styles; ?>"><?php // must be double quote, see above ?>
<?php if ( get_background_image() ) { ?>
<img class="custom-background-image" src="<?php echo get_theme_mod('background_image_thumb', ''); ?>" style="visibility:hidden;" alt="" /><br />
<img class="custom-background-image" src="<?php echo get_theme_mod('background_image_thumb', ''); ?>" style="visibility:hidden;" alt="" />
<img class="custom-background-image" src="<?php echo set_url_scheme( get_theme_mod( 'background_image_thumb', get_background_image() ) ); ?>" style="visibility:hidden;" alt="" /><br />
<img class="custom-background-image" src="<?php echo set_url_scheme( get_theme_mod( 'background_image_thumb', get_background_image() ) ); ?>" style="visibility:hidden;" alt="" />
<?php } ?>
</div>
<?php } ?>
@ -217,7 +231,8 @@ if ( get_background_image() ) {
</tr>
<?php endif; ?>
<?php if ( defined( 'BACKGROUND_IMAGE' ) ) : // Show only if a default background image exists ?>
<?php $default_image = get_theme_support( 'custom-background', 'default-image' ); ?>
<?php if ( $default_image && get_background_image() != $default_image ) : ?>
<tr valign="top">
<th scope="row"><?php _e('Restore Original Image'); ?></th>
<td>
@ -231,13 +246,22 @@ if ( get_background_image() ) {
<?php endif; ?>
<tr valign="top">
<th scope="row"><?php _e('Upload Image'); ?></th>
<td><form enctype="multipart/form-data" id="upload-form" method="post" action="">
<label for="upload"><?php _e('Choose an image from your computer:'); ?></label><br /><input type="file" id="upload" name="import" />
<input type="hidden" name="action" value="save" />
<?php wp_nonce_field('custom-background-upload', '_wpnonce-custom-background-upload') ?>
<?php submit_button( __( 'Upload' ), 'button', 'submit', false ); ?>
</form>
<th scope="row"><?php _e('Select Image'); ?></th>
<td><form enctype="multipart/form-data" id="upload-form" class="wp-upload-form" method="post" action="">
<p>
<label for="upload"><?php _e( 'Choose an image from your computer:' ); ?></label><br />
<input type="file" id="upload" name="import" />
<input type="hidden" name="action" value="save" />
<?php wp_nonce_field( 'custom-background-upload', '_wpnonce-custom-background-upload' ); ?>
<?php submit_button( __( 'Upload' ), 'button', 'submit', false ); ?>
</p>
<p>
<label for="choose-from-library-link"><?php _e( 'Or choose an image from your media library:' ); ?></label><br />
<a id="choose-from-library-link" class="button"
data-choose="<?php esc_attr_e( 'Choose a Background Image' ); ?>"
data-update="<?php esc_attr_e( 'Set as background' ); ?>"><?php _e( 'Choose Image' ); ?></a>
</p>
</form>
</td>
</tr>
</tbody>
@ -291,12 +315,14 @@ if ( get_background_image() ) {
</tr>
<?php endif; // get_background_image() ?>
<tr valign="top">
<th scope="row"><?php _e( 'Color' ); ?></th>
<th scope="row"><?php _e( 'Background Color' ); ?></th>
<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Background Color' ); ?></span></legend>
<?php $show_clear = get_background_color() ? '' : ' style="display:none"'; ?>
<input type="text" name="background-color" id="background-color" value="#<?php echo esc_attr(get_background_color()) ?>" />
<a class="hide-if-no-js" href="#" id="pickcolor"><?php _e('Select a Color'); ?></a> <span <?php echo $show_clear; ?>class="hide-if-no-js" id="clearcolor"> (<a href="#"><?php _e( 'Clear' ); ?></a>)</span>
<div id="colorPickerDiv" style="z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;"></div>
<?php
$default_color = '';
if ( current_theme_supports( 'custom-background', 'default-color' ) )
$default_color = ' data-default-color="#' . esc_attr( get_theme_support( 'custom-background', 'default-color' ) ) . '"';
?>
<input type="text" name="background-color" id="background-color" value="#<?php echo esc_attr( get_background_color() ); ?>"<?php echo $default_color ?> />
</fieldset></td>
</tr>
</tbody>
@ -322,7 +348,13 @@ if ( get_background_image() ) {
check_admin_referer('custom-background-upload', '_wpnonce-custom-background-upload');
$overrides = array('test_form' => false);
$file = wp_handle_upload($_FILES['import'], $overrides);
$uploaded_file = $_FILES['import'];
$wp_filetype = wp_check_filetype_and_ext( $uploaded_file['tmp_name'], $uploaded_file['name'], false );
if ( ! wp_match_mime_types( 'image', $wp_filetype['type'] ) )
wp_die( __( 'The uploaded file is not a valid image. Please try again.' ) );
$file = wp_handle_upload($uploaded_file, $overrides);
if ( isset($file['error']) )
wp_die( $file['error'] );
@ -348,14 +380,46 @@ if ( get_background_image() ) {
wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) );
update_post_meta( $id, '_wp_attachment_is_custom_background', get_option('stylesheet' ) );
set_theme_mod('background_image', esc_url($url));
set_theme_mod('background_image', esc_url_raw($url));
$thumbnail = wp_get_attachment_image_src( $id, 'thumbnail' );
set_theme_mod('background_image_thumb', esc_url( $thumbnail[0] ) );
set_theme_mod('background_image_thumb', esc_url_raw( $thumbnail[0] ) );
do_action('wp_create_file_in_uploads', $file, $id); // For replication
$this->updated = true;
}
/**
* Unused since 3.5.0.
*
* @since 3.4.0
*/
function attachment_fields_to_edit( $form_fields ) {
return $form_fields;
}
/**
* Unused since 3.5.0.
*
* @since 3.4.0
*/
function filter_upload_tabs( $tabs ) {
return $tabs;
}
public function wp_set_background_image() {
if ( ! current_user_can('edit_theme_options') || ! isset( $_POST['attachment_id'] ) ) exit;
$attachment_id = absint($_POST['attachment_id']);
$sizes = array_keys(apply_filters( 'image_size_names_choose', array('thumbnail' => __('Thumbnail'), 'medium' => __('Medium'), 'large' => __('Large'), 'full' => __('Full Size')) ));
$size = 'thumbnail';
if ( in_array( $_POST['size'], $sizes ) )
$size = esc_attr( $_POST['size'] );
update_post_meta( $attachment_id, '_wp_attachment_is_custom_background', get_option('stylesheet' ) );
$url = wp_get_attachment_image_src( $attachment_id, $size );
$thumbnail = wp_get_attachment_image_src( $attachment_id, 'thumbnail' );
set_theme_mod( 'background_image', esc_url_raw( $url[0] ) );
set_theme_mod( 'background_image_thumb', esc_url_raw( $thumbnail[0] ) );
exit;
}
}
?>

View File

@ -42,7 +42,6 @@ class Custom_Image_Header {
*/
var $default_headers = array();
/**
* Holds custom headers uploaded by the user
*
@ -72,6 +71,8 @@ class Custom_Image_Header {
function __construct($admin_header_callback, $admin_image_div_callback = '') {
$this->admin_header_callback = $admin_header_callback;
$this->admin_image_div_callback = $admin_image_div_callback;
add_action( 'admin_menu', array( $this, 'init' ) );
}
/**
@ -90,7 +91,8 @@ class Custom_Image_Header {
add_action("admin_head-$page", array(&$this, 'help') );
add_action("admin_head-$page", array(&$this, 'take_action'), 50);
add_action("admin_head-$page", array(&$this, 'js'), 50);
add_action("admin_head-$page", $this->admin_header_callback, 51);
if ( $this->admin_header_callback )
add_action("admin_head-$page", $this->admin_header_callback, 51);
}
/**
@ -99,12 +101,38 @@ class Custom_Image_Header {
* @since 3.0.0
*/
function help() {
add_contextual_help( $this->page, '<p>' . __( 'You can set a custom image header for your site. Simply upload the image and crop it, and the new header will go live immediately.' ) . '</p>' .
'<p>' . __( 'If you want to discard your custom header and go back to the default included in your theme, click on the buttons to remove the custom image and restore the original header image.' ) . '</p>' .
'<p>' . __( 'Some themes come with additional header images bundled. If you see multiple images displayed, select the one you&#8217;d like and click the Save Changes button.' ) . '</p>' .
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
'<p>' . __( '<a href="http://codex.wordpress.org/Appearance_Header_Screen" target="_blank">Documentation on Custom Header</a>' ) . '</p>' .
'<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>' );
get_current_screen()->add_help_tab( array(
'id' => 'overview',
'title' => __('Overview'),
'content' =>
'<p>' . __( 'This screen is used to customize the header section of your theme.') . '</p>' .
'<p>' . __( 'You can choose from the theme&#8217;s default header images, or use one of your own. You can also customize how your Site Title and Tagline are displayed.') . '<p>'
) );
get_current_screen()->add_help_tab( array(
'id' => 'set-header-image',
'title' => __('Header Image'),
'content' =>
'<p>' . __( 'You can set a custom image header for your site. Simply upload the image and crop it, and the new header will go live immediately. Alternatively, you can use an image that has already been uploaded to your Media Library by clicking the &#8220;Choose Image&#8221; button.' ) . '</p>' .
'<p>' . __( 'Some themes come with additional header images bundled. If you see multiple images displayed, select the one you&#8217;d like and click the &#8220;Save Changes&#8221; button.' ) . '</p>' .
'<p>' . __( 'If your theme has more than one default header image, or you have uploaded more than one custom header image, you have the option of having WordPress display a randomly different image on each page of your site. Click the &#8220;Random&#8221; radio button next to the Uploaded Images or Default Images section to enable this feature.') . '</p>' .
'<p>' . __( 'If you don&#8217;t want a header image to be displayed on your site at all, click the &#8220;Remove Header Image&#8221; button at the bottom of the Header Image section of this page. If you want to re-enable the header image later, you just have to select one of the other image options and click &#8220;Save Changes&#8221;.') . '</p>'
) );
get_current_screen()->add_help_tab( array(
'id' => 'set-header-text',
'title' => __('Header Text'),
'content' =>
'<p>' . sprintf( __( 'For most themes, the header text is your Site Title and Tagline, as defined in the <a href="%1$s">General Settings</a> section.' ), admin_url( 'options-general.php' ) ) . '<p>' .
'<p>' . __( 'In the Header Text section of this page, you can choose whether to display this text or hide it. You can also choose a color for the text by clicking the Select Color button and either typing in a legitimate HTML hex value, e.g. &#8220;#ff0000&#8221; for red, or by choosing a color using the color picker.' ) . '</p>' .
'<p>' . __( 'Don&#8217;t forget to click &#8220;Save Changes&#8221; when you&#8217;re done!') . '</p>'
) );
get_current_screen()->set_help_sidebar(
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
'<p>' . __( '<a href="http://codex.wordpress.org/Appearance_Header_Screen" target="_blank">Documentation on Custom Header</a>' ) . '</p>' .
'<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
);
}
/**
@ -119,8 +147,11 @@ class Custom_Image_Header {
return 1;
$step = (int) $_GET['step'];
if ( $step < 1 || 3 < $step )
$step = 1;
if ( $step < 1 || 3 < $step ||
( 2 == $step && ! wp_verify_nonce( $_REQUEST['_wpnonce-custom-header-upload'], 'custom-header-upload' ) ) ||
( 3 == $step && ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'custom-header-crop-image' ) )
)
return 1;
return $step;
}
@ -133,10 +164,14 @@ class Custom_Image_Header {
function js_includes() {
$step = $this->step();
if ( ( 1 == $step || 3 == $step ) && $this->header_text() )
wp_enqueue_script('farbtastic');
elseif ( 2 == $step )
if ( ( 1 == $step || 3 == $step ) ) {
wp_enqueue_media();
wp_enqueue_script( 'custom-header' );
if ( current_theme_supports( 'custom-header', 'header-text' ) )
wp_enqueue_script( 'wp-color-picker' );
} elseif ( 2 == $step ) {
wp_enqueue_script('imgareaselect');
}
}
/**
@ -147,24 +182,12 @@ class Custom_Image_Header {
function css_includes() {
$step = $this->step();
if ( ( 1 == $step || 3 == $step ) && $this->header_text() )
wp_enqueue_style('farbtastic');
if ( ( 1 == $step || 3 == $step ) && current_theme_supports( 'custom-header', 'header-text' ) )
wp_enqueue_style( 'wp-color-picker' );
elseif ( 2 == $step )
wp_enqueue_style('imgareaselect');
}
/**
* Check if header text is allowed
*
* @since 3.0.0
*/
function header_text() {
if ( defined( 'NO_HEADER_TEXT' ) && NO_HEADER_TEXT )
return false;
return true;
}
/**
* Execute custom header modification.
*
@ -181,48 +204,33 @@ class Custom_Image_Header {
if ( isset( $_POST['resetheader'] ) ) {
check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' );
remove_theme_mod( 'header_image' );
return;
}
if ( isset( $_POST['resettext'] ) ) {
check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' );
remove_theme_mod('header_textcolor');
$this->reset_header_image();
return;
}
if ( isset( $_POST['removeheader'] ) ) {
check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' );
set_theme_mod( 'header_image', 'remove-header' );
$this->remove_header_image();
return;
}
if ( isset( $_POST['text-color'] ) ) {
if ( isset( $_POST['text-color'] ) && ! isset( $_POST['display-header-text'] ) ) {
check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' );
set_theme_mod( 'header_textcolor', 'blank' );
} elseif ( isset( $_POST['text-color'] ) ) {
check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' );
$_POST['text-color'] = str_replace( '#', '', $_POST['text-color'] );
if ( 'blank' == $_POST['text-color'] ) {
$color = preg_replace('/[^0-9a-fA-F]/', '', $_POST['text-color']);
if ( strlen($color) == 6 || strlen($color) == 3 )
set_theme_mod('header_textcolor', $color);
elseif ( ! $color )
set_theme_mod( 'header_textcolor', 'blank' );
} else {
$color = preg_replace('/[^0-9a-fA-F]/', '', $_POST['text-color']);
if ( strlen($color) == 6 || strlen($color) == 3 )
set_theme_mod('header_textcolor', $color);
}
}
if ( isset( $_POST['default-header'] ) ) {
check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' );
if ( 'random-default-image' == $_POST['default-header'] ) {
set_theme_mod( 'header_image', 'random-default-image' );
} elseif ( 'random-uploaded-image' == $_POST['default-header'] ) {
set_theme_mod( 'header_image', 'random-uploaded-image' );
} else {
$this->process_default_headers();
$uploaded = get_uploaded_header_images();
if ( isset( $uploaded[$_POST['default-header']] ) )
set_theme_mod( 'header_image', esc_url( $uploaded[$_POST['default-header']]['url'] ) );
elseif ( isset( $this->default_headers[$_POST['default-header']] ) )
set_theme_mod( 'header_image', esc_url( $this->default_headers[$_POST['default-header']]['url'] ) );
}
$this->set_header_image( $_POST['default-header'] );
return;
}
}
@ -241,9 +249,11 @@ class Custom_Image_Header {
return;
$this->default_headers = $_wp_default_headers;
$template_directory_uri = get_template_directory_uri();
$stylesheet_directory_uri = get_stylesheet_directory_uri();
foreach ( array_keys($this->default_headers) as $header ) {
$this->default_headers[$header]['url'] = sprintf( $this->default_headers[$header]['url'], get_template_directory_uri(), get_stylesheet_directory_uri() );
$this->default_headers[$header]['thumbnail_url'] = sprintf( $this->default_headers[$header]['thumbnail_url'], get_template_directory_uri(), get_stylesheet_directory_uri() );
$this->default_headers[$header]['url'] = sprintf( $this->default_headers[$header]['url'], $template_directory_uri, $stylesheet_directory_uri );
$this->default_headers[$header]['thumbnail_url'] = sprintf( $this->default_headers[$header]['thumbnail_url'], $template_directory_uri, $stylesheet_directory_uri );
}
}
@ -280,9 +290,9 @@ class Custom_Image_Header {
echo '<div class="default-header">';
echo '<label><input name="default-header" type="radio" value="' . esc_attr( $header_key ) . '" ' . checked( $header_url, get_theme_mod( 'header_image' ), false ) . ' />';
$width = '';
if ( !empty( $header['uploaded'] ) )
if ( !empty( $header['attachment_id'] ) )
$width = ' width="230"';
echo '<img src="' . $header_thumbnail . '" alt="' . esc_attr( $header_desc ) .'" title="' . esc_attr( $header_desc ) . '"' . $width . ' /></label>';
echo '<img src="' . set_url_scheme( $header_thumbnail ) . '" alt="' . esc_attr( $header_desc ) .'" title="' . esc_attr( $header_desc ) . '"' . $width . ' /></label>';
echo '</div>';
}
echo '<div class="clear"></div></div>';
@ -295,7 +305,7 @@ class Custom_Image_Header {
*/
function js() {
$step = $this->step();
if ( ( 1 == $step || 3 == $step ) && $this->header_text() )
if ( ( 1 == $step || 3 == $step ) && current_theme_supports( 'custom-header', 'header-text' ) )
$this->js_1();
elseif ( 2 == $step )
$this->js_2();
@ -309,86 +319,48 @@ class Custom_Image_Header {
function js_1() { ?>
<script type="text/javascript">
/* <![CDATA[ */
var text_objects = ['#name', '#desc', '#text-color-row'];
var farbtastic;
var default_color = '#<?php echo HEADER_TEXTCOLOR; ?>';
var old_color = null;
(function($){
var default_color = '#<?php echo get_theme_support( 'custom-header', 'default-text-color' ); ?>',
header_text_fields;
function pickColor(color) {
jQuery('#name').css('color', color);
jQuery('#desc').css('color', color);
jQuery('#text-color').val(color);
farbtastic.setColor(color);
$('#name').css('color', color);
$('#desc').css('color', color);
$('#text-color').val(color);
}
function toggle_text(s) {
if (jQuery(s).attr('id') == 'showtext' && jQuery('#text-color').val() != 'blank')
function toggle_text() {
var checked = $('#display-header-text').prop('checked'),
text_color;
header_text_fields.toggle( checked );
if ( ! checked )
return;
if (jQuery(s).attr('id') == 'hidetext' && jQuery('#text-color').val() == 'blank')
return;
if (jQuery('#text-color').val() == 'blank') {
//Show text
if (old_color == '#blank')
old_color = default_color;
jQuery( text_objects.toString() ).show();
jQuery('#text-color').val(old_color);
jQuery('#name').css('color', old_color);
jQuery('#desc').css('color', old_color);
pickColor(old_color);
text_color = $('#text-color');
if ( '' == text_color.val().replace('#', '') ) {
text_color.val( default_color );
pickColor( default_color );
} else {
//Hide text
jQuery( text_objects.toString() ).hide();
old_color = jQuery('#text-color').val();
jQuery('#text-color').val('blank');
pickColor( text_color.val() );
}
}
jQuery(document).ready(function() {
jQuery('#pickcolor').click(function() {
jQuery('#color-picker').show();
$(document).ready(function() {
var text_color = $('#text-color');
header_text_fields = $('.displaying-header-text');
text_color.wpColorPicker({
change: function( event, ui ) {
pickColor( text_color.wpColorPicker('color') );
},
clear: function() {
pickColor( '' );
}
});
jQuery('input[name="hidetext"]').click(function() {
toggle_text(this);
});
jQuery('#defaultcolor').click(function() {
pickColor(default_color);
jQuery('#text-color').val(default_color)
});
jQuery('#text-color').keyup(function() {
var _hex = jQuery('#text-color').val();
var hex = _hex;
if ( hex[0] != '#' )
hex = '#' + hex;
hex = hex.replace(/[^#a-fA-F0-9]+/, '');
if ( hex != _hex )
jQuery('#text-color').val(hex);
if ( hex.length == 4 || hex.length == 7 )
pickColor( hex );
});
jQuery(document).mousedown(function(){
jQuery('#color-picker').each( function() {
var display = jQuery(this).css('display');
if (display == 'block')
jQuery(this).fadeOut(2);
});
});
farbtastic = jQuery.farbtastic('#color-picker', function(color) { pickColor(color); });
<?php if ( $color = get_theme_mod('header_textcolor', HEADER_TEXTCOLOR) ) { ?>
pickColor('#<?php echo $color; ?>');
<?php } ?>
<?php if ( 'blank' == get_theme_mod( 'header_textcolor', HEADER_TEXTCOLOR ) || '' == get_theme_mod('header_textcolor', HEADER_TEXTCOLOR) || ! $this->header_text() ) { ?>
$('#display-header-text').click( toggle_text );
<?php if ( ! display_header_text() ) : ?>
toggle_text();
<?php } ?>
<?php endif; ?>
});
})(jQuery);
/* ]]> */
</script>
<?php
@ -410,8 +382,8 @@ class Custom_Image_Header {
}
jQuery(document).ready(function() {
var xinit = <?php echo HEADER_IMAGE_WIDTH; ?>;
var yinit = <?php echo HEADER_IMAGE_HEIGHT; ?>;
var xinit = <?php echo absint( get_theme_support( 'custom-header', 'width' ) ); ?>;
var yinit = <?php echo absint( get_theme_support( 'custom-header', 'height' ) ); ?>;
var ratio = xinit / yinit;
var ximg = jQuery('img#upload').width();
var yimg = jQuery('img#upload').height();
@ -429,14 +401,28 @@ class Custom_Image_Header {
jQuery('img#upload').imgAreaSelect({
handles: true,
keys: true,
aspectRatio: xinit + ':' + yinit,
show: true,
x1: 0,
y1: 0,
x2: xinit,
y2: yinit,
maxHeight: <?php echo HEADER_IMAGE_HEIGHT; ?>,
maxWidth: <?php echo HEADER_IMAGE_WIDTH; ?>,
<?php
if ( ! current_theme_supports( 'custom-header', 'flex-height' ) && ! current_theme_supports( 'custom-header', 'flex-width' ) ) {
?>
aspectRatio: xinit + ':' + yinit,
<?php
}
if ( ! current_theme_supports( 'custom-header', 'flex-height' ) ) {
?>
maxHeight: <?php echo get_theme_support( 'custom-header', 'height' ); ?>,
<?php
}
if ( ! current_theme_supports( 'custom-header', 'flex-width' ) ) {
?>
maxWidth: <?php echo get_theme_support( 'custom-header', 'width' ); ?>,
<?php
}
?>
onInit: function () {
jQuery('#width').val(xinit);
jQuery('#height').val(yinit);
@ -473,44 +459,81 @@ class Custom_Image_Header {
</div>
<?php } ?>
<h3><?php _e( 'Header Image' ); ?></h3>
<table class="form-table">
<tbody>
<tr valign="top">
<th scope="row"><?php _e( 'Preview' ); ?></th>
<td >
<td>
<?php if ( $this->admin_image_div_callback ) {
call_user_func( $this->admin_image_div_callback );
} else {
$custom_header = get_custom_header();
$header_image_style = 'background-image:url(' . esc_url( get_header_image() ) . ');';
if ( $custom_header->width )
$header_image_style .= 'max-width:' . $custom_header->width . 'px;';
if ( $custom_header->height )
$header_image_style .= 'height:' . $custom_header->height . 'px;';
?>
<div id="headimg" style="max-width:<?php echo HEADER_IMAGE_WIDTH; ?>px;height:<?php echo HEADER_IMAGE_HEIGHT; ?>px;background-image:url(<?php esc_url ( header_image() ) ?>);">
<div id="headimg" style="<?php echo $header_image_style; ?>">
<?php
if ( 'blank' == get_theme_mod('header_textcolor', HEADER_TEXTCOLOR) || '' == get_theme_mod('header_textcolor', HEADER_TEXTCOLOR) || ! $this->header_text() )
$style = ' style="display:none;"';
if ( display_header_text() )
$style = ' style="color:#' . get_header_textcolor() . ';"';
else
$style = ' style="color:#' . get_theme_mod( 'header_textcolor', HEADER_TEXTCOLOR ) . ';"';
$style = ' style="display:none;"';
?>
<h1><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php bloginfo('url'); ?>"><?php bloginfo( 'name' ); ?></a></h1>
<div id="desc"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></div>
<h1><a id="name" class="displaying-header-text" <?php echo $style; ?> onclick="return false;" href="<?php bloginfo('url'); ?>"><?php bloginfo( 'name' ); ?></a></h1>
<div id="desc" class="displaying-header-text" <?php echo $style; ?>><?php bloginfo( 'description' ); ?></div>
</div>
<?php } ?>
</td>
</tr>
<?php if ( current_theme_supports( 'custom-header-uploads' ) ) : ?>
<?php if ( current_theme_supports( 'custom-header', 'uploads' ) ) : ?>
<tr valign="top">
<th scope="row"><?php _e( 'Upload Image' ); ?></th>
<th scope="row"><?php _e( 'Select Image' ); ?></th>
<td>
<p><?php _e( 'You can upload a custom header image to be shown at the top of your site instead of the default one. On the next screen you will be able to crop the image.' ); ?><br />
<?php printf( __( 'Images of exactly <strong>%1$d &times; %2$d pixels</strong> will be used as-is.' ), HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT ); ?></p>
<form enctype="multipart/form-data" id="upload-form" method="post" action="<?php echo esc_attr( add_query_arg( 'step', 2 ) ) ?>">
<p><?php _e( 'You can select an image to be shown at the top of your site by uploading from your computer or choosing from your media library. After selecting an image you will be able to crop it.' ); ?><br />
<?php
if ( ! current_theme_supports( 'custom-header', 'flex-height' ) && ! current_theme_supports( 'custom-header', 'flex-width' ) ) {
printf( __( 'Images of exactly <strong>%1$d &times; %2$d pixels</strong> will be used as-is.' ) . '<br />', get_theme_support( 'custom-header', 'width' ), get_theme_support( 'custom-header', 'height' ) );
} elseif ( current_theme_supports( 'custom-header', 'flex-height' ) ) {
if ( ! current_theme_supports( 'custom-header', 'flex-width' ) )
printf( __( 'Images should be at least <strong>%1$d pixels</strong> wide.' ) . ' ', get_theme_support( 'custom-header', 'width' ) );
} elseif ( current_theme_supports( 'custom-header', 'flex-width' ) ) {
if ( ! current_theme_supports( 'custom-header', 'flex-height' ) )
printf( __( 'Images should be at least <strong>%1$d pixels</strong> tall.' ) . ' ', get_theme_support( 'custom-header', 'height' ) );
}
if ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) {
if ( current_theme_supports( 'custom-header', 'width' ) )
printf( __( 'Suggested width is <strong>%1$d pixels</strong>.' ) . ' ', get_theme_support( 'custom-header', 'width' ) );
if ( current_theme_supports( 'custom-header', 'height' ) )
printf( __( 'Suggested height is <strong>%1$d pixels</strong>.' ) . ' ', get_theme_support( 'custom-header', 'height' ) );
}
?></p>
<form enctype="multipart/form-data" id="upload-form" class="wp-upload-form" method="post" action="<?php echo esc_url( add_query_arg( 'step', 2 ) ) ?>">
<p>
<label for="upload"><?php _e( 'Choose an image from your computer:' ); ?></label><br />
<input type="file" id="upload" name="import" />
<input type="hidden" name="action" value="save" />
<?php wp_nonce_field( 'custom-header-upload', '_wpnonce-custom-header-upload' ) ?>
<?php wp_nonce_field( 'custom-header-upload', '_wpnonce-custom-header-upload' ); ?>
<?php submit_button( __( 'Upload' ), 'button', 'submit', false ); ?>
</p>
<?php
$modal_update_href = esc_url( add_query_arg( array(
'page' => 'custom-header',
'step' => 2,
'_wpnonce-custom-header-upload' => wp_create_nonce('custom-header-upload'),
), admin_url('themes.php') ) );
?>
<p>
<label for="choose-from-library-link"><?php _e( 'Or choose an image from your media library:' ); ?></label><br />
<a id="choose-from-library-link" class="button"
data-update-link="<?php echo esc_attr( $modal_update_href ); ?>"
data-choose="<?php esc_attr_e( 'Choose a Custom Header' ); ?>"
data-update="<?php esc_attr_e( 'Set as header' ); ?>"><?php _e( 'Choose Image' ); ?></a>
</p>
</form>
</td>
</tr>
@ -518,7 +541,7 @@ class Custom_Image_Header {
</tbody>
</table>
<form method="post" action="<?php echo esc_attr( add_query_arg( 'step', 1 ) ) ?>">
<form method="post" action="<?php echo esc_url( add_query_arg( 'step', 1 ) ) ?>">
<table class="form-table">
<tbody>
<?php if ( get_uploaded_header_images() ) : ?>
@ -536,7 +559,7 @@ class Custom_Image_Header {
<tr valign="top">
<th scope="row"><?php _e( 'Default Images' ); ?></th>
<td>
<?php if ( current_theme_supports( 'custom-header-uploads' ) ) : ?>
<?php if ( current_theme_supports( 'custom-header', 'uploads' ) ) : ?>
<p><?php _e( 'If you don&lsquo;t want to upload your own image, you can use one of these cool headers, or show a random one.' ) ?></p>
<?php else: ?>
<p><?php _e( 'You can use one of these cool headers or show a random one on each page.' ) ?></p>
@ -557,7 +580,8 @@ class Custom_Image_Header {
</tr>
<?php endif;
if ( defined( 'HEADER_IMAGE' ) && '' != HEADER_IMAGE ) : ?>
$default_image = get_theme_support( 'custom-header', 'default-image' );
if ( $default_image && get_header_image() != $default_image ) : ?>
<tr valign="top">
<th scope="row"><?php _e( 'Reset Image' ); ?></th>
<td>
@ -569,45 +593,42 @@ class Custom_Image_Header {
</tbody>
</table>
<?php if ( $this->header_text() ) : ?>
<?php if ( current_theme_supports( 'custom-header', 'header-text' ) ) : ?>
<h3><?php _e( 'Header Text' ); ?></h3>
<table class="form-table">
<tbody>
<tr valign="top" class="hide-if-no-js">
<th scope="row"><?php _e( 'Display Text' ); ?></th>
<tr valign="top">
<th scope="row"><?php _e( 'Header Text' ); ?></th>
<td>
<p>
<?php $hidetext = get_theme_mod( 'header_textcolor', HEADER_TEXTCOLOR ); ?>
<label><input type="radio" value="1" name="hidetext" id="hidetext"<?php checked( ( 'blank' == $hidetext || empty( $hidetext ) ) ? true : false ); ?> /> <?php _e( 'No' ); ?></label>
<label><input type="radio" value="0" name="hidetext" id="showtext"<?php checked( ( 'blank' == $hidetext || empty( $hidetext ) ) ? false : true ); ?> /> <?php _e( 'Yes' ); ?></label>
<label><input type="checkbox" name="display-header-text" id="display-header-text"<?php checked( display_header_text() ); ?> /> <?php _e( 'Show header text with your image.' ); ?></label>
</p>
</td>
</tr>
<tr valign="top" id="text-color-row">
<tr valign="top" class="displaying-header-text">
<th scope="row"><?php _e( 'Text Color' ); ?></th>
<td>
<p>
<input type="text" name="text-color" id="text-color" value="#<?php echo esc_attr( get_theme_mod( 'header_textcolor', HEADER_TEXTCOLOR ) ); ?>" />
<span class="description hide-if-js"><?php _e( 'If you want to hide header text, add <strong>#blank</strong> as text color.' );?></span>
<input type="button" class="button hide-if-no-js" value="<?php esc_attr_e( 'Select a Color' ); ?>" id="pickcolor" />
<?php
$header_textcolor = display_header_text() ? get_header_textcolor() : get_theme_support( 'custom-header', 'default-text-color' );
$default_color = '';
if ( current_theme_supports( 'custom-header', 'default-text-color' ) ) {
$default_color = '#' . get_theme_support( 'custom-header', 'default-text-color' );
$default_color_attr = ' data-default-color="' . esc_attr( $default_color ) . '"';
echo '<input type="text" name="text-color" id="text-color" value="#' . esc_attr( $header_textcolor ) . '"' . $default_color_attr . ' />';
if ( $default_color )
echo ' <span class="description hide-if-js">' . sprintf( _x( 'Default: %s', 'color' ), $default_color ) . '</span>';
}
?>
</p>
<div id="color-picker" style="z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;"></div>
</td>
</tr>
<?php if ( defined('HEADER_TEXTCOLOR') && get_theme_mod('header_textcolor') ) { ?>
<tr valign="top">
<th scope="row"><?php _e('Reset Text Color'); ?></th>
<td>
<p><?php _e( 'This will restore the original header text. You will not be able to restore any customizations.' ) ?></p>
<?php submit_button( __( 'Restore Original Header Text' ), 'button', 'resettext', false ); ?>
</td>
</tr>
<?php } ?>
</tbody>
</table>
<?php endif;
<?php endif;
do_action( 'custom_header_options' );
@ -626,49 +647,55 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
*/
function step_2() {
check_admin_referer('custom-header-upload', '_wpnonce-custom-header-upload');
if ( ! current_theme_supports( 'custom-header-uploads' ) )
wp_die( 'Cheatin&#8217; uh?' );
if ( ! current_theme_supports( 'custom-header', 'uploads' ) )
wp_die( __( 'Cheatin&#8217; uh?' ) );
$overrides = array('test_form' => false);
$file = wp_handle_upload($_FILES['import'], $overrides);
if ( empty( $_POST ) && isset( $_GET['file'] ) ) {
$attachment_id = absint( $_GET['file'] );
$file = get_attached_file( $attachment_id, true );
$url = wp_get_attachment_image_src( $attachment_id, 'full');
$url = $url[0];
} elseif ( isset( $_POST ) ) {
extract($this->step_2_manage_upload());
}
if ( isset($file['error']) )
wp_die( $file['error'], __( 'Image Upload Error' ) );
if ( file_exists( $file ) ) {
list( $width, $height, $type, $attr ) = getimagesize( $file );
} else {
$data = wp_get_attachment_metadata( $attachment_id );
$height = $data[ 'height' ];
$width = $data[ 'width' ];
unset( $data );
}
$url = $file['url'];
$type = $file['type'];
$file = $file['file'];
$filename = basename($file);
$max_width = 0;
// For flex, limit size of image displayed to 1500px unless theme says otherwise
if ( current_theme_supports( 'custom-header', 'flex-width' ) )
$max_width = 1500;
// Construct the object array
$object = array(
'post_title' => $filename,
'post_content' => $url,
'post_mime_type' => $type,
'guid' => $url,
'context' => 'custom-header'
);
if ( current_theme_supports( 'custom-header', 'max-width' ) )
$max_width = max( $max_width, get_theme_support( 'custom-header', 'max-width' ) );
$max_width = max( $max_width, get_theme_support( 'custom-header', 'width' ) );
// Save the data
$id = wp_insert_attachment($object, $file);
list($width, $height, $type, $attr) = getimagesize( $file );
if ( $width == HEADER_IMAGE_WIDTH && $height == HEADER_IMAGE_HEIGHT ) {
// If flexible height isn't supported and the image is the exact right size
if ( ! current_theme_supports( 'custom-header', 'flex-height' ) && ! current_theme_supports( 'custom-header', 'flex-width' )
&& $width == get_theme_support( 'custom-header', 'width' ) && $height == get_theme_support( 'custom-header', 'height' ) )
{
// Add the meta-data
wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) );
update_post_meta( $id, '_wp_attachment_is_custom_header', get_option('stylesheet' ) );
if ( file_exists( $file ) )
wp_update_attachment_metadata( $attachment_id, wp_generate_attachment_metadata( $attachment_id, $file ) );
set_theme_mod('header_image', esc_url($url));
do_action('wp_create_file_in_uploads', $file, $id); // For replication
$this->set_header_image( compact( 'url', 'attachment_id', 'width', 'height' ) );
do_action('wp_create_file_in_uploads', $file, $attachment_id); // For replication
return $this->finished();
} elseif ( $width > HEADER_IMAGE_WIDTH ) {
$oitar = $width / HEADER_IMAGE_WIDTH;
$image = wp_crop_image($file, 0, 0, $width, $height, HEADER_IMAGE_WIDTH, $height / $oitar, false, str_replace(basename($file), 'midsize-'.basename($file), $file));
if ( is_wp_error( $image ) )
wp_die( __( 'Image could not be processed. Please go back and try again.' ), __( 'Image Processing Error' ) );
} elseif ( $width > $max_width ) {
$oitar = $width / $max_width;
$image = wp_crop_image($attachment_id, 0, 0, $width, $height, $max_width, $height / $oitar, false, str_replace(basename($file), 'midsize-'.basename($file), $file));
if ( ! $image || is_wp_error( $image ) )
wp_die( __( 'Image could not be processed. Please go back and try again.' ), __( 'Image Processing Error' ) );
$image = apply_filters('wp_create_file_in_uploads', $image, $id); // For replication
$image = apply_filters('wp_create_file_in_uploads', $image, $attachment_id); // For replication
$url = str_replace(basename($url), basename($image), $url);
$width = $width / $oitar;
@ -682,7 +709,7 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
<?php screen_icon(); ?>
<h2><?php _e( 'Crop Header Image' ); ?></h2>
<form method="post" action="<?php echo esc_attr(add_query_arg('step', 3)); ?>">
<form method="post" action="<?php echo esc_url(add_query_arg('step', 3)); ?>">
<p class="hide-if-no-js"><?php _e('Choose the part of the image you want to use as your header.'); ?></p>
<p class="hide-if-js"><strong><?php _e( 'You need Javascript to choose a part of the image.'); ?></strong></p>
@ -694,26 +721,76 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
<input type="hidden" name="y1" id="y1" value="0"/>
<input type="hidden" name="width" id="width" value="<?php echo esc_attr( $width ); ?>"/>
<input type="hidden" name="height" id="height" value="<?php echo esc_attr( $height ); ?>"/>
<input type="hidden" name="attachment_id" id="attachment_id" value="<?php echo esc_attr( $id ); ?>" />
<input type="hidden" name="attachment_id" id="attachment_id" value="<?php echo esc_attr( $attachment_id ); ?>" />
<input type="hidden" name="oitar" id="oitar" value="<?php echo esc_attr( $oitar ); ?>" />
<?php if ( empty( $_POST ) && isset( $_GET['file'] ) ) { ?>
<input type="hidden" name="create-new-attachment" value="true" />
<?php } ?>
<?php wp_nonce_field( 'custom-header-crop-image' ) ?>
<?php submit_button( __( 'Crop and Publish' ) ); ?>
<p class="submit">
<?php submit_button( __( 'Crop and Publish' ), 'primary', 'submit', false ); ?>
<?php
if ( isset( $oitar ) && 1 == $oitar && ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) )
submit_button( __( 'Skip Cropping, Publish Image as Is' ), 'secondary', 'skip-cropping', false );
?>
</p>
</form>
</div>
<?php
}
/**
* Upload the file to be cropped in the second step.
*
* @since 3.4.0
*/
function step_2_manage_upload() {
$overrides = array('test_form' => false);
$uploaded_file = $_FILES['import'];
$wp_filetype = wp_check_filetype_and_ext( $uploaded_file['tmp_name'], $uploaded_file['name'], false );
if ( ! wp_match_mime_types( 'image', $wp_filetype['type'] ) )
wp_die( __( 'The uploaded file is not a valid image. Please try again.' ) );
$file = wp_handle_upload($uploaded_file, $overrides);
if ( isset($file['error']) )
wp_die( $file['error'], __( 'Image Upload Error' ) );
$url = $file['url'];
$type = $file['type'];
$file = $file['file'];
$filename = basename($file);
// Construct the object array
$object = array(
'post_title' => $filename,
'post_content' => $url,
'post_mime_type' => $type,
'guid' => $url,
'context' => 'custom-header'
);
// Save the data
$attachment_id = wp_insert_attachment( $object, $file );
return compact( 'attachment_id', 'file', 'filename', 'url', 'type' );
}
/**
* Display third step of custom header image page.
*
* @since 2.1.0
*/
function step_3() {
check_admin_referer('custom-header-crop-image');
if ( ! current_theme_supports( 'custom-header-uploads' ) )
wp_die( 'Cheatin&#8217; uh?' );
check_admin_referer( 'custom-header-crop-image' );
if ( ! current_theme_supports( 'custom-header', 'uploads' ) )
wp_die( __( 'Cheatin&#8217; uh?' ) );
if ( ! empty( $_POST['skip-cropping'] ) && ! ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) )
wp_die( __( 'Cheatin&#8217; uh?' ) );
if ( $_POST['oitar'] > 1 ) {
$_POST['x1'] = $_POST['x1'] * $_POST['oitar'];
@ -725,37 +802,75 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
$attachment_id = absint( $_POST['attachment_id'] );
$original = get_attached_file($attachment_id);
$cropped = wp_crop_image( $attachment_id, (int) $_POST['x1'], (int) $_POST['y1'], (int) $_POST['width'], (int) $_POST['height'], HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT );
if ( is_wp_error( $cropped ) )
wp_die( __( 'Image could not be processed. Please go back and try again.' ), __( 'Image Processing Error' ) );
$max_width = 0;
// For flex, limit size of image displayed to 1500px unless theme says otherwise
if ( current_theme_supports( 'custom-header', 'flex-width' ) )
$max_width = 1500;
if ( current_theme_supports( 'custom-header', 'max-width' ) )
$max_width = max( $max_width, get_theme_support( 'custom-header', 'max-width' ) );
$max_width = max( $max_width, get_theme_support( 'custom-header', 'width' ) );
if ( ( current_theme_supports( 'custom-header', 'flex-height' ) && ! current_theme_supports( 'custom-header', 'flex-width' ) ) || $_POST['width'] > $max_width )
$dst_height = absint( $_POST['height'] * ( $max_width / $_POST['width'] ) );
elseif ( current_theme_supports( 'custom-header', 'flex-height' ) && current_theme_supports( 'custom-header', 'flex-width' ) )
$dst_height = absint( $_POST['height'] );
else
$dst_height = get_theme_support( 'custom-header', 'height' );
if ( ( current_theme_supports( 'custom-header', 'flex-width' ) && ! current_theme_supports( 'custom-header', 'flex-height' ) ) || $_POST['width'] > $max_width )
$dst_width = absint( $_POST['width'] * ( $max_width / $_POST['width'] ) );
elseif ( current_theme_supports( 'custom-header', 'flex-width' ) && current_theme_supports( 'custom-header', 'flex-height' ) )
$dst_width = absint( $_POST['width'] );
else
$dst_width = get_theme_support( 'custom-header', 'width' );
if ( empty( $_POST['skip-cropping'] ) )
$cropped = wp_crop_image( $attachment_id, (int) $_POST['x1'], (int) $_POST['y1'], (int) $_POST['width'], (int) $_POST['height'], $dst_width, $dst_height );
elseif ( ! empty( $_POST['create-new-attachment'] ) )
$cropped = _copy_image_file( $attachment_id );
else
$cropped = get_attached_file( $attachment_id );
if ( ! $cropped || is_wp_error( $cropped ) )
wp_die( __( 'Image could not be processed. Please go back and try again.' ), __( 'Image Processing Error' ) );
$cropped = apply_filters('wp_create_file_in_uploads', $cropped, $attachment_id); // For replication
$parent = get_post($attachment_id);
$parent_url = $parent->guid;
$url = str_replace(basename($parent_url), basename($cropped), $parent_url);
$url = str_replace( basename( $parent_url ), basename( $cropped ), $parent_url );
$size = @getimagesize( $cropped );
$image_type = ( $size ) ? $size['mime'] : 'image/jpeg';
// Construct the object array
$object = array(
'ID' => $attachment_id,
'post_title' => basename($cropped),
'post_content' => $url,
'post_mime_type' => 'image/jpeg',
'post_mime_type' => $image_type,
'guid' => $url,
'context' => 'custom-header'
);
if ( ! empty( $_POST['create-new-attachment'] ) )
unset( $object['ID'] );
// Update the attachment
wp_insert_attachment($object, $cropped);
$attachment_id = wp_insert_attachment( $object, $cropped );
wp_update_attachment_metadata( $attachment_id, wp_generate_attachment_metadata( $attachment_id, $cropped ) );
update_post_meta( $attachment_id, '_wp_attachment_is_custom_header', get_option('stylesheet' ) );
set_theme_mod('header_image', $url);
$width = $dst_width;
$height = $dst_height;
$this->set_header_image( compact( 'url', 'attachment_id', 'width', 'height' ) );
// cleanup
$medium = str_replace(basename($original), 'midsize-'.basename($original), $original);
@unlink( apply_filters( 'wp_delete_file', $medium ) );
@unlink( apply_filters( 'wp_delete_file', $original ) );
$medium = str_replace( basename( $original ), 'midsize-' . basename( $original ), $original );
if ( file_exists( $medium ) )
@unlink( apply_filters( 'wp_delete_file', $medium ) );
if ( empty( $_POST['create-new-attachment'] ) && empty( $_POST['skip-cropping'] ) )
@unlink( apply_filters( 'wp_delete_file', $original ) );
return $this->finished();
}
@ -779,13 +894,121 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
if ( ! current_user_can('edit_theme_options') )
wp_die(__('You do not have permission to customize headers.'));
$step = $this->step();
if ( 1 == $step )
$this->step_1();
elseif ( 2 == $step )
if ( 2 == $step )
$this->step_2();
elseif ( 3 == $step )
$this->step_3();
else
$this->step_1();
}
/**
* Unused since 3.5.0.
*
* @since 3.4.0
*/
function attachment_fields_to_edit( $form_fields ) {
return $form_fields;
}
/**
* Unused since 3.5.0.
*
* @since 3.4.0
*/
function filter_upload_tabs( $tabs ) {
return $tabs;
}
/**
* Choose a header image, selected from existing uploaded and default headers,
* or provide an array of uploaded header data (either new, or from media library).
*
* @param mixed $choice Which header image to select. Allows for values of 'random-default-image',
* for randomly cycling among the default images; 'random-uploaded-image', for randomly cycling
* among the uploaded images; the key of a default image registered for that theme; and
* the key of an image uploaded for that theme (the basename of the URL).
* Or an array of arguments: attachment_id, url, width, height. All are required.
*
* @since 3.4.0
*/
final public function set_header_image( $choice ) {
if ( is_array( $choice ) || is_object( $choice ) ) {
$choice = (array) $choice;
if ( ! isset( $choice['attachment_id'] ) || ! isset( $choice['url'] ) )
return;
$choice['url'] = esc_url_raw( $choice['url'] );
$header_image_data = (object) array(
'attachment_id' => $choice['attachment_id'],
'url' => $choice['url'],
'thumbnail_url' => $choice['url'],
'height' => $choice['height'],
'width' => $choice['width'],
);
update_post_meta( $choice['attachment_id'], '_wp_attachment_is_custom_header', get_stylesheet() );
set_theme_mod( 'header_image', $choice['url'] );
set_theme_mod( 'header_image_data', $header_image_data );
return;
}
if ( in_array( $choice, array( 'remove-header', 'random-default-image', 'random-uploaded-image' ) ) ) {
set_theme_mod( 'header_image', $choice );
remove_theme_mod( 'header_image_data' );
return;
}
$uploaded = get_uploaded_header_images();
if ( $uploaded && isset( $uploaded[ $choice ] ) ) {
$header_image_data = $uploaded[ $choice ];
} else {
$this->process_default_headers();
if ( isset( $this->default_headers[ $choice ] ) )
$header_image_data = $this->default_headers[ $choice ];
else
return;
}
set_theme_mod( 'header_image', esc_url_raw( $header_image_data['url'] ) );
set_theme_mod( 'header_image_data', $header_image_data );
}
/**
* Remove a header image.
*
* @since 3.4.0
*/
final public function remove_header_image() {
return $this->set_header_image( 'remove-header' );
}
/**
* Reset a header image to the default image for the theme.
*
* This method does not do anything if the theme does not have a default header image.
*
* @since 3.4.0
*/
final public function reset_header_image() {
$this->process_default_headers();
$default = get_theme_support( 'custom-header', 'default-image' );
if ( ! $default )
return $this->remove_header_image();
$default = sprintf( $default, get_template_directory_uri(), get_stylesheet_directory_uri() );
foreach ( $this->default_headers as $header => $details ) {
if ( $details['url'] == $default ) {
$default_data = $details;
break;
}
}
set_theme_mod( 'header_image', $default );
set_theme_mod( 'header_image_data', (object) $default_data );
}
}
?>

208
src/wp-admin/customize.php Normal file
View File

@ -0,0 +1,208 @@
<?php
/**
* Customize Controls
*
* @package WordPress
* @subpackage Customize
* @since 3.4.0
*/
define( 'IFRAME_REQUEST', true );
require_once( './admin.php' );
if ( ! current_user_can( 'edit_theme_options' ) )
wp_die( __( 'Cheatin&#8217; uh?' ) );
wp_reset_vars( array( 'url', 'return' ) );
$url = urldecode( $url );
$url = wp_validate_redirect( $url, home_url( '/' ) );
if ( $return )
$return = wp_validate_redirect( urldecode( $return ) );
if ( ! $return )
$return = $url;
global $wp_scripts, $wp_customize;
$registered = $wp_scripts->registered;
$wp_scripts = new WP_Scripts;
$wp_scripts->registered = $registered;
add_action( 'customize_controls_print_scripts', 'print_head_scripts', 20 );
add_action( 'customize_controls_print_footer_scripts', '_wp_footer_scripts' );
add_action( 'customize_controls_print_styles', 'print_admin_styles', 20 );
do_action( 'customize_controls_init' );
wp_enqueue_script( 'customize-controls' );
wp_enqueue_style( 'customize-controls' );
do_action( 'customize_controls_enqueue_scripts' );
// Let's roll.
@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
wp_user_settings();
_wp_admin_html_begin();
$body_class = 'wp-core-ui';
if ( wp_is_mobile() ) :
$body_class .= ' mobile';
?><meta name="viewport" id="viewport-meta" content="width=device-width, initial-scale=0.8, minimum-scale=0.5, maximum-scale=1.2"><?php
endif;
$is_ios = wp_is_mobile() && preg_match( '/iPad|iPod|iPhone/', $_SERVER['HTTP_USER_AGENT'] );
if ( $is_ios )
$body_class .= ' ios';
if ( is_rtl() )
$body_class .= ' rtl';
$body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
$admin_title = sprintf( __( '%1$s &#8212; WordPress' ), strip_tags( sprintf( __( 'Customize %s' ), $wp_customize->theme()->display('Name') ) ) );
?><title><?php echo $admin_title; ?></title><?php
do_action( 'customize_controls_print_styles' );
do_action( 'customize_controls_print_scripts' );
?>
</head>
<body class="<?php echo esc_attr( $body_class ); ?>">
<div class="wp-full-overlay expanded">
<form id="customize-controls" class="wrap wp-full-overlay-sidebar">
<div id="customize-header-actions" class="wp-full-overlay-header">
<?php
$save_text = $wp_customize->is_theme_active() ? __( 'Save &amp; Publish' ) : __( 'Save &amp; Activate' );
submit_button( $save_text, 'primary save', 'save', false );
?>
<span class="spinner"></span>
<a class="back button" href="<?php echo esc_url( $return ? $return : admin_url( 'themes.php' ) ); ?>">
<?php _e( 'Cancel' ); ?>
</a>
</div>
<?php
$screenshot = $wp_customize->theme()->get_screenshot();
$cannot_expand = ! ( $screenshot || $wp_customize->theme()->get('Description') );
?>
<div class="wp-full-overlay-sidebar-content" tabindex="-1">
<div id="customize-info" class="customize-section<?php if ( $cannot_expand ) echo ' cannot-expand'; ?>">
<div class="customize-section-title" aria-label="<?php esc_attr_e( 'Theme Customizer Options' ); ?>" tabindex="0">
<span class="preview-notice"><?php
/* translators: %s is the theme name in the Customize/Live Preview pane */
echo sprintf( __( 'You are previewing %s' ), '<strong class="theme-name">' . $wp_customize->theme()->display('Name') . '</strong>' );
?></span>
</div>
<?php if ( ! $cannot_expand ) : ?>
<div class="customize-section-content">
<?php if ( $screenshot ) : ?>
<img class="theme-screenshot" src="<?php echo esc_url( $screenshot ); ?>" />
<?php endif; ?>
<?php if ( $wp_customize->theme()->get('Description') ): ?>
<div class="theme-description"><?php echo $wp_customize->theme()->display('Description'); ?></div>
<?php endif; ?>
</div>
<?php endif; ?>
</div>
<div id="customize-theme-controls"><ul>
<?php
foreach ( $wp_customize->sections() as $section )
$section->maybe_render();
?>
</ul></div>
</div>
<div id="customize-footer-actions" class="wp-full-overlay-footer">
<a href="#" class="collapse-sidebar button-secondary" title="<?php esc_attr_e('Collapse Sidebar'); ?>">
<span class="collapse-sidebar-arrow"></span>
<span class="collapse-sidebar-label"><?php _e('Collapse'); ?></span>
</a>
</div>
</form>
<div id="customize-preview" class="wp-full-overlay-main"></div>
<?php
do_action( 'customize_controls_print_footer_scripts' );
// If the frontend and the admin are served from the same domain, load the
// preview over ssl if the customizer is being loaded over ssl. This avoids
// insecure content warnings. This is not attempted if the admin and frontend
// are on different domains to avoid the case where the frontend doesn't have
// ssl certs. Domain mapping plugins can allow other urls in these conditions
// using the customize_allowed_urls filter.
$allowed_urls = array( home_url('/') );
$admin_origin = parse_url( admin_url() );
$home_origin = parse_url( home_url() );
$cross_domain = ( strtolower( $admin_origin[ 'host' ] ) != strtolower( $home_origin[ 'host' ] ) );
if ( is_ssl() && ! $cross_domain )
$allowed_urls[] = home_url( '/', 'https' );
$allowed_urls = array_unique( apply_filters( 'customize_allowed_urls', $allowed_urls ) );
$fallback_url = add_query_arg( array(
'preview' => 1,
'template' => $wp_customize->get_template(),
'stylesheet' => $wp_customize->get_stylesheet(),
'preview_iframe' => true,
'TB_iframe' => 'true'
), home_url( '/' ) );
$login_url = add_query_arg( array(
'interim-login' => 1,
'customize-login' => 1
), wp_login_url() );
$settings = array(
'theme' => array(
'stylesheet' => $wp_customize->get_stylesheet(),
'active' => $wp_customize->is_theme_active(),
),
'url' => array(
'preview' => esc_url( $url ? $url : home_url( '/' ) ),
'parent' => esc_url( admin_url() ),
'activated' => admin_url( 'themes.php?activated=true&previewed' ),
'ajax' => esc_url( admin_url( 'admin-ajax.php', 'relative' ) ),
'allowed' => array_map( 'esc_url', $allowed_urls ),
'isCrossDomain' => $cross_domain,
'fallback' => $fallback_url,
'home' => esc_url( home_url( '/' ) ),
'login' => $login_url,
),
'browser' => array(
'mobile' => wp_is_mobile(),
'ios' => $is_ios,
),
'settings' => array(),
'controls' => array(),
'nonce' => array(
'save' => wp_create_nonce( 'save-customize_' . $wp_customize->get_stylesheet() ),
'preview' => wp_create_nonce( 'preview-customize_' . $wp_customize->get_stylesheet() )
),
);
foreach ( $wp_customize->settings() as $id => $setting ) {
$settings['settings'][ $id ] = array(
'value' => $setting->js_value(),
'transport' => $setting->transport,
);
}
foreach ( $wp_customize->controls() as $id => $control ) {
$control->to_json();
$settings['controls'][ $id ] = $control->json;
}
?>
<script type="text/javascript">
var _wpCustomizeSettings = <?php echo json_encode( $settings ); ?>;
</script>
</div>
</body>
</html>

View File

@ -30,7 +30,7 @@ if ( $doaction ) {
} elseif ( isset( $_REQUEST['ids'] ) ) {
$comment_ids = array_map( 'absint', explode( ',', $_REQUEST['ids'] ) );
} elseif ( wp_get_referer() ) {
wp_redirect( wp_get_referer() );
wp_safe_redirect( wp_get_referer() );
exit;
}
@ -92,7 +92,7 @@ if ( $doaction ) {
if ( $trashed || $spammed )
$redirect_to = add_query_arg( 'ids', join( ',', $comment_ids ), $redirect_to );
wp_redirect( $redirect_to );
wp_safe_redirect( $redirect_to );
exit;
} elseif ( ! empty( $_GET['_wp_http_referer'] ) ) {
wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), stripslashes( $_SERVER['REQUEST_URI'] ) ) );
@ -111,18 +111,31 @@ else
add_screen_option( 'per_page', array('label' => _x( 'Comments', 'comments per page (screen options)' )) );
add_contextual_help( $current_screen, '<p>' . __( 'You can manage comments made on your site similar to the way you manage Posts and other content. This screen is customizable in the same ways as other management screens, and you can act on comments using the on-hover action links or the Bulk Actions.' ) . '</p>' .
'<p>' . __( 'A yellow row means the comment is waiting for you to moderate it.' ) . '</p>' .
'<p>' . __( 'In the Author column, in addition to the author&#8217;s name, email address, and blog URL, the commenter&#8217;s IP address is shown. Clicking on this link will show you all the comments made from this IP address.' ) . '</p>' .
'<p>' . __( 'In the Comment column, above each comment it says &#8220;Submitted on,&#8221; followed by the date and time the comment was left on your site. Clicking on the date/time link will take you to that comment on your live site. Hovering over any comment gives you options to approve, reply (and approve), quick edit, edit, spam mark, or trash that comment.' ) . '</p>' .
'<p>' . __( 'In the In Response To column, there are three elements. The text is the name of the post that inspired the comment, and links to the post editor for that entry. The &#8220;#&#8221; permalink symbol below leads to that post on your live site. The small bubble with the number in it shows how many comments that post has received. If the bubble is gray, you have moderated all comments for that post. If it is blue, there are pending comments. Clicking the bubble will filter the comments screen to show only comments on that post.' ) . '</p>' .
'<p>' . __( 'Many people take advantage of keyboard shortcuts to moderate their comments more quickly. Use the link below to learn more.' ) . '</p>' .
get_current_screen()->add_help_tab( array(
'id' => 'overview',
'title' => __('Overview'),
'content' =>
'<p>' . __( 'You can manage comments made on your site similar to the way you manage posts and other content. This screen is customizable in the same ways as other management screens, and you can act on comments using the on-hover action links or the Bulk Actions.' ) . '</p>'
) );
get_current_screen()->add_help_tab( array(
'id' => 'moderating-comments',
'title' => __('Moderating Comments'),
'content' =>
'<p>' . __( 'A yellow row means the comment is waiting for you to moderate it.' ) . '</p>' .
'<p>' . __( 'In the <strong>Author</strong> column, in addition to the author&#8217;s name, email address, and blog URL, the commenter&#8217;s IP address is shown. Clicking on this link will show you all the comments made from this IP address.' ) . '</p>' .
'<p>' . __( 'In the <strong>Comment</strong> column, above each comment it says &#8220;Submitted on,&#8221; followed by the date and time the comment was left on your site. Clicking on the date/time link will take you to that comment on your live site. Hovering over any comment gives you options to approve, reply (and approve), quick edit, edit, spam mark, or trash that comment.' ) . '</p>' .
'<p>' . __( 'In the <strong>In Response To</strong> column, there are three elements. The text is the name of the post that inspired the comment, and links to the post editor for that entry. The View Post link leads to that post on your live site. The small bubble with the number in it shows the number of approved comments that post has received. If the bubble is gray, you have moderated all comments for that post. If it is blue, there are pending comments. Clicking the bubble will filter the comments screen to show only comments on that post.' ) . '</p>' .
'<p>' . __( 'Many people take advantage of keyboard shortcuts to moderate their comments more quickly. Use the link to the side to learn more.' ) . '</p>'
) );
get_current_screen()->set_help_sidebar(
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
'<p>' . __( '<a href="http://codex.wordpress.org/Administration_Screens#Comments" target="_blank">Documentation on Comments</a>' ) . '</p>' .
'<p>' . __( '<a href="http://codex.wordpress.org/Comment_Spam" target="_blank">Documentation on Comment Spam</a>' ) . '</p>' .
'<p>' . __( '<a href="http://codex.wordpress.org/Keyboard_Shortcuts" target="_blank">Documentation on Keyboard Shortcuts</a>' ) . '</p>' .
'<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
);
require_once('./admin-header.php');
?>

View File

@ -12,10 +12,8 @@ if ( !defined('ABSPATH') )
wp_enqueue_script('post');
if ( post_type_supports($post_type, 'editor') || post_type_supports($post_type, 'thumbnail') ) {
add_thickbox();
wp_enqueue_script('media-upload');
}
if ( wp_is_mobile() )
wp_enqueue_script( 'jquery-touch-punch' );
/**
* Post ID global
@ -23,10 +21,14 @@ if ( post_type_supports($post_type, 'editor') || post_type_supports($post_type,
* @var int
*/
$post_ID = isset($post_ID) ? (int) $post_ID : 0;
$temp_ID = isset($temp_ID) ? (int) $temp_ID : 0;
$user_ID = isset($user_ID) ? (int) $user_ID : 0;
$action = isset($action) ? $action : '';
if ( post_type_supports($post_type, 'editor') || post_type_supports($post_type, 'thumbnail') ) {
add_thickbox();
wp_enqueue_media( array( 'post' => $post_ID ) );
}
$messages = array();
$messages['post'] = array(
0 => '', // Unused. Messages start at index 1.
@ -57,6 +59,7 @@ $messages['page'] = array(
9 => sprintf( __('Page scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview page</a>'), date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post_ID) ) ),
10 => sprintf( __('Page draft updated. <a target="_blank" href="%s">Preview page</a>'), esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ) ),
);
$messages['attachment'] = array_fill( 1, 10, __( 'Media attachment updated.' ) ); // Hack, for now.
$messages = apply_filters( 'post_updated_messages', $messages );
@ -81,14 +84,14 @@ if ( 'auto-draft' == $post->post_status ) {
}
$form_action = 'editpost';
$nonce_action = 'update-' . $post_type . '_' . $post_ID;
$nonce_action = 'update-post_' . $post_ID;
$form_extra .= "<input type='hidden' id='post_ID' name='post_ID' value='" . esc_attr($post_ID) . "' />";
// Detect if there exists an autosave newer than the post and if that autosave is different than the post
if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt, false ) > mysql2date( 'U', $post->post_modified_gmt, false ) ) {
foreach ( _wp_post_revision_fields() as $autosave_field => $_autosave_field ) {
if ( normalize_whitespace( $autosave->$autosave_field ) != normalize_whitespace( $post->$autosave_field ) ) {
$notice = sprintf( __( 'There is an autosave of this post that is more recent than the version below. <a href="%s">View the autosave</a>' ), get_edit_post_link( $autosave->ID ) );
$notice = sprintf( __( 'There is an autosave of this post that is more recent than the version below. <a href="%s">View the autosave</a>' ), get_edit_post_link( $autosave->ID ) );
break;
}
}
@ -100,13 +103,20 @@ $post_type_object = get_post_type_object($post_type);
// All meta boxes should be defined and added before the first do_meta_boxes() call (or potentially during the do_meta_boxes action).
require_once('./includes/meta-boxes.php');
add_meta_box('submitdiv', __('Publish'), 'post_submit_meta_box', $post_type, 'side', 'core');
if ( 'attachment' == $post_type ) {
wp_enqueue_script( 'image-edit' );
wp_enqueue_style( 'imgareaselect' );
add_meta_box( 'submitdiv', __('Save'), 'attachment_submit_meta_box', null, 'side', 'core' );
add_action( 'edit_form_after_title', 'edit_form_image_editor' );
} else {
add_meta_box( 'submitdiv', __( 'Publish' ), 'post_submit_meta_box', null, 'side', 'core' );
}
if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post_type, 'post-formats' ) )
add_meta_box( 'formatdiv', _x( 'Format', 'post format' ), 'post_format_meta_box', $post_type, 'side', 'core' );
add_meta_box( 'formatdiv', _x( 'Format', 'post format' ), 'post_format_meta_box', null, 'side', 'core' );
// all taxonomies
foreach ( get_object_taxonomies($post_type) as $tax_name ) {
foreach ( get_object_taxonomies( $post ) as $tax_name ) {
$taxonomy = get_taxonomy($tax_name);
if ( ! $taxonomy->show_ui )
continue;
@ -114,44 +124,43 @@ foreach ( get_object_taxonomies($post_type) as $tax_name ) {
$label = $taxonomy->labels->name;
if ( !is_taxonomy_hierarchical($tax_name) )
add_meta_box('tagsdiv-' . $tax_name, $label, 'post_tags_meta_box', $post_type, 'side', 'core', array( 'taxonomy' => $tax_name ));
add_meta_box('tagsdiv-' . $tax_name, $label, 'post_tags_meta_box', null, 'side', 'core', array( 'taxonomy' => $tax_name ));
else
add_meta_box($tax_name . 'div', $label, 'post_categories_meta_box', $post_type, 'side', 'core', array( 'taxonomy' => $tax_name ));
add_meta_box($tax_name . 'div', $label, 'post_categories_meta_box', null, 'side', 'core', array( 'taxonomy' => $tax_name ));
}
if ( post_type_supports($post_type, 'page-attributes') )
add_meta_box('pageparentdiv', 'page' == $post_type ? __('Page Attributes') : __('Attributes'), 'page_attributes_meta_box', $post_type, 'side', 'core');
add_meta_box('pageparentdiv', 'page' == $post_type ? __('Page Attributes') : __('Attributes'), 'page_attributes_meta_box', null, 'side', 'core');
if ( current_theme_supports( 'post-thumbnails', $post_type ) && post_type_supports( $post_type, 'thumbnail' )
&& ( ! is_multisite() || ( ( $mu_media_buttons = get_site_option( 'mu_media_buttons', array() ) ) && ! empty( $mu_media_buttons['image'] ) ) ) )
add_meta_box('postimagediv', __('Featured Image'), 'post_thumbnail_meta_box', $post_type, 'side', 'low');
if ( current_theme_supports( 'post-thumbnails', $post_type ) && post_type_supports( $post_type, 'thumbnail' ) )
add_meta_box('postimagediv', __('Featured Image'), 'post_thumbnail_meta_box', null, 'side', 'low');
if ( post_type_supports($post_type, 'excerpt') )
add_meta_box('postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', $post_type, 'normal', 'core');
add_meta_box('postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', null, 'normal', 'core');
if ( post_type_supports($post_type, 'trackbacks') )
add_meta_box('trackbacksdiv', __('Send Trackbacks'), 'post_trackback_meta_box', $post_type, 'normal', 'core');
add_meta_box('trackbacksdiv', __('Send Trackbacks'), 'post_trackback_meta_box', null, 'normal', 'core');
if ( post_type_supports($post_type, 'custom-fields') )
add_meta_box('postcustom', __('Custom Fields'), 'post_custom_meta_box', $post_type, 'normal', 'core');
add_meta_box('postcustom', __('Custom Fields'), 'post_custom_meta_box', null, 'normal', 'core');
do_action('dbx_post_advanced');
do_action('dbx_post_advanced', $post);
if ( post_type_supports($post_type, 'comments') )
add_meta_box('commentstatusdiv', __('Discussion'), 'post_comment_status_meta_box', $post_type, 'normal', 'core');
add_meta_box('commentstatusdiv', __('Discussion'), 'post_comment_status_meta_box', null, 'normal', 'core');
if ( ('publish' == $post->post_status || 'private' == $post->post_status) && post_type_supports($post_type, 'comments') )
add_meta_box('commentsdiv', __('Comments'), 'post_comment_meta_box', $post_type, 'normal', 'core');
if ( ( 'publish' == get_post_status( $post ) || 'private' == get_post_status( $post ) ) && post_type_supports($post_type, 'comments') )
add_meta_box('commentsdiv', __('Comments'), 'post_comment_meta_box', null, 'normal', 'core');
if ( !( 'pending' == $post->post_status && !current_user_can( $post_type_object->cap->publish_posts ) ) )
add_meta_box('slugdiv', __('Slug'), 'post_slug_meta_box', $post_type, 'normal', 'core');
if ( ! ( 'pending' == get_post_status( $post ) && ! current_user_can( $post_type_object->cap->publish_posts ) ) )
add_meta_box('slugdiv', __('Slug'), 'post_slug_meta_box', null, 'normal', 'core');
if ( post_type_supports($post_type, 'author') ) {
if ( is_super_admin() || current_user_can( $post_type_object->cap->edit_others_posts ) )
add_meta_box('authordiv', __('Author'), 'post_author_meta_box', $post_type, 'normal', 'core');
add_meta_box('authordiv', __('Author'), 'post_author_meta_box', null, 'normal', 'core');
}
if ( post_type_supports($post_type, 'revisions') && 0 < $post_ID && wp_get_post_revisions( $post_ID ) )
add_meta_box('revisionsdiv', __('Revisions'), 'post_revisions_meta_box', $post_type, 'normal', 'core');
add_meta_box('revisionsdiv', __('Revisions'), 'post_revisions_meta_box', null, 'normal', 'core');
do_action('add_meta_boxes', $post_type, $post);
do_action('add_meta_boxes_' . $post_type, $post);
@ -160,49 +169,134 @@ do_action('do_meta_boxes', $post_type, 'normal', $post);
do_action('do_meta_boxes', $post_type, 'advanced', $post);
do_action('do_meta_boxes', $post_type, 'side', $post);
add_screen_option('layout_columns', array('max' => 2) );
add_screen_option('layout_columns', array('max' => 2, 'default' => 2) );
if ( 'post' == $post_type ) {
add_contextual_help($current_screen,
'<p>' . __('The title field and the big Post Editing Area are fixed in place, but you can reposition all the other boxes using drag and drop, and can minimize or expand them by clicking the title bar of each box. Use the Screen Options tab to unhide more boxes (Excerpt, Send Trackbacks, Custom Fields, Discussion, Slug, Author) or to choose a 1- or 2-column layout for this screen.') . '</p>' .
'<p>' . __('<strong>Title</strong> - Enter a title for your post. After you enter a title, you&#8217;ll see the permalink below, which you can edit.') . '</p>' .
'<p>' . __('<strong>Post editor</strong> - Enter the text for your post. There are two modes of editing: Visual and HTML. Choose the mode by clicking on the appropriate tab. Visual mode gives you a WYSIWYG editor. Click the last icon in the row to get a second row of controls. The HTML mode allows you to enter raw HTML along with your post text. You can insert media files by clicking the icons above the post editor and following the directions. You can go the distraction-free writing screen, new in 3.2, via the Fullscreen icon in Visual mode (second to last in the top row) or the Fullscreen button in HTML mode (last in the row). Once there, you can make buttons visible by hovering over the top area. Exit Fullscreen back to the regular post editor.') . '</p>' .
'<p>' . __('<strong>Publish</strong> - You can set the terms of publishing your post in the Publish box. For Status, Visibility, and Publish (immediately), click on the Edit link to reveal more options. Visibility includes options for password-protecting a post or making it stay at the top of your blog indefinitely (sticky). Publish (immediately) allows you to set a future or past date and time, so you can schedule a post to be published in the future or backdate a post.') . '</p>' .
( ( current_theme_supports( 'post-formats' ) && post_type_supports( 'post', 'post-formats' ) ) ? '<p>' . __( '<strong>Post Format</strong> - This designates how your theme will display a specific post. For example, you could have a <em>standard</em> blog post with a title and paragraphs, or a short <em>aside</em> that omits the title and contains a short text blurb. Please refer to the Codex for <a href="http://codex.wordpress.org/Post_Formats#Supported_Formats">descriptions of each post format</a>. Your theme could enable all or some of 10 possible formats.' ) . '</p>' : '' ) .
'<p>' . __('<strong>Featured Image</strong> - This allows you to associate an image with your post without inserting it. This is usually useful only if your theme makes use of the featured image as a post thumbnail on the home page, a custom header, etc.') . '</p>' .
'<p>' . __('<strong>Send Trackbacks</strong> - Trackbacks are a way to notify legacy blog systems that you&#8217;ve linked to them. Enter the URL(s) you want to send trackbacks. If you link to other WordPress sites they&#8217;ll be notified automatically using pingbacks, and this field is unnecessary.') . '</p>' .
'<p>' . __('<strong>Discussion</strong> - You can turn comments and pings on or off, and if there are comments on the post, you can see them here and moderate them.') . '</p>' .
'<p>' . sprintf(__('You can also create posts with the <a href="%s">Press This bookmarklet</a>.'), 'options-writing.php') . '</p>' .
'<p><strong>' . __('For more information:') . '</strong></p>' .
'<p>' . __('<a href="http://codex.wordpress.org/Posts_Add_New_Screen" target="_blank">Documentation on Writing and Editing Posts</a>') . '</p>' .
'<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
$customize_display = '<p>' . __('The title field and the big Post Editing Area are fixed in place, but you can reposition all the other boxes using drag and drop. You can also minimize or expand them by clicking the title bar of each box. Use the Screen Options tab to unhide more boxes (Excerpt, Send Trackbacks, Custom Fields, Discussion, Slug, Author) or to choose a 1- or 2-column layout for this screen.') . '</p>';
get_current_screen()->add_help_tab( array(
'id' => 'customize-display',
'title' => __('Customizing This Display'),
'content' => $customize_display,
) );
$title_and_editor = '<p>' . __('<strong>Title</strong> - Enter a title for your post. After you enter a title, you&#8217;ll see the permalink below, which you can edit.') . '</p>';
$title_and_editor .= '<p>' . __('<strong>Post editor</strong> - Enter the text for your post. There are two modes of editing: Visual and Text. Choose the mode by clicking on the appropriate tab. Visual mode gives you a WYSIWYG editor. Click the last icon in the row to get a second row of controls. The Text mode allows you to enter HTML along with your post text. Line breaks will be converted to paragraphs automatically. You can insert media files by clicking the icons above the post editor and following the directions. You can go to the distraction-free writing screen via the Fullscreen icon in Visual mode (second to last in the top row) or the Fullscreen button in Text mode (last in the row). Once there, you can make buttons visible by hovering over the top area. Exit Fullscreen back to the regular post editor.') . '</p>';
get_current_screen()->add_help_tab( array(
'id' => 'title-post-editor',
'title' => __('Title and Post Editor'),
'content' => $title_and_editor,
) );
get_current_screen()->set_help_sidebar(
'<p>' . sprintf(__('You can also create posts with the <a href="%s">Press This bookmarklet</a>.'), 'options-writing.php') . '</p>' .
'<p><strong>' . __('For more information:') . '</strong></p>' .
'<p>' . __('<a href="http://codex.wordpress.org/Posts_Add_New_Screen" target="_blank">Documentation on Writing and Editing Posts</a>') . '</p>' .
'<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
);
} elseif ( 'page' == $post_type ) {
add_contextual_help($current_screen, '<p>' . __('Pages are similar to Posts in that they have a title, body text, and associated metadata, but they are different in that they are not part of the chronological blog stream, kind of like permanent posts. Pages are not categorized or tagged, but can have a hierarchy. You can nest Pages under other Pages by making one the &#8220;Parent&#8221; of the other, creating a group of Pages.') . '</p>' .
'<p>' . __('Creating a Page is very similar to creating a Post, and the screens can be customized in the same way using drag and drop, the Screen Options tab, and expanding/collapsing boxes as you choose. This screen also has the new in 3.2 distraction-free writing space, available in both the Visual and HTML modes via the Fullscreen buttons. The Page editor mostly works the same as the Post editor, but there are some Page-specific features in the Page Attributes box:') . '</p>' .
'<p>' . __('<strong>Parent</strong> - You can arrange your pages in hierarchies. For example, you could have an &#8220;About&#8221; page that has &#8220;Life Story&#8221; and &#8220;My Dog&#8221; pages under it. There are no limits to how many levels you can nest pages.') . '</p>' .
'<p>' . __('<strong>Template</strong> - Some themes have custom templates you can use for certain pages that might have additional features or custom layouts. If so, you&#8217;ll see them in this dropdown menu.') . '</p>' .
'<p>' . __('<strong>Order</strong> - Pages are usually ordered alphabetically, but you can choose your own order by entering a number (1 for first, etc.) in this field.') . '</p>' .
$about_pages = '<p>' . __('Pages are similar to Posts in that they have a title, body text, and associated metadata, but they are different in that they are not part of the chronological blog stream, kind of like permanent posts. Pages are not categorized or tagged, but can have a hierarchy. You can nest Pages under other Pages by making one the &#8220;Parent&#8221; of the other, creating a group of Pages.') . '</p>' .
'<p>' . __('Creating a Page is very similar to creating a Post, and the screens can be customized in the same way using drag and drop, the Screen Options tab, and expanding/collapsing boxes as you choose. This screen also has the distraction-free writing space, available in both the Visual and Text modes via the Fullscreen buttons. The Page editor mostly works the same as the Post editor, but there are some Page-specific features in the Page Attributes box:') . '</p>';
get_current_screen()->add_help_tab( array(
'id' => 'about-pages',
'title' => __('About Pages'),
'content' => $about_pages,
) );
get_current_screen()->set_help_sidebar(
'<p><strong>' . __('For more information:') . '</strong></p>' .
'<p>' . __('<a href="http://codex.wordpress.org/Pages_Add_New_Screen" target="_blank">Documentation on Adding New Pages</a>') . '</p>' .
'<p>' . __('<a href="http://codex.wordpress.org/Pages_Screen#Editing_Individual_Pages" target="_blank">Documentation on Editing Pages</a>') . '</p>' .
'<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
);
} elseif ( 'attachment' == $post_type ) {
get_current_screen()->add_help_tab( array(
'id' => 'overview',
'title' => __('Overview'),
'content' =>
'<p>' . __('This screen allows you to edit four fields for metadata in a file within the media library.') . '</p>' .
'<p>' . __('For images only, you can click on Edit Image under the thumbnail to expand out an inline image editor with icons for cropping, rotating, or flipping the image as well as for undoing and redoing. The boxes on the right give you more options for scaling the image, for cropping it, and for cropping the thumbnail in a different way than you crop the original image. You can click on Help in those boxes to get more information.') . '</p>' .
'<p>' . __('Note that you crop the image by clicking on it (the Crop icon is already selected) and dragging the cropping frame to select the desired part. Then click Save to retain the cropping.') . '</p>' .
'<p>' . __('Remember to click Update Media to save metadata entered or changed.') . '</p>'
) );
get_current_screen()->set_help_sidebar(
'<p><strong>' . __('For more information:') . '</strong></p>' .
'<p>' . __('<a href="http://codex.wordpress.org/Pages_Add_New_Screen" target="_blank">Documentation on Adding New Pages</a>') . '</p>' .
'<p>' . __('<a href="http://codex.wordpress.org/Pages_Screen#Editing_Individual_Pages" target="_blank">Documentation on Editing Pages</a>') . '</p>' .
'<p>' . __('<a href="http://codex.wordpress.org/Media_Add_New_Screen#Edit_Media" target="_blank">Documentation on Edit Media</a>') . '</p>' .
'<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
);
}
if ( 'post' == $post_type || 'page' == $post_type ) {
$inserting_media = '<p>' . __( 'You can upload and insert media (images, audio, documents, etc.) by clicking the Add Media button. You can select from the images and files already uploaded to the Media Library, or upload new media to add to your page or post. To create an image gallery, select the images to add and click the &#8220;Create a new gallery&#8221; button.' ) . '</p>';
$inserting_media .= '<p>' . __( 'You can also embed media from many popular websites including Twitter, YouTube, Flickr and others by pasting the media URL on its own line into the content of your post/page. Please refer to the Codex to <a href="http://codex.wordpress.org/Embeds">learn more about embeds</a>.' ) . '</p>';
get_current_screen()->add_help_tab( array(
'id' => 'inserting-media',
'title' => __( 'Inserting Media' ),
'content' => $inserting_media,
) );
}
if ( 'post' == $post_type ) {
$publish_box = '<p>' . __('Several boxes on this screen contain settings for how your content will be published, including:') . '</p>';
$publish_box .= '<ul><li>' . __('<strong>Publish</strong> - You can set the terms of publishing your post in the Publish box. For Status, Visibility, and Publish (immediately), click on the Edit link to reveal more options. Visibility includes options for password-protecting a post or making it stay at the top of your blog indefinitely (sticky). Publish (immediately) allows you to set a future or past date and time, so you can schedule a post to be published in the future or backdate a post.') . '</li>';
if ( current_theme_supports( 'post-formats' ) && post_type_supports( 'post', 'post-formats' ) ) {
$publish_box .= '<li>' . __( '<strong>Format</strong> - Post Formats designate how your theme will display a specific post. For example, you could have a <em>standard</em> blog post with a title and paragraphs, or a short <em>aside</em> that omits the title and contains a short text blurb. Please refer to the Codex for <a href="http://codex.wordpress.org/Post_Formats#Supported_Formats">descriptions of each post format</a>. Your theme could enable all or some of 10 possible formats.' ) . '</li>';
}
if ( current_theme_supports( 'post-thumbnails' ) && post_type_supports( 'post', 'thumbnail' ) ) {
$publish_box .= '<li>' . __('<strong>Featured Image</strong> - This allows you to associate an image with your post without inserting it. This is usually useful only if your theme makes use of the featured image as a post thumbnail on the home page, a custom header, etc.') . '</li>';
}
$publish_box .= '</ul>';
get_current_screen()->add_help_tab( array(
'id' => 'publish-box',
'title' => __('Publish Settings'),
'content' => $publish_box,
) );
$discussion_settings = '<p>' . __('<strong>Send Trackbacks</strong> - Trackbacks are a way to notify legacy blog systems that you&#8217;ve linked to them. Enter the URL(s) you want to send trackbacks. If you link to other WordPress sites they&#8217;ll be notified automatically using pingbacks, and this field is unnecessary.') . '</p>';
$discussion_settings .= '<p>' . __('<strong>Discussion</strong> - You can turn comments and pings on or off, and if there are comments on the post, you can see them here and moderate them.') . '</p>';
get_current_screen()->add_help_tab( array(
'id' => 'discussion-settings',
'title' => __('Discussion Settings'),
'content' => $discussion_settings,
) );
} elseif ( 'page' == $post_type ) {
$page_attributes = '<p>' . __('<strong>Parent</strong> - You can arrange your pages in hierarchies. For example, you could have an &#8220;About&#8221; page that has &#8220;Life Story&#8221; and &#8220;My Dog&#8221; pages under it. There are no limits to how many levels you can nest pages.') . '</p>' .
'<p>' . __('<strong>Template</strong> - Some themes have custom templates you can use for certain pages that might have additional features or custom layouts. If so, you&#8217;ll see them in this dropdown menu.') . '</p>' .
'<p>' . __('<strong>Order</strong> - Pages are usually ordered alphabetically, but you can choose your own order by entering a number (1 for first, etc.) in this field.') . '</p>';
get_current_screen()->add_help_tab( array(
'id' => 'page-attributes',
'title' => __('Page Attributes'),
'content' => $page_attributes,
) );
}
require_once('./admin-header.php');
?>
<div class="wrap">
<?php screen_icon(); ?>
<h2><?php echo esc_html( $title ); ?><?php if ( isset( $post_new_file ) ) : ?> <a href="<?php echo esc_url( $post_new_file ) ?>" class="add-new-h2"><?php echo esc_html($post_type_object->labels->add_new); ?></a><?php endif; ?></h2>
<h2><?php
echo esc_html( $title );
if ( isset( $post_new_file ) && current_user_can( $post_type_object->cap->create_posts ) )
echo ' <a href="' . esc_url( $post_new_file ) . '" class="add-new-h2">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
?></h2>
<?php if ( $notice ) : ?>
<div id="notice" class="error"><p><?php echo $notice ?></p></div>
<?php endif; ?>
<?php if ( $message ) : ?>
<div id="message" class="updated"><p><?php echo $message; ?></p></div>
<?php endif; ?>
<form name="post" action="post.php" method="post" id="post"<?php do_action('post_edit_form_tag'); ?>>
<form name="post" action="post.php" method="post" id="post"<?php do_action('post_edit_form_tag', $post); ?>>
<?php wp_nonce_field($nonce_action); ?>
<input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_ID ?>" />
<input type="hidden" id="hiddenaction" name="action" value="<?php echo esc_attr( $form_action ) ?>" />
@ -211,8 +305,11 @@ require_once('./admin-header.php');
<input type="hidden" id="post_type" name="post_type" value="<?php echo esc_attr( $post_type ) ?>" />
<input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo esc_attr( $post->post_status) ?>" />
<input type="hidden" id="referredby" name="referredby" value="<?php echo esc_url(stripslashes(wp_get_referer())); ?>" />
<?php if ( ! empty( $active_post_lock ) ) { ?>
<input type="hidden" id="active_post_lock" value="<?php echo esc_attr( implode( ':', $active_post_lock ) ); ?>" />
<?php
if ( 'draft' != $post->post_status )
}
if ( 'draft' != get_post_status( $post ) )
wp_original_referer_field(true, 'previous');
echo $form_extra;
@ -222,34 +319,27 @@ wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
?>
<div id="poststuff" class="metabox-holder<?php echo 2 == $screen_layout_columns ? ' has-right-sidebar' : ''; ?>">
<div id="side-info-column" class="inner-sidebar">
<div id="poststuff">
<?php
('page' == $post_type) ? do_action('submitpage_box') : do_action('submitpost_box');
$side_meta_boxes = do_meta_boxes($post_type, 'side', $post);
?>
</div>
<div id="post-body">
<div id="post-body" class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>">
<div id="post-body-content">
<?php if ( post_type_supports($post_type, 'title') ) { ?>
<div id="titlediv">
<div id="titlewrap">
<label class="hide-if-no-js" style="visibility:hidden" id="title-prompt-text" for="title"><?php echo apply_filters( 'enter_title_here', __( 'Enter title here' ), $post ); ?></label>
<input type="text" name="post_title" size="30" tabindex="1" value="<?php echo esc_attr( htmlspecialchars( $post->post_title ) ); ?>" id="title" autocomplete="off" />
<label class="screen-reader-text" id="title-prompt-text" for="title"><?php echo apply_filters( 'enter_title_here', __( 'Enter title here' ), $post ); ?></label>
<input type="text" name="post_title" size="30" value="<?php echo esc_attr( htmlspecialchars( $post->post_title ) ); ?>" id="title" autocomplete="off" />
</div>
<div class="inside">
<?php
$sample_permalink_html = $post_type_object->public ? get_sample_permalink_html($post->ID) : '';
$shortlink = wp_get_shortlink($post->ID, 'post');
if ( !empty($shortlink) )
$sample_permalink_html .= '<input id="shortlink" type="hidden" value="' . esc_attr($shortlink) . '" /><a href="#" class="button" onclick="prompt(&#39;URL:&#39;, jQuery(\'#shortlink\').val()); return false;">' . __('Get Shortlink') . '</a>';
$sample_permalink_html .= '<input id="shortlink" type="hidden" value="' . esc_attr($shortlink) . '" /><a href="#" class="button button-small" onclick="prompt(&#39;URL:&#39;, jQuery(\'#shortlink\').val()); return false;">' . __('Get Shortlink') . '</a>';
if ( $post_type_object->public && ! ( 'pending' == $post->post_status && !current_user_can( $post_type_object->cap->publish_posts ) ) ) { ?>
<div id="edit-slug-box">
if ( $post_type_object->public && ! ( 'pending' == get_post_status( $post ) && !current_user_can( $post_type_object->cap->publish_posts ) ) ) { ?>
<div id="edit-slug-box" class="hide-if-no-js">
<?php
if ( ! empty($post->ID) && ! empty($sample_permalink_html) && 'auto-draft' != $post->post_status )
if ( $sample_permalink_html && 'auto-draft' != $post->post_status )
echo $sample_permalink_html;
?>
</div>
@ -260,13 +350,17 @@ if ( $post_type_object->public && ! ( 'pending' == $post->post_status && !curren
<?php
wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false );
?>
</div>
<?php } ?>
</div><!-- /titlediv -->
<?php
}
<?php if ( post_type_supports($post_type, 'editor') ) { ?>
<div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea">
do_action( 'edit_form_after_title', $post );
<?php the_editor($post->post_content); ?>
if ( post_type_supports($post_type, 'editor') ) {
?>
<div id="postdivrich" class="postarea">
<?php wp_editor($post->post_content, 'content', array('dfw' => true, 'tabfocus_elements' => 'sample-permalink,post-preview', 'editor_height' => 360) ); ?>
<table id="post-status-info" cellspacing="0"><tbody><tr>
<td id="wp-word-count"><?php printf( __( 'Word count: %s' ), '<span class="word-count">0</span>' ); ?></td>
@ -287,28 +381,54 @@ wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false );
</tr></tbody></table>
</div>
<?php } ?>
<?php do_action( 'edit_form_after_editor', $post ); ?>
</div><!-- /post-body-content -->
<div id="postbox-container-1" class="postbox-container">
<?php
}
do_meta_boxes($post_type, 'normal', $post);
if ( 'page' == $post_type )
do_action('submitpage_box', $post);
else
do_action('submitpost_box', $post);
( 'page' == $post_type ) ? do_action('edit_page_form') : do_action('edit_form_advanced');
do_meta_boxes($post_type, 'advanced', $post);
do_action('dbx_post_sidebar'); ?>
do_meta_boxes($post_type, 'side', $post);
?>
</div>
<div id="postbox-container-2" class="postbox-container">
<?php
do_meta_boxes(null, 'normal', $post);
if ( 'page' == $post_type )
do_action('edit_page_form', $post);
else
do_action('edit_form_advanced', $post);
do_meta_boxes(null, 'advanced', $post);
?>
</div>
<?php
do_action('dbx_post_sidebar', $post);
?>
</div><!-- /post-body -->
<br class="clear" />
</div><!-- /poststuff -->
</form>
</div>
<?php wp_comment_reply(); ?>
<?php
if ( post_type_supports( $post_type, 'comments' ) )
wp_comment_reply();
?>
<?php if ((isset($post->post_title) && '' == $post->post_title) || (isset($_GET['message']) && 2 > $_GET['message'])) : ?>
<?php if ( (isset($post->post_title) && '' == $post->post_title) || (isset($_GET['message']) && 2 > $_GET['message']) ) : ?>
<script type="text/javascript">
try{document.post.title.focus();}catch(e){}
</script>

View File

@ -9,28 +9,67 @@
// don't load directly
if ( !defined('ABSPATH') )
die('-1');
/**
* @var string
*/
$submitbutton_text = __('Edit Comment');
$toprow_title = sprintf(__('Editing Comment # %s'), $comment->comment_ID);
$form_action = 'editedcomment';
$form_extra = "' />\n<input type='hidden' name='comment_ID' value='" . esc_attr($comment->comment_ID) . "' />\n<input type='hidden' name='comment_post_ID' value='" . esc_attr($comment->comment_post_ID);
$comment->comment_author_email = esc_attr($comment->comment_author_email);
?>
<form name="post" action="comment.php" method="post" id="post">
<?php wp_nonce_field('update-comment_' . $comment->comment_ID) ?>
<div class="wrap">
<?php screen_icon(); ?>
<h2><?php _e('Edit Comment'); ?></h2>
<div id="poststuff" class="metabox-holder has-right-sidebar">
<input type="hidden" name="user_ID" value="<?php echo (int) $user_ID ?>" />
<input type="hidden" name="action" value='<?php echo $form_action . $form_extra ?>' />
<div id="poststuff">
<input type="hidden" name="user_ID" value="<?php echo (int) $user_ID; ?>" />
<input type="hidden" name="action" value="editedcomment" />
<input type="hidden" name="comment_ID" value="<?php echo esc_attr( $comment->comment_ID ); ?>" />
<input type="hidden" name="comment_post_ID" value="<?php echo esc_attr( $comment->comment_post_ID ); ?>" />
<div id="side-info-column" class="inner-sidebar">
<div id="post-body" class="metabox-holder columns-2">
<div id="post-body-content">
<div id="namediv" class="stuffbox">
<h3><label for="name"><?php _e( 'Author' ) ?></label></h3>
<div class="inside">
<table class="form-table editcomment">
<tbody>
<tr valign="top">
<td class="first"><?php _e( 'Name:' ); ?></td>
<td><input type="text" name="newcomment_author" size="30" value="<?php echo esc_attr( $comment->comment_author ); ?>" id="name" /></td>
</tr>
<tr valign="top">
<td class="first">
<?php
if ( $comment->comment_author_email ) {
printf( __( 'E-mail (%s):' ), get_comment_author_email_link( __( 'send e-mail' ), '', '' ) );
} else {
_e( 'E-mail:' );
}
?></td>
<td><input type="text" name="newcomment_author_email" size="30" value="<?php echo $comment->comment_author_email; ?>" id="email" /></td>
</tr>
<tr valign="top">
<td class="first">
<?php
if ( ! empty( $comment->comment_author_url ) && 'http://' != $comment->comment_author_url ) {
$link = '<a href="' . $comment->comment_author_url . '" rel="external nofollow" target="_blank">' . __('visit site') . '</a>';
printf( __( 'URL (%s):' ), apply_filters('get_comment_author_link', $link ) );
} else {
_e( 'URL:' );
} ?></td>
<td><input type="text" id="newcomment_author_url" name="newcomment_author_url" size="30" class="code" value="<?php echo esc_attr($comment->comment_author_url); ?>" /></td>
</tr>
</tbody>
</table>
<br />
</div>
</div>
<div id="postdiv" class="postarea">
<?php
$quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,spell,close' );
wp_editor( $comment->comment_content, 'content', array( 'media_buttons' => false, 'tinymce' => false, 'quicktags' => $quicktags_settings ) );
wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
</div>
</div><!-- /post-body-content -->
<div id="postbox-container-1" class="postbox-container">
<div id="submitdiv" class="stuffbox" >
<h3><span class='hndle'><?php _e('Status') ?></span></h3>
<div class="inside">
@ -52,15 +91,15 @@ $comment->comment_author_email = esc_attr($comment->comment_author_email);
<label class="spam"><input type="radio"<?php checked( $comment->comment_approved, 'spam' ); ?> name="comment_status" value="spam" /><?php /* translators: comment type radio button */ _ex('Spam', 'adjective'); ?></label>
</div>
<div class="misc-pub-section curtime misc-pub-section-last">
<div class="misc-pub-section curtime">
<?php
// translators: Publish box date formt, see http://php.net/date
// translators: Publish box date format, see http://php.net/date
$datef = __( 'M j, Y @ G:i' );
$stamp = __('Submitted on: <b>%1$s</b>');
$date = date_i18n( $datef, strtotime( $comment->comment_date ) );
?>
<span id="timestamp"><?php printf($stamp, $date); ?></span>&nbsp;<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a>
<div id='timestampdiv' class='hide-if-js'><?php touch_time(('editcomment' == $action), 0, 5); ?></div>
<span id="timestamp"><?php printf($stamp, $date); ?></span>&nbsp;<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js"><?php _e('Edit') ?></a>
<div id='timestampdiv' class='hide-if-js'><?php touch_time(('editcomment' == $action), 0); ?></div>
</div>
</div> <!-- misc actions -->
<div class="clear"></div>
@ -71,73 +110,33 @@ $date = date_i18n( $datef, strtotime( $comment->comment_date ) );
<?php echo "<a class='submitdelete deletion' href='" . wp_nonce_url("comment.php?action=" . ( !EMPTY_TRASH_DAYS ? 'deletecomment' : 'trashcomment' ) . "&amp;c=$comment->comment_ID&amp;_wp_original_http_referer=" . urlencode(wp_get_referer()), 'delete-comment_' . $comment->comment_ID) . "'>" . ( !EMPTY_TRASH_DAYS ? __('Delete Permanently') : __('Move to Trash') ) . "</a>\n"; ?>
</div>
<div id="publishing-action">
<?php submit_button( __( 'Update Comment' ), 'primary', 'save', false, array( 'tabindex' => '4' ) ); ?>
<?php submit_button( __( 'Update' ), 'primary', 'save', false ); ?>
</div>
<div class="clear"></div>
</div>
</div>
</div>
</div>
</div>
<div id="post-body">
<div id="post-body-content">
<div id="namediv" class="stuffbox">
<h3><label for="name"><?php _e( 'Author' ) ?></label></h3>
<div class="inside">
<table class="form-table editcomment">
<tbody>
<tr valign="top">
<td class="first"><?php _e( 'Name:' ); ?></td>
<td><input type="text" name="newcomment_author" size="30" value="<?php echo esc_attr( $comment->comment_author ); ?>" tabindex="1" id="name" /></td>
</tr>
<tr valign="top">
<td class="first">
<?php
if ( $comment->comment_author_email ) {
printf( __( 'E-mail (%s):' ), get_comment_author_email_link( __( 'send e-mail' ), '', '' ) );
} else {
_e( 'E-mail:' );
}
?></td>
<td><input type="text" name="newcomment_author_email" size="30" value="<?php echo $comment->comment_author_email; ?>" tabindex="2" id="email" /></td>
</tr>
<tr valign="top">
<td class="first">
<?php
if ( ! empty( $comment->comment_author_url ) && 'http://' != $comment->comment_author_url ) {
$link = '<a href="' . $comment->comment_author_url . '" rel="external nofollow" target="_blank">' . __('visit site') . '</a>';
printf( __( 'URL (%s):' ), apply_filters('get_comment_author_link', $link ) );
} else {
_e( 'URL:' );
} ?></td>
<td><input type="text" id="newcomment_author_url" name="newcomment_author_url" size="30" class="code" value="<?php echo esc_attr($comment->comment_author_url); ?>" tabindex="3" /></td>
</tr>
</tbody>
</table>
<br />
</div>
</div>
<div id="postdiv" class="postarea">
<?php the_editor($comment->comment_content, 'content', 'newcomment_author_url', false, 4, false); ?>
<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
</div><!-- /submitdiv -->
</div>
<div id="postbox-container-2" class="postbox-container">
<?php
do_action('add_meta_boxes', 'comment', $comment);
do_action('add_meta_boxes_comment', $comment);
do_meta_boxes('comment', 'normal', $comment);
do_meta_boxes(null, 'normal', $comment);
?>
</div>
<input type="hidden" name="c" value="<?php echo esc_attr($comment->comment_ID) ?>" />
<input type="hidden" name="p" value="<?php echo esc_attr($comment->comment_post_ID) ?>" />
<input name="referredby" type="hidden" id="referredby" value="<?php echo esc_url(stripslashes(wp_get_referer())); ?>" />
<?php wp_original_referer_field(true, 'previous'); ?>
<input type="hidden" name="noredir" value="1" />
</div>
</div>
</div><!-- /post-body -->
</div>
</div>
</form>

View File

@ -24,11 +24,11 @@ if ( ! empty($link_id) ) {
require_once('./includes/meta-boxes.php');
add_meta_box('linksubmitdiv', __('Save'), 'link_submit_meta_box', 'link', 'side', 'core');
add_meta_box('linkcategorydiv', __('Categories'), 'link_categories_meta_box', 'link', 'normal', 'core');
add_meta_box('linktargetdiv', __('Target'), 'link_target_meta_box', 'link', 'normal', 'core');
add_meta_box('linkxfndiv', __('Link Relationship (XFN)'), 'link_xfn_meta_box', 'link', 'normal', 'core');
add_meta_box('linkadvanceddiv', __('Advanced'), 'link_advanced_meta_box', 'link', 'normal', 'core');
add_meta_box('linksubmitdiv', __('Save'), 'link_submit_meta_box', null, 'side', 'core');
add_meta_box('linkcategorydiv', __('Categories'), 'link_categories_meta_box', null, 'normal', 'core');
add_meta_box('linktargetdiv', __('Target'), 'link_target_meta_box', null, 'normal', 'core');
add_meta_box('linkxfndiv', __('Link Relationship (XFN)'), 'link_xfn_meta_box', null, 'normal', 'core');
add_meta_box('linkadvanceddiv', __('Advanced'), 'link_advanced_meta_box', null, 'normal', 'core');
do_action('add_meta_boxes', 'link', $link);
do_action('add_meta_boxes_link', $link);
@ -37,20 +37,26 @@ do_action('do_meta_boxes', 'link', 'normal', $link);
do_action('do_meta_boxes', 'link', 'advanced', $link);
do_action('do_meta_boxes', 'link', 'side', $link);
add_screen_option('layout_columns', array('max' => 2) );
add_screen_option('layout_columns', array('max' => 2, 'default' => 2) );
add_contextual_help($current_screen,
get_current_screen()->add_help_tab( array(
'id' => 'overview',
'title' => __('Overview'),
'content' =>
'<p>' . __( 'You can add or edit links on this screen by entering information in each of the boxes. Only the link&#8217;s web address and name (the text you want to display on your site as the link) are required fields.' ) . '</p>' .
'<p>' . __( 'The boxes for link name, web address, and description have fixed positions, while the others may be repositioned using drag and drop. You can also hide boxes you don&#8217;t use in the Screen Options tab, or minimize boxes by clicking on the title bar of the box.' ) . '</p>' .
'<p>' . __( 'XFN stands for <a href="http://gmpg.org/xfn/" target="_blank">XHTML Friends Network</a>, which is optional. WordPress allows the generation of XFN attributes to show how you are related to the authors/owners of the site to which you are linking.' ) . '</p>' .
'<p>' . __( 'XFN stands for <a href="http://gmpg.org/xfn/" target="_blank">XHTML Friends Network</a>, which is optional. WordPress allows the generation of XFN attributes to show how you are related to the authors/owners of the site to which you are linking.' ) . '</p>'
) );
get_current_screen()->set_help_sidebar(
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
'<p>' . __( '<a href="http://codex.wordpress.org/Links_Add_New_Screen" target="_blank">Documentation on Creating Links</a>' ) . '</p>' .
'<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
);
require_once ('admin-header.php');
?>
<div class="wrap">
<?php screen_icon(); ?>
<h2><?php echo esc_html( $title ); ?> <a href="link-add.php" class="add-new-h2"><?php echo esc_html_x('Add New', 'link'); ?></a></h2>
@ -69,23 +75,14 @@ wp_nonce_field( $nonce_action );
wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
<div id="poststuff" class="metabox-holder<?php echo 2 == $screen_layout_columns ? ' has-right-sidebar' : ''; ?>">
<div id="poststuff">
<div id="side-info-column" class="inner-sidebar">
<?php
do_action('submitlink_box');
$side_meta_boxes = do_meta_boxes( 'link', 'side', $link );
?>
</div>
<div id="post-body">
<div id="post-body" class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>">
<div id="post-body-content">
<div id="namediv" class="stuffbox">
<h3><label for="link_name"><?php _ex('Name', 'link name') ?></label></h3>
<div class="inside">
<input type="text" name="link_name" size="30" tabindex="1" value="<?php echo esc_attr($link->link_name); ?>" id="link_name" />
<input type="text" name="link_name" size="30" value="<?php echo esc_attr($link->link_name); ?>" id="link_name" />
<p><?php _e('Example: Nifty blogging software'); ?></p>
</div>
</div>
@ -93,7 +90,7 @@ $side_meta_boxes = do_meta_boxes( 'link', 'side', $link );
<div id="addressdiv" class="stuffbox">
<h3><label for="link_url"><?php _e('Web Address') ?></label></h3>
<div class="inside">
<input type="text" name="link_url" size="30" class="code" tabindex="1" value="<?php echo esc_attr($link->link_url); ?>" id="link_url" />
<input type="text" name="link_url" size="30" class="code" value="<?php echo esc_attr($link->link_url); ?>" id="link_url" />
<p><?php _e('Example: <code>http://wordpress.org/</code> &#8212; don&#8217;t forget the <code>http://</code>'); ?></p>
</div>
</div>
@ -101,16 +98,30 @@ $side_meta_boxes = do_meta_boxes( 'link', 'side', $link );
<div id="descriptiondiv" class="stuffbox">
<h3><label for="link_description"><?php _e('Description') ?></label></h3>
<div class="inside">
<input type="text" name="link_description" size="30" tabindex="1" value="<?php echo isset($link->link_description) ? esc_attr($link->link_description) : ''; ?>" id="link_description" />
<input type="text" name="link_description" size="30" value="<?php echo isset($link->link_description) ? esc_attr($link->link_description) : ''; ?>" id="link_description" />
<p><?php _e('This will be shown when someone hovers over the link in the blogroll, or optionally below the link.'); ?></p>
</div>
</div>
</div><!-- /post-body-content -->
<div id="postbox-container-1" class="postbox-container">
<?php
do_meta_boxes('link', 'normal', $link);
do_action('submitlink_box');
$side_meta_boxes = do_meta_boxes( 'link', 'side', $link );
do_meta_boxes('link', 'advanced', $link);
?>
</div>
<div id="postbox-container-2" class="postbox-container">
<?php
do_meta_boxes(null, 'normal', $link);
do_meta_boxes(null, 'advanced', $link);
?>
</div>
<?php
if ( $link_id ) : ?>
<input type="hidden" name="action" value="save" />
@ -121,7 +132,6 @@ if ( $link_id ) : ?>
<input type="hidden" name="action" value="add" />
<?php endif; ?>
</div>
</div>
</div>

View File

@ -24,7 +24,7 @@ elseif ( 'link_category' == $taxonomy )
else
do_action('edit_tag_form_pre', $tag);
do_action($taxonomy . '_pre_edit_form', $tag, $taxonomy); ?>
do_action($taxonomy . '_pre_edit_form', $tag, $taxonomy); ?>
<div class="wrap">
<?php screen_icon(); ?>
@ -52,17 +52,17 @@ do_action($taxonomy . '_pre_edit_form', $tag, $taxonomy); ?>
<tr class="form-field">
<th scope="row" valign="top"><label for="parent"><?php _ex('Parent', 'Taxonomy Parent'); ?></label></th>
<td>
<?php wp_dropdown_categories(array('hide_empty' => 0, 'hide_if_empty' => false, 'name' => 'parent', 'orderby' => 'name', 'taxonomy' => $taxonomy, 'selected' => $tag->parent, 'exclude_tree' => $tag->term_id, 'hierarchical' => true, 'show_option_none' => __('None'))); ?><br />
<?php wp_dropdown_categories(array('hide_empty' => 0, 'hide_if_empty' => false, 'name' => 'parent', 'orderby' => 'name', 'taxonomy' => $taxonomy, 'selected' => $tag->parent, 'exclude_tree' => $tag->term_id, 'hierarchical' => true, 'show_option_none' => __('None'))); ?>
<?php if ( 'category' == $taxonomy ) : ?>
<span class="description"><?php _e('Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have children categories for Bebop and Big Band. Totally optional.'); ?></span>
<p class="description"><?php _e('Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have children categories for Bebop and Big Band. Totally optional.'); ?></p>
<?php endif; ?>
</td>
</tr>
<?php endif; // is_taxonomy_hierarchical() ?>
<tr class="form-field">
<th scope="row" valign="top"><label for="description"><?php _ex('Description', 'Taxonomy Description'); ?></label></th>
<td><textarea name="description" id="description" rows="5" cols="50" style="width: 97%;"><?php echo $tag->description; // textarea_escaped ?></textarea><br />
<span class="description"><?php _e('The description is not prominent by default, however some themes may show it.'); ?></span></td>
<td><textarea name="description" id="description" rows="5" cols="50" class="large-text"><?php echo $tag->description; // textarea_escaped ?></textarea><br />
<span class="description"><?php _e('The description is not prominent by default; however, some themes may show it.'); ?></span></td>
</tr>
<?php
// Back compat hooks
@ -91,3 +91,6 @@ submit_button( __('Update') );
?>
</form>
</div>
<script type="text/javascript">
try{document.forms.edittag.name.focus();}catch(e){}
</script>

View File

@ -8,8 +8,16 @@
/** WordPress Administration Bootstrap */
require_once('./admin.php');
if ( ! $taxnow )
wp_die( __( 'Invalid taxonomy' ) );
$tax = get_taxonomy( $taxnow );
if ( !current_user_can( $tax->cap->manage_terms ) )
if ( ! $tax )
wp_die( __( 'Invalid taxonomy' ) );
if ( ! current_user_can( $tax->cap->manage_terms ) )
wp_die( __( 'Cheatin&#8217; uh?' ) );
$wp_list_table = _get_list_table('WP_Terms_List_Table');
@ -18,7 +26,7 @@ $pagenum = $wp_list_table->get_pagenum();
$title = $tax->labels->name;
if ( 'post' != $post_type ) {
$parent_file = "edit.php?post_type=$post_type";
$parent_file = ( 'attachment' == $post_type ) ? 'upload.php' : "edit.php?post_type=$post_type";
$submenu_file = "edit-tags.php?taxonomy=$taxonomy&amp;post_type=$post_type";
} else if ( 'link_category' == $tax->name ) {
$parent_file = 'link-manager.php';
@ -28,7 +36,7 @@ if ( 'post' != $post_type ) {
$submenu_file = "edit-tags.php?taxonomy=$taxonomy";
}
add_screen_option( 'per_page', array('label' => $title, 'default' => 20, 'option' => 'edit_' . $tax->name . '_per_page') );
add_screen_option( 'per_page', array( 'label' => $title, 'default' => 20, 'option' => 'edit_' . $tax->name . '_per_page' ) );
switch ( $wp_list_table->current_action() ) {
@ -72,7 +80,7 @@ case 'delete':
}
$tag_ID = (int) $_REQUEST['tag_ID'];
check_admin_referer( 'delete-tag_' . $tag_ID );
check_admin_referer( 'delete-tag_' . $tag_ID );
if ( !current_user_can( $tax->cap->delete_terms ) )
wp_die( __( 'Cheatin&#8217; uh?' ) );
@ -113,10 +121,12 @@ break;
case 'edit':
$title = $tax->labels->edit_item;
require_once ( 'admin-header.php' );
$tag_ID = (int) $_REQUEST['tag_ID'];
$tag = get_term( $tag_ID, $taxonomy, OBJECT, 'edit' );
if ( ! $tag )
wp_die( __( 'You attempted to edit an item that doesn&#8217;t exist. Perhaps it was deleted?' ) );
require_once ( 'admin-header.php' );
include( './edit-tag-form.php' );
break;
@ -128,6 +138,10 @@ case 'editedtag':
if ( !current_user_can( $tax->cap->edit_terms ) )
wp_die( __( 'Cheatin&#8217; uh?' ) );
$tag = get_term( $tag_ID, $taxonomy );
if ( ! $tag )
wp_die( __( 'You attempted to edit an item that doesn&#8217;t exist. Perhaps it was deleted?' ) );
$ret = wp_update_term( $tag_ID, $taxonomy, $_POST );
$location = 'edit-tags.php?taxonomy=' . $taxonomy;
@ -176,49 +190,61 @@ if ( 'category' == $taxonomy || 'link_category' == $taxonomy || 'post_tag' == $t
if ( 'category' == $taxonomy )
$help = '<p>' . sprintf(__( 'You can use categories to define sections of your site and group related posts. The default category is &#8220;Uncategorized&#8221; until you change it in your <a href="%s">writing settings</a>.' ) , 'options-writing.php' ) . '</p>';
elseif ( 'link_category' == $taxonomy )
$help = '<p>' . __( 'You can create groups of links by using link categories. Link category names must be unique and link categories are separate from the categories you use for posts.' ) . '</p>';
$help = '<p>' . __( 'You can create groups of links by using Link Categories. Link Category names must be unique and Link Categories are separate from the categories you use for posts.' ) . '</p>';
else
$help = '<p>' . __( 'You can assign keywords to your posts using Post Tags. Unlike categories, tags have no hierarchy, meaning there&#8217;s no relationship from one tag to another.' ) . '</p>';
$help = '<p>' . __( 'You can assign keywords to your posts using <strong>tags</strong>. Unlike categories, tags have no hierarchy, meaning there&#8217;s no relationship from one tag to another.' ) . '</p>';
if ( 'link_category' == $taxonomy )
$help .= '<p>' . __( 'You can delete link categories in the Bulk Action pulldown, but that action does not delete the links within the category. Instead, it moves them to the default link category.' ) . '</p>';
$help .= '<p>' . __( 'You can delete Link Categories in the Bulk Action pull-down, but that action does not delete the links within the category. Instead, it moves them to the default Link Category.' ) . '</p>';
else
$help .='<p>' . __( 'What&#8217;s the difference between categories and tags? Normally, tags are ad-hoc keywords that identify important information in your post (names, subjects, etc) that may or may not recur in other posts, while categories are pre-determined sections. If you think of your site like a book, the categories are like the Table of Contents and the tags are like the terms in the index.' ) . '</p>';
if ( 'category' == $taxonomy )
$help .= '<p>' . __( 'When adding a new category on this screen, you&#8217;ll fill in the following fields:' ) . '</p>';
elseif ( 'post_tag' == $taxonomy )
$help .= '<p>' . __( 'When adding a new tag on this screen, you&#8217;ll fill in the following fields:' ) . '</p>';
get_current_screen()->add_help_tab( array(
'id' => 'overview',
'title' => __('Overview'),
'content' => $help,
) );
if ( 'category' == $taxonomy || 'post_tag' == $taxonomy )
if ( 'category' == $taxonomy || 'post_tag' == $taxonomy ) {
if ( 'category' == $taxonomy )
$help = '<p>' . __( 'When adding a new category on this screen, you&#8217;ll fill in the following fields:' ) . '</p>';
else
$help = '<p>' . __( 'When adding a new tag on this screen, you&#8217;ll fill in the following fields:' ) . '</p>';
$help .= '<ul>' .
'<li>' . __( '<strong>Name</strong> - The name is how it appears on your site.' ) . '</li>';
if ( ! global_terms_enabled() )
if ( 'category' == $taxonomy || 'post_tag' == $taxonomy )
$help .= '<li>' . __( '<strong>Slug</strong> - The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.' ) . '</li>';
if ( ! global_terms_enabled() )
$help .= '<li>' . __( '<strong>Slug</strong> - The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.' ) . '</li>';
if ( 'category' == $taxonomy )
$help .= '<li>' . __( '<strong>Parent</strong> - Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have children categories for Bebop and Big Band. Totally optional. To create a subcategory, just choose another category from the Parent dropdown.' ) . '</li>';
if ( 'category' == $taxonomy )
$help .= '<li>' . __( '<strong>Parent</strong> - Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have child categories for Bebop and Big Band. Totally optional. To create a subcategory, just choose another category from the Parent dropdown.' ) . '</li>';
if ( 'category' == $taxonomy || 'post_tag' == $taxonomy )
$help .= '<li>' . __( '<strong>Description</strong> - The description is not prominent by default; however, some themes may display it.' ) . '</li>' .
'</ul>' .
'<p>' . __( 'You can change the display of this screen using the Screen Options tab to set how many items are displayed per screen and to display/hide columns in the table.' ) . '</p>' .
'<p><strong>' . __( 'For more information:' ) . '</strong></p>';
'<p>' . __( 'You can change the display of this screen using the Screen Options tab to set how many items are displayed per screen and to display/hide columns in the table.' ) . '</p>';
get_current_screen()->add_help_tab( array(
'id' => 'adding-terms',
'title' => 'category' == $taxonomy ? __( 'Adding Categories' ) : __( 'Adding Tags' ),
'content' => $help,
) );
}
$help = '<p><strong>' . __( 'For more information:' ) . '</strong></p>';
if ( 'category' == $taxonomy )
$help .= '<p>' . __( '<a href="http://codex.wordpress.org/Posts_Categories_Screen" target="_blank">Documentation on Categories</a>' ) . '</p>';
elseif ( 'link_category' == $taxonomy )
$help .= '<p>' . __( '<a href="http://codex.wordpress.org/Links_Link_Categories_Screen" target="_blank">Documentation on Link Categories</a>' ) . '</p>';
else
$help .= '<p>' . __( '<a href="http://codex.wordpress.org/Posts_Post_Tags_Screen" target="_blank">Documentation on Post Tags</a>' ) . '</p>';
$help .= '<p>' . __( '<a href="http://codex.wordpress.org/Posts_Tags_Screen" target="_blank">Documentation on Tags</a>' ) . '</p>';
$help .= '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>';
add_contextual_help($current_screen, $help);
unset($help);
get_current_screen()->set_help_sidebar( $help );
unset( $help );
}
require_once ('admin-header.php');
@ -279,7 +305,7 @@ endif; ?>
</div>
<?php elseif ( 'post_tag' == $taxonomy && current_user_can( 'import' ) ) : ?>
<div class="form-wrap">
<p><?php printf(__('Tags can be selectively converted to categories using the <a href="%s">tag to category converter</a>'), 'import.php') ;?>.</p>
<p><?php printf(__('Tags can be selectively converted to categories using the <a href="%s">tag to category converter</a>.'), 'import.php') ;?></p>
</div>
<?php endif;
do_action('after-' . $taxonomy . '-table', $taxonomy);
@ -362,7 +388,7 @@ if ( ! is_taxonomy_hierarchical($taxonomy) )
do_action('add_tag_form_fields', $taxonomy);
do_action($taxonomy . '_add_form_fields', $taxonomy);
submit_button( $tax->labels->add_new_item, 'button' );
submit_button( $tax->labels->add_new_item );
// Back compat hooks. Deprecated in preference to {$taxonomy}_add_form
if ( 'category' == $taxonomy )
@ -382,7 +408,9 @@ do_action($taxonomy . '_add_form', $taxonomy);
</div><!-- /col-container -->
</div><!-- /wrap -->
<script type="text/javascript">
try{document.forms.addtag['tag-name'].focus();}catch(e){}
</script>
<?php $wp_list_table->inline_edit(); ?>
<?php
@ -390,5 +418,3 @@ break;
}
include('./admin-footer.php');
?>

View File

@ -9,19 +9,17 @@
/** WordPress Administration Bootstrap */
require_once( './admin.php' );
if ( !isset($_GET['post_type']) )
$post_type = 'post';
elseif ( in_array( $_GET['post_type'], get_post_types( array('show_ui' => true ) ) ) )
$post_type = $_GET['post_type'];
else
wp_die( __('Invalid post type') );
$_GET['post_type'] = $post_type;
if ( ! $typenow )
wp_die( __( 'Invalid post type' ) );
$post_type = $typenow;
$post_type_object = get_post_type_object( $post_type );
if ( !current_user_can($post_type_object->cap->edit_posts) )
wp_die(__('Cheatin&#8217; uh?'));
if ( ! $post_type_object )
wp_die( __( 'Invalid post type' ) );
if ( ! current_user_can( $post_type_object->cap->edit_posts ) )
wp_die( __( 'Cheatin&#8217; uh?' ) );
$wp_list_table = _get_list_table('WP_Posts_List_Table');
$pagenum = $wp_list_table->get_pagenum();
@ -51,6 +49,8 @@ if ( $doaction ) {
check_admin_referer('bulk-posts');
$sendback = remove_query_arg( array('trashed', 'untrashed', 'deleted', 'ids'), wp_get_referer() );
if ( ! $sendback )
$sendback = admin_url( $parent_file );
$sendback = add_query_arg( 'paged', $pagenum, $sendback );
if ( strpos($sendback, 'post.php') !== false )
$sendback = admin_url($post_new_file);
@ -103,7 +103,7 @@ if ( $doaction ) {
case 'delete':
$deleted = 0;
foreach( (array) $post_ids as $post_id ) {
$post_del = & get_post($post_id);
$post_del = get_post($post_id);
if ( !current_user_can($post_type_object->cap->delete_post, $post_id) )
wp_die( __('You are not allowed to delete this item.') );
@ -133,7 +133,7 @@ if ( $doaction ) {
break;
}
$sendback = remove_query_arg( array('action', 'action2', 'tags_input', 'post_author', 'comment_status', 'ping_status', '_status', 'post', 'bulk_edit', 'post_view'), $sendback );
$sendback = remove_query_arg( array('action', 'action2', 'tags_input', 'post_author', 'comment_status', 'ping_status', '_status', 'post', 'bulk_edit', 'post_view'), $sendback );
wp_redirect($sendback);
exit();
@ -149,87 +149,117 @@ wp_enqueue_script('inline-edit-post');
$title = $post_type_object->labels->name;
if ( 'post' == $post_type ) {
add_contextual_help($current_screen,
'<p>' . __('You can customize the display of this screen in a number of ways:') . '</p>' .
'<ul>' .
'<li>' . __('You can hide/display columns based on your needs and decide how many posts to list per screen using the Screen Options tab.') . '</li>' .
'<li>' . __('You can filter the list of posts by post status using the text links in the upper left to show All, Published, Draft, or Trashed posts. The default view is to show all posts.') . '</li>' .
'<li>' . __('You can view posts in a simple title list or with an excerpt. Choose the view you prefer by clicking on the icons at the top of the list on the right.') . '</li>' .
'<li>' . __('You can refine the list to show only posts in a specific category or from a specific month by using the dropdown menus above the posts list. Click the Filter button after making your selection. You also can refine the list by clicking on the post author, category or tag in the posts list.') . '</li>' .
'</ul>' .
'<p>' . __('Hovering over a row in the posts list will display action links that allow you to manage your post. You can perform the following actions:') . '</p>' .
'<ul>' .
'<li>' . __('Edit takes you to the editing screen for that post. You can also reach that screen by clicking on the post title.') . '</li>' .
'<li>' . __('Quick Edit provides inline access to the metadata of your post, allowing you to update post details without leaving this screen.') . '</li>' .
'<li>' . __('Trash removes your post from this list and places it in the trash, from which you can permanently delete it.') . '</li>' .
'<li>' . __('Preview will show you what your draft post will look like if you publish it. View will take you to your live site to view the post. Which link is available depends on your post&#8217;s status.') . '</li>' .
'</ul>' .
'<p>' . __('You can also edit multiple posts at once. Select the posts you want to edit using the checkboxes, select Edit from the Bulk Actions menu and click Apply. You will be able to change the metadata (categories, author, etc.) for all selected posts at once. To remove a post from the grouping, just click the x next to its name in the Bulk Edit area that appears.') . '</p>' .
get_current_screen()->add_help_tab( array(
'id' => 'overview',
'title' => __('Overview'),
'content' =>
'<p>' . __('This screen provides access to all of your posts. You can customize the display of this screen to suit your workflow.') . '</p>'
) );
get_current_screen()->add_help_tab( array(
'id' => 'screen-content',
'title' => __('Screen Content'),
'content' =>
'<p>' . __('You can customize the display of this screen&#8217;s contents in a number of ways:') . '</p>' .
'<ul>' .
'<li>' . __('You can hide/display columns based on your needs and decide how many posts to list per screen using the Screen Options tab.') . '</li>' .
'<li>' . __('You can filter the list of posts by post status using the text links in the upper left to show All, Published, Draft, or Trashed posts. The default view is to show all posts.') . '</li>' .
'<li>' . __('You can view posts in a simple title list or with an excerpt. Choose the view you prefer by clicking on the icons at the top of the list on the right.') . '</li>' .
'<li>' . __('You can refine the list to show only posts in a specific category or from a specific month by using the dropdown menus above the posts list. Click the Filter button after making your selection. You also can refine the list by clicking on the post author, category or tag in the posts list.') . '</li>' .
'</ul>'
) );
get_current_screen()->add_help_tab( array(
'id' => 'action-links',
'title' => __('Available Actions'),
'content' =>
'<p>' . __('Hovering over a row in the posts list will display action links that allow you to manage your post. You can perform the following actions:') . '</p>' .
'<ul>' .
'<li>' . __('<strong>Edit</strong> takes you to the editing screen for that post. You can also reach that screen by clicking on the post title.') . '</li>' .
'<li>' . __('<strong>Quick Edit</strong> provides inline access to the metadata of your post, allowing you to update post details without leaving this screen.') . '</li>' .
'<li>' . __('<strong>Trash</strong> removes your post from this list and places it in the trash, from which you can permanently delete it.') . '</li>' .
'<li>' . __('<strong>Preview</strong> will show you what your draft post will look like if you publish it. View will take you to your live site to view the post. Which link is available depends on your post&#8217;s status.') . '</li>' .
'</ul>'
) );
get_current_screen()->add_help_tab( array(
'id' => 'bulk-actions',
'title' => __('Bulk Actions'),
'content' =>
'<p>' . __('You can also edit or move multiple posts to the trash at once. Select the posts you want to act on using the checkboxes, then select the action you want to take from the Bulk Actions menu and click Apply.') . '</p>' .
'<p>' . __('When using Bulk Edit, you can change the metadata (categories, author, etc.) for all selected posts at once. To remove a post from the grouping, just click the x next to its name in the Bulk Edit area that appears.') . '</p>'
) );
get_current_screen()->set_help_sidebar(
'<p><strong>' . __('For more information:') . '</strong></p>' .
'<p>' . __('<a href="http://codex.wordpress.org/Posts_Screen" target="_blank">Documentation on Managing Posts</a>') . '</p>' .
'<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
);
} elseif ( 'page' == $post_type ) {
add_contextual_help($current_screen,
'<p>' . __('Pages are similar to Posts in that they have a title, body text, and associated metadata, but they are different in that they are not part of the chronological blog stream, kind of like permanent posts. Pages are not categorized or tagged, but can have a hierarchy. You can nest Pages under other Pages by making one the &#8220;Parent&#8221; of the other, creating a group of Pages.') . '</p>' .
'<p>' . __('Managing Pages is very similar to managing Posts, and the screens can be customized in the same way.') . '</p>' .
'<p>' . __('You can also perform the same types of actions, including narrowing the list by using the filters, acting on a Page using the action links that appear when you hover over a row, or using the Bulk Actions menu to edit the metadata for multiple Pages at once.') . '</p>' .
get_current_screen()->add_help_tab( array(
'id' => 'overview',
'title' => __('Overview'),
'content' =>
'<p>' . __('Pages are similar to posts in that they have a title, body text, and associated metadata, but they are different in that they are not part of the chronological blog stream, kind of like permanent posts. Pages are not categorized or tagged, but can have a hierarchy. You can nest pages under other pages by making one the &#8220;Parent&#8221; of the other, creating a group of pages.') . '</p>'
) );
get_current_screen()->add_help_tab( array(
'id' => 'managing-pages',
'title' => __('Managing Pages'),
'content' =>
'<p>' . __('Managing pages is very similar to managing posts, and the screens can be customized in the same way.') . '</p>' .
'<p>' . __('You can also perform the same types of actions, including narrowing the list by using the filters, acting on a page using the action links that appear when you hover over a row, or using the Bulk Actions menu to edit the metadata for multiple pages at once.') . '</p>'
) );
get_current_screen()->set_help_sidebar(
'<p><strong>' . __('For more information:') . '</strong></p>' .
'<p>' . __('<a href="http://codex.wordpress.org/Pages_Screen" target="_blank">Documentation on Managing Pages</a>') . '</p>' .
'<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
);
}
add_screen_option( 'per_page', array('label' => $title, 'default' => 20) );
add_screen_option( 'per_page', array( 'label' => $title, 'default' => 20, 'option' => 'edit_' . $post_type . '_per_page' ) );
require_once('./admin-header.php');
?>
<div class="wrap">
<?php screen_icon(); ?>
<h2><?php echo esc_html( $post_type_object->labels->name ); ?> <a href="<?php echo $post_new_file ?>" class="add-new-h2"><?php echo esc_html($post_type_object->labels->add_new); ?></a> <?php
if ( isset($_REQUEST['s']) && $_REQUEST['s'] )
printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', get_search_query() ); ?>
</h2>
<h2><?php
echo esc_html( $post_type_object->labels->name );
if ( current_user_can( $post_type_object->cap->create_posts ) )
echo ' <a href="' . esc_url( $post_new_file ) . '" class="add-new-h2">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
if ( ! empty( $_REQUEST['s'] ) )
printf( ' <span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', get_search_query() );
?></h2>
<?php
if ( isset($_REQUEST['posted']) && $_REQUEST['posted'] ) : $_REQUEST['posted'] = (int) $_REQUEST['posted']; ?>
<div id="message" class="updated"><p><strong><?php _e('This has been saved.'); ?></strong> <a href="<?php echo get_permalink( $_REQUEST['posted'] ); ?>"><?php _e('View Post'); ?></a> | <a href="<?php echo get_edit_post_link( $_REQUEST['posted'] ); ?>"><?php _e('Edit Post'); ?></a></p></div>
<?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('posted'), $_SERVER['REQUEST_URI']);
endif; ?>
<?php if ( isset($_REQUEST['locked']) || isset($_REQUEST['skipped']) || isset($_REQUEST['updated']) || isset($_REQUEST['deleted']) || isset($_REQUEST['trashed']) || isset($_REQUEST['untrashed']) ) { ?>
<?php if ( isset( $_REQUEST['locked'] ) || isset( $_REQUEST['updated'] ) || isset( $_REQUEST['deleted'] ) || isset( $_REQUEST['trashed'] ) || isset( $_REQUEST['untrashed'] ) ) {
$messages = array();
?>
<div id="message" class="updated"><p>
<?php if ( isset($_REQUEST['updated']) && (int) $_REQUEST['updated'] ) {
printf( _n( '%s post updated.', '%s posts updated.', $_REQUEST['updated'] ), number_format_i18n( $_REQUEST['updated'] ) );
unset($_REQUEST['updated']);
<?php if ( isset( $_REQUEST['updated'] ) && $updated = absint( $_REQUEST['updated'] ) ) {
$messages[] = sprintf( _n( '%s post updated.', '%s posts updated.', $updated ), number_format_i18n( $updated ) );
}
if ( isset($_REQUEST['skipped']) && (int) $_REQUEST['skipped'] )
unset($_REQUEST['skipped']);
if ( isset($_REQUEST['locked']) && (int) $_REQUEST['locked'] ) {
printf( _n( '%s item not updated, somebody is editing it.', '%s items not updated, somebody is editing them.', $_REQUEST['locked'] ), number_format_i18n( $_REQUEST['locked'] ) );
unset($_REQUEST['locked']);
if ( isset( $_REQUEST['locked'] ) && $locked = absint( $_REQUEST['locked'] ) ) {
$messages[] = sprintf( _n( '%s item not updated, somebody is editing it.', '%s items not updated, somebody is editing them.', $locked ), number_format_i18n( $locked ) );
}
if ( isset($_REQUEST['deleted']) && (int) $_REQUEST['deleted'] ) {
printf( _n( 'Item permanently deleted.', '%s items permanently deleted.', $_REQUEST['deleted'] ), number_format_i18n( $_REQUEST['deleted'] ) );
unset($_REQUEST['deleted']);
if ( isset( $_REQUEST['deleted'] ) && $deleted = absint( $_REQUEST['deleted'] ) ) {
$messages[] = sprintf( _n( 'Item permanently deleted.', '%s items permanently deleted.', $deleted ), number_format_i18n( $deleted ) );
}
if ( isset($_REQUEST['trashed']) && (int) $_REQUEST['trashed'] ) {
printf( _n( 'Item moved to the Trash.', '%s items moved to the Trash.', $_REQUEST['trashed'] ), number_format_i18n( $_REQUEST['trashed'] ) );
if ( isset( $_REQUEST['trashed'] ) && $trashed = absint( $_REQUEST['trashed'] ) ) {
$messages[] = sprintf( _n( 'Item moved to the Trash.', '%s items moved to the Trash.', $trashed ), number_format_i18n( $trashed ) );
$ids = isset($_REQUEST['ids']) ? $_REQUEST['ids'] : 0;
echo ' <a href="' . esc_url( wp_nonce_url( "edit.php?post_type=$post_type&doaction=undo&action=untrash&ids=$ids", "bulk-posts" ) ) . '">' . __('Undo') . '</a><br />';
unset($_REQUEST['trashed']);
$messages[] = '<a href="' . esc_url( wp_nonce_url( "edit.php?post_type=$post_type&doaction=undo&action=untrash&ids=$ids", "bulk-posts" ) ) . '">' . __('Undo') . '</a>';
}
if ( isset($_REQUEST['untrashed']) && (int) $_REQUEST['untrashed'] ) {
printf( _n( 'Item restored from the Trash.', '%s items restored from the Trash.', $_REQUEST['untrashed'] ), number_format_i18n( $_REQUEST['untrashed'] ) );
unset($_REQUEST['undeleted']);
if ( isset( $_REQUEST['untrashed'] ) && $untrashed = absint( $_REQUEST['untrashed'] ) ) {
$messages[] = sprintf( _n( 'Item restored from the Trash.', '%s items restored from the Trash.', $untrashed ), number_format_i18n( $untrashed ) );
}
$_SERVER['REQUEST_URI'] = remove_query_arg( array('locked', 'skipped', 'updated', 'deleted', 'trashed', 'untrashed'), $_SERVER['REQUEST_URI'] );
if ( $messages )
echo join( ' ', $messages );
unset( $messages );
$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'locked', 'skipped', 'updated', 'deleted', 'trashed', 'untrashed' ), $_SERVER['REQUEST_URI'] );
?>
</p></div>
<?php } ?>

71
src/wp-admin/error_log Normal file
View File

@ -0,0 +1,71 @@
[19-Aug-2011 09:36:13] PHP Warning: unserialize() expects parameter 1 to be string, array given in /home/ohouse/public_html/wp-content/plugins/plugin-update-blocker/plugin-update-blocker.php on line 75
[19-Aug-2011 09:36:13] PHP Warning: Invalid argument supplied for foreach() in /home/ohouse/public_html/wp-content/plugins/plugin-update-blocker/plugin-update-blocker.php on line 80
[03-Oct-2011 18:58:42] PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent by (output started at /home/ohouse/public_html/wp-config.php:1) in /home/ohouse/public_html/wp-content/plugins/thecartpress/TheCartPress.class.php on line 56
[03-Oct-2011 18:58:42] PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/ohouse/public_html/wp-config.php:1) in /home/ohouse/public_html/wp-content/plugins/thecartpress/TheCartPress.class.php on line 56
[03-Oct-2011 18:58:42] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/ohouse/public_html/wp-config.php:1) in /home/ohouse/public_html/wp-includes/pluggable.php on line 934
[03-Oct-2011 18:58:59] PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent by (output started at /home/ohouse/public_html/wp-config.php:1) in /home/ohouse/public_html/wp-content/plugins/thecartpress/TheCartPress.class.php on line 56
[03-Oct-2011 18:58:59] PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/ohouse/public_html/wp-config.php:1) in /home/ohouse/public_html/wp-content/plugins/thecartpress/TheCartPress.class.php on line 56
[03-Oct-2011 18:58:59] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/ohouse/public_html/wp-config.php:1) in /home/ohouse/public_html/wp-includes/pluggable.php on line 934
[03-Oct-2011 19:02:58] PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent by (output started at /home/ohouse/public_html/wp-config.php:1) in /home/ohouse/public_html/wp-content/plugins/thecartpress/TheCartPress.class.php on line 56
[03-Oct-2011 19:02:58] PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/ohouse/public_html/wp-config.php:1) in /home/ohouse/public_html/wp-content/plugins/thecartpress/TheCartPress.class.php on line 56
[03-Oct-2011 19:02:59] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/ohouse/public_html/wp-config.php:1) in /home/ohouse/public_html/wp-includes/pluggable.php on line 934
[03-Oct-2011 19:04:38] PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent by (output started at /home/ohouse/public_html/wp-config.php:1) in /home/ohouse/public_html/wp-content/plugins/thecartpress/TheCartPress.class.php on line 56
[03-Oct-2011 19:04:38] PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/ohouse/public_html/wp-config.php:1) in /home/ohouse/public_html/wp-content/plugins/thecartpress/TheCartPress.class.php on line 56
[03-Oct-2011 19:04:38] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/ohouse/public_html/wp-config.php:1) in /home/ohouse/public_html/wp-includes/pluggable.php on line 934
[03-Oct-2011 19:05:02] PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent by (output started at /home/ohouse/public_html/wp-config.php:1) in /home/ohouse/public_html/wp-content/plugins/thecartpress/TheCartPress.class.php on line 56
[03-Oct-2011 19:05:02] PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/ohouse/public_html/wp-config.php:1) in /home/ohouse/public_html/wp-content/plugins/thecartpress/TheCartPress.class.php on line 56
[03-Oct-2011 19:05:02] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/ohouse/public_html/wp-config.php:1) in /home/ohouse/public_html/wp-includes/pluggable.php on line 934
[03-Oct-2011 19:06:56] PHP Notice: Undefined index: aiosp_enabled in /home/ohouse/public_html/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack.php on line 766
[03-Oct-2011 19:06:56] PHP Notice: Undefined index: aiosp_enabled in /home/ohouse/public_html/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack.php on line 766
[03-Oct-2011 19:06:56] PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent by (output started at /home/ohouse/public_html/wp-config.php:1) in /home/ohouse/public_html/wp-content/plugins/thecartpress/TheCartPress.class.php on line 56
[03-Oct-2011 19:06:56] PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/ohouse/public_html/wp-config.php:1) in /home/ohouse/public_html/wp-content/plugins/thecartpress/TheCartPress.class.php on line 56
[03-Oct-2011 19:06:56] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/ohouse/public_html/wp-config.php:1) in /home/ohouse/public_html/wp-includes/pluggable.php on line 934
[03-Oct-2011 19:07:28] PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent by (output started at /home/ohouse/public_html/wp-config.php:1) in /home/ohouse/public_html/wp-content/plugins/thecartpress/TheCartPress.class.php on line 56
[03-Oct-2011 19:07:28] PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/ohouse/public_html/wp-config.php:1) in /home/ohouse/public_html/wp-content/plugins/thecartpress/TheCartPress.class.php on line 56
[03-Oct-2011 19:07:29] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/ohouse/public_html/wp-config.php:1) in /home/ohouse/public_html/wp-includes/pluggable.php on line 934
[04-Oct-2011 07:32:44] PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home/ohouse/public_html/wp-content/plugins/wp-security-scan/libs/functions.php on line 253
[04-Oct-2011 07:32:45] PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home/ohouse/public_html/wp-content/plugins/wp-security-scan/libs/functions.php on line 253
[04-Oct-2011 07:32:45] PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home/ohouse/public_html/wp-content/plugins/wp-security-scan/libs/functions.php on line 253
[04-Oct-2011 07:32:45] PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home/ohouse/public_html/wp-content/plugins/wp-security-scan/libs/functions.php on line 253
[04-Oct-2011 07:32:45] PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home/ohouse/public_html/wp-content/plugins/wp-security-scan/libs/functions.php on line 253
[04-Oct-2011 07:32:45] PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home/ohouse/public_html/wp-content/plugins/wp-security-scan/libs/functions.php on line 253
[04-Oct-2011 07:32:45] PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home/ohouse/public_html/wp-content/plugins/wp-security-scan/libs/functions.php on line 253
[04-Oct-2011 07:32:45] PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home/ohouse/public_html/wp-content/plugins/wp-security-scan/libs/functions.php on line 253
[04-Oct-2011 07:32:45] PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home/ohouse/public_html/wp-content/plugins/wp-security-scan/libs/functions.php on line 253
[04-Oct-2011 07:32:45] PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home/ohouse/public_html/wp-content/plugins/wp-security-scan/libs/functions.php on line 253
[04-Oct-2011 07:32:45] PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home/ohouse/public_html/wp-content/plugins/wp-security-scan/libs/functions.php on line 253
[04-Oct-2011 07:32:45] PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home/ohouse/public_html/wp-content/plugins/wp-security-scan/libs/functions.php on line 253
[04-Oct-2011 07:32:45] PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home/ohouse/public_html/wp-content/plugins/wp-security-scan/libs/functions.php on line 253
[04-Oct-2011 07:32:45] PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home/ohouse/public_html/wp-content/plugins/wp-security-scan/libs/functions.php on line 253
[04-Oct-2011 07:32:45] PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home/ohouse/public_html/wp-content/plugins/wp-security-scan/libs/functions.php on line 253
[04-Oct-2011 07:32:45] PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home/ohouse/public_html/wp-content/plugins/wp-security-scan/libs/functions.php on line 253
[04-Oct-2011 07:32:45] PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home/ohouse/public_html/wp-content/plugins/wp-security-scan/libs/functions.php on line 253
[04-Oct-2011 07:32:45] PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home/ohouse/public_html/wp-content/plugins/wp-security-scan/libs/functions.php on line 253
[04-Oct-2011 07:32:45] PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home/ohouse/public_html/wp-content/plugins/wp-security-scan/libs/functions.php on line 253
[04-Oct-2011 07:32:45] PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home/ohouse/public_html/wp-content/plugins/wp-security-scan/libs/functions.php on line 253
[04-Oct-2011 07:32:45] PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home/ohouse/public_html/wp-content/plugins/wp-security-scan/libs/functions.php on line 253
[04-Oct-2011 07:32:45] PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home/ohouse/public_html/wp-content/plugins/wp-security-scan/libs/functions.php on line 253
[04-Oct-2011 07:32:45] PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home/ohouse/public_html/wp-content/plugins/wp-security-scan/libs/functions.php on line 253
[04-Oct-2011 07:32:45] PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home/ohouse/public_html/wp-content/plugins/wp-security-scan/libs/functions.php on line 253
[04-Oct-2011 07:32:45] PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home/ohouse/public_html/wp-content/plugins/wp-security-scan/libs/functions.php on line 253
[04-Oct-2011 07:32:45] PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home/ohouse/public_html/wp-content/plugins/wp-security-scan/libs/functions.php on line 253
[04-Oct-2011 07:32:45] PHP Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in /home/ohouse/public_html/wp-content/plugins/wp-security-scan/libs/functions.php on line 253
[04-Oct-2011 09:35:14] PHP Warning: unserialize() expects parameter 1 to be string, array given in /home/ohouse/public_html/wp-content/plugins/plugin-update-blocker/plugin-update-blocker.php on line 75
[04-Oct-2011 09:35:14] PHP Warning: Invalid argument supplied for foreach() in /home/ohouse/public_html/wp-content/plugins/plugin-update-blocker/plugin-update-blocker.php on line 80
[04-Oct-2011 13:58:35] PHP Warning: unserialize() expects parameter 1 to be string, array given in /home/ohouse/public_html/wp-content/plugins/plugin-update-blocker/plugin-update-blocker.php on line 75
[04-Oct-2011 13:58:35] PHP Warning: Invalid argument supplied for foreach() in /home/ohouse/public_html/wp-content/plugins/plugin-update-blocker/plugin-update-blocker.php on line 80
[04-Oct-2011 13:59:15] PHP Warning: unserialize() expects parameter 1 to be string, array given in /home/ohouse/public_html/wp-content/plugins/plugin-update-blocker/plugin-update-blocker.php on line 75
[04-Oct-2011 13:59:15] PHP Warning: Invalid argument supplied for foreach() in /home/ohouse/public_html/wp-content/plugins/plugin-update-blocker/plugin-update-blocker.php on line 80
[11-Apr-2012 10:51:00] PHP Warning: closedir(): 319 is not a valid Directory resource in /home/ohouse/public_html/wp-content/plugins/thecartpress/widgets/CustomListWidget.class.php on line 188
[11-Apr-2012 10:51:05] PHP Warning: closedir(): 325 is not a valid Directory resource in /home/ohouse/public_html/wp-content/plugins/thecartpress/widgets/CustomPostTypeListWidget.class.php on line 302
[11-Apr-2012 10:51:05] PHP Warning: closedir(): 326 is not a valid Directory resource in /home/ohouse/public_html/wp-content/plugins/thecartpress/widgets/CustomListWidget.class.php on line 188
[11-Apr-2012 10:51:05] PHP Warning: closedir(): 327 is not a valid Directory resource in /home/ohouse/public_html/wp-content/plugins/thecartpress/widgets/CustomListWidget.class.php on line 188
[11-Apr-2012 10:51:05] PHP Warning: closedir(): 329 is not a valid Directory resource in /home/ohouse/public_html/wp-content/plugins/thecartpress/widgets/CustomListWidget.class.php on line 188
[11-Apr-2012 10:51:05] PHP Warning: closedir(): 319 is not a valid Directory resource in /home/ohouse/public_html/wp-content/plugins/thecartpress/widgets/CustomListWidget.class.php on line 188
[11-Apr-2012 10:51:06] PHP Warning: closedir(): 325 is not a valid Directory resource in /home/ohouse/public_html/wp-content/plugins/thecartpress/widgets/CustomPostTypeListWidget.class.php on line 302
[11-Apr-2012 10:51:06] PHP Warning: closedir(): 326 is not a valid Directory resource in /home/ohouse/public_html/wp-content/plugins/thecartpress/widgets/CustomListWidget.class.php on line 188
[11-Apr-2012 10:51:06] PHP Warning: closedir(): 327 is not a valid Directory resource in /home/ohouse/public_html/wp-content/plugins/thecartpress/widgets/CustomListWidget.class.php on line 188
[11-Apr-2012 10:51:07] PHP Warning: closedir(): 329 is not a valid Directory resource in /home/ohouse/public_html/wp-content/plugins/thecartpress/widgets/CustomListWidget.class.php on line 188
[17-Apr-2012 11:03:06] PHP Warning: require_once(/home/ohouse/public_html/wp-content/plugins/thecartpress/metaboxes/ProductCustomFieldsMetabox.class.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in /home/ohouse/public_html/wp-content/plugins/thecartpress/TheCartPress.class.php on line 76
[17-Apr-2012 11:03:06] PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required '/home/ohouse/public_html/wp-content/plugins/thecartpress/metaboxes/ProductCustomFieldsMetabox.class.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ohouse/public_html/wp-content/plugins/thecartpress/TheCartPress.class.php on line 76
[26-Apr-2012 10:27:04] PHP Parse error: syntax error, unexpected $end in /home/ohouse/public_html/wp-content/plugins/wp-bannerize/Classes/wpBannerizeAdmin.php on line 897

View File

@ -16,7 +16,12 @@ if ( !current_user_can('export') )
require_once('./includes/export.php');
$title = __('Export');
function add_js() {
/**
* Display JavaScript on the page.
*
* @since 3.5.0
*/
function export_add_js() {
?>
<script type="text/javascript">
//<![CDATA[
@ -36,11 +41,16 @@ function add_js() {
</script>
<?php
}
add_action( 'admin_head', 'add_js' );
add_action( 'admin_head', 'export_add_js' );
add_contextual_help( $current_screen,
'<p>' . __('You can export a file of your site&#8217;s content in order to import it into another installation or platform. The export file will be an XML file format called WXR. Posts, pages, comments, custom fields, categories, and tags can be included. You can choose for the WXR file to include only certain posts or pages by setting the dropdown filters to limit the export by category, author, date range by month, or publishing status.') . '</p>' .
'<p>' . __('Once generated, your WXR file can be imported by another WordPress site or by another blogging platform able to access this format.') . '</p>' .
get_current_screen()->add_help_tab( array(
'id' => 'overview',
'title' => __('Overview'),
'content' => '<p>' . __('You can export a file of your site&#8217;s content in order to import it into another installation or platform. The export file will be an XML file format called WXR. Posts, pages, comments, custom fields, categories, and tags can be included. You can choose for the WXR file to include only certain posts or pages by setting the dropdown filters to limit the export by category, author, date range by month, or publishing status.') . '</p>' .
'<p>' . __('Once generated, your WXR file can be imported by another WordPress site or by another blogging platform able to access this format.') . '</p>',
) );
get_current_screen()->set_help_sidebar(
'<p><strong>' . __('For more information:') . '</strong></p>' .
'<p>' . __('<a href="http://codex.wordpress.org/Tools_Export_Screen" target="_blank">Documentation on Export</a>') . '</p>' .
'<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
@ -84,21 +94,23 @@ if ( isset( $_GET['download'] ) ) {
$args['content'] = $_GET['content'];
}
$args = apply_filters( 'export_args', $args );
export_wp( $args );
die();
}
require_once ('admin-header.php');
function export_date_options() {
function export_date_options( $post_type = 'post' ) {
global $wpdb, $wp_locale;
$months = $wpdb->get_results( "
$months = $wpdb->get_results( $wpdb->prepare( "
SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
FROM $wpdb->posts
WHERE post_type = 'post' AND post_status != 'auto-draft'
WHERE post_type = %s AND post_status != 'auto-draft'
ORDER BY post_date DESC
" );
", $post_type ) );
$month_count = count( $months );
if ( !$month_count || ( 1 == $month_count && 0 == $months[0]->month ) )
@ -120,13 +132,13 @@ function export_date_options() {
<p><?php _e('When you click the button below WordPress will create an XML file for you to save to your computer.'); ?></p>
<p><?php _e('This format, which we call WordPress eXtended RSS or WXR, will contain your posts, pages, comments, custom fields, categories, and tags.'); ?></p>
<p><?php _e('Once you&#8217;ve saved the download file, you can use the Import function in another WordPress installation to import this site.'); ?></p>
<p><?php _e('Once you&#8217;ve saved the download file, you can use the Import function in another WordPress installation to import the content from this site.'); ?></p>
<h3><?php _e( 'Choose what to export' ); ?></h3>
<form action="" method="get" id="export-filters">
<input type="hidden" name="download" value="true" />
<p><label><input type="radio" name="content" value="all" checked="checked" /> <?php _e( 'All content' ); ?></label>
<span class="description"><?php _e( 'This will contain all of your posts, pages, comments, custom fields, terms, navigation menus and custom posts.' ); ?></span></p>
<p><label><input type="radio" name="content" value="all" checked="checked" /> <?php _e( 'All content' ); ?></label></p>
<p class="description"><?php _e( 'This will contain all of your posts, pages, comments, custom fields, terms, navigation menus and custom posts.' ); ?></p>
<p><label><input type="radio" name="content" value="posts" /> <?php _e( 'Posts' ); ?></label></p>
<ul id="post-filters" class="export-filters">
@ -177,11 +189,11 @@ function export_date_options() {
<label><?php _e( 'Date range:' ); ?></label>
<select name="page_start_date">
<option value="0"><?php _e( 'Start Date' ); ?></option>
<?php export_date_options(); ?>
<?php export_date_options( 'page' ); ?>
</select>
<select name="page_end_date">
<option value="0"><?php _e( 'End Date' ); ?></option>
<?php export_date_options(); ?>
<?php export_date_options( 'page' ); ?>
</select>
</li>
<li>
@ -199,7 +211,9 @@ function export_date_options() {
<p><label><input type="radio" name="content" value="<?php echo esc_attr( $post_type->name ); ?>" /> <?php echo esc_html( $post_type->label ); ?></label></p>
<?php endforeach; ?>
<?php submit_button( __('Download Export File'), 'secondary' ); ?>
<?php do_action( 'export_filters' ) ?>
<?php submit_button( __('Download Export File') ); ?>
</form>
</div>

View File

@ -10,21 +10,36 @@
require_once( './admin.php' );
$title = __( 'Freedoms' );
$parent_file = 'index.php';
include( './admin-header.php' );
list( $display_version ) = explode( '-', $wp_version );
include( ABSPATH . 'wp-admin/admin-header.php' );
?>
<div class="wrap">
<?php screen_icon(); ?>
<h2><?php _e( 'Freedoms' ); ?></h2>
<div class="wrap about-wrap">
<p><?php printf( __( 'WordPress is Free and open source software, built by a distributed community of mostly volunteer developers from around the world. WordPress comes with some awesome, worldview-changing rights courtesy of its <a href="%s">license</a>, the GPL.' ), 'http://wordpress.org/about/license/' ); ?></p>
<h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
<div class="about-text"><?php printf( __( 'Thank you for updating to the latest version! WordPress %s is more polished and enjoyable than ever before. We hope you like it.' ), $display_version ); ?></div>
<div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
<h2 class="nav-tab-wrapper">
<a href="about.php" class="nav-tab">
<?php _e( 'What&#8217;s New' ); ?>
</a><a href="credits.php" class="nav-tab">
<?php _e( 'Credits' ); ?>
</a><a href="freedoms.php" class="nav-tab nav-tab-active">
<?php _e( 'Freedoms' ); ?>
</a>
</h2>
<p class="about-description"><?php printf( __( 'WordPress is Free and open source software, built by a distributed community of mostly volunteer developers from around the world. WordPress comes with some awesome, worldview-changing rights courtesy of its <a href="%s">license</a>, the GPL.' ), 'http://wordpress.org/about/license/' ); ?></p>
<ol start="0">
<li><?php _e( 'You have the freedom to run the program, for any purpose.' ); ?></li>
<li><?php _e( 'You have access to the source code, the freedom to study how the program works, and the freedom to change it to make it do what you wish.' ); ?></li>
<li><?php _e( 'You have the freedom to redistribute copies of the original program so you can help your neighbor.' ); ?></li>
<li><?php _e( 'You have the freedom to distribute copies of your modified versions to others. By doing this you can give the whole community a chance to benefit from your changes.' ); ?></li>
<li><p><?php _e( 'You have the freedom to run the program, for any purpose.' ); ?></p></li>
<li><p><?php _e( 'You have access to the source code, the freedom to study how the program works, and the freedom to change it to make it do what you wish.' ); ?></p></li>
<li><p><?php _e( 'You have the freedom to redistribute copies of the original program so you can help your neighbor.' ); ?></p></li>
<li><p><?php _e( 'You have the freedom to distribute copies of your modified versions to others. By doing this you can give the whole community a chance to benefit from your changes.' ); ?></p></li>
</ol>
<p><?php printf( __( 'WordPress grows when people like you tell their friends about it, and the thousands of businesses and services that are built on and around WordPress share that fact with their users. We&#8217;re flattered every time someone spreads the good word, just make sure to <a href="%s">check out our trademark guidelines</a> first.' ), 'http://wordpressfoundation.org/trademark-policy/' ); ?></p>
@ -39,4 +54,4 @@ printf( __( 'Every plugin and theme in WordPress.org&#8217;s directory is 100%%
<p><?php _e( 'Don&#8217;t you wish all software came with these freedoms? So do we! For more information, check out the <a href="http://www.fsf.org/">Free Software Foundation</a>.' ); ?></p>
</div>
<?php include( './admin-footer.php' ); ?>
<?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 571 B

After

Width:  |  Height:  |  Size: 546 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 587 B

After

Width:  |  Height:  |  Size: 554 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 453 B

After

Width:  |  Height:  |  Size: 417 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 556 B

After

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 863 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 719 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 761 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 243 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 495 B

After

Width:  |  Height:  |  Size: 243 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 723 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 243 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 494 B

After

Width:  |  Height:  |  Size: 243 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 B

After

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 992 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 B

After

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 719 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1003 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 652 B

After

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 850 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 891 B

After

Width:  |  Height:  |  Size: 92 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 B

After

Width:  |  Height:  |  Size: 89 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Some files were not shown because too many files have changed in this diff Show More