Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a67b6501e7 | ||
|
|
bb7f5def49 | ||
|
|
90ff07836f | ||
|
|
db3aa34eb7 | ||
|
|
7c048e745b | ||
|
|
afc218c988 | ||
|
|
61c109e030 | ||
|
|
cad54bba34 | ||
|
|
1f28b09d74 | ||
|
|
056e32340f | ||
|
|
77c7c21043 | ||
|
|
9f6201cbf4 | ||
|
|
434b4605eb | ||
|
|
c52e2c100d | ||
|
|
8c7f681a75 | ||
|
|
c15548e05e | ||
|
|
61aef00dc4 | ||
|
|
f50c0c90cc | ||
|
|
fd2cfdfcda | ||
|
|
b5bb8c72a8 | ||
|
|
97ebc17ca8 | ||
|
|
c51dfe7bfe |
@@ -15,3 +15,4 @@ define('WP_USE_THEMES', true);
|
||||
|
||||
/** Loads the WordPress Environment and Template */
|
||||
require('./wp-blog-header.php');
|
||||
?>
|
||||
78
license.txt
@@ -37,15 +37,16 @@ and
|
||||
|
||||
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, 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.
|
||||
|
||||
Preamble
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
@@ -54,7 +55,7 @@ software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
@@ -95,7 +96,7 @@ patent must be licensed for everyone's free use or not licensed at all.
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
@@ -159,7 +160,6 @@ distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
@@ -294,7 +294,7 @@ make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
@@ -316,66 +316,8 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
|
||||
WRITTEN OFFER
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="logo">
|
||||
<a href="http://wordpress.org/"><img alt="WordPress" src="wp-admin/images/wordpress-logo.png" /></a>
|
||||
<br /> Version 3.4
|
||||
<a href="http://wordpress.org/"><img alt="WordPress" src="wp-admin/images/wordpress-logo.png" width="250" height="68" /></a>
|
||||
<br /> Version 3.3.1
|
||||
</h1>
|
||||
<p style="text-align: center">Semantic Personal Publishing Platform</p>
|
||||
|
||||
@@ -104,5 +104,6 @@
|
||||
<h1>License</h1>
|
||||
<p>WordPress is free software, and is released under the terms of the <abbr title="GNU General Public License">GPL</abbr> version 2 or (at your option) any later version. See <a href="license.txt">license.txt</a>.</p>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -63,9 +63,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 “%2$s”. 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() );
|
||||
printf( __('Your account has been activated. You may now <a href="%1$s">log in</a> to the site using your chosen username of “%2$s”. 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 “%3$s”. 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() );
|
||||
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 “%3$s”. 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 {
|
||||
|
||||
@@ -13,13 +13,13 @@ $title = __( 'About' );
|
||||
|
||||
list( $display_version ) = explode( '-', $wp_version );
|
||||
|
||||
include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
include( './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 already making your website better, faster, and more attractive, just like you!' ), $display_version ); ?></div>
|
||||
<div class="about-text"><?php printf( __( 'Thank you for updating to the latest version! Using WordPress %s will improve your looks, personality, and web publishing experience. Okay, just the last one, but still. :)' ), $display_version ); ?></div>
|
||||
|
||||
<div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
|
||||
|
||||
@@ -33,62 +33,103 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
<div class="changelog point-releases">
|
||||
<h3><?php echo _n( 'Maintenance and Security Release', 'Maintenance and Security Releases', 1 ); ?></h3>
|
||||
<p><?php printf( _n( '<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.', 15 ), '3.3.1', number_format_i18n( 15 ) ); ?>
|
||||
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'http://codex.wordpress.org/Version_3.3.1' ); ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="changelog">
|
||||
<h3><?php _e( 'Live Theme Previews' ); ?></h3>
|
||||
<h3><?php _e( 'Easier Uploading' ); ?></h3>
|
||||
|
||||
<div class="feature-section images-stagger-right">
|
||||
<img src="<?php echo esc_url( admin_url( 'images/screenshots/theme-customizer.png' ) ); ?>" class="image-50" />
|
||||
<h4><?php _e( 'Try on New Themes' ); ?></h4>
|
||||
<p><?php _e( 'Gone are the days of rushing to update your header, background, and the like as soon as you activate a new theme. You can now customize these options <strong>before</strong> activating a new theme. Note: this feature is available for installed themes only.' ); ?></p>
|
||||
<div class="feature-images">
|
||||
<img src="images/screenshots/media-icon.png" width="200" class="angled-right" />
|
||||
<img src="images/screenshots/drag-and-drop.png" width="200" class="angled-left" />
|
||||
</div>
|
||||
<div class="left-feature">
|
||||
<h4><?php _e( 'File Type Detection' ); ?></h4>
|
||||
<p><?php _e( 'We’ve streamlined things! Instead of needing to click on a specific upload icon based on your file type, now there’s just one. Once your file is uploaded, the appropriate fields will be displayed for entering information based on the file type.' ); ?></p>
|
||||
|
||||
<h4><?php _e( 'Customize Current Theme' ); ?></h4>
|
||||
<p><?php _e( 'Satisfy your curiosity and try on a fresh coat of paint — you can also use the live preview mode to customize your current theme. Look for the Customize link on the Themes screen.' ); ?></p>
|
||||
<h4><?php _e( 'Drag-and-Drop Media Uploader' ); ?></h4>
|
||||
<p><?php _e( 'Adding photos or other files to posts and pages just got easier. Drag files from your desktop and drop them into the uploader. Add one file at a time, or many at once.' ); ?></p>
|
||||
|
||||
<h4><?php _e( 'More File Formats' ); ?></h4>
|
||||
<p><?php _e( 'We’ve added the rar and 7z file formats to the list of allowed file types in the uploader.' ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="changelog">
|
||||
<h3><?php _e( 'Custom Headers' ); ?></h3>
|
||||
<h3><?php _e( 'Dashboard Design' ); ?></h3>
|
||||
|
||||
<div class="feature-section">
|
||||
<h4><?php _e( 'Flexible Sizes' ); ?></h4>
|
||||
<p><?php _e( 'You can decide for yourself how tall or wide your custom header image should be. From now on, themes will provide a recommended image size for custom headers rather than a fixed requirement. Note: this feature requires <a href="http://codex.wordpress.org/Custom_Headers">theme support</a>.' ); ?></p>
|
||||
<div class="three-col-images">
|
||||
<img src="<?php echo esc_url( admin_url( 'images/screenshots/flex-header-1.png' ) ); ?>" class="image-30 first-feature" />
|
||||
<img src="<?php echo esc_url( admin_url( 'images/screenshots/flex-header-2.png' ) ); ?>" class="image-30" />
|
||||
<img src="<?php echo esc_url( admin_url( 'images/screenshots/flex-header-3.png' ) ); ?>" class="image-30 last-feature" />
|
||||
<div class="feature-section text-features">
|
||||
<h4><?php _e( 'Flyout Menus' ); ?></h4>
|
||||
<p><?php _e( 'Speed up navigating the dashboard and reduce repetitive clicking with our new flyout submenus. As you hover over each main menu item in your dashboard navigation, the submenus will magically appear, providing single-click access to any dashboard screen.' ); ?></p>
|
||||
|
||||
<div>
|
||||
<h4><?php _e( 'Header + Admin Bar = Toolbar' ); ?></h4>
|
||||
<p><?php _e( 'To save space and increase efficiency, we’ve combined the admin bar and the old Dashboard header into one persistent toolbar. Hovering over the toolbar items will reveal submenus when available for quick access. ' ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="feature-section images-stagger-right">
|
||||
<img src="<?php echo esc_url( admin_url( 'images/screenshots/flex-header-media-library.png' ) ); ?>" class="image-50" />
|
||||
<h4><?php _e( 'Choose from Media Library' ); ?></h4>
|
||||
<p><?php _e( 'Tired of re-uploading the same custom header image every time you check out a new theme? Now you can choose header images from your media library for easier customization.' ); ?></p>
|
||||
<div class="feature-section screenshot-features">
|
||||
<div class="angled-left">
|
||||
<img src="images/screenshots/admin-flyouts.png" />
|
||||
<h4><?php _e( 'Responsive Design' ); ?></h4>
|
||||
<p><?php _e( 'Certain dashboard screens have been updated to look better at various sizes, including improved iPad/tablet support.' ); ?></p>
|
||||
</div>
|
||||
<div class="angled-right">
|
||||
<img src="images/screenshots/help-screen.png" />
|
||||
<h4><?php _e( 'Help Tabs' ); ?></h4>
|
||||
<p><?php _e( 'The Help tabs located in the upper corner of the dashboard screens below your name have gotten a facelift. Help content is broken into smaller sections for easier access, with links to relevant documentation and the support forums always visible.' ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="changelog">
|
||||
<h3><?php _e( 'Twitter Embeds' ); ?></h3>
|
||||
<h3><?php _e( 'Feels Like the First Time' ); ?></h3>
|
||||
|
||||
<div class="feature-section images-stagger-right">
|
||||
<img src="<?php echo esc_url( admin_url( 'images/screenshots/twitter-embed-1.png' ) ); ?>" class="image-30" />
|
||||
<img src="<?php echo esc_url( admin_url( 'images/screenshots/twitter-embed-2.png' ) ); ?>" class="image-30" />
|
||||
<h4><?php _e( 'Share Tweets with Style' ); ?></h4>
|
||||
<p><?php _e( 'You can now embed individual tweets in posts. It includes action links that allow readers to reply to, retweet, and favorite the tweet without leaving your site. Just paste a tweet URL on its own line.' ); ?></p>
|
||||
<p><?php printf( __( 'This works with URLs from some other sites, too. For more, see the Codex article on <a href="%s">Embeds</a>.' ), __( 'http://codex.wordpress.org/Embeds' ) ); ?></p>
|
||||
<div class="feature-images">
|
||||
<img src="images/screenshots/new-feature-pointer.png" class="angled-right" />
|
||||
<img src="images/screenshots/welcome-screen.png" class="angled-left" />
|
||||
</div>
|
||||
<div class="left-feature">
|
||||
<h4><?php _e( 'New Feature Pointers' ); ?></h4>
|
||||
<p><?php _e( 'When we add new features, move navigation, or do anything else with the dashboard that might throw you for a loop when you update your WordPress site, we’ll let you know about it with new feature pointers explaining the change.' ); ?></p>
|
||||
|
||||
<h4><?php _e( 'Post-update Changelog' ); ?></h4>
|
||||
<p><?php _e( 'This screen! From now on when you update WordPress, you’ll be brought to this screen — also accessible any time from the W logo in the corner of the toolbar — to get an overview of what’s changed.' ); ?></p>
|
||||
|
||||
<h4><?php _e( 'Dashboard Welcome' ); ?></h4>
|
||||
<p><?php _e( 'The dashboard home screen will have a Welcome area that displays when a new WordPress installation is accessed for the first time, prompting the site owner to complete various setup tasks. Once dismissed, this welcome can be accessed via the dashboard home screen options tab.' ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="changelog">
|
||||
<h3><?php _e( 'Better Captions' ); ?></h3>
|
||||
<h3><?php _e( 'Content Tools' ); ?></h3>
|
||||
|
||||
<div class="feature-section images-stagger-right">
|
||||
<img src="<?php echo esc_url( admin_url( 'images/screenshots/captions-1.png' ) ); ?>" class="image-30" />
|
||||
<img src="<?php echo esc_url( admin_url( 'images/screenshots/captions-2.png' ) ); ?>" class="image-30" />
|
||||
<h4><?php _e( 'HTML Support' ); ?></h4>
|
||||
<p><?php _e( 'Basic HTML support has been added to the caption field in the image uploader. This allows you to add links — great for photo credits or licensing details — and basic formatting such as bold and italicized text.' ); ?></p>
|
||||
<div class="feature-section three-col">
|
||||
<div>
|
||||
<h4><?php _e( 'Better Co-Editing' ); ?></h4>
|
||||
<img src="images/screenshots/coediting.png" class="element-screenshot" />
|
||||
<p><?php _e( 'Have you ever gone to edit a post after someone else has finished with it, only to get an alert that tells you the other person is still editing the post? From now on, you’ll only get that alert if another person is still on the editing screen — no more time lag.' ); ?></p>
|
||||
</div>
|
||||
<div>
|
||||
<h4><?php _e( 'Tumblr Importer' ); ?></h4>
|
||||
<p><?php _e( 'Want to import content from Tumblr to WordPress? No problem! Go to <span class="no-break">Tools → Import</span> to get the new Tumblr Importer, which maps your Tumblog posts to the matching WordPress post formats. Tip: Choose a theme designed to display post formats to get the greatest benefit from the importer.' ); ?></p>
|
||||
</div>
|
||||
<div class="last-feature">
|
||||
<h4><?php _e( 'Widget Improvements' ); ?></h4>
|
||||
<p><?php _e( 'Changing themes often requires widget re-configuration based on the number and position of sidebars. Now if you change back to a previous theme, the widgets will automatically go back to how you had them arranged in that theme. <em>Note: if you’ve added new widgets since the switch, you’ll need to rescue them from the Inactive Widgets area.</em>' ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="changelog">
|
||||
@@ -96,43 +137,49 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
|
||||
<div class="feature-section three-col">
|
||||
<div>
|
||||
<h4><?php _e( 'Faster WP_Query' ); ?></h4>
|
||||
<p><?php _e( 'Post queries have been optimized to improve performance, especially for sites with large databases.' ); ?></p>
|
||||
|
||||
<h4><?php _e( 'Faster Translations' ); ?></h4>
|
||||
<p><?php _e( 'The number of strings loaded on the front end was greatly reduced, resulting in faster front page load times for localized installations.' ); ?> <?php _e( 'Also, better support for East Asian languages, right-to-left languages, theme translations, and more.' ); ?></p>
|
||||
<h4><?php _e( 'Flexible Permalinks' ); ?></h4>
|
||||
<p><?php _e( 'You have more freedom when choosing a post permalink structure. Skip the date information or add a category slug without a performance penalty.' ); ?></p>
|
||||
</div>
|
||||
<div>
|
||||
<h4><?php _e( 'Themes API' ); ?></h4>
|
||||
<p><?php _e( 'WP_Theme, wp_get_themes(), wp_get_theme(). Faster, uses less memory, makes use of persistent caching.' ); ?></p>
|
||||
|
||||
<h4><?php _e( 'Custom Header and Background API' ); ?></h4>
|
||||
<p><?php _e( 'Custom header and background API relocated into the theme support API.' ); ?></p>
|
||||
<h4><?php _e( 'Post Slugs: Less Funky' ); ?></h4>
|
||||
<p><?php _e( 'Funky characters in post titles (e.g. curly quotes from a word processor) will no longer result in garbled post slugs.' ); ?></p>
|
||||
</div>
|
||||
<div class="last-feature">
|
||||
<h4><?php _e( 'XML-RPC API' ); ?></h4>
|
||||
<p><?php printf( __( 'A new <a href="%s">WordPress API</a> that supports custom content types and taxonomies, as well as dozens of other bug fixes and improvements.' ), __( 'http://codex.wordpress.org/XML-RPC_WordPress_API' ) ); ?></p>
|
||||
|
||||
<h4><?php _e( 'External Libraries' ); ?></h4>
|
||||
<p><?php _e( 'jQuery, jQuery UI, TinyMCE, Plupload, PHPMailer, SimplePie, and other libraries were updated. jQuery UI Touch Punch was introduced.' ); ?></p>
|
||||
<h4><?php _e( 'jQuery and jQuery UI' ); ?></h4>
|
||||
<p><?php printf( __( 'WordPress now includes the entire jQuery UI stack and the latest version of jQuery: %s.' ), '1.7.1' ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="feature-section three-col">
|
||||
<div>
|
||||
<h4 style="direction:ltr">is_main_query()</h4>
|
||||
<p><?php _e( 'This handy method will tell you if a <code>WP_Query</code> object is the main WordPress query or a secondary query.' ); ?></p>
|
||||
</div>
|
||||
<div>
|
||||
<h4><?php _e( 'WP_Screen API' ); ?></h4>
|
||||
<p><?php _e( 'WordPress has a nice new API for working with admin screens. Create rich screens, add help documentation, adapt to screen contexts, and more.' ); ?></p>
|
||||
</div>
|
||||
<div class="last-feature">
|
||||
<h4><?php _e( 'Editor API Overhaul' ); ?></h4>
|
||||
<p><?php _e( 'The new editor API automatically pulls in all the JS and CSS goodness for the editor. It even supports multiple editors on the same page.' ); ?></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
|
||||
<a href="<?php echo esc_url( network_admin_url( 'update-core.php' ) ); ?>"><?php
|
||||
is_multisite() ? _e( 'Return to Updates' ) : _e( 'Return to Dashboard → Updates' );
|
||||
?></a> |
|
||||
<?php endif; ?>
|
||||
<a href="<?php echo esc_url( self_admin_url() ); ?>"><?php
|
||||
is_blog_admin() ? _e( 'Go to Dashboard → Home' ) : _e( 'Go to Dashboard' ); ?></a>
|
||||
<a href="<?php echo esc_url( admin_url() ); ?>"><?php _e( 'Go to Dashboard → Home' ); ?></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
|
||||
include( ABSPATH . 'wp-admin/admin-footer.php' );
|
||||
include( './admin-footer.php' );
|
||||
|
||||
// These are strings we may use to describe maintenance/security releases, where we aim for no new strings.
|
||||
return;
|
||||
@@ -158,3 +205,5 @@ _n_noop( '<strong>Version %1$s</strong> addressed some security issues and fixed
|
||||
'<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>.' );
|
||||
|
||||
?>
|
||||
@@ -13,3 +13,4 @@ _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');
|
||||
?>
|
||||
@@ -11,7 +11,7 @@ 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,
|
||||
global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow, $wp_version, $is_iphone,
|
||||
$current_site, $update_title, $total_update_count, $parent_file;
|
||||
|
||||
// Catch plugins that include admin-header.php before admin.php completes.
|
||||
@@ -55,7 +55,7 @@ var userSettings = {
|
||||
'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', 'relative' ); ?>',
|
||||
ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>',
|
||||
pagenow = '<?php echo $current_screen->id; ?>',
|
||||
typenow = '<?php echo $current_screen->post_type; ?>',
|
||||
adminpage = '<?php echo $admin_body_class; ?>',
|
||||
@@ -85,26 +85,13 @@ if ( is_rtl() )
|
||||
$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 ( wp_is_mobile() )
|
||||
$admin_body_class .= ' mobile';
|
||||
|
||||
$admin_body_class .= ' no-customize-support';
|
||||
|
||||
?>
|
||||
if ( $is_iphone ) { ?>
|
||||
<style type="text/css">.row-actions{visibility:visible;}</style>
|
||||
<?php } ?>
|
||||
</head>
|
||||
<body class="wp-admin no-js <?php echo apply_filters( 'admin_body_class', '' ) . " $admin_body_class"; ?>">
|
||||
<script type="text/javascript">
|
||||
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();
|
||||
?>
|
||||
<script type="text/javascript">document.body.className = document.body.className.replace('no-js','js');</script>
|
||||
|
||||
<div id="wpwrap">
|
||||
<?php require(ABSPATH . 'wp-admin/menu-header.php'); ?>
|
||||
|
||||
@@ -29,3 +29,5 @@ if ( !empty($_REQUEST['action']) )
|
||||
$action .= '_' . $_REQUEST['action'];
|
||||
|
||||
do_action($action);
|
||||
|
||||
?>
|
||||
@@ -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') )
|
||||
@@ -30,7 +30,7 @@ if ( isset($_GET['import']) && !defined('WP_LOAD_IMPORTERS') )
|
||||
require_once(dirname(dirname(__FILE__)) . '/wp-load.php');
|
||||
|
||||
if ( get_option('db_upgraded') ) {
|
||||
flush_rewrite_rules();
|
||||
$wp_rewrite->flush_rules();
|
||||
update_option( 'db_upgraded', false );
|
||||
|
||||
/**
|
||||
@@ -153,6 +153,7 @@ 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)));
|
||||
|
||||
@@ -228,3 +229,5 @@ if ( isset($plugin_page) ) {
|
||||
|
||||
if ( !empty($_REQUEST['action']) )
|
||||
do_action('admin_action_' . $_REQUEST['action']);
|
||||
|
||||
?>
|
||||
|
||||
@@ -66,3 +66,5 @@ if ( $_REQUEST['short'] ) {
|
||||
$type = $_REQUEST['type'];
|
||||
echo apply_filters("async_upload_{$type}", $id);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -65,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.') );
|
||||
@@ -73,6 +73,9 @@ case 'editcomment' :
|
||||
if ( 'trash' == $comment->comment_approved )
|
||||
comment_footer_die( __('This comment is in the Trash. Please move it out of the Trash if you want to edit it.') );
|
||||
|
||||
if ( 'spam' == $comment->comment_approved )
|
||||
comment_footer_die( __('This comment is marked as Spam. Please mark it as Not Spam if you want to edit it.') );
|
||||
|
||||
$comment = get_comment_to_edit( $comment_id );
|
||||
|
||||
include('./edit-form-comment.php');
|
||||
@@ -219,7 +222,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.') );
|
||||
|
||||
@@ -292,3 +295,5 @@ default:
|
||||
} // end switch
|
||||
|
||||
include('./admin-footer.php');
|
||||
|
||||
?>
|
||||
|
||||
@@ -17,9 +17,7 @@ function wp_credits() {
|
||||
|
||||
$results = get_site_transient( 'wordpress_credits_' . $locale );
|
||||
|
||||
if ( ! is_array( $results )
|
||||
|| ( isset( $results['data']['version'] ) && strpos( $wp_version, $results['data']['version'] ) !== 0 )
|
||||
) {
|
||||
if ( ! is_array( $results ) ) {
|
||||
$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 ) )
|
||||
@@ -46,13 +44,13 @@ function _wp_credits_build_object_link( &$data ) {
|
||||
|
||||
list( $display_version ) = explode( '-', $wp_version );
|
||||
|
||||
include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
include( './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 already making your website better, faster, and more attractive, just like you!' ), $display_version ); ?></div>
|
||||
<div class="about-text"><?php printf( __( 'Thank you for updating to the latest version! Using WordPress %s will improve your looks, personality, and web publishing experience. Okay, just the last one, but still. :)' ), $display_version ); ?></div>
|
||||
|
||||
<div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
|
||||
|
||||
@@ -75,7 +73,7 @@ if ( ! $credits ) {
|
||||
'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( ABSPATH . 'wp-admin/admin-footer.php' );
|
||||
include( './admin-footer.php' );
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -136,7 +134,7 @@ foreach ( $credits['groups'] as $group_slug => $group_data ) {
|
||||
</div>
|
||||
<?php
|
||||
|
||||
include( ABSPATH . 'wp-admin/admin-footer.php' );
|
||||
include( './admin-footer.php' );
|
||||
|
||||
return;
|
||||
|
||||
@@ -159,3 +157,5 @@ __( 'XML-RPC' );
|
||||
__( 'Internationalization' );
|
||||
__( 'External Libraries' );
|
||||
__( 'Icon Design' );
|
||||
|
||||
?>
|
||||
|
||||
@@ -45,27 +45,6 @@ input[type="url"],
|
||||
select {
|
||||
border-color: #dfdfdf;
|
||||
background-color: #fff;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
select {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
textarea:focus,
|
||||
input[type="text"]:focus,
|
||||
input[type="password"]:focus,
|
||||
input[type="file"]:focus,
|
||||
input[type="button"]:focus,
|
||||
input[type="submit"]:focus,
|
||||
input[type="reset"]:focus,
|
||||
input[type="email"]:focus,
|
||||
input[type="number"]:focus,
|
||||
input[type="search"]:focus,
|
||||
input[type="tel"]:focus,
|
||||
input[type="url"]:focus,
|
||||
select:focus {
|
||||
border-color: #d1e5ee;
|
||||
}
|
||||
|
||||
kbd,
|
||||
@@ -96,8 +75,7 @@ a.page-numbers:hover {
|
||||
|
||||
body,
|
||||
#wpbody,
|
||||
.form-table .pre,
|
||||
.ui-autocomplete li a {
|
||||
.form-table .pre {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
@@ -158,10 +136,6 @@ div.dashboard-widget-submit {
|
||||
border-top-color: #ccc;
|
||||
}
|
||||
|
||||
ul.category-tabs li {
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
div.tabs-panel,
|
||||
.wp-tab-panel,
|
||||
ul.category-tabs li.tabs,
|
||||
@@ -313,9 +287,8 @@ div.error a {
|
||||
border-color: #c00 !important;
|
||||
}
|
||||
|
||||
.submit,
|
||||
#commentsdiv #add-new-comment {
|
||||
border-color: #dfdfdf;
|
||||
.submit {
|
||||
border-color: #DFDFDF;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
@@ -336,15 +309,6 @@ td.help {
|
||||
color: #9a9a9a;
|
||||
}
|
||||
|
||||
.ui-autocomplete {
|
||||
background-color: #eff8ff;
|
||||
border-color: #d1e5ee;
|
||||
}
|
||||
|
||||
.ui-autocomplete li a.ui-state-hover {
|
||||
background-color: #def1ff;
|
||||
}
|
||||
|
||||
.post-com-count {
|
||||
background-image: url(../images/bubble_bg.gif);
|
||||
color: #fff;
|
||||
@@ -1038,6 +1002,7 @@ table.widefat .spam a:hover,
|
||||
border-color: #5589AA !important;
|
||||
}
|
||||
|
||||
|
||||
.wp-editor-wrap .wp_themeSkin table.mceSplitButton td {
|
||||
background-color: #cfdfe9; /* Fallback */
|
||||
background-image: -ms-linear-gradient(bottom, #cfdfe9, #fff); /* IE10 */
|
||||
@@ -1443,381 +1408,203 @@ table.widefat .spam a:hover,
|
||||
background-position: 0 -108px;
|
||||
}
|
||||
|
||||
/* Auto-folding of the admin menu */
|
||||
@media only screen and (max-width: 900px) {
|
||||
#adminmenu li.menu-top {
|
||||
border-top-color: #ffffff;
|
||||
border-bottom-color: #cae6ff;
|
||||
}
|
||||
|
||||
#adminmenu li.wp-has-current-submenu,
|
||||
#adminmenu li.current.menu-top {
|
||||
background-color: #5589AA; /* Fallback */
|
||||
background-image: -ms-linear-gradient(bottom, #5589AA, #619bbb); /* IE10 */
|
||||
background-image: -moz-linear-gradient(bottom, #5589AA, #619bbb); /* Firefox */
|
||||
background-image: -o-linear-gradient(bottom, #5589AA, #619bbb); /* Opera */
|
||||
background-image: -webkit-gradient(linear, left bottom, left top, from(#5589AA), to(#619bbb)); /* old Webkit */
|
||||
background-image: -webkit-linear-gradient(bottom, #5589AA, #619bbb); /* new Webkit */
|
||||
background-image: linear-gradient(bottom, #5589AA, #619bbb); /* proposed W3C Markup */
|
||||
}
|
||||
|
||||
#adminmenu li.menu-top li:hover a {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
#adminmenu li.wp-has-current-submenu,
|
||||
#adminmenu li.current.menu-top {
|
||||
border-top-color: #5A8FAD;
|
||||
border-bottom-color: #5589AA;
|
||||
}
|
||||
|
||||
#adminmenu .wp-has-current-submenu .wp-submenu-wrap {
|
||||
-moz-box-shadow: 2px 2px 5px rgba( 0, 0, 0, 0.4 );
|
||||
-webkit-box-shadow: 2px 2px 5px rgba( 0, 0, 0, 0.4 );
|
||||
box-shadow: 2px 2px 5px rgba( 0, 0, 0, 0.4 );
|
||||
}
|
||||
|
||||
#collapse-button div {
|
||||
background-position: 0 -108px;
|
||||
}
|
||||
}
|
||||
|
||||
/* menu and screen icons */
|
||||
.icon16,
|
||||
.icon32,
|
||||
div.wp-menu-image {
|
||||
background-color: transparent;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.icon16.icon-dashboard,
|
||||
.menu-icon-dashboard div.wp-menu-image,
|
||||
.icon16.icon-post,
|
||||
.menu-icon-post div.wp-menu-image,
|
||||
.icon16.icon-media,
|
||||
.menu-icon-media div.wp-menu-image,
|
||||
.icon16.icon-links,
|
||||
.menu-icon-links div.wp-menu-image,
|
||||
.icon16.icon-page,
|
||||
.menu-icon-page div.wp-menu-image,
|
||||
.icon16.icon-comments,
|
||||
.menu-icon-comments div.wp-menu-image,
|
||||
.icon16.icon-appearance,
|
||||
.menu-icon-appearance div.wp-menu-image,
|
||||
.icon16.icon-plugins,
|
||||
.menu-icon-plugins div.wp-menu-image,
|
||||
.icon16.icon-users,
|
||||
.menu-icon-users div.wp-menu-image,
|
||||
.icon16.icon-tools,
|
||||
.menu-icon-tools div.wp-menu-image,
|
||||
.icon16.icon-settings,
|
||||
.menu-icon-settings div.wp-menu-image,
|
||||
.icon16.icon-site,
|
||||
.menu-icon-site div.wp-menu-image {
|
||||
background-image: url('../images/menu-vs.png?ver=20120201');
|
||||
}
|
||||
|
||||
.icon16.icon-dashboard,
|
||||
#adminmenu .menu-icon-dashboard div.wp-menu-image {
|
||||
background-position: -59px -33px;
|
||||
background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -60px -33px;
|
||||
}
|
||||
|
||||
#adminmenu .menu-icon-dashboard:hover div.wp-menu-image,
|
||||
#adminmenu .menu-icon-dashboard.wp-has-current-submenu div.wp-menu-image,
|
||||
#adminmenu .menu-icon-dashboard.current div.wp-menu-image {
|
||||
background-position: -59px -1px;
|
||||
background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -60px -1px;
|
||||
}
|
||||
|
||||
.icon16.icon-post,
|
||||
#adminmenu .menu-icon-post div.wp-menu-image {
|
||||
background-position: -269px -33px;
|
||||
background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -271px -33px;
|
||||
}
|
||||
|
||||
#adminmenu .menu-icon-post:hover div.wp-menu-image,
|
||||
#adminmenu .menu-icon-post.wp-has-current-submenu div.wp-menu-image,
|
||||
#adminmenu .menu-icon-post.current div.wp-menu-image {
|
||||
background-position: -269px -1px;
|
||||
#adminmenu .menu-icon-post.wp-has-current-submenu div.wp-menu-image {
|
||||
background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -271px -1px;
|
||||
}
|
||||
|
||||
.icon16.icon-media,
|
||||
#adminmenu .menu-icon-media div.wp-menu-image {
|
||||
background-position: -119px -33px;
|
||||
background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -120px -33px;
|
||||
}
|
||||
|
||||
#adminmenu .menu-icon-media:hover div.wp-menu-image,
|
||||
#adminmenu .menu-icon-media.wp-has-current-submenu div.wp-menu-image,
|
||||
#adminmenu .menu-icon-media.current div.wp-menu-image {
|
||||
background-position: -119px -1px;
|
||||
#adminmenu .menu-icon-media.wp-has-current-submenu div.wp-menu-image {
|
||||
background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -120px -1px;
|
||||
}
|
||||
|
||||
.icon16.icon-links,
|
||||
#adminmenu .menu-icon-links div.wp-menu-image {
|
||||
background-position: -89px -33px;
|
||||
background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -90px -33px;
|
||||
}
|
||||
|
||||
#adminmenu .menu-icon-links:hover div.wp-menu-image,
|
||||
#adminmenu .menu-icon-links.wp-has-current-submenu div.wp-menu-image,
|
||||
#adminmenu .menu-icon-links.current div.wp-menu-image {
|
||||
background-position: -89px -1px;
|
||||
#adminmenu .menu-icon-links.wp-has-current-submenu div.wp-menu-image {
|
||||
background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -90px -1px;
|
||||
}
|
||||
|
||||
.icon16.icon-page,
|
||||
#adminmenu .menu-icon-page div.wp-menu-image {
|
||||
background-position: -149px -33px;
|
||||
background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -150px -33px;
|
||||
}
|
||||
|
||||
#adminmenu .menu-icon-page:hover div.wp-menu-image,
|
||||
#adminmenu .menu-icon-page.wp-has-current-submenu div.wp-menu-image,
|
||||
#adminmenu .menu-icon-page.current div.wp-menu-image {
|
||||
background-position: -149px -1px;
|
||||
#adminmenu .menu-icon-page.wp-has-current-submenu div.wp-menu-image {
|
||||
background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -150px -1px;
|
||||
}
|
||||
|
||||
.icon16.icon-comments,
|
||||
#adminmenu .menu-icon-comments div.wp-menu-image {
|
||||
background-position: -29px -33px;
|
||||
background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -30px -33px;
|
||||
}
|
||||
|
||||
#adminmenu .menu-icon-comments:hover div.wp-menu-image,
|
||||
#adminmenu .menu-icon-comments.wp-has-current-submenu div.wp-menu-image,
|
||||
#adminmenu .menu-icon-comments.current div.wp-menu-image {
|
||||
background-position: -29px -1px;
|
||||
background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -30px -1px;
|
||||
}
|
||||
|
||||
.icon16.icon-appearance,
|
||||
#adminmenu .menu-icon-appearance div.wp-menu-image {
|
||||
background-position: 1px -33px;
|
||||
background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll 0 -33px;
|
||||
}
|
||||
|
||||
#adminmenu .menu-icon-appearance:hover div.wp-menu-image,
|
||||
#adminmenu .menu-icon-appearance.wp-has-current-submenu div.wp-menu-image,
|
||||
#adminmenu .menu-icon-appearance.current div.wp-menu-image {
|
||||
background-position: 1px -1px;
|
||||
#adminmenu .menu-icon-appearance.wp-has-current-submenu div.wp-menu-image {
|
||||
background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll 0 -1px;
|
||||
}
|
||||
|
||||
.icon16.icon-plugins,
|
||||
#adminmenu .menu-icon-plugins div.wp-menu-image {
|
||||
background-position: -179px -33px;
|
||||
background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -180px -33px;
|
||||
}
|
||||
|
||||
#adminmenu .menu-icon-plugins:hover div.wp-menu-image,
|
||||
#adminmenu .menu-icon-plugins.wp-has-current-submenu div.wp-menu-image,
|
||||
#adminmenu .menu-icon-plugins.current div.wp-menu-image {
|
||||
background-position: -179px -1px;
|
||||
#adminmenu .menu-icon-plugins.wp-has-current-submenu div.wp-menu-image {
|
||||
background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -180px -1px;
|
||||
}
|
||||
|
||||
.icon16.icon-users,
|
||||
#adminmenu .menu-icon-users div.wp-menu-image {
|
||||
background-position: -300px -33px;
|
||||
background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -300px -33px;
|
||||
}
|
||||
|
||||
#adminmenu .menu-icon-users:hover div.wp-menu-image,
|
||||
#adminmenu .menu-icon-users.wp-has-current-submenu div.wp-menu-image,
|
||||
#adminmenu .menu-icon-users.current div.wp-menu-image {
|
||||
background-position: -300px -1px;
|
||||
background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -300px -1px;
|
||||
}
|
||||
|
||||
.icon16.icon-tools,
|
||||
#adminmenu .menu-icon-tools div.wp-menu-image {
|
||||
background-position: -209px -33px;
|
||||
background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -210px -33px;
|
||||
}
|
||||
|
||||
#adminmenu .menu-icon-tools:hover div.wp-menu-image,
|
||||
#adminmenu .menu-icon-tools.wp-has-current-submenu div.wp-menu-image,
|
||||
#adminmenu .menu-icon-tools.current div.wp-menu-image {
|
||||
background-position: -209px -1px;
|
||||
background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -210px -1px;
|
||||
}
|
||||
|
||||
.icon16.icon-settings,
|
||||
#icon-options-general,
|
||||
#adminmenu .menu-icon-settings div.wp-menu-image {
|
||||
background-position: -239px -33px;
|
||||
background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -240px -33px;
|
||||
}
|
||||
|
||||
#adminmenu .menu-icon-settings:hover div.wp-menu-image,
|
||||
#adminmenu .menu-icon-settings.wp-has-current-submenu div.wp-menu-image,
|
||||
#adminmenu .menu-icon-settings.current div.wp-menu-image {
|
||||
background-position: -239px -1px;
|
||||
#adminmenu .menu-icon-settings.wp-has-current-submenu div.wp-menu-image {
|
||||
background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -240px -1px;
|
||||
}
|
||||
|
||||
.icon16.icon-site,
|
||||
#adminmenu .menu-icon-site div.wp-menu-image {
|
||||
background-position: -359px -33px;
|
||||
background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -360px -33px;
|
||||
}
|
||||
|
||||
#adminmenu .menu-icon-site:hover div.wp-menu-image,
|
||||
#adminmenu .menu-icon-site.wp-has-current-submenu div.wp-menu-image,
|
||||
#adminmenu .menu-icon-site.current div.wp-menu-image {
|
||||
background-position: -359px -1px;
|
||||
#adminmenu .menu-icon-site.wp-has-current-submenu div.wp-menu-image {
|
||||
background: transparent url('../images/menu-vs.png?ver=20111128') no-repeat scroll -360px -1px;
|
||||
}
|
||||
/* end menu and screen icons */
|
||||
|
||||
/* Screen Icons */
|
||||
.icon32.icon-post,
|
||||
#icon-edit,
|
||||
#icon-post,
|
||||
.icon32.icon-dashboard,
|
||||
#icon-index,
|
||||
.icon32.icon-media,
|
||||
#icon-upload,
|
||||
.icon32.icon-links,
|
||||
#icon-link-manager,
|
||||
#icon-link,
|
||||
#icon-link-category,
|
||||
.icon32.icon-page,
|
||||
#icon-edit-pages,
|
||||
#icon-page,
|
||||
.icon32.icon-comments,
|
||||
#icon-edit-comments,
|
||||
.icon32.icon-appearance,
|
||||
#icon-themes,
|
||||
.icon32.icon-plugins,
|
||||
#icon-plugins,
|
||||
.icon32.icon-users,
|
||||
#icon-users,
|
||||
#icon-profile,
|
||||
#icon-user-edit,
|
||||
.icon32.icon-tools,
|
||||
#icon-tools,
|
||||
#icon-admin,
|
||||
.icon32.icon-settings,
|
||||
#icon-options-general,
|
||||
.icon32.icon-site,
|
||||
#icon-ms-admin {
|
||||
background-image: url(../images/icons32-vs.png?ver=20111206);
|
||||
}
|
||||
|
||||
.icon32.icon-post,
|
||||
#icon-edit,
|
||||
#icon-post {
|
||||
background-position: -552px -5px;
|
||||
background: transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -552px -5px;
|
||||
}
|
||||
|
||||
.icon32.icon-dashboard,
|
||||
#icon-index {
|
||||
background-position: -137px -5px;
|
||||
background: transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -137px -5px;
|
||||
}
|
||||
|
||||
.icon32.icon-media,
|
||||
#icon-upload {
|
||||
background-position: -251px -5px;
|
||||
background: transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -251px -5px;
|
||||
}
|
||||
|
||||
.icon32.icon-links,
|
||||
#icon-link-manager,
|
||||
#icon-link,
|
||||
#icon-link-category {
|
||||
background-position: -190px -5px;
|
||||
background: transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -190px -5px;
|
||||
}
|
||||
|
||||
.icon32.icon-page,
|
||||
#icon-edit-pages,
|
||||
#icon-page {
|
||||
background-position: -312px -5px;
|
||||
background: transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -312px -5px;
|
||||
}
|
||||
|
||||
.icon32.icon-comments,
|
||||
#icon-edit-comments {
|
||||
background-position: -72px -5px;
|
||||
background: transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -72px -5px;
|
||||
}
|
||||
|
||||
.icon32.icon-appearance,
|
||||
#icon-themes {
|
||||
background-position: -11px -5px;
|
||||
background: transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -11px -5px;
|
||||
}
|
||||
|
||||
.icon32.icon-plugins,
|
||||
#icon-plugins {
|
||||
background-position: -370px -5px;
|
||||
background: transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -370px -5px;
|
||||
}
|
||||
|
||||
.icon32.icon-users,
|
||||
#icon-users,
|
||||
#icon-profile,
|
||||
#icon-user-edit {
|
||||
background-position: -600px -5px;
|
||||
background: transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -600px -5px;
|
||||
}
|
||||
|
||||
.icon32.icon-tools,
|
||||
#icon-tools,
|
||||
#icon-admin {
|
||||
background-position: -432px -5px;
|
||||
background: transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -432px -5px;
|
||||
}
|
||||
|
||||
.icon32.icon-settings,
|
||||
#icon-options-general {
|
||||
background-position: -492px -5px;
|
||||
background: transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -492px -5px;
|
||||
}
|
||||
|
||||
.icon32.icon-site,
|
||||
#icon-ms-admin {
|
||||
background-position: -659px -5px;
|
||||
}
|
||||
|
||||
@media only screen and (-webkit-min-device-pixel-ratio: 1.5) {
|
||||
.icon32.icon-post,
|
||||
#icon-edit,
|
||||
#icon-post,
|
||||
.icon32.icon-dashboard,
|
||||
#icon-index,
|
||||
.icon32.icon-media,
|
||||
#icon-upload,
|
||||
.icon32.icon-links,
|
||||
#icon-link-manager,
|
||||
#icon-link,
|
||||
#icon-link-category,
|
||||
.icon32.icon-page,
|
||||
#icon-edit-pages,
|
||||
#icon-page,
|
||||
.icon32.icon-comments,
|
||||
#icon-edit-comments,
|
||||
.icon32.icon-appearance,
|
||||
#icon-themes,
|
||||
.icon32.icon-plugins,
|
||||
#icon-plugins,
|
||||
.icon32.icon-users,
|
||||
#icon-users,
|
||||
#icon-profile,
|
||||
#icon-user-edit,
|
||||
.icon32.icon-tools,
|
||||
#icon-tools,
|
||||
#icon-admin,
|
||||
.icon32.icon-settings,
|
||||
#icon-options-general,
|
||||
.icon32.icon-site,
|
||||
#icon-ms-admin {
|
||||
background-image: url(../images/icons32-vs-2x.png?ver=20120412);
|
||||
background-size: 708px 45px;
|
||||
}
|
||||
|
||||
.icon16.icon-dashboard,
|
||||
.menu-icon-dashboard div.wp-menu-image,
|
||||
.icon16.icon-post,
|
||||
.menu-icon-post div.wp-menu-image,
|
||||
.icon16.icon-media,
|
||||
.menu-icon-media div.wp-menu-image,
|
||||
.icon16.icon-links,
|
||||
.menu-icon-links div.wp-menu-image,
|
||||
.icon16.icon-page,
|
||||
.menu-icon-page div.wp-menu-image,
|
||||
.icon16.icon-comments,
|
||||
.menu-icon-comments div.wp-menu-image,
|
||||
.icon16.icon-appearance,
|
||||
.menu-icon-appearance div.wp-menu-image,
|
||||
.icon16.icon-plugins,
|
||||
.menu-icon-plugins div.wp-menu-image,
|
||||
.icon16.icon-users,
|
||||
.menu-icon-users div.wp-menu-image,
|
||||
.icon16.icon-tools,
|
||||
.menu-icon-tools div.wp-menu-image,
|
||||
.icon16.icon-settings,
|
||||
.menu-icon-settings div.wp-menu-image,
|
||||
.icon16.icon-site,
|
||||
.menu-icon-site div.wp-menu-image {
|
||||
background-image: url('../images/menu-2x.png?ver=20120412');
|
||||
background-size: 390px 64px;
|
||||
}
|
||||
background: transparent url(../images/icons32-vs.png?ver=20111206) no-repeat -659px -5px;
|
||||
}
|
||||
/* end screen icons */
|
||||
|
||||
|
||||
/* Diff */
|
||||
table.diff .diff-deletedline {
|
||||
background-color: #fdd;
|
||||
@@ -1887,12 +1674,12 @@ table.diff .diff-addedline ins {
|
||||
border-right: 1px solid #D1E5EE;
|
||||
border-left: 1px solid #D1E5EE;
|
||||
border-bottom: 1px solid #D1E5EE;
|
||||
background-image: -ms-linear-gradient(bottom, #eff8ff, #eff8ff); /* IE10 */
|
||||
background-image: -moz-linear-gradient(bottom, #def1ff, #eff8ff); /* Firefox */
|
||||
background-image: -o-linear-gradient(bottom, #def1ff, #eff8ff); /* Opera */
|
||||
background-image: -webkit-gradient(linear, left bottom, left top, from(#def1ff), to(#eff8ff)); /* old Webkit */
|
||||
background-image: -webkit-linear-gradient(bottom, #def1ff, #eff8ff); /* new Webkit */
|
||||
background-image: linear-gradient(bottom, #def1ff, #eff8ff); /* proposed W3C Markup */
|
||||
background-image: -ms-linear-gradient(bottom, #eff8ff, #fff); /* IE10 */
|
||||
background-image: -moz-linear-gradient(bottom, #eff8ff, #fff); /* Firefox */
|
||||
background-image: -o-linear-gradient(bottom, #eff8ff, #fff); /* Opera */
|
||||
background-image: -webkit-gradient(linear, left bottom, left top, from(#eff8ff), to(#fff)); /* old Webkit */
|
||||
background-image: -webkit-linear-gradient(bottom, #eff8ff, #fff); /* new Webkit */
|
||||
background-image: linear-gradient(bottom, #eff8ff, #fff); /* proposed W3C Markup */
|
||||
}
|
||||
|
||||
#screen-meta-links a.show-settings {
|
||||
@@ -1904,11 +1691,11 @@ table.diff .diff-addedline ins {
|
||||
}
|
||||
|
||||
#screen-meta-links a.show-settings {
|
||||
background: transparent url(../images/arrows-vs.png) no-repeat right 4px;
|
||||
background: transparent url(../images/arrows.png) no-repeat right 3px;
|
||||
}
|
||||
|
||||
#screen-meta-links a.show-settings.screen-meta-active {
|
||||
background: transparent url(../images/arrows-vs.png) no-repeat right -31px;
|
||||
background: transparent url(../images/arrows.png) no-repeat right -33px;
|
||||
}
|
||||
|
||||
/* end screen options and help tabs */
|
||||
@@ -1926,6 +1713,20 @@ table.diff .diff-addedline ins {
|
||||
}
|
||||
|
||||
/* Install Plugins */
|
||||
.star-average,
|
||||
.star.star-rating {
|
||||
background-color: #fc0;
|
||||
}
|
||||
|
||||
div.star.select:hover {
|
||||
background-color: #d00;
|
||||
}
|
||||
|
||||
div.star img {
|
||||
border-left: 1px solid #fff;
|
||||
border-right: 1px solid #fff;
|
||||
}
|
||||
|
||||
#plugin-information .fyi ul {
|
||||
background-color: #eaf3fa;
|
||||
}
|
||||
@@ -2034,7 +1835,7 @@ fieldset.inline-edit-col-right .inline-edit-col {
|
||||
}
|
||||
|
||||
#post-body .misc-pub-section {
|
||||
border-left-color: #eee;
|
||||
border-right-color: #eee;
|
||||
}
|
||||
|
||||
.post-com-count span {
|
||||
@@ -2082,6 +1883,14 @@ body.press-this ul.category-tabs li.tabs a {
|
||||
border-color: #DFDFDF;
|
||||
}
|
||||
|
||||
#theme-information .action-button {
|
||||
border-top-color: #DFDFDF;
|
||||
}
|
||||
|
||||
.theme-listing br.line {
|
||||
border-bottom-color: #ccc;
|
||||
}
|
||||
|
||||
div.widgets-sortables,
|
||||
#widgets-left .inactive {
|
||||
background-color: #f7fcfe;
|
||||
@@ -2299,6 +2108,7 @@ div.widgets-sortables,
|
||||
border-bottom-color: #eff8ff;
|
||||
}
|
||||
|
||||
/* custom header & background pages */
|
||||
#upload-form label {
|
||||
color: #777;
|
||||
}
|
||||
@@ -2360,11 +2170,11 @@ div.widgets-sortables,
|
||||
|
||||
.about-wrap .feature-section img {
|
||||
background: #fff;
|
||||
border: 1px #ccc solid;
|
||||
border-color: #dfdfdf;
|
||||
|
||||
-moz-box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.3 );
|
||||
-webkit-box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.3 );
|
||||
box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.3 );
|
||||
-moz-box-shadow: 0 0 6px rgba( 0, 0, 0, 0.3 );
|
||||
-webkit-box-shadow: 0 0 6px rgba( 0, 0, 0, 0.3 );
|
||||
box-shadow: 0 0 6px rgba( 0, 0, 0, 0.3 );
|
||||
}
|
||||
|
||||
.about-wrap .point-releases {
|
||||
@@ -2462,19 +2272,6 @@ div.widgets-sortables,
|
||||
background-position: 0 -72px;
|
||||
}
|
||||
|
||||
/* Auto-folding of the admin menu for RTL */
|
||||
@media only screen and (max-width: 900px) {
|
||||
.rtl #adminmenu .wp-has-current-submenu .wp-submenu-wrap{
|
||||
-moz-box-shadow: -2px 2px 5px rgba( 0, 0, 0, 0.4 );
|
||||
-webkit-box-shadow: -2px 2px 5px rgba( 0, 0, 0, 0.4 );
|
||||
box-shadow: -2px 2px 5px rgba( 0, 0, 0, 0.4 );
|
||||
}
|
||||
|
||||
.rtl #collapse-button div {
|
||||
background-position: 0 -72px;
|
||||
}
|
||||
}
|
||||
|
||||
/* edit image */
|
||||
.rtl .meta-box-sortables .postbox:hover .handlediv {
|
||||
background: transparent url(../images/arrows-vs.png) no-repeat 6px 7px;
|
||||
|
||||
@@ -40,11 +40,6 @@ input[type="url"],
|
||||
select {
|
||||
border-color: #dfdfdf;
|
||||
background-color: #fff;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
select {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
textarea:focus,
|
||||
@@ -91,8 +86,7 @@ a.page-numbers:hover {
|
||||
|
||||
body,
|
||||
#wpbody,
|
||||
.form-table .pre,
|
||||
.ui-autocomplete li a {
|
||||
.form-table .pre {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
@@ -150,10 +144,6 @@ div.dashboard-widget-submit {
|
||||
border-top-color: #ccc;
|
||||
}
|
||||
|
||||
ul.category-tabs li {
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
div.tabs-panel,
|
||||
.wp-tab-panel,
|
||||
ul.category-tabs li.tabs,
|
||||
@@ -192,7 +182,8 @@ h3.dashboard-widget-title small,
|
||||
.sidebar-name,
|
||||
#nav-menu-header,
|
||||
#nav-menu-footer,
|
||||
.menu-item-handle {
|
||||
.menu-item-handle,
|
||||
#fullscreen-topbar {
|
||||
background-color: #f1f1f1; /* Fallback */
|
||||
background-image: -ms-linear-gradient(top, #f9f9f9, #ececec); /* IE10 */
|
||||
background-image: -moz-linear-gradient(top, #f9f9f9, #ececec); /* Firefox */
|
||||
@@ -304,9 +295,8 @@ div.error a {
|
||||
border-color: #c00 !important;
|
||||
}
|
||||
|
||||
.submit,
|
||||
#commentsdiv #add-new-comment {
|
||||
border-color: #dfdfdf;
|
||||
.submit {
|
||||
border-color: #DFDFDF;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
@@ -327,15 +317,6 @@ td.help {
|
||||
color: #9a9a9a;
|
||||
}
|
||||
|
||||
.ui-autocomplete {
|
||||
background-color: #efefef;
|
||||
border-color: #bbb;
|
||||
}
|
||||
|
||||
.ui-autocomplete li a.ui-state-hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.post-com-count {
|
||||
background-image: url(../images/bubble_bg.gif);
|
||||
color: #fff;
|
||||
@@ -823,16 +804,16 @@ table.widefat span.spam a,
|
||||
.contextual-help-tabs .active a,
|
||||
.contextual-help-tabs .active a:hover {
|
||||
background: #fff;
|
||||
color: #333;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
/* screen options and help tabs */
|
||||
#screen-options-link-wrap,
|
||||
#contextual-help-link-wrap {
|
||||
background-color: #e3e3e3; /* Fallback */
|
||||
border-right: 1px solid #ccc;
|
||||
border-left: 1px solid #ccc;
|
||||
border-bottom: 1px solid #ccc;
|
||||
border-right: 1px solid transparent;
|
||||
border-left: 1px solid transparent;
|
||||
border-bottom: 1px solid transparent;
|
||||
background-image: -ms-linear-gradient(bottom, #dfdfdf, #f1f1f1); /* IE10 */
|
||||
background-image: -moz-linear-gradient(bottom, #dfdfdf, #f1f1f1); /* Firefox */
|
||||
background-image: -o-linear-gradient(bottom, #dfdfdf, #f1f1f1); /* Opera */
|
||||
@@ -846,15 +827,15 @@ table.widefat span.spam a,
|
||||
}
|
||||
|
||||
#screen-meta-links a.show-settings:hover {
|
||||
color: #333;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#screen-meta-links a.show-settings {
|
||||
background: transparent url(../images/arrows.png) no-repeat right 4px;
|
||||
background: transparent url(../images/arrows.png) no-repeat right 3px;
|
||||
}
|
||||
|
||||
#screen-meta-links a.show-settings.screen-meta-active {
|
||||
background: transparent url(../images/arrows.png) no-repeat right -31px;
|
||||
background: transparent url(../images/arrows.png) no-repeat right -33px;
|
||||
}
|
||||
|
||||
/* end screen options and help tabs */
|
||||
@@ -877,6 +858,7 @@ table.widefat span.spam a,
|
||||
}
|
||||
|
||||
#footer a:hover {
|
||||
color: #000;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
@@ -1107,394 +1089,212 @@ table.widefat .spam a:hover,
|
||||
background-image: -webkit-linear-gradient(bottom, #dfdfdf, #fff); /* new Webkit */
|
||||
background-image: linear-gradient(bottom, #dfdfdf, #fff); /* proposed W3C Markup */
|
||||
}
|
||||
|
||||
#collapse-menu:hover #collapse-button {
|
||||
border-color: #aaa;
|
||||
}
|
||||
|
||||
#collapse-button div {
|
||||
background: transparent url(../images/arrows.png) no-repeat 0 -72px;
|
||||
}
|
||||
|
||||
.folded #collapse-button div {
|
||||
background-position: 0 -108px;
|
||||
}
|
||||
|
||||
/* Auto-folding of the admin menu */
|
||||
@media only screen and (max-width: 900px) {
|
||||
#adminmenu li.menu-top {
|
||||
border-top-color: #f9f9f9;
|
||||
border-bottom-color: #dfdfdf;
|
||||
}
|
||||
|
||||
#adminmenu li.wp-has-current-submenu,
|
||||
#adminmenu li.current.menu-top {
|
||||
background-color: #777; /* Fallback */
|
||||
background-image: -ms-linear-gradient(bottom, #6d6d6d, #808080); /* IE10 */
|
||||
background-image: -moz-linear-gradient(bottom, #6d6d6d, #808080); /* Firefox */
|
||||
background-image: -o-linear-gradient(bottom, #6d6d6d, #808080); /* Opera */
|
||||
background-image: -webkit-gradient(linear, left bottom, left top, from(#6d6d6d), to(#808080)); /* old Webkit */
|
||||
background-image: -webkit-linear-gradient(bottom, #6d6d6d, #808080); /* new Webkit */
|
||||
background-image: linear-gradient(bottom, #6d6d6d, #808080); /* proposed W3C Markup */
|
||||
}
|
||||
|
||||
#adminmenu li.menu-top li:hover a {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
#adminmenu li.wp-has-current-submenu,
|
||||
#adminmenu li.current.menu-top {
|
||||
border-top-color: #808080;
|
||||
border-bottom-color: #6d6d6d;
|
||||
}
|
||||
|
||||
#adminmenu .wp-has-current-submenu .wp-submenu-wrap {
|
||||
-moz-box-shadow: 2px 2px 5px rgba( 0, 0, 0, 0.4 );
|
||||
-webkit-box-shadow: 2px 2px 5px rgba( 0, 0, 0, 0.4 );
|
||||
box-shadow: 2px 2px 5px rgba( 0, 0, 0, 0.4 );
|
||||
}
|
||||
|
||||
#collapse-button div {
|
||||
background-position: 0 -108px;
|
||||
}
|
||||
}
|
||||
|
||||
/* menu and screen icons */
|
||||
.icon16,
|
||||
.icon32,
|
||||
div.wp-menu-image {
|
||||
background-color: transparent;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.icon16.icon-dashboard,
|
||||
.menu-icon-dashboard div.wp-menu-image,
|
||||
.icon16.icon-post,
|
||||
.menu-icon-post div.wp-menu-image,
|
||||
.icon16.icon-media,
|
||||
.menu-icon-media div.wp-menu-image,
|
||||
.icon16.icon-links,
|
||||
.menu-icon-links div.wp-menu-image,
|
||||
.icon16.icon-page,
|
||||
.menu-icon-page div.wp-menu-image,
|
||||
.icon16.icon-comments,
|
||||
.menu-icon-comments div.wp-menu-image,
|
||||
.icon16.icon-appearance,
|
||||
.menu-icon-appearance div.wp-menu-image,
|
||||
.icon16.icon-plugins,
|
||||
.menu-icon-plugins div.wp-menu-image,
|
||||
.icon16.icon-users,
|
||||
.menu-icon-users div.wp-menu-image,
|
||||
.icon16.icon-tools,
|
||||
.menu-icon-tools div.wp-menu-image,
|
||||
.icon16.icon-settings,
|
||||
.menu-icon-settings div.wp-menu-image,
|
||||
.icon16.icon-site,
|
||||
.menu-icon-site div.wp-menu-image {
|
||||
background-image: url('../images/menu.png?ver=20120201');
|
||||
}
|
||||
|
||||
.icon16.icon-dashboard,
|
||||
#adminmenu .menu-icon-dashboard div.wp-menu-image {
|
||||
background-position: -59px -33px;
|
||||
background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -60px -33px;
|
||||
}
|
||||
|
||||
#adminmenu .menu-icon-dashboard:hover div.wp-menu-image,
|
||||
#adminmenu .menu-icon-dashboard.wp-has-current-submenu div.wp-menu-image,
|
||||
#adminmenu .menu-icon-dashboard.current div.wp-menu-image {
|
||||
background-position: -59px -1px;
|
||||
background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -60px -1px;
|
||||
}
|
||||
|
||||
.icon16.icon-post,
|
||||
#adminmenu .menu-icon-post div.wp-menu-image {
|
||||
background-position: -269px -33px;
|
||||
background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -271px -33px;
|
||||
}
|
||||
|
||||
#adminmenu .menu-icon-post:hover div.wp-menu-image,
|
||||
#adminmenu .menu-icon-post.wp-has-current-submenu div.wp-menu-image,
|
||||
#adminmenu .menu-icon-post.current div.wp-menu-image {
|
||||
background-position: -269px -1px;
|
||||
#adminmenu .menu-icon-post.wp-has-current-submenu div.wp-menu-image {
|
||||
background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -271px -1px;
|
||||
}
|
||||
|
||||
.icon16.icon-media,
|
||||
#adminmenu .menu-icon-media div.wp-menu-image {
|
||||
background-position: -119px -33px;
|
||||
background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -120px -33px;
|
||||
}
|
||||
|
||||
#adminmenu .menu-icon-media:hover div.wp-menu-image,
|
||||
#adminmenu .menu-icon-media.wp-has-current-submenu div.wp-menu-image,
|
||||
#adminmenu .menu-icon-media.current div.wp-menu-image {
|
||||
background-position: -119px -1px;
|
||||
#adminmenu .menu-icon-media.wp-has-current-submenu div.wp-menu-image {
|
||||
background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -120px -1px;
|
||||
}
|
||||
|
||||
.icon16.icon-links,
|
||||
#adminmenu .menu-icon-links div.wp-menu-image {
|
||||
background-position: -89px -33px;
|
||||
background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -90px -33px;
|
||||
}
|
||||
|
||||
#adminmenu .menu-icon-links:hover div.wp-menu-image,
|
||||
#adminmenu .menu-icon-links.wp-has-current-submenu div.wp-menu-image,
|
||||
#adminmenu .menu-icon-links.current div.wp-menu-image {
|
||||
background-position: -89px -1px;
|
||||
#adminmenu .menu-icon-links.wp-has-current-submenu div.wp-menu-image {
|
||||
background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -90px -1px;
|
||||
}
|
||||
|
||||
.icon16.icon-page,
|
||||
#adminmenu .menu-icon-page div.wp-menu-image {
|
||||
background-position: -149px -33px;
|
||||
background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -150px -33px;
|
||||
}
|
||||
|
||||
#adminmenu .menu-icon-page:hover div.wp-menu-image,
|
||||
#adminmenu .menu-icon-page.wp-has-current-submenu div.wp-menu-image,
|
||||
#adminmenu .menu-icon-page.current div.wp-menu-image {
|
||||
background-position: -149px -1px;
|
||||
#adminmenu .menu-icon-page.wp-has-current-submenu div.wp-menu-image {
|
||||
background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -150px -1px;
|
||||
}
|
||||
|
||||
.icon16.icon-comments,
|
||||
#adminmenu .menu-icon-comments div.wp-menu-image {
|
||||
background-position: -29px -33px;
|
||||
background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -30px -33px;
|
||||
}
|
||||
|
||||
#adminmenu .menu-icon-comments:hover div.wp-menu-image,
|
||||
#adminmenu .menu-icon-comments.wp-has-current-submenu div.wp-menu-image,
|
||||
#adminmenu .menu-icon-comments.current div.wp-menu-image {
|
||||
background-position: -29px -1px;
|
||||
background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -30px -1px;
|
||||
}
|
||||
|
||||
.icon16.icon-appearance,
|
||||
#adminmenu .menu-icon-appearance div.wp-menu-image {
|
||||
background-position: 1px -33px;
|
||||
background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll 0 -33px;
|
||||
}
|
||||
|
||||
#adminmenu .menu-icon-appearance:hover div.wp-menu-image,
|
||||
#adminmenu .menu-icon-appearance.wp-has-current-submenu div.wp-menu-image,
|
||||
#adminmenu .menu-icon-appearance.current div.wp-menu-image {
|
||||
background-position: 1px -1px;
|
||||
#adminmenu .menu-icon-appearance.wp-has-current-submenu div.wp-menu-image {
|
||||
background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll 0 -1px;
|
||||
}
|
||||
|
||||
.icon16.icon-plugins,
|
||||
#adminmenu .menu-icon-plugins div.wp-menu-image {
|
||||
background-position: -179px -33px;
|
||||
background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -180px -33px;
|
||||
}
|
||||
|
||||
#adminmenu .menu-icon-plugins:hover div.wp-menu-image,
|
||||
#adminmenu .menu-icon-plugins.wp-has-current-submenu div.wp-menu-image,
|
||||
#adminmenu .menu-icon-plugins.current div.wp-menu-image {
|
||||
background-position: -179px -1px;
|
||||
#adminmenu .menu-icon-plugins.wp-has-current-submenu div.wp-menu-image {
|
||||
background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -180px -1px;
|
||||
}
|
||||
|
||||
.icon16.icon-users,
|
||||
#adminmenu .menu-icon-users div.wp-menu-image {
|
||||
background-position: -300px -33px;
|
||||
background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -300px -33px;
|
||||
}
|
||||
|
||||
#adminmenu .menu-icon-users:hover div.wp-menu-image,
|
||||
#adminmenu .menu-icon-users.wp-has-current-submenu div.wp-menu-image,
|
||||
#adminmenu .menu-icon-users.current div.wp-menu-image {
|
||||
background-position: -300px -1px;
|
||||
background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -300px -1px;
|
||||
}
|
||||
|
||||
.icon16.icon-tools,
|
||||
#adminmenu .menu-icon-tools div.wp-menu-image {
|
||||
background-position: -209px -33px;
|
||||
background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -210px -33px;
|
||||
}
|
||||
|
||||
#adminmenu .menu-icon-tools:hover div.wp-menu-image,
|
||||
#adminmenu .menu-icon-tools.wp-has-current-submenu div.wp-menu-image,
|
||||
#adminmenu .menu-icon-tools.current div.wp-menu-image {
|
||||
background-position: -209px -1px;
|
||||
background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -210px -1px;
|
||||
}
|
||||
|
||||
.icon16.icon-settings,
|
||||
#adminmenu .menu-icon-settings div.wp-menu-image {
|
||||
background-position: -239px -33px;
|
||||
background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -240px -33px;
|
||||
}
|
||||
|
||||
#adminmenu .menu-icon-settings:hover div.wp-menu-image,
|
||||
#adminmenu .menu-icon-settings.wp-has-current-submenu div.wp-menu-image,
|
||||
#adminmenu .menu-icon-settings.current div.wp-menu-image {
|
||||
background-position: -239px -1px;
|
||||
#adminmenu .menu-icon-settings.wp-has-current-submenu div.wp-menu-image {
|
||||
background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -240px -1px;
|
||||
}
|
||||
|
||||
.icon16.icon-site,
|
||||
#adminmenu .menu-icon-site div.wp-menu-image {
|
||||
background-position: -359px -33px;
|
||||
background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -360px -33px;
|
||||
}
|
||||
|
||||
#adminmenu .menu-icon-site:hover div.wp-menu-image,
|
||||
#adminmenu .menu-icon-site.wp-has-current-submenu div.wp-menu-image,
|
||||
#adminmenu .menu-icon-site.current div.wp-menu-image {
|
||||
background-position: -359px -1px;
|
||||
#adminmenu .menu-icon-site.wp-has-current-submenu div.wp-menu-image {
|
||||
background: transparent url('../images/menu.png?ver=20111128') no-repeat scroll -360px -1px;
|
||||
}
|
||||
/* end menu and screen icons */
|
||||
|
||||
/* Screen Icons */
|
||||
.icon32.icon-post,
|
||||
#icon-edit,
|
||||
#icon-post,
|
||||
.icon32.icon-dashboard,
|
||||
#icon-index,
|
||||
.icon32.icon-media,
|
||||
#icon-upload,
|
||||
.icon32.icon-links,
|
||||
#icon-link-manager,
|
||||
#icon-link,
|
||||
#icon-link-category,
|
||||
.icon32.icon-page,
|
||||
#icon-edit-pages,
|
||||
#icon-page,
|
||||
.icon32.icon-comments,
|
||||
#icon-edit-comments,
|
||||
.icon32.icon-appearance,
|
||||
#icon-themes,
|
||||
.icon32.icon-plugins,
|
||||
#icon-plugins,
|
||||
.icon32.icon-users,
|
||||
#icon-users,
|
||||
#icon-profile,
|
||||
#icon-user-edit,
|
||||
.icon32.icon-tools,
|
||||
#icon-tools,
|
||||
#icon-admin,
|
||||
.icon32.icon-settings,
|
||||
#icon-options-general,
|
||||
.icon32.icon-site,
|
||||
#icon-ms-admin {
|
||||
background-image: url(../images/icons32.png?ver=20111206);
|
||||
}
|
||||
|
||||
.icon32.icon-post,
|
||||
#icon-edit,
|
||||
#icon-post {
|
||||
background-position: -552px -5px;
|
||||
background: transparent url(../images/icons32.png?ver=20111206) no-repeat -552px -5px;
|
||||
}
|
||||
|
||||
.icon32.icon-dashboard,
|
||||
#icon-index {
|
||||
background-position: -137px -5px;
|
||||
background: transparent url(../images/icons32.png?ver=20111206) no-repeat -137px -5px;
|
||||
}
|
||||
|
||||
.icon32.icon-media,
|
||||
#icon-upload {
|
||||
background-position: -251px -5px;
|
||||
background: transparent url(../images/icons32.png?ver=20111206) no-repeat -251px -5px;
|
||||
}
|
||||
|
||||
.icon32.icon-links,
|
||||
#icon-link-manager,
|
||||
#icon-link,
|
||||
#icon-link-category {
|
||||
background-position: -190px -5px;
|
||||
background: transparent url(../images/icons32.png?ver=20111206) no-repeat -190px -5px;
|
||||
}
|
||||
|
||||
.icon32.icon-page,
|
||||
#icon-edit-pages,
|
||||
#icon-page {
|
||||
background-position: -312px -5px;
|
||||
background: transparent url(../images/icons32.png?ver=20111206) no-repeat -312px -5px;
|
||||
}
|
||||
|
||||
.icon32.icon-comments,
|
||||
#icon-edit-comments {
|
||||
background-position: -72px -5px;
|
||||
background: transparent url(../images/icons32.png?ver=20111206) no-repeat -72px -5px;
|
||||
}
|
||||
|
||||
.icon32.icon-appearance,
|
||||
#icon-themes {
|
||||
background-position: -11px -5px;
|
||||
background: transparent url(../images/icons32.png?ver=20111206) no-repeat -11px -5px;
|
||||
}
|
||||
|
||||
.icon32.icon-plugins,
|
||||
#icon-plugins {
|
||||
background-position: -370px -5px;
|
||||
background: transparent url(../images/icons32.png?ver=20111206) no-repeat -370px -5px;
|
||||
}
|
||||
|
||||
.icon32.icon-users,
|
||||
#icon-users,
|
||||
#icon-profile,
|
||||
#icon-user-edit {
|
||||
background-position: -600px -5px;
|
||||
background: transparent url(../images/icons32.png?ver=20111206) no-repeat -600px -5px;
|
||||
}
|
||||
|
||||
.icon32.icon-tools,
|
||||
#icon-tools,
|
||||
#icon-admin {
|
||||
background-position: -432px -5px;
|
||||
background: transparent url(../images/icons32.png?ver=20111206) no-repeat -432px -5px;
|
||||
}
|
||||
|
||||
.icon32.icon-settings,
|
||||
#icon-options-general {
|
||||
background-position: -492px -5px;
|
||||
background: transparent url(../images/icons32.png?ver=20111206) no-repeat -492px -5px;
|
||||
}
|
||||
|
||||
.icon32.icon-site,
|
||||
#icon-ms-admin {
|
||||
background-position: -659px -5px;
|
||||
}
|
||||
|
||||
@media only screen and (-webkit-min-device-pixel-ratio: 1.5) {
|
||||
.icon32.icon-post,
|
||||
#icon-edit,
|
||||
#icon-post,
|
||||
.icon32.icon-dashboard,
|
||||
#icon-index,
|
||||
.icon32.icon-media,
|
||||
#icon-upload,
|
||||
.icon32.icon-links,
|
||||
#icon-link-manager,
|
||||
#icon-link,
|
||||
#icon-link-category,
|
||||
.icon32.icon-page,
|
||||
#icon-edit-pages,
|
||||
#icon-page,
|
||||
.icon32.icon-comments,
|
||||
#icon-edit-comments,
|
||||
.icon32.icon-appearance,
|
||||
#icon-themes,
|
||||
.icon32.icon-plugins,
|
||||
#icon-plugins,
|
||||
.icon32.icon-users,
|
||||
#icon-users,
|
||||
#icon-profile,
|
||||
#icon-user-edit,
|
||||
.icon32.icon-tools,
|
||||
#icon-tools,
|
||||
#icon-admin,
|
||||
.icon32.icon-settings,
|
||||
#icon-options-general,
|
||||
.icon32.icon-site,
|
||||
#icon-ms-admin {
|
||||
background-image: url(../images/icons32-2x.png?ver=20120412);
|
||||
background-size: 708px 45px;
|
||||
}
|
||||
|
||||
.icon16.icon-dashboard,
|
||||
.menu-icon-dashboard div.wp-menu-image,
|
||||
.icon16.icon-post,
|
||||
.menu-icon-post div.wp-menu-image,
|
||||
.icon16.icon-media,
|
||||
.menu-icon-media div.wp-menu-image,
|
||||
.icon16.icon-links,
|
||||
.menu-icon-links div.wp-menu-image,
|
||||
.icon16.icon-page,
|
||||
.menu-icon-page div.wp-menu-image,
|
||||
.icon16.icon-comments,
|
||||
.menu-icon-comments div.wp-menu-image,
|
||||
.icon16.icon-appearance,
|
||||
.menu-icon-appearance div.wp-menu-image,
|
||||
.icon16.icon-plugins,
|
||||
.menu-icon-plugins div.wp-menu-image,
|
||||
.icon16.icon-users,
|
||||
.menu-icon-users div.wp-menu-image,
|
||||
.icon16.icon-tools,
|
||||
.menu-icon-tools div.wp-menu-image,
|
||||
.icon16.icon-settings,
|
||||
.menu-icon-settings div.wp-menu-image,
|
||||
.icon16.icon-site,
|
||||
.menu-icon-site div.wp-menu-image {
|
||||
background-image: url('../images/menu-2x.png?ver=20120412');
|
||||
background-size: 390px 64px;
|
||||
}
|
||||
background: transparent url(../images/icons32.png?ver=20111206) no-repeat -659px -5px;
|
||||
}
|
||||
/* end screen icons */
|
||||
|
||||
|
||||
/* Diff */
|
||||
table.diff .diff-deletedline {
|
||||
background-color: #fdd;
|
||||
@@ -1542,6 +1342,25 @@ table.diff .diff-addedline ins {
|
||||
}
|
||||
|
||||
/* Install Plugins */
|
||||
.star-average,
|
||||
.star.star-rating {
|
||||
background-color: #fc0;
|
||||
}
|
||||
|
||||
div.star.select:hover {
|
||||
background-color: #d00;
|
||||
}
|
||||
|
||||
div.star img {
|
||||
border-left: 1px solid #fff;
|
||||
border-right: 1px solid #fff;
|
||||
}
|
||||
|
||||
.widefat div.star img {
|
||||
border-left: 1px solid #f9f9f9;
|
||||
border-right: 1px solid #f9f9f9;
|
||||
}
|
||||
|
||||
#plugin-information .fyi ul {
|
||||
background-color: #eaf3fa;
|
||||
}
|
||||
@@ -1650,7 +1469,7 @@ fieldset.inline-edit-col-right .inline-edit-col {
|
||||
}
|
||||
|
||||
#post-body .misc-pub-section {
|
||||
border-left-color: #eee;
|
||||
border-right-color: #eee;
|
||||
}
|
||||
|
||||
.post-com-count span {
|
||||
@@ -1698,8 +1517,20 @@ body.press-this ul.category-tabs li.tabs a {
|
||||
border-color: #DFDFDF;
|
||||
}
|
||||
|
||||
#theme-information .action-button {
|
||||
border-top-color: #DFDFDF;
|
||||
}
|
||||
|
||||
.theme-listing br.line {
|
||||
border-bottom-color: #ccc;
|
||||
}
|
||||
|
||||
div.widgets-sortables,
|
||||
#widgets-left .inactive,
|
||||
#widgets-left .inactive {
|
||||
background-color: #fcfcfc;
|
||||
border-color: #dfdfdf;
|
||||
}
|
||||
|
||||
#available-widgets .widget-holder {
|
||||
background-color: #fcfcfc;
|
||||
border-color: #dfdfdf;
|
||||
@@ -1826,7 +1657,10 @@ div.widgets-sortables,
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.list-container,
|
||||
.list-container {
|
||||
border-color: #DFDFDF;
|
||||
}
|
||||
|
||||
.menu-item-handle {
|
||||
border-color: #dfdfdf;
|
||||
}
|
||||
@@ -1901,9 +1735,25 @@ div.widgets-sortables,
|
||||
border-bottom-color: #f9f9f9;
|
||||
}
|
||||
|
||||
/* custom header & background pages */
|
||||
#upload-form label {
|
||||
color: #777;
|
||||
}
|
||||
/* custom header & background pages */
|
||||
|
||||
/* full screen */
|
||||
.fullscreen-overlay {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.wp-fullscreen-focus #wp-fullscreen-title,
|
||||
.wp-fullscreen-focus #wp-fullscreen-container {
|
||||
border-color: #ccc;
|
||||
}
|
||||
|
||||
#fullscreen-topbar {
|
||||
border-bottom-color: #DFDFDF;
|
||||
}
|
||||
|
||||
/* Begin About Pages */
|
||||
|
||||
@@ -1947,11 +1797,11 @@ div.widgets-sortables,
|
||||
|
||||
.about-wrap .feature-section img {
|
||||
background: #fff;
|
||||
border: 1px #ccc solid;
|
||||
border-color: #dfdfdf;
|
||||
|
||||
-moz-box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.3 );
|
||||
-webkit-box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.3 );
|
||||
box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.3 );
|
||||
-moz-box-shadow: 0 0 6px rgba( 0, 0, 0, 0.3 );
|
||||
-webkit-box-shadow: 0 0 6px rgba( 0, 0, 0, 0.3 );
|
||||
box-shadow: 0 0 6px rgba( 0, 0, 0, 0.3 );
|
||||
}
|
||||
|
||||
.about-wrap h4.wp-people-group {
|
||||
@@ -2049,19 +1899,6 @@ div.widgets-sortables,
|
||||
background-position: 0 -72px;
|
||||
}
|
||||
|
||||
/* Auto-folding of the admin menu for RTL */
|
||||
@media only screen and (max-width: 900px) {
|
||||
.rtl #adminmenu .wp-has-current-submenu .wp-submenu-wrap{
|
||||
-moz-box-shadow: -2px 2px 5px rgba( 0, 0, 0, 0.4 );
|
||||
-webkit-box-shadow: -2px 2px 5px rgba( 0, 0, 0, 0.4 );
|
||||
box-shadow: -2px 2px 5px rgba( 0, 0, 0, 0.4 );
|
||||
}
|
||||
|
||||
.rtl #collapse-button div {
|
||||
background-position: 0 -72px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Edit Image */
|
||||
.rtl .meta-box-sortables .postbox:hover .handlediv {
|
||||
background: transparent url(../images/arrows.png) no-repeat 6px 7px;
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
.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 img{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,.customize-control-color .farbtastic-placeholder{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}
|
||||
@@ -1,86 +0,0 @@
|
||||
.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 img {
|
||||
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,
|
||||
.customize-control-color .farbtastic-placeholder {
|
||||
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;
|
||||
}
|
||||
@@ -1,537 +0,0 @@
|
||||
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;
|
||||
}
|
||||
|
||||
.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-color: #f5f5f5;
|
||||
background-image: -webkit-linear-gradient( top, #f5f5f5, #eee );
|
||||
background-image: -moz-linear-gradient( top, #f5f5f5, #eee );
|
||||
background-image: -ms-linear-gradient( top, #f5f5f5, #eee );
|
||||
background-image: -o-linear-gradient( top, #f5f5f5, #eee );
|
||||
background-image: linear-gradient( top, #f5f5f5, #eee );
|
||||
}
|
||||
|
||||
.control-section:hover .customize-section-title,
|
||||
.control-section .customize-section-title:hover,
|
||||
.control-section.open .customize-section-title {
|
||||
color: #fff;
|
||||
text-shadow: 0 -1px 0 #333;
|
||||
background-color: #808080;
|
||||
background-image: -webkit-linear-gradient( top, #808080, #6d6d6d );
|
||||
background-image: -moz-linear-gradient( top, #808080, #6d6d6d );
|
||||
background-image: -ms-linear-gradient( top, #808080, #6d6d6d );
|
||||
background-image: -o-linear-gradient( top, #808080, #6d6d6d );
|
||||
background-image: linear-gradient( top, #808080, #6d6d6d );
|
||||
}
|
||||
|
||||
.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 {
|
||||
border-color: #aaa transparent;
|
||||
}
|
||||
|
||||
.control-section .customize-section-title:hover: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: 11px;
|
||||
}
|
||||
|
||||
#customize-header-actions img {
|
||||
display: none;
|
||||
float: right;
|
||||
margin-top: 13px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.saving #customize-header-actions img {
|
||||
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,
|
||||
.customize-control-color .farbtastic-placeholder {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.customize-control-color.open .color-picker-hex,
|
||||
.customize-control-color.open .farbtastic-placeholder {
|
||||
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 {
|
||||
float: left;
|
||||
width: 85px;
|
||||
font-family: monospace;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
.customize-control-color .farbtastic-placeholder {
|
||||
width: 100%;
|
||||
margin: 5px 0 10px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.customize-control-color .farbtastic {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/*
|
||||
* 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;
|
||||
}
|
||||
@@ -40,6 +40,7 @@
|
||||
background: url(../images/marker.png) no-repeat;
|
||||
}
|
||||
|
||||
|
||||
/* farbtastic-rtl */
|
||||
.rtl .farbtastic .color,
|
||||
.rtl .farbtastic .overlay {
|
||||
@@ -50,3 +51,5 @@
|
||||
.rtl .farbtastic .marker {
|
||||
margin: -8px -8px 0 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1 +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-wrap,#adminmenu .wp-menu-open .wp-submenu .wp-submenu-wrap{border:1px solid #dfdfdf}.folded #adminmenu .wp-submenu{right:30px;top:-4px}#adminmenu .wp-submenu .wp-submenu-head{padding:6px 10px 6px 4px}#adminmenu .wp-menu-arrow{display:none!important}#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}#dashboard_quick_press h4{text-align:right}.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}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}
|
||||
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-wrap,#adminmenu .wp-menu-open .wp-submenu .wp-submenu-wrap{border:1px solid #dfdfdf;}.folded #adminmenu .wp-submenu{right:30px;top:-4px;}#adminmenu .wp-submenu .wp-submenu-head{padding:6px 10px 6px 4px;}#adminmenu .wp-menu-arrow{display:none!important;}#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;}#dashboard_quick_press h4{text-align:right;}.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;}.inner-sidebar{position:static;}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;}
|
||||
@@ -126,6 +126,10 @@ p.submit { /* quick edit and reply in edit-comments.php */
|
||||
height:22px;
|
||||
}
|
||||
|
||||
.inner-sidebar { /* fix edit single comment */
|
||||
position: static;
|
||||
}
|
||||
|
||||
form#widgets-filter { /* fix widget page */
|
||||
position: static;
|
||||
}
|
||||
@@ -237,3 +241,4 @@ p.button-controls,
|
||||
#nav-menus-frame .delete-action {
|
||||
float: none;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +1,4 @@
|
||||
/* Fixes for IE 7 bugs */
|
||||
|
||||
.wp-editor-wrap .wp-editor-container textarea.wp-editor-area {
|
||||
width: 97%;
|
||||
}
|
||||
|
||||
#post-body.columns-2 #postbox-container-1 {
|
||||
padding-left: 19px;
|
||||
}
|
||||
|
||||
/* Fixes for IE bugs */
|
||||
.welcome-panel .wp-badge {
|
||||
position: absolute;
|
||||
}
|
||||
@@ -286,7 +277,8 @@ form#template div {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wp-editor-container .quicktags-toolbar input {
|
||||
#ed_toolbar input,
|
||||
#ed_reply_toolbar input {
|
||||
overflow: visible;
|
||||
padding: 0 4px;
|
||||
}
|
||||
@@ -379,6 +371,8 @@ table.ie-fixed {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#wpcontent .button-primary-disabled {
|
||||
color: #9FD0D5;
|
||||
background: #298CBA;
|
||||
@@ -430,22 +424,6 @@ table.ie-fixed {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.available-theme {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.available-theme ul {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.about-wrap .three-col-images img {
|
||||
margin: 0 0.6% 10px;
|
||||
}
|
||||
|
||||
.about-wrap .three-col-images .last-feature,
|
||||
.about-wrap .three-col-images .first-feature {
|
||||
float: none;
|
||||
}
|
||||
|
||||
/* IE6 leftovers */
|
||||
* html .row-actions {
|
||||
@@ -522,6 +500,7 @@ table.ie-fixed {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
* html .inner-sidebar #side-sortables,
|
||||
* html .postbox-container .meta-box-sortables {
|
||||
height: 300px;
|
||||
}
|
||||
@@ -571,3 +550,4 @@ table.ie-fixed {
|
||||
* html #adminmenu div.wp-menu-image {
|
||||
height: 29px;
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +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}.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;-webkit-border-radius:15px;border-radius:15px;-moz-box-sizing:content-box;-webkit-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 #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}
|
||||
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;}.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;-webkit-border-radius:15px;border-radius:15px;-moz-box-sizing:content-box;-webkit-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 #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 #user_login,.rtl #admin_email,.rtl #pass1,.rtl #pass2{direction:ltr;}
|
||||
@@ -228,6 +228,7 @@ textarea {
|
||||
background-color: #ffffe0;
|
||||
}
|
||||
|
||||
|
||||
/* install-rtl */
|
||||
body.rtl {
|
||||
font-family: Tahoma, arial;
|
||||
@@ -239,7 +240,7 @@ body.rtl {
|
||||
}
|
||||
|
||||
.rtl ul,
|
||||
.rtl ol {
|
||||
.rtl ol {
|
||||
padding: 5px 22px 5px 5px;
|
||||
}
|
||||
|
||||
@@ -255,14 +256,10 @@ body.rtl {
|
||||
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 +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}
|
||||
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;}
|
||||
@@ -1 +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-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 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}
|
||||
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;}.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;}#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-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 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;}
|
||||
@@ -51,6 +51,7 @@ th {
|
||||
|
||||
/* specific to the image upload form */
|
||||
|
||||
|
||||
.image-align-none-label {
|
||||
background: url(../images/align-none.png) no-repeat center left;
|
||||
}
|
||||
|
||||
@@ -53,9 +53,6 @@ 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' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -73,12 +70,6 @@ class Custom_Background {
|
||||
add_action("load-$page", array(&$this, 'take_action'), 49);
|
||||
add_action("load-$page", array(&$this, 'handle_upload'), 49);
|
||||
|
||||
if ( isset( $_REQUEST['context'] ) && $_REQUEST['context'] == 'custom-background' ) {
|
||||
add_filter( 'attachment_fields_to_edit', array( $this, 'attachment_fields_to_edit' ), 10, 2 );
|
||||
add_filter( 'media_upload_tabs', array( $this, 'filter_upload_tabs' ) );
|
||||
add_filter( 'media_upload_mime_type_links', '__return_empty_array' );
|
||||
}
|
||||
|
||||
if ( $this->admin_header_callback )
|
||||
add_action("admin_head-$page", $this->admin_header_callback, 51);
|
||||
}
|
||||
@@ -105,8 +96,6 @@ class Custom_Background {
|
||||
'<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
|
||||
);
|
||||
|
||||
add_thickbox();
|
||||
wp_enqueue_script('media-upload');
|
||||
wp_enqueue_script('custom-background');
|
||||
wp_enqueue_style('farbtastic');
|
||||
}
|
||||
@@ -135,7 +124,6 @@ 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;
|
||||
}
|
||||
|
||||
@@ -211,15 +199,15 @@ if ( $bgcolor = get_background_color() )
|
||||
|
||||
if ( get_background_image() ) {
|
||||
// background-image URL must be single quote, see below
|
||||
$background_styles .= ' background-image: url(\'' . set_url_scheme( get_theme_mod( 'background_image_thumb', get_background_image() ) ) . '\');'
|
||||
$background_styles .= ' background-image: url(\'' . get_theme_mod('background_image_thumb', '') . '\');'
|
||||
. ' 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 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="" />
|
||||
<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="" />
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
@@ -238,8 +226,7 @@ if ( get_background_image() ) {
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $default_image = get_theme_support( 'custom-background', 'default-image' ); ?>
|
||||
<?php if ( $default_image && get_background_image() != $default_image ) : ?>
|
||||
<?php if ( defined( 'BACKGROUND_IMAGE' ) ) : // Show only if a default background image exists ?>
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php _e('Restore Original Image'); ?></th>
|
||||
<td>
|
||||
@@ -253,25 +240,13 @@ if ( get_background_image() ) {
|
||||
|
||||
<?php endif; ?>
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php _e('Select Image'); ?></th>
|
||||
<th scope="row"><?php _e('Upload Image'); ?></th>
|
||||
<td><form enctype="multipart/form-data" id="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>
|
||||
<?php
|
||||
$image_library_url = get_upload_iframe_src( 'image', null, 'library' );
|
||||
$image_library_url = remove_query_arg( 'TB_iframe', $image_library_url );
|
||||
$image_library_url = add_query_arg( array( 'context' => 'custom-background', 'TB_iframe' => 1 ), $image_library_url );
|
||||
?>
|
||||
<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 thickbox" href="<?php echo esc_url( $image_library_url ); ?>"><?php _e( 'Choose Image' ); ?></a>
|
||||
</p>
|
||||
</form>
|
||||
<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>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -327,10 +302,9 @@ if ( get_background_image() ) {
|
||||
<tr valign="top">
|
||||
<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_theme_mod('background_color') ? '' : ' style="display:none"'; ?>
|
||||
<?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 current_theme_supports( 'custom-background', 'default-color' ) ? _e( 'Default' ) : _e( 'Clear' ); ?></a>)</span>
|
||||
<input type="hidden" id="defaultcolor" value="<?php if ( current_theme_supports( 'custom-background', 'default-color' ) ) echo '#' . esc_attr( get_theme_support( 'custom-background', 'default-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>
|
||||
</fieldset></td>
|
||||
</tr>
|
||||
@@ -383,50 +357,14 @@ 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_raw($url));
|
||||
set_theme_mod('background_image', esc_url($url));
|
||||
|
||||
$thumbnail = wp_get_attachment_image_src( $id, 'thumbnail' );
|
||||
set_theme_mod('background_image_thumb', esc_url_raw( $thumbnail[0] ) );
|
||||
set_theme_mod('background_image_thumb', esc_url( $thumbnail[0] ) );
|
||||
|
||||
do_action('wp_create_file_in_uploads', $file, $id); // For replication
|
||||
$this->updated = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace default attachment actions with "Set as background" link.
|
||||
*
|
||||
* @since 3.4.0
|
||||
*/
|
||||
function attachment_fields_to_edit( $form_fields, $post ) {
|
||||
$form_fields = array( 'image-size' => $form_fields['image-size'] );
|
||||
$form_fields['buttons'] = array( 'tr' => '<tr class="submit"><td></td><td><a data-attachment-id="' . $post->ID . '" class="wp-set-background">' . __( 'Set as background' ) . '</a></td></tr>' );
|
||||
$form_fields['context'] = array( 'input' => 'hidden', 'value' => 'custom-background' );
|
||||
|
||||
return $form_fields;
|
||||
}
|
||||
|
||||
/**
|
||||
* Leave only "Media Library" tab in the uploader window.
|
||||
*
|
||||
* @since 3.4.0
|
||||
*/
|
||||
function filter_upload_tabs() {
|
||||
return array( 'library' => __('Media Library') );
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -42,6 +42,7 @@ class Custom_Image_Header {
|
||||
*/
|
||||
var $default_headers = array();
|
||||
|
||||
|
||||
/**
|
||||
* Holds custom headers uploaded by the user
|
||||
*
|
||||
@@ -71,8 +72,6 @@ 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' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -91,14 +90,7 @@ 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);
|
||||
if ( $this->admin_header_callback )
|
||||
add_action("admin_head-$page", $this->admin_header_callback, 51);
|
||||
|
||||
if ( isset( $_REQUEST['context'] ) && $_REQUEST['context'] == 'custom-header' ) {
|
||||
add_filter( 'attachment_fields_to_edit', array( $this, 'attachment_fields_to_edit' ), 10, 2 );
|
||||
add_filter( 'media_upload_tabs', array( $this, 'filter_upload_tabs' ) );
|
||||
add_filter( 'media_upload_mime_type_links', '__return_empty_array' );
|
||||
}
|
||||
add_action("admin_head-$page", $this->admin_header_callback, 51);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -111,27 +103,9 @@ class Custom_Image_Header {
|
||||
'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’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 “Choose Image” button.' ) . '</p>' .
|
||||
'<p>' . __( 'Some themes come with additional header images bundled. If you see multiple images displayed, select the one you’d like and click the “Save Changes” 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 “Random” radio button next to the Uploaded Images or Default Images section to enable this feature.') . '</p>' .
|
||||
'<p>' . __( 'If you don’t want a header image to be displayed on your site at all, click the “Remove Header Image” 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 “Save Changes”.') . '</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 typing in a legitimate HTML hex value (eg: “#ff0000” for red) or by clicking “Select a Color” and dialing in a color using the color picker.') . '</p>' .
|
||||
'<p>' . __( 'Don’t forget to Save Changes when you’re done!') . '</p>'
|
||||
'<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’d like and click the Save Changes button.' ) . '</p>'
|
||||
) );
|
||||
|
||||
get_current_screen()->set_help_sidebar(
|
||||
@@ -153,11 +127,8 @@ class Custom_Image_Header {
|
||||
return 1;
|
||||
|
||||
$step = (int) $_GET['step'];
|
||||
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;
|
||||
if ( $step < 1 || 3 < $step )
|
||||
$step = 1;
|
||||
|
||||
return $step;
|
||||
}
|
||||
@@ -170,15 +141,10 @@ class Custom_Image_Header {
|
||||
function js_includes() {
|
||||
$step = $this->step();
|
||||
|
||||
if ( ( 1 == $step || 3 == $step ) ) {
|
||||
add_thickbox();
|
||||
wp_enqueue_script( 'media-upload' );
|
||||
wp_enqueue_script( 'custom-header' );
|
||||
if ( current_theme_supports( 'custom-header', 'header-text' ) )
|
||||
wp_enqueue_script('farbtastic');
|
||||
} elseif ( 2 == $step ) {
|
||||
if ( ( 1 == $step || 3 == $step ) && $this->header_text() )
|
||||
wp_enqueue_script('farbtastic');
|
||||
elseif ( 2 == $step )
|
||||
wp_enqueue_script('imgareaselect');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -189,12 +155,24 @@ class Custom_Image_Header {
|
||||
function css_includes() {
|
||||
$step = $this->step();
|
||||
|
||||
if ( ( 1 == $step || 3 == $step ) && current_theme_supports( 'custom-header', 'header-text' ) )
|
||||
if ( ( 1 == $step || 3 == $step ) && $this->header_text() )
|
||||
wp_enqueue_style('farbtastic');
|
||||
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.
|
||||
*
|
||||
@@ -211,7 +189,7 @@ class Custom_Image_Header {
|
||||
|
||||
if ( isset( $_POST['resetheader'] ) ) {
|
||||
check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' );
|
||||
$this->reset_header_image();
|
||||
remove_theme_mod( 'header_image' );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -223,27 +201,36 @@ class Custom_Image_Header {
|
||||
|
||||
if ( isset( $_POST['removeheader'] ) ) {
|
||||
check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' );
|
||||
$this->remove_header_image();
|
||||
set_theme_mod( 'header_image', 'remove-header' );
|
||||
return;
|
||||
}
|
||||
|
||||
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'] ) ) {
|
||||
if ( isset( $_POST['text-color'] ) ) {
|
||||
check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' );
|
||||
$_POST['text-color'] = str_replace( '#', '', $_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 )
|
||||
if ( 'blank' == $_POST['text-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' );
|
||||
$this->set_header_image( $_POST['default-header'] );
|
||||
return;
|
||||
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'] ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -303,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['attachment_id'] ) )
|
||||
if ( !empty( $header['uploaded'] ) )
|
||||
$width = ' width="230"';
|
||||
echo '<img src="' . set_url_scheme( $header_thumbnail ) . '" alt="' . esc_attr( $header_desc ) .'" title="' . esc_attr( $header_desc ) . '"' . $width . ' /></label>';
|
||||
echo '<img src="' . $header_thumbnail . '" alt="' . esc_attr( $header_desc ) .'" title="' . esc_attr( $header_desc ) . '"' . $width . ' /></label>';
|
||||
echo '</div>';
|
||||
}
|
||||
echo '<div class="clear"></div></div>';
|
||||
@@ -318,7 +305,7 @@ class Custom_Image_Header {
|
||||
*/
|
||||
function js() {
|
||||
$step = $this->step();
|
||||
if ( ( 1 == $step || 3 == $step ) && current_theme_supports( 'custom-header', 'header-text' ) )
|
||||
if ( ( 1 == $step || 3 == $step ) && $this->header_text() )
|
||||
$this->js_1();
|
||||
elseif ( 2 == $step )
|
||||
$this->js_2();
|
||||
@@ -332,75 +319,86 @@ class Custom_Image_Header {
|
||||
function js_1() { ?>
|
||||
<script type="text/javascript">
|
||||
/* <![CDATA[ */
|
||||
var farbtastic;
|
||||
(function($){
|
||||
var default_color = '#<?php echo get_theme_support( 'custom-header', 'default-text-color' ); ?>',
|
||||
header_text_fields;
|
||||
var text_objects = ['#name', '#desc', '#text-color-row'];
|
||||
var farbtastic;
|
||||
var default_color = '#<?php echo HEADER_TEXTCOLOR; ?>';
|
||||
var old_color = null;
|
||||
|
||||
function pickColor(color) {
|
||||
$('#name').css('color', color);
|
||||
$('#desc').css('color', color);
|
||||
$('#text-color').val(color);
|
||||
jQuery('#name').css('color', color);
|
||||
jQuery('#desc').css('color', color);
|
||||
jQuery('#text-color').val(color);
|
||||
farbtastic.setColor(color);
|
||||
}
|
||||
|
||||
function toggle_text() {
|
||||
var checked = $('#display-header-text').prop('checked'),
|
||||
text_color;
|
||||
header_text_fields.toggle( checked );
|
||||
if ( ! checked )
|
||||
function toggle_text(s) {
|
||||
if (jQuery(s).attr('id') == 'showtext' && jQuery('#text-color').val() != 'blank')
|
||||
return;
|
||||
text_color = $('#text-color');
|
||||
if ( '' == text_color.val().replace('#', '') ) {
|
||||
text_color.val( default_color );
|
||||
pickColor( default_color );
|
||||
|
||||
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);
|
||||
} else {
|
||||
pickColor( text_color.val() );
|
||||
//Hide text
|
||||
jQuery( text_objects.toString() ).hide();
|
||||
old_color = jQuery('#text-color').val();
|
||||
jQuery('#text-color').val('blank');
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
header_text_fields = $('.displaying-header-text');
|
||||
$('#pickcolor').click(function(e) {
|
||||
e.preventDefault();
|
||||
$('#color-picker').show();
|
||||
jQuery(document).ready(function() {
|
||||
jQuery('#pickcolor').click(function() {
|
||||
jQuery('#color-picker').show();
|
||||
});
|
||||
|
||||
$('#display-header-text').click( toggle_text );
|
||||
jQuery('input[name="hidetext"]').click(function() {
|
||||
toggle_text(this);
|
||||
});
|
||||
|
||||
$('#defaultcolor').click(function() {
|
||||
jQuery('#defaultcolor').click(function() {
|
||||
pickColor(default_color);
|
||||
$('#text-color').val(default_color);
|
||||
jQuery('#text-color').val(default_color)
|
||||
});
|
||||
|
||||
$('#text-color').keyup(function() {
|
||||
var _hex = $('#text-color').val();
|
||||
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 )
|
||||
$('#text-color').val(hex);
|
||||
jQuery('#text-color').val(hex);
|
||||
if ( hex.length == 4 || hex.length == 7 )
|
||||
pickColor( hex );
|
||||
});
|
||||
|
||||
$(document).mousedown(function(){
|
||||
$('#color-picker').each( function() {
|
||||
var display = $(this).css('display');
|
||||
jQuery(document).mousedown(function(){
|
||||
jQuery('#color-picker').each( function() {
|
||||
var display = jQuery(this).css('display');
|
||||
if (display == 'block')
|
||||
$(this).fadeOut(2);
|
||||
jQuery(this).fadeOut(2);
|
||||
});
|
||||
});
|
||||
|
||||
farbtastic = $.farbtastic('#color-picker', function(color) { pickColor(color); });
|
||||
<?php if ( display_header_text() ) { ?>
|
||||
pickColor('#<?php echo get_header_textcolor(); ?>');
|
||||
<?php } else { ?>
|
||||
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() ) { ?>
|
||||
toggle_text();
|
||||
<?php } ?>
|
||||
});
|
||||
})(jQuery);
|
||||
/* ]]> */
|
||||
</script>
|
||||
<?php
|
||||
@@ -422,8 +420,8 @@ var farbtastic;
|
||||
}
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
var xinit = <?php echo absint( get_theme_support( 'custom-header', 'width' ) ); ?>;
|
||||
var yinit = <?php echo absint( get_theme_support( 'custom-header', 'height' ) ); ?>;
|
||||
var xinit = <?php echo HEADER_IMAGE_WIDTH; ?>;
|
||||
var yinit = <?php echo HEADER_IMAGE_HEIGHT; ?>;
|
||||
var ratio = xinit / yinit;
|
||||
var ximg = jQuery('img#upload').width();
|
||||
var yimg = jQuery('img#upload').height();
|
||||
@@ -441,28 +439,14 @@ var farbtastic;
|
||||
jQuery('img#upload').imgAreaSelect({
|
||||
handles: true,
|
||||
keys: true,
|
||||
aspectRatio: xinit + ':' + yinit,
|
||||
show: true,
|
||||
x1: 0,
|
||||
y1: 0,
|
||||
x2: xinit,
|
||||
y2: yinit,
|
||||
<?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
|
||||
}
|
||||
?>
|
||||
maxHeight: <?php echo HEADER_IMAGE_HEIGHT; ?>,
|
||||
maxWidth: <?php echo HEADER_IMAGE_WIDTH; ?>,
|
||||
onInit: function () {
|
||||
jQuery('#width').val(xinit);
|
||||
jQuery('#height').val(yinit);
|
||||
@@ -499,70 +483,44 @@ var farbtastic;
|
||||
</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 {
|
||||
?>
|
||||
<div id="headimg" style="background-image:url(<?php esc_url ( header_image() ) ?>);max-width:<?php echo get_custom_header()->width; ?>px;height:<?php echo get_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() ) ?>);">
|
||||
<?php
|
||||
if ( display_header_text() )
|
||||
$style = ' style="color:#' . get_header_textcolor() . ';"';
|
||||
else
|
||||
if ( 'blank' == get_theme_mod('header_textcolor', HEADER_TEXTCOLOR) || '' == get_theme_mod('header_textcolor', HEADER_TEXTCOLOR) || ! $this->header_text() )
|
||||
$style = ' style="display:none;"';
|
||||
else
|
||||
$style = ' style="color:#' . get_theme_mod( 'header_textcolor', HEADER_TEXTCOLOR ) . ';"';
|
||||
?>
|
||||
<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>
|
||||
<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>
|
||||
</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( 'Select Image' ); ?></th>
|
||||
<th scope="row"><?php _e( 'Upload 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
|
||||
if ( ! current_theme_supports( 'custom-header', 'flex-height' ) && ! current_theme_supports( 'custom-header', 'flex-width' ) ) {
|
||||
printf( __( 'Images of exactly <strong>%1$d × %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>
|
||||
<?php printf( __( 'Images of exactly <strong>%1$d × %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>
|
||||
<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
|
||||
$image_library_url = get_upload_iframe_src( 'image', null, 'library' );
|
||||
$image_library_url = remove_query_arg( 'TB_iframe', $image_library_url );
|
||||
$image_library_url = add_query_arg( array( 'context' => 'custom-header', 'TB_iframe' => 1 ), $image_library_url );
|
||||
?>
|
||||
<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 thickbox" href="<?php echo esc_url( $image_library_url ); ?>"><?php _e( 'Choose Image' ); ?></a>
|
||||
</p>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -588,7 +546,7 @@ var farbtastic;
|
||||
<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‘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>
|
||||
@@ -609,8 +567,7 @@ var farbtastic;
|
||||
</tr>
|
||||
<?php endif;
|
||||
|
||||
$default_image = get_theme_support( 'custom-header', 'default-image' );
|
||||
if ( $default_image && get_header_image() != $default_image ) : ?>
|
||||
if ( defined( 'HEADER_IMAGE' ) && '' != HEADER_IMAGE ) : ?>
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php _e( 'Reset Image' ); ?></th>
|
||||
<td>
|
||||
@@ -622,37 +579,33 @@ var farbtastic;
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php if ( current_theme_supports( 'custom-header', 'header-text' ) ) : ?>
|
||||
|
||||
<h3><?php _e( 'Header Text' ); ?></h3>
|
||||
|
||||
<?php if ( $this->header_text() ) : ?>
|
||||
<table class="form-table">
|
||||
<tbody>
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php _e( 'Header Text' ); ?></th>
|
||||
<tr valign="top" class="hide-if-no-js">
|
||||
<th scope="row"><?php _e( 'Display Text' ); ?></th>
|
||||
<td>
|
||||
<p>
|
||||
<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>
|
||||
<?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>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top" class="displaying-header-text">
|
||||
<tr valign="top" id="text-color-row">
|
||||
<th scope="row"><?php _e( 'Text Color' ); ?></th>
|
||||
<td>
|
||||
<p>
|
||||
<?php if ( display_header_text() ) : ?>
|
||||
<input type="text" name="text-color" id="text-color" value="#<?php echo esc_attr( get_header_textcolor() ); ?>" />
|
||||
<?php else : ?>
|
||||
<input type="text" name="text-color" id="text-color" value="#<?php echo esc_attr( get_theme_support( 'custom-header', 'default-text-color' ) ); ?>" />
|
||||
<?php endif; ?>
|
||||
<a href="#" class="hide-if-no-js" id="pickcolor"><?php _e( 'Select a Color' ); ?></a>
|
||||
<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" />
|
||||
</p>
|
||||
<div id="color-picker" style="z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;"></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php if ( current_theme_supports( 'custom-header', 'default-text-color' ) && get_theme_mod( 'header_textcolor' ) ) { ?>
|
||||
<?php if ( defined('HEADER_TEXTCOLOR') && get_theme_mod('header_textcolor') ) { ?>
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php _e('Reset Text Color'); ?></th>
|
||||
<td>
|
||||
@@ -664,7 +617,7 @@ var farbtastic;
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif;
|
||||
<?php endif;
|
||||
|
||||
do_action( 'custom_header_options' );
|
||||
|
||||
@@ -683,55 +636,49 @@ 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' ) )
|
||||
if ( ! current_theme_supports( 'custom-header-uploads' ) )
|
||||
wp_die( __( 'Cheatin’ uh?' ) );
|
||||
|
||||
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());
|
||||
}
|
||||
$overrides = array('test_form' => false);
|
||||
$file = wp_handle_upload($_FILES['import'], $overrides);
|
||||
|
||||
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 );
|
||||
}
|
||||
if ( isset($file['error']) )
|
||||
wp_die( $file['error'], __( 'Image Upload 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;
|
||||
$url = $file['url'];
|
||||
$type = $file['type'];
|
||||
$file = $file['file'];
|
||||
$filename = basename($file);
|
||||
|
||||
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' ) );
|
||||
// Construct the object array
|
||||
$object = array(
|
||||
'post_title' => $filename,
|
||||
'post_content' => $url,
|
||||
'post_mime_type' => $type,
|
||||
'guid' => $url,
|
||||
'context' => 'custom-header'
|
||||
);
|
||||
|
||||
// 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' ) )
|
||||
{
|
||||
// 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 ) {
|
||||
// Add the meta-data
|
||||
if ( file_exists( $file ) )
|
||||
wp_update_attachment_metadata( $attachment_id, wp_generate_attachment_metadata( $attachment_id, $file ) );
|
||||
wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) );
|
||||
update_post_meta( $id, '_wp_attachment_is_custom_header', get_option('stylesheet' ) );
|
||||
|
||||
$this->set_header_image( compact( 'url', 'attachment_id', 'width', 'height' ) );
|
||||
|
||||
do_action('wp_create_file_in_uploads', $file, $attachment_id); // For replication
|
||||
set_theme_mod('header_image', esc_url($url));
|
||||
do_action('wp_create_file_in_uploads', $file, $id); // For replication
|
||||
return $this->finished();
|
||||
} 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' ) );
|
||||
} 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' ) );
|
||||
|
||||
$image = apply_filters('wp_create_file_in_uploads', $image, $attachment_id); // For replication
|
||||
$image = apply_filters('wp_create_file_in_uploads', $image, $id); // For replication
|
||||
|
||||
$url = str_replace(basename($url), basename($image), $url);
|
||||
$width = $width / $oitar;
|
||||
@@ -757,66 +704,25 @@ 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( $attachment_id ); ?>" />
|
||||
<input type="hidden" name="attachment_id" id="attachment_id" value="<?php echo esc_attr( $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' ) ?>
|
||||
|
||||
<p class="submit">
|
||||
<?php submit_button( __( 'Crop and Publish' ), 'primary', 'submit', false ); ?>
|
||||
<?php
|
||||
if ( isset( $oitar ) && 1 == $oitar )
|
||||
submit_button( __( 'Skip Cropping, Publish Image as Is' ), 'secondary', 'skip-cropping', false );
|
||||
?>
|
||||
<?php submit_button( __( 'Crop and Publish' ) ); ?>
|
||||
</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);
|
||||
$file = wp_handle_upload($_FILES['import'], $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' ) )
|
||||
check_admin_referer('custom-header-crop-image');
|
||||
if ( ! current_theme_supports( 'custom-header-uploads' ) )
|
||||
wp_die( __( 'Cheatin’ uh?' ) );
|
||||
|
||||
if ( $_POST['oitar'] > 1 ) {
|
||||
@@ -829,75 +735,37 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
|
||||
$attachment_id = absint( $_POST['attachment_id'] );
|
||||
$original = get_attached_file($attachment_id);
|
||||
|
||||
|
||||
$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 = 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' ) );
|
||||
|
||||
$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 );
|
||||
|
||||
$size = @getimagesize( $cropped );
|
||||
$image_type = ( $size ) ? $size['mime'] : 'image/jpeg';
|
||||
$url = str_replace(basename($parent_url), basename($cropped), $parent_url);
|
||||
|
||||
// Construct the object array
|
||||
$object = array(
|
||||
'ID' => $attachment_id,
|
||||
'post_title' => basename($cropped),
|
||||
'post_content' => $url,
|
||||
'post_mime_type' => $image_type,
|
||||
'post_mime_type' => 'image/jpeg',
|
||||
'guid' => $url,
|
||||
'context' => 'custom-header'
|
||||
);
|
||||
if ( ! empty( $_POST['create-new-attachment'] ) )
|
||||
unset( $object['ID'] );
|
||||
|
||||
// Update the attachment
|
||||
$attachment_id = wp_insert_attachment( $object, $cropped );
|
||||
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' ) );
|
||||
|
||||
$width = $dst_width;
|
||||
$height = $dst_height;
|
||||
$this->set_header_image( compact( 'url', 'attachment_id', 'width', 'height' ) );
|
||||
set_theme_mod('header_image', $url);
|
||||
|
||||
// cleanup
|
||||
$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 ) );
|
||||
$medium = str_replace(basename($original), 'midsize-'.basename($original), $original);
|
||||
@unlink( apply_filters( 'wp_delete_file', $medium ) );
|
||||
@unlink( apply_filters( 'wp_delete_file', $original ) );
|
||||
|
||||
return $this->finished();
|
||||
}
|
||||
@@ -921,132 +789,13 @@ 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 ( 2 == $step )
|
||||
if ( 1 == $step )
|
||||
$this->step_1();
|
||||
elseif ( 2 == $step )
|
||||
$this->step_2();
|
||||
elseif ( 3 == $step )
|
||||
$this->step_3();
|
||||
else
|
||||
$this->step_1();
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace default attachment actions with "Set as header" link.
|
||||
*
|
||||
* @since 3.4.0
|
||||
*/
|
||||
function attachment_fields_to_edit( $form_fields, $post ) {
|
||||
$form_fields = array();
|
||||
$href = esc_url(add_query_arg(array(
|
||||
'page' => 'custom-header',
|
||||
'step' => 2,
|
||||
'_wpnonce-custom-header-upload' => wp_create_nonce('custom-header-upload'),
|
||||
'file' => $post->ID
|
||||
), admin_url('themes.php')));
|
||||
|
||||
$form_fields['buttons'] = array( 'tr' => '<tr class="submit"><td></td><td><a data-location="' . $href . '" class="wp-set-header">' . __( 'Set as header' ) . '</a></td></tr>' );
|
||||
$form_fields['context'] = array( 'input' => 'hidden', 'value' => 'custom-header' );
|
||||
|
||||
return $form_fields;
|
||||
}
|
||||
|
||||
/**
|
||||
* Leave only "Media Library" tab in the uploader window.
|
||||
*
|
||||
* @since 3.4.0
|
||||
*/
|
||||
function filter_upload_tabs() {
|
||||
return array( 'library' => __('Media Library') );
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 );
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -1,198 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Customize Controls
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Customize
|
||||
* @since 3.4.0
|
||||
*/
|
||||
|
||||
require_once( './admin.php' );
|
||||
if ( ! current_user_can( 'edit_theme_options' ) )
|
||||
wp_die( __( 'Cheatin’ 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 = '';
|
||||
|
||||
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';
|
||||
|
||||
$admin_title = sprintf( __( '%1$s — 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">
|
||||
<?php wp_nonce_field( 'customize_controls-' . $wp_customize->get_stylesheet() ); ?>
|
||||
<div id="customize-header-actions" class="wp-full-overlay-header">
|
||||
<?php
|
||||
$save_text = $wp_customize->is_theme_active() ? __( 'Save & Publish' ) : __( 'Save & Activate' );
|
||||
submit_button( $save_text, 'primary', 'save', false );
|
||||
?>
|
||||
<img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" />
|
||||
<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">
|
||||
<div id="customize-info" class="customize-section<?php if ( $cannot_expand ) echo ' cannot-expand'; ?>">
|
||||
<div class="customize-section-title">
|
||||
<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(),
|
||||
);
|
||||
|
||||
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>
|
||||
@@ -121,11 +121,13 @@ 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’s name, email address, and blog URL, the commenter’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 “Submitted on,” 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 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 to the side to learn more.' ) . '</p>'
|
||||
'<ul>' .
|
||||
'<li>' . __( 'A yellow row means the comment is waiting for you to moderate it.' ) . '</li>' .
|
||||
'<li>' . __( 'In the <strong>Author</strong> column, in addition to the author’s name, email address, and blog URL, the commenter’s IP address is shown. Clicking on this link will show you all the comments made from this IP address.' ) . '</li>' .
|
||||
'<li>' . __( 'In the <strong>Comment</strong> column, above each comment it says “Submitted on,” 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.' ) . '</li>' .
|
||||
'<li>' . __( '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 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.' ) . '</li>' .
|
||||
'<li>' . __( 'Many people take advantage of keyboard shortcuts to moderate their comments more quickly. Use the link to the side to learn more.' ) . '</li>' .
|
||||
'</ul>'
|
||||
) );
|
||||
|
||||
get_current_screen()->set_help_sidebar(
|
||||
|
||||
@@ -12,9 +12,6 @@ if ( !defined('ABSPATH') )
|
||||
|
||||
wp_enqueue_script('post');
|
||||
|
||||
if ( wp_is_mobile() )
|
||||
wp_enqueue_script( 'jquery-touch-punch' );
|
||||
|
||||
if ( post_type_supports($post_type, 'editor') || post_type_supports($post_type, 'thumbnail') ) {
|
||||
add_thickbox();
|
||||
wp_enqueue_script('media-upload');
|
||||
@@ -90,7 +87,7 @@ $form_extra .= "<input type='hidden' id='post_ID' name='post_ID' value='" . esc_
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -243,7 +240,7 @@ if ( 'post' == $post_type ) {
|
||||
require_once('./admin-header.php');
|
||||
?>
|
||||
|
||||
<div class="wrap">
|
||||
<div class="wrap columns-<?php echo (int) $screen_layout_columns ? (int) $screen_layout_columns : 'auto'; ?>">
|
||||
<?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>
|
||||
<?php if ( $notice ) : ?>
|
||||
@@ -275,9 +272,17 @@ wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
|
||||
wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
|
||||
?>
|
||||
|
||||
<div id="poststuff">
|
||||
<div id="poststuff" class="metabox-holder<?php echo 1 != $screen_layout_columns ? ' has-right-sidebar' : ''; ?>">
|
||||
<div id="side-info-column" class="inner-sidebar">
|
||||
<?php
|
||||
if ( 1 != $screen_layout_columns ) {
|
||||
('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" class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>">
|
||||
<div id="post-body">
|
||||
<div id="post-body-content">
|
||||
<?php if ( post_type_supports($post_type, 'title') ) { ?>
|
||||
<div id="titlediv">
|
||||
@@ -333,41 +338,25 @@ wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false );
|
||||
</tr></tbody></table>
|
||||
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div><!-- /post-body-content -->
|
||||
|
||||
<div id="postbox-container-1" class="postbox-container">
|
||||
<?php
|
||||
}
|
||||
|
||||
if ( 'page' == $post_type )
|
||||
do_action('submitpage_box');
|
||||
else
|
||||
do_action('submitpost_box');
|
||||
|
||||
do_meta_boxes($post_type, 'side', $post);
|
||||
|
||||
?>
|
||||
</div>
|
||||
<div id="postbox-container-2" class="postbox-container">
|
||||
<?php
|
||||
if ( 1 == $screen_layout_columns ) {
|
||||
('page' == $post_type) ? do_action('submitpage_box') : do_action('submitpost_box');
|
||||
$side_meta_boxes = do_meta_boxes($post_type, 'side', $post);
|
||||
}
|
||||
|
||||
do_meta_boxes(null, 'normal', $post);
|
||||
|
||||
if ( 'page' == $post_type )
|
||||
do_action('edit_page_form');
|
||||
else
|
||||
do_action('edit_form_advanced');
|
||||
( 'page' == $post_type ) ? do_action('edit_page_form') : do_action('edit_form_advanced');
|
||||
|
||||
do_meta_boxes(null, 'advanced', $post);
|
||||
|
||||
?>
|
||||
do_action('dbx_post_sidebar'); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
do_action('dbx_post_sidebar');
|
||||
|
||||
?>
|
||||
</div><!-- /post-body -->
|
||||
<br class="clear" />
|
||||
</div><!-- /poststuff -->
|
||||
</form>
|
||||
|
||||
@@ -9,20 +9,78 @@
|
||||
// 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">
|
||||
<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="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="post-body" class="metabox-holder columns-2">
|
||||
<div id="side-info-column" class="inner-sidebar">
|
||||
<div id="submitdiv" class="stuffbox" >
|
||||
<h3><span class='hndle'><?php _e('Status') ?></span></h3>
|
||||
<div class="inside">
|
||||
<div class="submitbox" id="submitcomment">
|
||||
<div id="minor-publishing">
|
||||
|
||||
<div id="minor-publishing-actions">
|
||||
<div id="preview-action">
|
||||
<a class="preview button" href="<?php echo get_comment_link(); ?>" target="_blank"><?php _e('View Comment'); ?></a>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div id="misc-publishing-actions">
|
||||
|
||||
<div class="misc-pub-section" id="comment-status-radio">
|
||||
<label class="approved"><input type="radio"<?php checked( $comment->comment_approved, '1' ); ?> name="comment_status" value="1" /><?php /* translators: comment type radio button */ _ex('Approved', 'adjective') ?></label><br />
|
||||
<label class="waiting"><input type="radio"<?php checked( $comment->comment_approved, '0' ); ?> name="comment_status" value="0" /><?php /* translators: comment type radio button */ _ex('Pending', 'adjective') ?></label><br />
|
||||
<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">
|
||||
<?php
|
||||
// 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> <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>
|
||||
</div>
|
||||
</div> <!-- misc actions -->
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div id="major-publishing-actions">
|
||||
<div id="delete-action">
|
||||
<?php echo "<a class='submitdelete deletion' href='" . wp_nonce_url("comment.php?action=" . ( !EMPTY_TRASH_DAYS ? 'deletecomment' : 'trashcomment' ) . "&c=$comment->comment_ID&_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' ), 'primary', 'save', false, array( 'tabindex' => '4' ) ); ?>
|
||||
</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>
|
||||
@@ -67,76 +125,21 @@ if ( !defined('ABSPATH') )
|
||||
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">
|
||||
<div class="submitbox" id="submitcomment">
|
||||
<div id="minor-publishing">
|
||||
|
||||
<div id="minor-publishing-actions">
|
||||
<div id="preview-action">
|
||||
<a class="preview button" href="<?php echo get_comment_link(); ?>" target="_blank"><?php _e('View Comment'); ?></a>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div id="misc-publishing-actions">
|
||||
|
||||
<div class="misc-pub-section" id="comment-status-radio">
|
||||
<label class="approved"><input type="radio"<?php checked( $comment->comment_approved, '1' ); ?> name="comment_status" value="1" /><?php /* translators: comment type radio button */ _ex('Approved', 'adjective') ?></label><br />
|
||||
<label class="waiting"><input type="radio"<?php checked( $comment->comment_approved, '0' ); ?> name="comment_status" value="0" /><?php /* translators: comment type radio button */ _ex('Pending', 'adjective') ?></label><br />
|
||||
<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">
|
||||
<?php
|
||||
// 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> <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>
|
||||
</div>
|
||||
</div> <!-- misc actions -->
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div id="major-publishing-actions">
|
||||
<div id="delete-action">
|
||||
<?php echo "<a class='submitdelete deletion' href='" . wp_nonce_url("comment.php?action=" . ( !EMPTY_TRASH_DAYS ? 'deletecomment' : 'trashcomment' ) . "&c=$comment->comment_ID&_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' ), 'primary', 'save', false, array( 'tabindex' => '4' ) ); ?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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(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><!-- /post-body -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -57,7 +57,7 @@ get_current_screen()->set_help_sidebar(
|
||||
require_once ('admin-header.php');
|
||||
?>
|
||||
|
||||
<div class="wrap">
|
||||
<div class="wrap columns-<?php echo (int) $screen_layout_columns ? (int) $screen_layout_columns : 'auto'; ?>">
|
||||
<?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>
|
||||
|
||||
@@ -75,9 +75,17 @@ 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">
|
||||
<div id="poststuff" class="metabox-holder<?php echo 1 != $screen_layout_columns ? ' has-right-sidebar' : ''; ?>">
|
||||
<div id="side-info-column" class="inner-sidebar">
|
||||
<?php
|
||||
if ( 1 != $screen_layout_columns ) {
|
||||
do_action('submitlink_box');
|
||||
$side_meta_boxes = do_meta_boxes( 'link', 'side', $link );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div id="post-body" class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>">
|
||||
<div id="post-body">
|
||||
<div id="post-body-content">
|
||||
<div id="namediv" class="stuffbox">
|
||||
<h3><label for="link_name"><?php _ex('Name', 'link name') ?></label></h3>
|
||||
@@ -102,27 +110,18 @@ wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
|
||||
<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_action('submitlink_box');
|
||||
$side_meta_boxes = do_meta_boxes( 'link', 'side', $link );
|
||||
|
||||
?>
|
||||
</div>
|
||||
<div id="postbox-container-2" class="postbox-container">
|
||||
<?php
|
||||
if ( 1 == $screen_layout_columns ) {
|
||||
do_action('submitlink_box');
|
||||
$side_meta_boxes = do_meta_boxes( 'link', 'side', $link );
|
||||
}
|
||||
|
||||
do_meta_boxes(null, 'normal', $link);
|
||||
|
||||
do_meta_boxes(null, 'advanced', $link);
|
||||
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
if ( $link_id ) : ?>
|
||||
<input type="hidden" name="action" value="save" />
|
||||
<input type="hidden" name="link_id" value="<?php echo (int) $link_id; ?>" />
|
||||
@@ -132,6 +131,7 @@ if ( $link_id ) : ?>
|
||||
<input type="hidden" name="action" value="add" />
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -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,16 +52,16 @@ 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'))); ?>
|
||||
<?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 if ( 'category' == $taxonomy ) : ?>
|
||||
<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>
|
||||
<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>
|
||||
<?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" class="large-text"><?php echo $tag->description; // textarea_escaped ?></textarea><br />
|
||||
<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>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@@ -80,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’ uh?' ) );
|
||||
@@ -416,3 +416,5 @@ break;
|
||||
}
|
||||
|
||||
include('./admin-footer.php');
|
||||
|
||||
?>
|
||||
|
||||
@@ -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();
|
||||
@@ -222,41 +222,49 @@ 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 ( ! empty( $_REQUEST['s'] ) )
|
||||
if ( isset($_REQUEST['s']) && $_REQUEST['s'] )
|
||||
printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', get_search_query() ); ?>
|
||||
</h2>
|
||||
|
||||
<?php if ( isset( $_REQUEST['locked'] ) || isset( $_REQUEST['updated'] ) || isset( $_REQUEST['deleted'] ) || isset( $_REQUEST['trashed'] ) || isset( $_REQUEST['untrashed'] ) ) {
|
||||
<?php if ( isset($_REQUEST['locked']) || isset($_REQUEST['skipped']) || 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'] ) && $updated = absint( $_REQUEST['updated'] ) ) {
|
||||
$messages[] = sprintf( _n( '%s post updated.', '%s posts updated.', $updated ), number_format_i18n( $updated ) );
|
||||
<?php if ( isset($_REQUEST['updated']) && (int) $_REQUEST['updated'] ) {
|
||||
$messages[] = sprintf( _n( '%s post updated.', '%s posts updated.', $_REQUEST['updated'] ), number_format_i18n( $_REQUEST['updated'] ) );
|
||||
unset($_REQUEST['updated']);
|
||||
}
|
||||
|
||||
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['skipped']) && (int) $_REQUEST['skipped'] )
|
||||
unset($_REQUEST['skipped']);
|
||||
|
||||
if ( isset($_REQUEST['locked']) && (int) $_REQUEST['locked'] ) {
|
||||
$messages[] = sprintf( _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['deleted'] ) && $deleted = absint( $_REQUEST['deleted'] ) ) {
|
||||
$messages[] = sprintf( _n( 'Item permanently deleted.', '%s items permanently deleted.', $deleted ), number_format_i18n( $deleted ) );
|
||||
if ( isset($_REQUEST['deleted']) && (int) $_REQUEST['deleted'] ) {
|
||||
$messages[] = sprintf( _n( 'Item permanently deleted.', '%s items permanently deleted.', $_REQUEST['deleted'] ), number_format_i18n( $_REQUEST['deleted'] ) );
|
||||
unset($_REQUEST['deleted']);
|
||||
}
|
||||
|
||||
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 ) );
|
||||
if ( isset($_REQUEST['trashed']) && (int) $_REQUEST['trashed'] ) {
|
||||
$messages[] = sprintf( _n( 'Item moved to the Trash.', '%s items moved to the Trash.', $_REQUEST['trashed'] ), number_format_i18n( $_REQUEST['trashed'] ) );
|
||||
$ids = isset($_REQUEST['ids']) ? $_REQUEST['ids'] : 0;
|
||||
$messages[] = '<a href="' . esc_url( wp_nonce_url( "edit.php?post_type=$post_type&doaction=undo&action=untrash&ids=$ids", "bulk-posts" ) ) . '">' . __('Undo') . '</a>';
|
||||
unset($_REQUEST['trashed']);
|
||||
}
|
||||
|
||||
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 ) );
|
||||
if ( isset($_REQUEST['untrashed']) && (int) $_REQUEST['untrashed'] ) {
|
||||
$messages[] = sprintf( _n( 'Item restored from the Trash.', '%s items restored from the Trash.', $_REQUEST['untrashed'] ), number_format_i18n( $_REQUEST['untrashed'] ) );
|
||||
unset($_REQUEST['undeleted']);
|
||||
}
|
||||
|
||||
if ( $messages )
|
||||
echo join( ' ', $messages );
|
||||
unset( $messages );
|
||||
|
||||
$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'locked', 'skipped', 'updated', 'deleted', 'trashed', 'untrashed' ), $_SERVER['REQUEST_URI'] );
|
||||
$_SERVER['REQUEST_URI'] = remove_query_arg( array('locked', 'skipped', 'updated', 'deleted', 'trashed', 'untrashed'), $_SERVER['REQUEST_URI'] );
|
||||
?>
|
||||
</p></div>
|
||||
<?php } ?>
|
||||
|
||||
@@ -41,7 +41,7 @@ add_action( 'admin_head', 'add_js' );
|
||||
get_current_screen()->add_help_tab( array(
|
||||
'id' => 'overview',
|
||||
'title' => __('Overview'),
|
||||
'content' => '<p>' . __('You can export a file of your site’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>' .
|
||||
'content' => '<p>' . __('You can export a file of your site’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>',
|
||||
) );
|
||||
|
||||
@@ -95,15 +95,15 @@ if ( isset( $_GET['download'] ) ) {
|
||||
|
||||
require_once ('admin-header.php');
|
||||
|
||||
function export_date_options( $post_type = 'post' ) {
|
||||
function export_date_options() {
|
||||
global $wpdb, $wp_locale;
|
||||
|
||||
$months = $wpdb->get_results( $wpdb->prepare( "
|
||||
$months = $wpdb->get_results( "
|
||||
SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
|
||||
FROM $wpdb->posts
|
||||
WHERE post_type = %s AND post_status != 'auto-draft'
|
||||
WHERE post_type = 'post' 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 ) )
|
||||
@@ -130,8 +130,8 @@ function export_date_options( $post_type = 'post' ) {
|
||||
<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></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="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="posts" /> <?php _e( 'Posts' ); ?></label></p>
|
||||
<ul id="post-filters" class="export-filters">
|
||||
@@ -182,11 +182,11 @@ function export_date_options( $post_type = 'post' ) {
|
||||
<label><?php _e( 'Date range:' ); ?></label>
|
||||
<select name="page_start_date">
|
||||
<option value="0"><?php _e( 'Start Date' ); ?></option>
|
||||
<?php export_date_options( 'page' ); ?>
|
||||
<?php export_date_options(); ?>
|
||||
</select>
|
||||
<select name="page_end_date">
|
||||
<option value="0"><?php _e( 'End Date' ); ?></option>
|
||||
<?php export_date_options( 'page' ); ?>
|
||||
<?php export_date_options(); ?>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
@@ -13,13 +13,13 @@ $title = __( 'Freedoms' );
|
||||
|
||||
list( $display_version ) = explode( '-', $wp_version );
|
||||
|
||||
include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
include( './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 already making your website better, faster, and more attractive, just like you!' ), $display_version ); ?></div>
|
||||
<div class="about-text"><?php printf( __( 'Thank you for updating to the latest version! Using WordPress %s will improve your looks, personality, and web publishing experience. Okay, just the last one, but still. :)' ), $display_version ); ?></div>
|
||||
|
||||
<div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
|
||||
|
||||
@@ -54,4 +54,4 @@ printf( __( 'Every plugin and theme in WordPress.org’s directory is 100%%
|
||||
<p><?php _e( 'Don’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( ABSPATH . 'wp-admin/admin-footer.php' ); ?>
|
||||
<?php include( './admin-footer.php' ); ?>
|
||||
|
||||
BIN
wp-admin/images/gray-star.png
Normal file
|
After Width: | Height: | Size: 625 B |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 36 KiB |
BIN
wp-admin/images/logo-login.png
Normal file
|
After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 567 B After Width: | Height: | Size: 818 B |
BIN
wp-admin/images/screenshots/admin-flyouts.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 43 KiB |
BIN
wp-admin/images/screenshots/coediting.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
wp-admin/images/screenshots/drag-and-drop.png
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 28 KiB |
BIN
wp-admin/images/screenshots/help-screen.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
wp-admin/images/screenshots/media-icon.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
wp-admin/images/screenshots/new-feature-pointer.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 104 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 16 KiB |
BIN
wp-admin/images/screenshots/welcome-screen.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
wp-admin/images/star.png
Normal file
|
After Width: | Height: | Size: 611 B |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 28 KiB |
@@ -20,9 +20,10 @@ get_current_screen()->add_help_tab( array(
|
||||
'id' => 'overview',
|
||||
'title' => __('Overview'),
|
||||
'content' => '<p>' . __('This screen lists links to plugins to import data from blogging/content management platforms. Choose the platform you want to import from, and click Install Now when you are prompted in the popup window. If your platform is not listed, click the link to search the plugin directory for other importer plugins to see if there is one for your platform.') . '</p>' .
|
||||
'<p>' . __('In previous versions of WordPress, all importers were built-in. They have been turned into plugins since most people only use them once or infrequently.') . '</p>',
|
||||
'<p>' . __('In previous versions of WordPress, all importers were built-in. They have been turned into plugins since most people only use them once or infrequently.') . '</p>',
|
||||
) );
|
||||
|
||||
|
||||
get_current_screen()->set_help_sidebar(
|
||||
'<p><strong>' . __('For more information:') . '</strong></p>' .
|
||||
'<p>' . __('<a href="http://codex.wordpress.org/Tools_Import_Screen" target="_blank">Documentation on Import</a>') . '</p>' .
|
||||
@@ -137,3 +138,4 @@ if ( current_user_can('install_plugins') )
|
||||
<?php
|
||||
|
||||
include ('admin-footer.php');
|
||||
?>
|
||||
|
||||
@@ -6,13 +6,6 @@
|
||||
* @subpackage Administration
|
||||
*/
|
||||
|
||||
if ( ! defined('WP_ADMIN') ) {
|
||||
// This file is being included from a file other than wp-admin/admin.php, so
|
||||
// some setup was skipped. Make sure the admin message catalog is loaded since
|
||||
// load_default_textdomain() will not have done so in this context.
|
||||
load_textdomain( 'default', WP_LANG_DIR . '/admin-' . get_locale() . '.mo' );
|
||||
}
|
||||
|
||||
/** WordPress Bookmark Administration API */
|
||||
require_once(ABSPATH . 'wp-admin/includes/bookmark.php');
|
||||
|
||||
@@ -70,3 +63,5 @@ if ( is_multisite() ) {
|
||||
require_once(ABSPATH . 'wp-admin/includes/ms.php');
|
||||
require_once(ABSPATH . 'wp-admin/includes/ms-deprecated.php');
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -53,7 +53,6 @@ function edit_link( $link_id = 0 ) {
|
||||
* @return object Default link
|
||||
*/
|
||||
function get_default_link_to_edit() {
|
||||
$link = new stdClass;
|
||||
if ( isset( $_GET['linkurl'] ) )
|
||||
$link->link_url = esc_url( $_GET['linkurl'] );
|
||||
else
|
||||
@@ -84,7 +83,7 @@ function wp_delete_link( $link_id ) {
|
||||
|
||||
wp_delete_object_term_relationships( $link_id, 'link_category' );
|
||||
|
||||
$wpdb->delete( $wpdb->links, array( 'link_id' => $link_id ) );
|
||||
$wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->links WHERE link_id = %d", $link_id ) );
|
||||
|
||||
do_action( 'deleted_link', $link_id );
|
||||
|
||||
@@ -266,3 +265,5 @@ function wp_update_link( $linkdata ) {
|
||||
|
||||
return wp_insert_link( $linkdata );
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -896,12 +896,11 @@ class ftp_base {
|
||||
}
|
||||
}
|
||||
|
||||
$mod_sockets = extension_loaded( 'sockets' );
|
||||
if ( ! $mod_sockets && function_exists( 'dl' ) && is_callable( 'dl' ) ) {
|
||||
$prefix = ( PHP_SHLIB_SUFFIX == 'dll' ) ? 'php_' : '';
|
||||
@dl( $prefix . 'sockets.' . PHP_SHLIB_SUFFIX );
|
||||
$mod_sockets = extension_loaded( 'sockets' );
|
||||
$mod_sockets=TRUE;
|
||||
if (!extension_loaded('sockets')) {
|
||||
$prefix = (PHP_SHLIB_SUFFIX == 'dll') ? 'php_' : '';
|
||||
if(!@dl($prefix . 'sockets.' . PHP_SHLIB_SUFFIX)) $mod_sockets=FALSE;
|
||||
}
|
||||
|
||||
require_once "class-ftp-" . ( $mod_sockets ? "sockets" : "pure" ) . ".php";
|
||||
require_once "class-ftp-".($mod_sockets?"sockets":"pure").".php";
|
||||
?>
|
||||
|
||||
@@ -130,13 +130,13 @@ class WP_Comments_List_Table extends WP_List_Table {
|
||||
global $comment_status;
|
||||
|
||||
if ( 'moderated' == $comment_status )
|
||||
_e( 'No comments awaiting moderation.' );
|
||||
_e( 'No comments awaiting moderation… yet.' );
|
||||
else
|
||||
_e( 'No comments found.' );
|
||||
}
|
||||
|
||||
function get_views() {
|
||||
global $post_id, $comment_status, $comment_type;
|
||||
global $post_id, $comment_status;
|
||||
|
||||
$status_links = array();
|
||||
$num_comments = ( $post_id ) ? wp_count_comments( $post_id ) : wp_count_comments();
|
||||
@@ -186,7 +186,7 @@ class WP_Comments_List_Table extends WP_List_Table {
|
||||
$actions = array();
|
||||
if ( in_array( $comment_status, array( 'all', 'approved' ) ) )
|
||||
$actions['unapprove'] = __( 'Unapprove' );
|
||||
if ( in_array( $comment_status, array( 'all', 'moderated' ) ) )
|
||||
if ( in_array( $comment_status, array( 'all', 'moderated', 'spam' ) ) )
|
||||
$actions['approve'] = __( 'Approve' );
|
||||
if ( in_array( $comment_status, array( 'all', 'moderated', 'approved' ) ) )
|
||||
$actions['spam'] = _x( 'Mark as Spam', 'comment' );
|
||||
@@ -556,3 +556,5 @@ class WP_Post_Comments_List_Table extends WP_Comments_List_Table {
|
||||
return 10;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -328,3 +328,5 @@ class WP_Filesystem_Base {
|
||||
return (bool) preg_match('|[^\x20-\x7E]|', $text); //chr(32)..chr(127)
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -207,7 +207,7 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base {
|
||||
if ( ! $overwrite && $this->exists($destination) )
|
||||
return false;
|
||||
|
||||
// try using rename first. if that fails (for example, source is read only) try copy
|
||||
// try using rename first. if that fails (for example, source is read only) try copy
|
||||
if ( @rename($source, $destination) )
|
||||
return true;
|
||||
|
||||
@@ -361,3 +361,4 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base {
|
||||
return $ret;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -387,3 +387,5 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
|
||||
ftp_close($this->link);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -327,3 +327,5 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
|
||||
$this->ftp->quit();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -182,3 +182,5 @@ class WP_Links_List_Table extends WP_List_Table {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -212,7 +212,7 @@ class WP_List_Table {
|
||||
?>
|
||||
<p class="search-box">
|
||||
<label class="screen-reader-text" for="<?php echo $input_id ?>"><?php echo $text; ?>:</label>
|
||||
<input type="search" id="<?php echo $input_id ?>" name="s" value="<?php _admin_search_query(); ?>" />
|
||||
<input type="text" id="<?php echo $input_id ?>" name="s" value="<?php _admin_search_query(); ?>" />
|
||||
<?php submit_button( $text, 'button', false, false, array('id' => 'search-submit') ); ?>
|
||||
</p>
|
||||
<?php
|
||||
@@ -386,8 +386,7 @@ class WP_List_Table {
|
||||
printf( "<option %s value='%s'>%s</option>\n",
|
||||
selected( $m, $year . $month, false ),
|
||||
esc_attr( $arc_row->year . $month ),
|
||||
/* translators: 1: month name, 2: 4-digit year */
|
||||
sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $month ), $year )
|
||||
$wp_locale->get_month( $month ) . " $year"
|
||||
);
|
||||
}
|
||||
?>
|
||||
@@ -484,7 +483,7 @@ class WP_List_Table {
|
||||
if ( empty( $this->_pagination_args ) )
|
||||
return;
|
||||
|
||||
extract( $this->_pagination_args, EXTR_SKIP );
|
||||
extract( $this->_pagination_args );
|
||||
|
||||
$output = '<span class="displaying-num">' . sprintf( _n( '1 item', '%s items', $total_items ), number_format_i18n( $total_items ) ) . '</span>';
|
||||
|
||||
@@ -519,8 +518,9 @@ class WP_List_Table {
|
||||
if ( 'bottom' == $which )
|
||||
$html_current_page = $current;
|
||||
else
|
||||
$html_current_page = sprintf( "<input class='current-page' title='%s' type='text' name='paged' value='%s' size='%d' />",
|
||||
$html_current_page = sprintf( "<input class='current-page' title='%s' type='text' name='%s' value='%s' size='%d' />",
|
||||
esc_attr__( 'Current page' ),
|
||||
esc_attr( 'paged' ),
|
||||
$current,
|
||||
strlen( $total_pages )
|
||||
);
|
||||
@@ -542,10 +542,7 @@ class WP_List_Table {
|
||||
'»'
|
||||
);
|
||||
|
||||
$pagination_links_class = 'pagination-links';
|
||||
if ( ! empty( $infinite_scroll ) )
|
||||
$pagination_links_class = ' hide-if-js';
|
||||
$output .= "\n<span class='$pagination_links_class'>" . join( "\n", $page_links ) . '</span>';
|
||||
$output .= "\n<span class='pagination-links'>" . join( "\n", $page_links ) . '</span>';
|
||||
|
||||
if ( $total_pages )
|
||||
$page_class = $total_pages < 2 ? ' one-page' : '';
|
||||
@@ -874,7 +871,7 @@ class WP_List_Table {
|
||||
$this->prepare_items();
|
||||
|
||||
extract( $this->_args );
|
||||
extract( $this->_pagination_args, EXTR_SKIP );
|
||||
extract( $this->_pagination_args );
|
||||
|
||||
ob_start();
|
||||
if ( ! empty( $_REQUEST['no_placeholder'] ) )
|
||||
@@ -916,3 +913,4 @@ class WP_List_Table {
|
||||
printf( "<script type='text/javascript'>list_args = %s;</script>\n", json_encode( $args ) );
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -302,8 +302,8 @@ foreach ( $columns as $column_name => $column_display_name ) {
|
||||
<td <?php echo $attributes ?>><strong>
|
||||
<?php if( current_user_can( 'edit_post', $post->post_parent ) ) { ?>
|
||||
<a href="<?php echo get_edit_post_link( $post->post_parent ); ?>">
|
||||
<?php echo $title ?></a><?php
|
||||
} else {
|
||||
<?php echo $title ?></a>
|
||||
<?php } else {
|
||||
echo $title;
|
||||
} ?></strong>,
|
||||
<?php echo get_the_time( __( 'Y/m/d' ) ); ?>
|
||||
@@ -392,3 +392,5 @@ foreach ( $columns as $column_name => $column_display_name ) {
|
||||
return $actions;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -251,7 +251,7 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
|
||||
$actions['deactivate'] = '<span class="activate"><a href="' . esc_url( wp_nonce_url( network_admin_url( 'sites.php?action=confirm&action2=deactivateblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( 'You are about to deactivate the site %s' ), $blogname ) ) ), 'confirm') ) . '">' . __( 'Deactivate' ) . '</a></span>';
|
||||
|
||||
if ( get_blog_status( $blog['blog_id'], 'archived' ) == '1' )
|
||||
$actions['unarchive'] = '<span class="archive"><a href="' . esc_url( wp_nonce_url( network_admin_url( 'sites.php?action=confirm&action2=unarchiveblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( 'You are about to unarchive the site %s.' ), $blogname ) ) ), 'confirm') ) . '">' . __( 'Unarchive' ) . '</a></span>';
|
||||
$actions['unarchive'] = '<span class="archive"><a href="' . esc_url( wp_nonce_url( network_admin_url( 'sites.php?action=confirm&action2=unarchiveblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( 'You are about to unarchive the site %s.' ), $blogname ) ) ), 'confirm') ) . '">' . __( 'Unarchive' ) . '</a></span>';
|
||||
else
|
||||
$actions['archive'] = '<span class="archive"><a href="' . esc_url( wp_nonce_url( network_admin_url( 'sites.php?action=confirm&action2=archiveblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( 'You are about to archive the site %s.' ), $blogname ) ) ), 'confirm') ) . '">' . _x( 'Archive', 'verb; site' ) . '</a></span>';
|
||||
|
||||
@@ -337,3 +337,5 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -15,9 +15,14 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
|
||||
function __construct() {
|
||||
global $status, $page;
|
||||
|
||||
$status = isset( $_REQUEST['theme_status'] ) ? $_REQUEST['theme_status'] : 'all';
|
||||
if ( !in_array( $status, array( 'all', 'enabled', 'disabled', 'upgrade', 'search', 'broken' ) ) )
|
||||
$default_status = get_user_option( 'themes_last_view' );
|
||||
if ( empty( $default_status ) )
|
||||
$default_status = 'all';
|
||||
$status = isset( $_REQUEST['theme_status'] ) ? $_REQUEST['theme_status'] : $default_status;
|
||||
if ( !in_array( $status, array( 'all', 'enabled', 'disabled', 'upgrade', 'search' ) ) )
|
||||
$status = 'all';
|
||||
if ( $status != $default_status && 'search' != $status )
|
||||
update_user_meta( get_current_user_id(), 'themes_last_view', $status );
|
||||
|
||||
$page = $this->get_pagenum();
|
||||
|
||||
@@ -50,47 +55,56 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
|
||||
}
|
||||
|
||||
function prepare_items() {
|
||||
global $status, $totals, $page, $orderby, $order, $s;
|
||||
global $status, $themes, $totals, $page, $orderby, $order, $s;
|
||||
|
||||
wp_reset_vars( array( 'orderby', 'order', 's' ) );
|
||||
|
||||
$themes = array(
|
||||
'all' => apply_filters( 'all_themes', wp_get_themes() ),
|
||||
'all' => apply_filters( 'all_themes', get_themes() ),
|
||||
'search' => array(),
|
||||
'enabled' => array(),
|
||||
'disabled' => array(),
|
||||
'upgrade' => array(),
|
||||
'broken' => $this->is_site_themes ? array() : wp_get_themes( array( 'errors' => true ) ),
|
||||
'upgrade' => array()
|
||||
);
|
||||
|
||||
if ( $this->is_site_themes ) {
|
||||
$themes_per_page = $this->get_items_per_page( 'site_themes_network_per_page' );
|
||||
$allowed_where = 'site';
|
||||
} else {
|
||||
$site_allowed_themes = get_site_allowed_themes();
|
||||
if ( !$this->is_site_themes ) {
|
||||
$allowed_themes = $site_allowed_themes;
|
||||
$themes_per_page = $this->get_items_per_page( 'themes_network_per_page' );
|
||||
$allowed_where = 'network';
|
||||
} else {
|
||||
$allowed_themes = wpmu_get_blog_allowedthemes( $this->site_id );
|
||||
$themes_per_page = $this->get_items_per_page( 'site_themes_network_per_page' );
|
||||
}
|
||||
|
||||
$maybe_update = current_user_can( 'update_themes' ) && ! $this->is_site_themes && $current = get_site_transient( 'update_themes' );
|
||||
$current = get_site_transient( 'update_themes' );
|
||||
|
||||
foreach ( (array) $themes['all'] as $key => $theme ) {
|
||||
if ( $this->is_site_themes && $theme->is_allowed( 'network' ) ) {
|
||||
unset( $themes['all'][ $key ] );
|
||||
continue;
|
||||
}
|
||||
$theme_key = $theme['Stylesheet'];
|
||||
|
||||
if ( $maybe_update && isset( $current->response[ $key ] ) ) {
|
||||
$themes['all'][ $key ]->update = true;
|
||||
$themes['upgrade'][ $key ] = $themes['all'][ $key ];
|
||||
if ( isset( $allowed_themes [ $theme_key ] ) ) {
|
||||
$themes['all'][$key]['enabled'] = true;
|
||||
$themes['enabled'][$key] = $themes['all'][$key];
|
||||
}
|
||||
else {
|
||||
$themes['all'][$key]['enabled'] = false;
|
||||
$themes['disabled'][$key] = $themes['all'][$key];
|
||||
}
|
||||
if ( isset( $current->response[ $theme['Template'] ] ) )
|
||||
$themes['upgrade'][$key] = $themes['all'][$key];
|
||||
|
||||
$filter = $theme->is_allowed( $allowed_where, $this->site_id ) ? 'enabled' : 'disabled';
|
||||
$themes[ $filter ][ $key ] = $themes['all'][ $key ];
|
||||
if ( $this->is_site_themes && isset( $site_allowed_themes[$theme_key] ) ) {
|
||||
unset( $themes['all'][$key] );
|
||||
unset( $themes['enabled'][$key] );
|
||||
unset( $themes['disabled'][$key] );
|
||||
}
|
||||
}
|
||||
|
||||
if ( !current_user_can( 'update_themes' ) || $this->is_site_themes )
|
||||
$themes['upgrade'] = array();
|
||||
|
||||
if ( $s ) {
|
||||
$status = 'search';
|
||||
$themes['search'] = array_filter( array_merge( $themes['all'], $themes['broken'] ), array( &$this, '_search_callback' ) );
|
||||
$themes['search'] = array_filter( $themes['all'], array( &$this, '_search_callback' ) );
|
||||
}
|
||||
|
||||
$totals = array();
|
||||
@@ -101,27 +115,19 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
|
||||
$status = 'all';
|
||||
|
||||
$this->items = $themes[ $status ];
|
||||
WP_Theme::sort_by_name( $this->items );
|
||||
|
||||
$this->has_items = ! empty( $themes['all'] );
|
||||
$total_this_page = $totals[ $status ];
|
||||
|
||||
if ( $orderby ) {
|
||||
$orderby = ucfirst( $orderby );
|
||||
$order = strtoupper( $order );
|
||||
|
||||
if ( $orderby == 'Name' ) {
|
||||
if ( 'ASC' == $order )
|
||||
$this->items = array_reverse( $this->items );
|
||||
} else {
|
||||
uasort( $this->items, array( &$this, '_order_callback' ) );
|
||||
}
|
||||
uasort( $this->items, array( &$this, '_order_callback' ) );
|
||||
}
|
||||
|
||||
$start = ( $page - 1 ) * $themes_per_page;
|
||||
|
||||
if ( $total_this_page > $themes_per_page )
|
||||
$this->items = array_slice( $this->items, $start, $themes_per_page, true );
|
||||
$this->items = array_slice( $this->items, $start, $themes_per_page );
|
||||
|
||||
$this->set_pagination_args( array(
|
||||
'total_items' => $total_this_page,
|
||||
@@ -134,27 +140,19 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
|
||||
if ( is_null( $term ) )
|
||||
$term = stripslashes( $_REQUEST['s'] );
|
||||
|
||||
foreach ( array( 'Name', 'Description', 'Author', 'Author', 'AuthorURI' ) as $field ) {
|
||||
// Don't mark up; Do translate.
|
||||
if ( false !== stripos( $theme->display( $field, false, true ), $term ) )
|
||||
$search_fields = array( 'Name', 'Title', 'Description', 'Author', 'Author Name', 'Author URI', 'Template', 'Stylesheet' );
|
||||
foreach ( $search_fields as $field )
|
||||
if ( stripos( $theme[ $field ], $term ) !== false )
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( false !== stripos( $theme->get_stylesheet(), $term ) )
|
||||
return true;
|
||||
|
||||
if ( false !== stripos( $theme->get_template(), $term ) )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Not used by any core columns.
|
||||
function _order_callback( $theme_a, $theme_b ) {
|
||||
global $orderby, $order;
|
||||
|
||||
$a = $theme_a[ $orderby ];
|
||||
$b = $theme_b[ $orderby ];
|
||||
$a = $theme_a[$orderby];
|
||||
$b = $theme_b[$orderby];
|
||||
|
||||
if ( $a == $b )
|
||||
return 0;
|
||||
@@ -166,7 +164,9 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
|
||||
}
|
||||
|
||||
function no_items() {
|
||||
if ( ! $this->has_items )
|
||||
global $themes;
|
||||
|
||||
if ( !empty( $themes['all'] ) )
|
||||
_e( 'No themes found.' );
|
||||
else
|
||||
_e( 'You do not appear to have any themes available at this time.' );
|
||||
@@ -209,9 +209,6 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
|
||||
case 'upgrade':
|
||||
$text = _n( 'Update Available <span class="count">(%s)</span>', 'Update Available <span class="count">(%s)</span>', $count );
|
||||
break;
|
||||
case 'broken' :
|
||||
$text = _n( 'Broken <span class="count">(%s)</span>', 'Broken <span class="count">(%s)</span>', $count );
|
||||
break;
|
||||
}
|
||||
|
||||
if ( $this->is_site_themes )
|
||||
@@ -263,17 +260,14 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
|
||||
}
|
||||
|
||||
function single_row( $key, $theme ) {
|
||||
global $status, $page, $s, $totals;
|
||||
global $status, $page, $s;
|
||||
|
||||
$context = $status;
|
||||
|
||||
if ( $this->is_site_themes ) {
|
||||
if ( $this->is_site_themes )
|
||||
$url = "site-themes.php?id={$this->site_id}&";
|
||||
$allowed = $theme->is_allowed( 'site', $this->site_id );
|
||||
} else {
|
||||
else
|
||||
$url = 'themes.php?';
|
||||
$allowed = $theme->is_allowed( 'network' );
|
||||
}
|
||||
|
||||
// preorder
|
||||
$actions = array(
|
||||
@@ -283,32 +277,30 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
|
||||
'delete' => ''
|
||||
);
|
||||
|
||||
$theme_key = $theme->get_stylesheet();
|
||||
$theme_key = $theme['Stylesheet'];
|
||||
|
||||
if ( ! $allowed ) {
|
||||
if ( ! $theme->errors() )
|
||||
$actions['enable'] = '<a href="' . esc_url( wp_nonce_url($url . 'action=enable&theme=' . $theme_key . '&paged=' . $page . '&s=' . $s, 'enable-theme_' . $theme_key) ) . '" title="' . esc_attr__('Enable this theme') . '" class="edit">' . ( $this->is_site_themes ? __( 'Enable' ) : __( 'Network Enable' ) ) . '</a>';
|
||||
} else {
|
||||
if ( empty( $theme['enabled'] ) )
|
||||
$actions['enable'] = '<a href="' . esc_url( wp_nonce_url($url . 'action=enable&theme=' . $theme_key . '&paged=' . $page . '&s=' . $s, 'enable-theme_' . $theme_key) ) . '" title="' . esc_attr__('Enable this theme') . '" class="edit">' . ( $this->is_site_themes ? __( 'Enable' ) : __( 'Network Enable' ) ) . '</a>';
|
||||
else
|
||||
$actions['disable'] = '<a href="' . esc_url( wp_nonce_url($url . 'action=disable&theme=' . $theme_key . '&paged=' . $page . '&s=' . $s, 'disable-theme_' . $theme_key) ) . '" title="' . esc_attr__('Disable this theme') . '">' . ( $this->is_site_themes ? __( 'Disable' ) : __( 'Network Disable' ) ) . '</a>';
|
||||
}
|
||||
|
||||
if ( current_user_can('edit_themes') )
|
||||
$actions['edit'] = '<a href="' . esc_url('theme-editor.php?theme=' . $theme_key ) . '" title="' . esc_attr__('Open this theme in the Theme Editor') . '" class="edit">' . __('Edit') . '</a>';
|
||||
$actions['edit'] = '<a href="' . esc_url('theme-editor.php?theme=' . urlencode( $theme['Name'] )) . '" title="' . esc_attr__('Open this theme in the Theme Editor') . '" class="edit">' . __('Edit') . '</a>';
|
||||
|
||||
if ( ! $allowed && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $theme_key != get_option( 'stylesheet' ) && $theme_key != get_option( 'template' ) )
|
||||
if ( empty( $theme['enabled'] ) && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $theme_key != get_option( 'stylesheet' ) && $theme_key != get_option( 'template' ) )
|
||||
$actions['delete'] = '<a href="' . esc_url( wp_nonce_url( 'themes.php?action=delete-selected&checked[]=' . $theme_key . '&theme_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-themes' ) ) . '" title="' . esc_attr__( 'Delete this theme' ) . '" class="delete">' . __( 'Delete' ) . '</a>';
|
||||
|
||||
$actions = apply_filters( 'theme_action_links', array_filter( $actions ), $theme_key, $theme, $context );
|
||||
$actions = apply_filters( "theme_action_links_$theme_key", $actions, $theme_key, $theme, $context );
|
||||
|
||||
$class = ! $allowed ? 'inactive' : 'active';
|
||||
$checkbox_id = "checkbox_" . md5( $theme->get('Name') );
|
||||
$checkbox = "<input type='checkbox' name='checked[]' value='" . esc_attr( $theme_key ) . "' id='" . $checkbox_id . "' /><label class='screen-reader-text' for='" . $checkbox_id . "' >" . __('Select') . " " . $theme->display('Name') . "</label>";
|
||||
$class = empty( $theme['enabled'] ) ? 'inactive' : 'active';
|
||||
$checkbox_id = "checkbox_" . md5($theme['Name']);
|
||||
$checkbox = "<input type='checkbox' name='checked[]' value='" . esc_attr( $theme_key ) . "' id='" . $checkbox_id . "' /><label class='screen-reader-text' for='" . $checkbox_id . "' >" . __('Select') . " " . $theme['Name'] . "</label>";
|
||||
|
||||
$id = sanitize_html_class( $theme->get_stylesheet() );
|
||||
$description = '<p>' . $theme['Description'] . '</p>';
|
||||
$theme_name = $theme['Name'];
|
||||
|
||||
if ( ! empty( $totals['upgrade'] ) && ! empty( $theme->update ) )
|
||||
$class .= ' update';
|
||||
$id = sanitize_title( $theme_name );
|
||||
|
||||
echo "<tr id='$id' class='$class'>";
|
||||
|
||||
@@ -324,28 +316,25 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
|
||||
echo "<th scope='row' class='check-column'>$checkbox</th>";
|
||||
break;
|
||||
case 'name':
|
||||
echo "<td class='theme-title'$style><strong>" . $theme->display('Name') . "</strong>";
|
||||
echo "<td class='theme-title'$style><strong>$theme_name</strong>";
|
||||
echo $this->row_actions( $actions, true );
|
||||
echo "</td>";
|
||||
break;
|
||||
case 'description':
|
||||
echo "<td class='column-description desc'$style>";
|
||||
if ( $theme->errors() ) {
|
||||
$pre = $status == 'broken' ? '' : __( 'Broken Theme:' ) . ' ';
|
||||
echo '<p><strong class="attention">' . $pre . $theme->errors()->get_error_message() . '</strong></p>';
|
||||
}
|
||||
echo "<div class='theme-description'><p>" . $theme->display( 'Description' ) . "</p></div>
|
||||
echo "<td class='column-description desc'$style>
|
||||
<div class='theme-description'>$description</div>
|
||||
<div class='$class second theme-version-author-uri'>";
|
||||
|
||||
$theme_meta = array();
|
||||
|
||||
if ( $theme->get('Version') )
|
||||
$theme_meta[] = sprintf( __( 'Version %s' ), $theme->display('Version') );
|
||||
if ( !empty( $theme['Version'] ) )
|
||||
$theme_meta[] = sprintf( __( 'Version %s' ), $theme['Version'] );
|
||||
|
||||
$theme_meta[] = sprintf( __( 'By %s' ), $theme->display('Author') );
|
||||
if ( !empty( $theme['Author'] ) )
|
||||
$theme_meta[] = sprintf( __( 'By %s' ), $theme['Author'] );
|
||||
|
||||
if ( $theme->get('ThemeURI') )
|
||||
$theme_meta[] = '<a href="' . $theme->display('ThemeURI') . '" title="' . esc_attr__( 'Visit theme homepage' ) . '">' . __( 'Visit Theme Site' ) . '</a>';
|
||||
if ( !empty( $theme['Theme URI'] ) )
|
||||
$theme_meta[] = '<a href="' . $theme['Theme URI'] . '" title="' . esc_attr__( 'Visit theme homepage' ) . '">' . __( 'Visit Theme Site' ) . '</a>';
|
||||
|
||||
$theme_meta = apply_filters( 'theme_row_meta', $theme_meta, $theme_key, $theme, $status );
|
||||
echo implode( ' | ', $theme_meta );
|
||||
@@ -368,3 +357,5 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
|
||||
do_action( "after_theme_row_$theme_key", $theme_key, $theme, $status );
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -162,6 +162,7 @@ class WP_MS_Users_List_Table extends WP_List_Table {
|
||||
|
||||
$attributes = "$class$style";
|
||||
|
||||
|
||||
switch ( $column_name ) {
|
||||
case 'cb': ?>
|
||||
<th scope="row" class="check-column">
|
||||
@@ -241,7 +242,7 @@ class WP_MS_Users_List_Table extends WP_List_Table {
|
||||
if ( get_blog_status( $val->userblog_id, 'archived' ) == 1 )
|
||||
$class .= 'site-archived ';
|
||||
|
||||
$actions['view'] = '<a class="' . $class . '" href="' . esc_url( get_home_url( $val->userblog_id ) ) . '">' . __( 'View' ) . '</a>';
|
||||
$actions['view'] = '<a class="' . $class . '" href="' . esc_url( get_home_url( $val->userblog_id ) ) . '">' . __( 'View' ) . '</a>';
|
||||
|
||||
$actions = apply_filters('ms_user_list_site_actions', $actions, $val->userblog_id);
|
||||
|
||||
@@ -273,3 +274,5 @@ class WP_MS_Users_List_Table extends WP_List_Table {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -33,6 +33,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
||||
$tabs['featured'] = _x( 'Featured','Plugin Installer' );
|
||||
$tabs['popular'] = _x( 'Popular','Plugin Installer' );
|
||||
$tabs['new'] = _x( 'Newest','Plugin Installer' );
|
||||
$tabs['updated'] = _x( 'Recently Updated','Plugin Installer' );
|
||||
|
||||
$nonmenu_tabs = array( 'plugin-information' ); //Valid actions to perform which do not have a Menu item.
|
||||
|
||||
@@ -47,7 +48,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
||||
|
||||
switch ( $tab ) {
|
||||
case 'search':
|
||||
$type = isset( $_REQUEST['type'] ) ? stripslashes( $_REQUEST['type'] ) : 'term';
|
||||
$type = isset( $_REQUEST['type'] ) ? stripslashes( $_REQUEST['type'] ) : '';
|
||||
$term = isset( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : '';
|
||||
|
||||
switch ( $type ) {
|
||||
@@ -62,12 +63,13 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
||||
break;
|
||||
}
|
||||
|
||||
add_action( 'install_plugins_table_header', 'install_search_form', 10, 0 );
|
||||
add_action( 'install_plugins_table_header', 'install_search_form' );
|
||||
break;
|
||||
|
||||
case 'featured':
|
||||
case 'popular':
|
||||
case 'new':
|
||||
case 'updated':
|
||||
$args['browse'] = $tab;
|
||||
break;
|
||||
|
||||
@@ -203,7 +205,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
||||
break;
|
||||
case 'latest_installed':
|
||||
case 'newer_installed':
|
||||
$action_links[] = '<span title="' . esc_attr__( 'This plugin is already installed and is up to date' ) . ' ">' . _x( 'Installed', 'plugin' ) . '</span>';
|
||||
$action_links[] = '<span title="' . esc_attr__( 'This plugin is already installed and is up to date' ) . ' ">' . __( 'Installed' ) . '</span>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -217,7 +219,19 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
||||
<td class="vers column-version"<?php echo $style['version']; ?>><?php echo $version; ?></td>
|
||||
<td class="vers column-rating"<?php echo $style['rating']; ?>>
|
||||
<div class="star-holder" title="<?php printf( _n( '(based on %s rating)', '(based on %s ratings)', $plugin['num_ratings'] ), number_format_i18n( $plugin['num_ratings'] ) ) ?>">
|
||||
<div class="star star-rating" style="width: <?php echo esc_attr( str_replace( ',', '.', $plugin['rating'] ) ); ?>px"></div>
|
||||
<div class="star star-rating" style="width: <?php echo esc_attr( $plugin['rating'] ) ?>px"></div>
|
||||
<?php
|
||||
$color = get_user_option('admin_color');
|
||||
if ( empty($color) || 'fresh' == $color )
|
||||
$star_url = admin_url( 'images/gray-star.png?v=20110615' ); // 'Fresh' Gray star for list tables
|
||||
else
|
||||
$star_url = admin_url( 'images/star.png?v=20110615' ); // 'Classic' Blue star
|
||||
?>
|
||||
<div class="star star5"><img src="<?php echo $star_url; ?>" alt="<?php esc_attr_e( '5 stars' ) ?>" /></div>
|
||||
<div class="star star4"><img src="<?php echo $star_url; ?>" alt="<?php esc_attr_e( '4 stars' ) ?>" /></div>
|
||||
<div class="star star3"><img src="<?php echo $star_url; ?>" alt="<?php esc_attr_e( '3 stars' ) ?>" /></div>
|
||||
<div class="star star2"><img src="<?php echo $star_url; ?>" alt="<?php esc_attr_e( '2 stars' ) ?>" /></div>
|
||||
<div class="star star1"><img src="<?php echo $star_url; ?>" alt="<?php esc_attr_e( '1 star' ) ?>" /></div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="desc column-description"<?php echo $style['description']; ?>><?php echo $description, $author; ?></td>
|
||||
@@ -226,3 +240,5 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -13,7 +13,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
global $status, $page;
|
||||
|
||||
$status = 'all';
|
||||
if ( isset( $_REQUEST['plugin_status'] ) && in_array( $_REQUEST['plugin_status'], array( 'active', 'inactive', 'recently_activated', 'upgrade', 'mustuse', 'dropins', 'search' ) ) )
|
||||
if ( isset( $_REQUEST['plugin_status'] ) && in_array( $_REQUEST['plugin_status'], array( 'active', 'inactive', 'recently_activated', 'upgrade', 'network', 'mustuse', 'dropins', 'search' ) ) )
|
||||
$status = $_REQUEST['plugin_status'];
|
||||
|
||||
if ( isset($_REQUEST['s']) )
|
||||
@@ -65,34 +65,32 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
if ( apply_filters( 'show_advanced_plugins', true, 'dropins' ) )
|
||||
$plugins['dropins'] = get_dropins();
|
||||
|
||||
if ( current_user_can( 'update_plugins' ) ) {
|
||||
$current = get_site_transient( 'update_plugins' );
|
||||
foreach ( (array) $plugins['all'] as $plugin_file => $plugin_data ) {
|
||||
if ( isset( $current->response[ $plugin_file ] ) ) {
|
||||
$plugins['all'][ $plugin_file ]['update'] = true;
|
||||
$plugins['upgrade'][ $plugin_file ] = $plugins['all'][ $plugin_file ];
|
||||
}
|
||||
}
|
||||
$current = get_site_transient( 'update_plugins' );
|
||||
foreach ( (array) $plugins['all'] as $plugin_file => $plugin_data ) {
|
||||
if ( isset( $current->response[ $plugin_file ] ) )
|
||||
$plugins['upgrade'][ $plugin_file ] = $plugin_data;
|
||||
}
|
||||
}
|
||||
|
||||
set_transient( 'plugin_slugs', array_keys( $plugins['all'] ), 86400 );
|
||||
|
||||
if ( ! $screen->is_network ) {
|
||||
$recently_activated = get_option( 'recently_activated', array() );
|
||||
$recently_activated = get_option( 'recently_activated', array() );
|
||||
|
||||
$one_week = 7*24*60*60;
|
||||
foreach ( $recently_activated as $key => $time )
|
||||
if ( $time + $one_week < time() )
|
||||
unset( $recently_activated[$key] );
|
||||
update_option( 'recently_activated', $recently_activated );
|
||||
}
|
||||
$one_week = 7*24*60*60;
|
||||
foreach ( $recently_activated as $key => $time )
|
||||
if ( $time + $one_week < time() )
|
||||
unset( $recently_activated[$key] );
|
||||
update_option( 'recently_activated', $recently_activated );
|
||||
|
||||
foreach ( (array) $plugins['all'] as $plugin_file => $plugin_data ) {
|
||||
// Filter into individual sections
|
||||
if ( ! $screen->is_network && is_plugin_active_for_network( $plugin_file ) ) {
|
||||
if ( is_multisite() && is_network_only_plugin( $plugin_file ) && !$screen->is_network ) {
|
||||
unset( $plugins['all'][ $plugin_file] );
|
||||
} elseif ( is_plugin_active_for_network($plugin_file) && !$screen->is_network ) {
|
||||
unset( $plugins['all'][ $plugin_file ] );
|
||||
} elseif ( ( ! $screen->is_network && is_plugin_active( $plugin_file ) )
|
||||
} elseif ( is_multisite() && is_network_only_plugin( $plugin_file ) && !current_user_can( 'manage_network_plugins' ) ) {
|
||||
$plugins['network'][ $plugin_file ] = $plugin_data;
|
||||
} elseif ( ( !$screen->is_network && is_plugin_active( $plugin_file ) )
|
||||
|| ( $screen->is_network && is_plugin_active_for_network( $plugin_file ) ) ) {
|
||||
$plugins['active'][ $plugin_file ] = $plugin_data;
|
||||
} else {
|
||||
@@ -102,6 +100,9 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
}
|
||||
}
|
||||
|
||||
if ( !current_user_can( 'update_plugins' ) )
|
||||
$plugins['upgrade'] = array();
|
||||
|
||||
if ( $s ) {
|
||||
$status = 'search';
|
||||
$plugins['search'] = array_filter( $plugins['all'], array( &$this, '_search_callback' ) );
|
||||
@@ -213,6 +214,9 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
case 'inactive':
|
||||
$text = _n( 'Inactive <span class="count">(%s)</span>', 'Inactive <span class="count">(%s)</span>', $count );
|
||||
break;
|
||||
case 'network':
|
||||
$text = _n( 'Network <span class="count">(%s)</span>', 'Network <span class="count">(%s)</span>', $count );
|
||||
break;
|
||||
case 'mustuse':
|
||||
$text = _n( 'Must-Use <span class="count">(%s)</span>', 'Must-Use <span class="count">(%s)</span>', $count );
|
||||
break;
|
||||
@@ -243,11 +247,13 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
|
||||
$screen = get_current_screen();
|
||||
|
||||
if ( 'active' != $status )
|
||||
$actions['activate-selected'] = $screen->is_network ? __( 'Network Activate' ) : __( 'Activate' );
|
||||
if ( 'active' != $status ) {
|
||||
$action = $screen->is_network ? 'network-activate-selected' : 'activate-selected';
|
||||
$actions[ $action ] = __( 'Activate' );
|
||||
}
|
||||
|
||||
if ( 'inactive' != $status && 'recent' != $status )
|
||||
$actions['deactivate-selected'] = $screen->is_network ? __( 'Network Deactivate' ) : __( 'Deactivate' );
|
||||
$actions['deactivate-selected'] = __( 'Deactivate' );
|
||||
|
||||
if ( !is_multisite() || $screen->is_network ) {
|
||||
if ( current_user_can( 'update_plugins' ) )
|
||||
@@ -276,9 +282,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
|
||||
echo '<div class="alignleft actions">';
|
||||
|
||||
$screen = get_current_screen();
|
||||
|
||||
if ( ! $screen->is_network && 'recently_activated' == $status )
|
||||
if ( 'recently_activated' == $status )
|
||||
submit_button( __( 'Clear List' ), 'secondary', 'clear-recent-list', false );
|
||||
elseif ( 'top' == $which && 'mustuse' == $status )
|
||||
echo '<p>' . sprintf( __( 'Files in the <code>%s</code> directory are executed automatically.' ), str_replace( ABSPATH, '/', WPMU_PLUGIN_DIR ) ) . '</p>';
|
||||
@@ -308,7 +312,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
}
|
||||
|
||||
function single_row( $plugin_file, $plugin_data ) {
|
||||
global $status, $page, $s, $totals;
|
||||
global $status, $page, $s;
|
||||
|
||||
$context = $status;
|
||||
|
||||
@@ -316,8 +320,9 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
|
||||
// preorder
|
||||
$actions = array(
|
||||
'deactivate' => '',
|
||||
'activate' => '',
|
||||
'network_deactivate' => '', 'deactivate' => '',
|
||||
'network_only' => '', 'activate' => '',
|
||||
'network_activate' => '',
|
||||
'edit' => '',
|
||||
'delete' => '',
|
||||
);
|
||||
@@ -342,18 +347,22 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
if ( $plugin_data['Description'] )
|
||||
$description .= '<p>' . $plugin_data['Description'] . '</p>';
|
||||
} else {
|
||||
$is_active_for_network = is_plugin_active_for_network($plugin_file);
|
||||
if ( $screen->is_network )
|
||||
$is_active = is_plugin_active_for_network( $plugin_file );
|
||||
$is_active = $is_active_for_network;
|
||||
else
|
||||
$is_active = is_plugin_active( $plugin_file );
|
||||
|
||||
if ( $is_active_for_network && !is_super_admin() && !$screen->is_network )
|
||||
return;
|
||||
|
||||
if ( $screen->is_network ) {
|
||||
if ( $is_active ) {
|
||||
if ( $is_active_for_network ) {
|
||||
if ( current_user_can( 'manage_network_plugins' ) )
|
||||
$actions['deactivate'] = '<a href="' . wp_nonce_url('plugins.php?action=deactivate&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'deactivate-plugin_' . $plugin_file) . '" title="' . esc_attr__('Deactivate this plugin') . '">' . __('Network Deactivate') . '</a>';
|
||||
$actions['network_deactivate'] = '<a href="' . wp_nonce_url('plugins.php?action=deactivate&networkwide=1&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'deactivate-plugin_' . $plugin_file) . '" title="' . esc_attr__('Deactivate this plugin') . '">' . __('Network Deactivate') . '</a>';
|
||||
} else {
|
||||
if ( current_user_can( 'manage_network_plugins' ) )
|
||||
$actions['activate'] = '<a href="' . wp_nonce_url('plugins.php?action=activate&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'activate-plugin_' . $plugin_file) . '" title="' . esc_attr__('Activate this plugin for all sites in this network') . '" class="edit">' . __('Network Activate') . '</a>';
|
||||
$actions['network_activate'] = '<a href="' . wp_nonce_url('plugins.php?action=activate&networkwide=1&plugin=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'activate-plugin_' . $plugin_file) . '" title="' . esc_attr__('Activate this plugin for all sites in this network') . '" class="edit">' . __('Network Activate') . '</a>';
|
||||
if ( current_user_can( 'delete_plugins' ) && ! is_plugin_active( $plugin_file ) )
|
||||
$actions['delete'] = '<a href="' . wp_nonce_url('plugins.php?action=delete-selected&checked[]=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-plugins') . '" title="' . esc_attr__('Delete this plugin') . '" class="delete">' . __('Delete') . '</a>';
|
||||
}
|
||||
@@ -385,8 +394,6 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
}
|
||||
|
||||
$id = sanitize_title( $plugin_name );
|
||||
if ( ! empty( $totals['upgrade'] ) && ! empty( $plugin_data['update'] ) )
|
||||
$class .= ' update';
|
||||
|
||||
echo "<tr id='$id' class='$class'>";
|
||||
|
||||
@@ -441,3 +448,5 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||
do_action( "after_plugin_row_$plugin_file", $plugin_file, $plugin_data, $status );
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -360,7 +360,7 @@ class WP_Posts_List_Table extends WP_List_Table {
|
||||
if ( $page->post_parent == $page->ID ) {
|
||||
$page->post_parent = 0;
|
||||
$wpdb->update( $wpdb->posts, array( 'post_parent' => 0 ), array( 'ID' => $page->ID ) );
|
||||
clean_post_cache( $page );
|
||||
clean_page_cache( $page->ID );
|
||||
}
|
||||
|
||||
if ( 0 == $page->post_parent )
|
||||
@@ -527,8 +527,9 @@ class WP_Posts_List_Table extends WP_List_Table {
|
||||
?>
|
||||
<td <?php echo $attributes ?>><strong><?php if ( $can_edit_post && $post->post_status != 'trash' ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo esc_attr( sprintf( __( 'Edit “%s”' ), $title ) ); ?>"><?php echo $title ?></a><?php } else { echo $title; }; _post_states( $post ); ?></strong>
|
||||
<?php
|
||||
if ( 'excerpt' == $mode && current_user_can( 'read_post', $post->ID ) )
|
||||
if ( 'excerpt' == $mode ) {
|
||||
the_excerpt();
|
||||
}
|
||||
}
|
||||
|
||||
$actions = array();
|
||||
@@ -608,8 +609,7 @@ class WP_Posts_List_Table extends WP_List_Table {
|
||||
esc_html( sanitize_term_field( 'name', $c->name, $c->term_id, 'category', 'display' ) )
|
||||
);
|
||||
}
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
echo join( __( ', ' ), $out );
|
||||
echo join( ', ', $out );
|
||||
} else {
|
||||
_e( 'Uncategorized' );
|
||||
}
|
||||
@@ -629,8 +629,7 @@ class WP_Posts_List_Table extends WP_List_Table {
|
||||
esc_html( sanitize_term_field( 'name', $c->name, $c->term_id, 'tag', 'display' ) )
|
||||
);
|
||||
}
|
||||
/* translators: used between list items, there is a space after the comma */
|
||||
echo join( __( ', ' ), $out );
|
||||
echo join( ', ', $out );
|
||||
} else {
|
||||
_e( 'No Tags' );
|
||||
}
|
||||
@@ -996,23 +995,20 @@ class WP_Posts_List_Table extends WP_List_Table {
|
||||
<?php if ( post_type_supports( $screen->post_type, 'post-formats' ) && current_theme_supports( 'post-formats' ) ) :
|
||||
$post_formats = get_theme_support( 'post-formats' );
|
||||
if ( isset( $post_formats[0] ) && is_array( $post_formats[0] ) ) :
|
||||
$all_post_formats = get_post_format_strings();
|
||||
unset( $all_post_formats['standard'] ); ?>
|
||||
$all_post_formats = get_post_format_strings(); ?>
|
||||
<div class="inline-edit-group">
|
||||
<label class="alignleft" for="post_format">
|
||||
<span class="title"><?php _ex( 'Format', 'post format' ); ?></span>
|
||||
<span class="title"><?php _e( 'Post Format' ); ?></span>
|
||||
<select name="post_format">
|
||||
<?php if ( $bulk ) : ?>
|
||||
<option value="-1"><?php _e( '— No Change —' ); ?></option>
|
||||
<?php endif; ?>
|
||||
<option value="0"><?php _ex( 'Standard', 'Post format' ); ?></option>
|
||||
<?php foreach ( $all_post_formats as $slug => $format ) :
|
||||
$unsupported = ! in_array( $slug, $post_formats[0] );
|
||||
if ( $bulk && $unsupported )
|
||||
continue;
|
||||
?>
|
||||
<option value="<?php echo esc_attr( $slug ); ?>"<?php if ( $unsupported ) echo ' class="unsupported"'; ?>><?php echo esc_html( $format ); ?></option>
|
||||
<?php endforeach; ?>
|
||||
<?php foreach ( $all_post_formats as $slug => $format ):
|
||||
if ( $slug != 'standard' ) : ?>
|
||||
<option value="<?php echo esc_attr( $slug ); ?>"<?php if ( ! in_array( $slug, $post_formats[0] ) ) echo ' class="unsupported"'; ?>><?php echo esc_html( $format ); ?></option>
|
||||
<?php endif;
|
||||
endforeach; ?>
|
||||
</select></label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@@ -1054,3 +1050,5 @@ class WP_Posts_List_Table extends WP_List_Table {
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -42,7 +42,7 @@ class WP_Terms_List_Table extends WP_List_Table {
|
||||
function prepare_items() {
|
||||
global $taxonomy;
|
||||
|
||||
$tags_per_page = $this->get_items_per_page( 'edit_' . $taxonomy . '_per_page' );
|
||||
$tags_per_page = $this->get_items_per_page( 'edit_' . $taxonomy . '_per_page' );
|
||||
|
||||
if ( 'post_tag' == $taxonomy ) {
|
||||
$tags_per_page = apply_filters( 'edit_tags_per_page', $tags_per_page );
|
||||
@@ -378,3 +378,5 @@ class WP_Terms_List_Table extends WP_List_Table {
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -7,30 +7,19 @@
|
||||
* @since 3.1.0
|
||||
* @access private
|
||||
*/
|
||||
class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
|
||||
|
||||
var $features = array();
|
||||
class WP_Theme_Install_List_Table extends WP_List_Table {
|
||||
|
||||
function ajax_user_can() {
|
||||
return current_user_can( 'install_themes' );
|
||||
return current_user_can('install_themes');
|
||||
}
|
||||
|
||||
function prepare_items() {
|
||||
include( ABSPATH . 'wp-admin/includes/theme-install.php' );
|
||||
|
||||
global $tabs, $tab, $paged, $type, $theme_field_defaults;
|
||||
global $tabs, $tab, $paged, $type, $term, $theme_field_defaults;
|
||||
|
||||
wp_reset_vars( array( 'tab' ) );
|
||||
|
||||
$search_terms = array();
|
||||
$search_string = '';
|
||||
if ( ! empty( $_REQUEST['s'] ) ){
|
||||
$search_string = strtolower( stripslashes( $_REQUEST['s'] ) );
|
||||
$search_terms = array_unique( array_filter( array_map( 'trim', explode( ',', $search_string ) ) ) );
|
||||
}
|
||||
|
||||
if ( ! empty( $_REQUEST['features'] ) )
|
||||
$this->features = $_REQUEST['features'];
|
||||
|
||||
$paged = $this->get_pagenum();
|
||||
|
||||
$per_page = 36;
|
||||
@@ -59,26 +48,34 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
|
||||
|
||||
switch ( $tab ) {
|
||||
case 'search':
|
||||
$type = isset( $_REQUEST['type'] ) ? stripslashes( $_REQUEST['type'] ) : 'term';
|
||||
$type = isset( $_REQUEST['type'] ) ? stripslashes( $_REQUEST['type'] ) : '';
|
||||
$term = isset( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : '';
|
||||
|
||||
switch ( $type ) {
|
||||
case 'tag':
|
||||
$args['tag'] = array_map( 'sanitize_key', $search_terms );
|
||||
$terms = explode( ',', $term );
|
||||
$terms = array_map( 'trim', $terms );
|
||||
$terms = array_map( 'sanitize_title_with_dashes', $terms );
|
||||
$args['tag'] = $terms;
|
||||
break;
|
||||
case 'term':
|
||||
$args['search'] = $search_string;
|
||||
$args['search'] = $term;
|
||||
break;
|
||||
case 'author':
|
||||
$args['author'] = $search_string;
|
||||
$args['author'] = $term;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( ! empty( $this->features ) ) {
|
||||
$args['tag'] = $this->features;
|
||||
$_REQUEST['s'] = implode( ',', $this->features );
|
||||
if ( !empty( $_POST['features'] ) ) {
|
||||
$terms = $_POST['features'];
|
||||
$terms = array_map( 'trim', $terms );
|
||||
$terms = array_map( 'sanitize_title_with_dashes', $terms );
|
||||
$args['tag'] = $terms;
|
||||
$_REQUEST['s'] = implode( ',', $terms );
|
||||
$_REQUEST['type'] = 'tag';
|
||||
}
|
||||
|
||||
add_action( 'install_themes_table_header', 'install_theme_search_form', 10, 0 );
|
||||
add_action( 'install_themes_table_header', 'install_theme_search_form' );
|
||||
break;
|
||||
|
||||
case 'featured':
|
||||
@@ -92,7 +89,7 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
|
||||
$args = false;
|
||||
}
|
||||
|
||||
if ( ! $args )
|
||||
if ( !$args )
|
||||
return;
|
||||
|
||||
$api = themes_api( 'query_themes', $args );
|
||||
@@ -105,7 +102,6 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
|
||||
$this->set_pagination_args( array(
|
||||
'total_items' => $api->info['results'],
|
||||
'per_page' => $per_page,
|
||||
'infinite_scroll' => true,
|
||||
) );
|
||||
}
|
||||
|
||||
@@ -126,8 +122,13 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
|
||||
return $display_tabs;
|
||||
}
|
||||
|
||||
function get_columns() {
|
||||
return array();
|
||||
}
|
||||
|
||||
function display() {
|
||||
wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
|
||||
|
||||
// wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
|
||||
?>
|
||||
<div class="tablenav top themes">
|
||||
<div class="alignleft actions">
|
||||
@@ -142,254 +143,27 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
|
||||
<?php $this->display_rows_or_placeholder(); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
parent::tablenav( 'bottom' );
|
||||
<div class="tablenav bottom themes">
|
||||
<?php $this->pagination( 'bottom' ); ?>
|
||||
<img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading list-ajax-loading" alt="" />
|
||||
<br class="clear" />
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
function display_rows() {
|
||||
$themes = $this->items;
|
||||
foreach ( $themes as $theme ) {
|
||||
$theme_names = array_keys( $themes );
|
||||
|
||||
foreach ( $theme_names as $theme_name ) {
|
||||
$class = array( 'available-theme' );
|
||||
?>
|
||||
<div class="available-theme installable-theme"><?php
|
||||
$this->single_row( $theme );
|
||||
<div class="<?php echo join( ' ', $class ); ?>"><?php
|
||||
if ( isset( $themes[$theme_name] ) )
|
||||
display_theme( $themes[$theme_name] );
|
||||
?></div>
|
||||
<?php } // end foreach $theme_names
|
||||
|
||||
$this->theme_installer();
|
||||
}
|
||||
|
||||
/*
|
||||
* Prints a theme from the WordPress.org API.
|
||||
*
|
||||
* @param object $theme An object that contains theme data returned by the WordPress.org API.
|
||||
*
|
||||
* Example theme data:
|
||||
* object(stdClass)[59]
|
||||
* public 'name' => string 'Magazine Basic' (length=14)
|
||||
* public 'slug' => string 'magazine-basic' (length=14)
|
||||
* public 'version' => string '1.1' (length=3)
|
||||
* public 'author' => string 'tinkerpriest' (length=12)
|
||||
* public 'preview_url' => string 'http://wp-themes.com/?magazine-basic' (length=36)
|
||||
* public 'screenshot_url' => string 'http://wp-themes.com/wp-content/themes/magazine-basic/screenshot.png' (length=68)
|
||||
* public 'rating' => float 80
|
||||
* public 'num_ratings' => int 1
|
||||
* public 'homepage' => string 'http://wordpress.org/extend/themes/magazine-basic' (length=49)
|
||||
* public 'description' => string 'A basic magazine style layout with a fully customizable layout through a backend interface. Designed by <a href="http://bavotasan.com">c.bavota</a> of <a href="http://tinkerpriestmedia.com">Tinker Priest Media</a>.' (length=214)
|
||||
* public 'download_link' => string 'http://wordpress.org/extend/themes/download/magazine-basic.1.1.zip' (length=66)
|
||||
*/
|
||||
function single_row( $theme ) {
|
||||
global $themes_allowedtags;
|
||||
|
||||
if ( empty( $theme ) )
|
||||
return;
|
||||
|
||||
$name = wp_kses( $theme->name, $themes_allowedtags );
|
||||
$author = wp_kses( $theme->author, $themes_allowedtags );
|
||||
|
||||
$preview_title = sprintf( __('Preview “%s”'), $name );
|
||||
$preview_url = add_query_arg( array(
|
||||
'tab' => 'theme-information',
|
||||
'theme' => $theme->slug,
|
||||
) );
|
||||
|
||||
$actions = array();
|
||||
|
||||
$install_url = add_query_arg( array(
|
||||
'action' => 'install-theme',
|
||||
'theme' => $theme->slug,
|
||||
), self_admin_url( 'update.php' ) );
|
||||
|
||||
$update_url = add_query_arg( array(
|
||||
'action' => 'upgrade-theme',
|
||||
'theme' => $theme->slug,
|
||||
), self_admin_url( 'update.php' ) );
|
||||
|
||||
$status = $this->_get_theme_status( $theme );
|
||||
|
||||
switch ( $status ) {
|
||||
default:
|
||||
case 'install':
|
||||
$actions[] = '<a class="install-now" href="' . esc_url( wp_nonce_url( $install_url, 'install-theme_' . $theme->slug ) ) . '" title="' . esc_attr( sprintf( __( 'Install %s' ), $name ) ) . '">' . __( 'Install Now' ) . '</a>';
|
||||
break;
|
||||
case 'update_available':
|
||||
$actions[] = '<a class="install-now" href="' . esc_url( wp_nonce_url( $update_url, 'upgrade-theme_' . $theme->slug ) ) . '" title="' . esc_attr( sprintf( __( 'Update to version %s' ), $theme->version ) ) . '">' . __( 'Update' ) . '</a>';
|
||||
break;
|
||||
case 'newer_installed':
|
||||
case 'latest_installed':
|
||||
$actions[] = '<span class="install-now" title="' . esc_attr__( 'This theme is already installed and is up to date' ) . '">' . _x( 'Installed', 'theme' ) . '</span>';
|
||||
break;
|
||||
}
|
||||
|
||||
$actions[] = '<a class="install-theme-preview" href="' . esc_url( $preview_url ) . '" title="' . esc_attr( sprintf( __( 'Preview %s' ), $name ) ) . '">' . __( 'Preview' ) . '</a>';
|
||||
|
||||
$actions = apply_filters( 'theme_install_actions', $actions, $theme );
|
||||
|
||||
?>
|
||||
<a class="screenshot install-theme-preview" href="<?php echo esc_url( $preview_url ); ?>" title="<?php echo esc_attr( $preview_title ); ?>">
|
||||
<img src='<?php echo esc_url( $theme->screenshot_url ); ?>' width='150' />
|
||||
</a>
|
||||
|
||||
<h3><?php echo $name; ?></h3>
|
||||
<div class="theme-author"><?php printf( __( 'By %s' ), $author ); ?></div>
|
||||
|
||||
<div class="action-links">
|
||||
<ul>
|
||||
<?php foreach ( $actions as $action ): ?>
|
||||
<li><?php echo $action; ?></li>
|
||||
<?php endforeach; ?>
|
||||
<li class="hide-if-no-js"><a href="#" class="theme-detail" tabindex='4'><?php _e('Details') ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$this->install_theme_info( $theme );
|
||||
}
|
||||
|
||||
/*
|
||||
* Prints the wrapper for the theme installer.
|
||||
*/
|
||||
function theme_installer() {
|
||||
?>
|
||||
<div id="theme-installer" class="wp-full-overlay expanded">
|
||||
<div class="wp-full-overlay-sidebar">
|
||||
<div class="wp-full-overlay-header">
|
||||
<a href="#" class="close-full-overlay"><?php _e( '← Close' ); ?></a>
|
||||
</div>
|
||||
<div class="wp-full-overlay-sidebar-content">
|
||||
<div class="install-theme-info"></div>
|
||||
</div>
|
||||
<div class="wp-full-overlay-footer">
|
||||
<a href="#" class="collapse-sidebar button-secondary" title="<?php esc_attr_e('Collapse Sidebar'); ?>">
|
||||
<span class="collapse-sidebar-label"><?php _e('Collapse'); ?></span>
|
||||
<span class="collapse-sidebar-arrow"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wp-full-overlay-main"></div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
/*
|
||||
* Prints the wrapper for the theme installer with a provided theme's data.
|
||||
* Used to make the theme installer work for no-js.
|
||||
*
|
||||
* @param object $theme - A WordPress.org Theme API object.
|
||||
*/
|
||||
function theme_installer_single( $theme ) {
|
||||
?>
|
||||
<div id="theme-installer" class="wp-full-overlay single-theme">
|
||||
<div class="wp-full-overlay-sidebar">
|
||||
<?php $this->install_theme_info( $theme ); ?>
|
||||
</div>
|
||||
<div class="wp-full-overlay-main">
|
||||
<iframe src="<?php echo esc_url( $theme->preview_url ); ?>"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
/*
|
||||
* Prints the info for a theme (to be used in the theme installer modal).
|
||||
*
|
||||
* @param object $theme - A WordPress.org Theme API object.
|
||||
*/
|
||||
function install_theme_info( $theme ) {
|
||||
global $themes_allowedtags;
|
||||
|
||||
if ( empty( $theme ) )
|
||||
return;
|
||||
|
||||
$name = wp_kses( $theme->name, $themes_allowedtags );
|
||||
$author = wp_kses( $theme->author, $themes_allowedtags );
|
||||
|
||||
$num_ratings = sprintf( _n( '(based on %s rating)', '(based on %s ratings)', $theme->num_ratings ), number_format_i18n( $theme->num_ratings ) );
|
||||
|
||||
$install_url = add_query_arg( array(
|
||||
'action' => 'install-theme',
|
||||
'theme' => $theme->slug,
|
||||
), self_admin_url( 'update.php' ) );
|
||||
|
||||
$update_url = add_query_arg( array(
|
||||
'action' => 'upgrade-theme',
|
||||
'theme' => $theme->slug,
|
||||
), self_admin_url( 'update.php' ) );
|
||||
|
||||
$status = $this->_get_theme_status( $theme );
|
||||
|
||||
?>
|
||||
<div class="install-theme-info"><?php
|
||||
switch ( $status ) {
|
||||
default:
|
||||
case 'install':
|
||||
echo '<a class="theme-install button-primary" href="' . esc_url( wp_nonce_url( $install_url, 'install-theme_' . $theme->slug ) ) . '">' . __( 'Install' ) . '</a>';
|
||||
break;
|
||||
case 'update_available':
|
||||
echo '<a class="theme-install button-primary" href="' . esc_url( wp_nonce_url( $update_url, 'upgrade-theme_' . $theme->slug ) ) . '" title="' . esc_attr( sprintf( __( 'Update to version %s' ), $theme->version ) ) . '">' . __( 'Update' ) . '</a>';
|
||||
break;
|
||||
case 'newer_installed':
|
||||
case 'latest_installed':
|
||||
echo '<span class="theme-install" title="' . esc_attr__( 'This theme is already installed and is up to date' ) . '">' . _x( 'Installed', 'theme' ) . '</span>';
|
||||
break;
|
||||
} ?>
|
||||
<h3 class="theme-name"><?php echo $name; ?></h3>
|
||||
<span class="theme-by"><?php printf( __( 'By %s' ), $author ); ?></span>
|
||||
<?php if ( isset( $theme->screenshot_url ) ): ?>
|
||||
<img class="theme-screenshot" src="<?php echo esc_url( $theme->screenshot_url ); ?>" />
|
||||
<?php endif; ?>
|
||||
<div class="theme-details">
|
||||
<div class="star-holder" title="<?php echo esc_attr( $num_ratings ); ?>">
|
||||
<div class="star-rating" style="width:<?php echo esc_attr( intval( $theme->rating ) . 'px' ); ?>;"></div>
|
||||
</div>
|
||||
<div class="theme-version">
|
||||
<strong><?php _e('Version:') ?> </strong>
|
||||
<?php echo wp_kses( $theme->version, $themes_allowedtags ); ?>
|
||||
</div>
|
||||
<div class="theme-description">
|
||||
<?php echo wp_kses( $theme->description, $themes_allowedtags ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<input class="theme-preview-url" type="hidden" value="<?php echo esc_url( $theme->preview_url ); ?>" />
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Send required variables to JavaScript land
|
||||
*
|
||||
* @since 3.4
|
||||
* @access private
|
||||
*
|
||||
* @uses $tab Global; current tab within Themes->Install screen
|
||||
* @uses $type Global; type of search.
|
||||
*/
|
||||
function _js_vars() {
|
||||
global $tab, $type;
|
||||
parent::_js_vars( compact( 'tab', 'type' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Check to see if the theme is already installed.
|
||||
*
|
||||
* @since 3.4
|
||||
* @access private
|
||||
*
|
||||
* @param object $theme - A WordPress.org Theme API object.
|
||||
* @return string Theme status.
|
||||
*/
|
||||
private function _get_theme_status( $theme ) {
|
||||
$status = 'install';
|
||||
|
||||
$installed_theme = wp_get_theme( $theme->slug );
|
||||
if ( $installed_theme->exists() ) {
|
||||
if ( version_compare( $installed_theme->get('Version'), $theme->version, '=' ) )
|
||||
$status = 'latest_installed';
|
||||
elseif ( version_compare( $installed_theme->get('Version'), $theme->version, '>' ) )
|
||||
$status = 'newer_installed';
|
||||
else
|
||||
$status = 'update_available';
|
||||
}
|
||||
|
||||
return $status;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -9,55 +9,59 @@
|
||||
*/
|
||||
class WP_Themes_List_Table extends WP_List_Table {
|
||||
|
||||
protected $search_terms = array();
|
||||
var $search = array();
|
||||
var $features = array();
|
||||
|
||||
function __construct() {
|
||||
parent::__construct( array(
|
||||
'ajax' => true,
|
||||
) );
|
||||
}
|
||||
|
||||
function ajax_user_can() {
|
||||
// Do not check edit_theme_options here. AJAX calls for available themes require switch_themes.
|
||||
return current_user_can( 'switch_themes' );
|
||||
return current_user_can('switch_themes');
|
||||
}
|
||||
|
||||
function prepare_items() {
|
||||
$themes = wp_get_themes( array( 'allowed' => true ) );
|
||||
global $ct;
|
||||
|
||||
if ( ! empty( $_REQUEST['s'] ) )
|
||||
$this->search_terms = array_unique( array_filter( array_map( 'trim', explode( ',', strtolower( stripslashes( $_REQUEST['s'] ) ) ) ) ) );
|
||||
$ct = current_theme_info();
|
||||
|
||||
if ( ! empty( $_REQUEST['features'] ) )
|
||||
$themes = get_allowed_themes();
|
||||
|
||||
if ( ! empty( $_REQUEST['s'] ) ) {
|
||||
$search = strtolower( stripslashes( $_REQUEST['s'] ) );
|
||||
$this->search = array_merge( $this->search, array_filter( array_map( 'trim', explode( ',', $search ) ) ) );
|
||||
$this->search = array_unique( $this->search );
|
||||
}
|
||||
|
||||
if ( !empty( $_REQUEST['features'] ) ) {
|
||||
$this->features = $_REQUEST['features'];
|
||||
$this->features = array_map( 'trim', $this->features );
|
||||
$this->features = array_map( 'sanitize_title_with_dashes', $this->features );
|
||||
$this->features = array_unique( $this->features );
|
||||
}
|
||||
|
||||
if ( $this->search_terms || $this->features ) {
|
||||
if ( $this->search || $this->features ) {
|
||||
foreach ( $themes as $key => $theme ) {
|
||||
if ( ! $this->search_theme( $theme ) )
|
||||
if ( !$this->search_theme( $theme ) )
|
||||
unset( $themes[ $key ] );
|
||||
}
|
||||
}
|
||||
|
||||
unset( $themes[ get_option( 'stylesheet' ) ] );
|
||||
WP_Theme::sort_by_name( $themes );
|
||||
unset( $themes[$ct->name] );
|
||||
uksort( $themes, "strnatcasecmp" );
|
||||
|
||||
$per_page = 999;
|
||||
$per_page = 24;
|
||||
$page = $this->get_pagenum();
|
||||
|
||||
$start = ( $page - 1 ) * $per_page;
|
||||
|
||||
$this->items = array_slice( $themes, $start, $per_page, true );
|
||||
$this->items = array_slice( $themes, $start, $per_page );
|
||||
|
||||
$this->set_pagination_args( array(
|
||||
'total_items' => count( $themes ),
|
||||
'per_page' => $per_page,
|
||||
'infinite_scroll' => true,
|
||||
) );
|
||||
}
|
||||
|
||||
function no_items() {
|
||||
if ( $this->search_terms || $this->features ) {
|
||||
if ( $this->search || $this->features ) {
|
||||
_e( 'No items found.' );
|
||||
return;
|
||||
}
|
||||
@@ -97,7 +101,7 @@ class WP_Themes_List_Table extends WP_List_Table {
|
||||
}
|
||||
|
||||
function display() {
|
||||
wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
|
||||
// wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
|
||||
?>
|
||||
<?php $this->tablenav( 'top' ); ?>
|
||||
|
||||
@@ -115,142 +119,104 @@ class WP_Themes_List_Table extends WP_List_Table {
|
||||
|
||||
function display_rows() {
|
||||
$themes = $this->items;
|
||||
$theme_names = array_keys( $themes );
|
||||
natcasesort( $theme_names );
|
||||
|
||||
foreach ( $themes as $theme ):
|
||||
?><div class="available-theme"><?php
|
||||
foreach ( $theme_names as $theme_name ) {
|
||||
$class = array( 'available-theme' );
|
||||
?>
|
||||
<div class="<?php echo join( ' ', $class ); ?>">
|
||||
<?php if ( !empty( $theme_name ) ) :
|
||||
$template = $themes[$theme_name]['Template'];
|
||||
$stylesheet = $themes[$theme_name]['Stylesheet'];
|
||||
$title = $themes[$theme_name]['Title'];
|
||||
$version = $themes[$theme_name]['Version'];
|
||||
$description = $themes[$theme_name]['Description'];
|
||||
$author = $themes[$theme_name]['Author'];
|
||||
$screenshot = $themes[$theme_name]['Screenshot'];
|
||||
$stylesheet_dir = $themes[$theme_name]['Stylesheet Dir'];
|
||||
$template_dir = $themes[$theme_name]['Template Dir'];
|
||||
$parent_theme = $themes[$theme_name]['Parent Theme'];
|
||||
$theme_root = $themes[$theme_name]['Theme Root'];
|
||||
$theme_root_uri = $themes[$theme_name]['Theme Root URI'];
|
||||
$preview_link = esc_url( get_option( 'home' ) . '/' );
|
||||
if ( is_ssl() )
|
||||
$preview_link = str_replace( 'http://', 'https://', $preview_link );
|
||||
$preview_link = htmlspecialchars( add_query_arg( array( 'preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'preview_iframe' => true, 'TB_iframe' => 'true' ), $preview_link ) );
|
||||
$preview_text = esc_attr( sprintf( __( 'Preview of “%s”' ), $title ) );
|
||||
$tags = $themes[$theme_name]['Tags'];
|
||||
$thickbox_class = 'thickbox thickbox-preview';
|
||||
$activate_link = wp_nonce_url( "themes.php?action=activate&template=".urlencode( $template )."&stylesheet=".urlencode( $stylesheet ), 'switch-theme_' . $template );
|
||||
$activate_text = esc_attr( sprintf( __( 'Activate “%s”' ), $title ) );
|
||||
$actions = array();
|
||||
$actions[] = '<a href="' . $activate_link . '" class="activatelink" title="' . $activate_text . '">' . __( 'Activate' ) . '</a>';
|
||||
$actions[] = '<a href="' . $preview_link . '" class="thickbox thickbox-preview" title="' . esc_attr( sprintf( __( 'Preview “%s”' ), $theme_name ) ) . '">' . __( 'Preview' ) . '</a>';
|
||||
if ( ! is_multisite() && current_user_can( 'delete_themes' ) )
|
||||
$actions[] = '<a class="submitdelete deletion" href="' . wp_nonce_url( "themes.php?action=delete&template=$stylesheet", 'delete-theme_' . $stylesheet ) . '" onclick="' . "return confirm( '" . esc_js( sprintf( __( "You are about to delete this theme '%s'\n 'Cancel' to stop, 'OK' to delete." ), $theme_name ) ) . "' );" . '">' . __( 'Delete' ) . '</a>';
|
||||
$actions = apply_filters( 'theme_action_links', $actions, $themes[$theme_name] );
|
||||
|
||||
$template = $theme->get_template();
|
||||
$stylesheet = $theme->get_stylesheet();
|
||||
$title = $theme->display('Name');
|
||||
$version = $theme->display('Version');
|
||||
$author = $theme->display('Author');
|
||||
|
||||
$activate_link = wp_nonce_url( "themes.php?action=activate&template=" . urlencode( $template ) . "&stylesheet=" . urlencode( $stylesheet ), 'switch-theme_' . $stylesheet );
|
||||
|
||||
$preview_link = esc_url( add_query_arg(
|
||||
array( 'preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'preview_iframe' => true, 'TB_iframe' => 'true' ),
|
||||
home_url( '/' ) ) );
|
||||
|
||||
$actions = array();
|
||||
$actions['activate'] = '<a href="' . $activate_link . '" class="activatelink" title="'
|
||||
. esc_attr( sprintf( __( 'Activate “%s”' ), $title ) ) . '">' . __( 'Activate' ) . '</a>';
|
||||
|
||||
$actions['preview'] = '<a href="' . $preview_link . '" class="hide-if-customize" title="'
|
||||
. esc_attr( sprintf( __( 'Preview “%s”' ), $title ) ) . '">' . __( 'Preview' ) . '</a>';
|
||||
|
||||
if ( current_user_can( 'edit_theme_options' ) )
|
||||
$actions['preview'] .= '<a href="' . wp_customize_url( $stylesheet ) . '" class="load-customize hide-if-no-customize">'
|
||||
. __( 'Live Preview' ) . '</a>';
|
||||
|
||||
if ( ! is_multisite() && current_user_can( 'delete_themes' ) )
|
||||
$actions['delete'] = '<a class="submitdelete deletion" href="' . wp_nonce_url( "themes.php?action=delete&stylesheet=$stylesheet", 'delete-theme_' . $stylesheet )
|
||||
. '" onclick="' . "return confirm( '" . esc_js( sprintf( __( "You are about to delete this theme '%s'\n 'Cancel' to stop, 'OK' to delete." ), $title ) )
|
||||
. "' );" . '">' . __( 'Delete' ) . '</a>';
|
||||
|
||||
$actions = apply_filters( 'theme_action_links', $actions, $theme );
|
||||
$delete_action = isset( $actions['delete'] ) ? '<div class="delete-theme">' . $actions['delete'] . '</div>' : '';
|
||||
unset( $actions['delete'] );
|
||||
|
||||
?>
|
||||
|
||||
<a href="<?php echo $preview_link; ?>" class="screenshot hide-if-customize">
|
||||
<?php if ( $screenshot = $theme->get_screenshot() ) : ?>
|
||||
<img src="<?php echo esc_url( $screenshot ); ?>" alt="" />
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
<a href="<?php echo wp_customize_url( $stylesheet ); ?>" class="screenshot load-customize hide-if-no-customize">
|
||||
<?php if ( $screenshot = $theme->get_screenshot() ) : ?>
|
||||
<img src="<?php echo esc_url( $screenshot ); ?>" alt="" />
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
|
||||
<h3><?php echo $title; ?></h3>
|
||||
<div class="theme-author"><?php printf( __( 'By %s' ), $author ); ?></div>
|
||||
<div class="action-links">
|
||||
<ul>
|
||||
<?php foreach ( $actions as $action ): ?>
|
||||
<li><?php echo $action; ?></li>
|
||||
<?php endforeach; ?>
|
||||
<li class="hide-if-no-js"><a href="#" class="theme-detail" tabindex='4'><?php _e('Details') ?></a></li>
|
||||
</ul>
|
||||
<?php echo $delete_action; ?>
|
||||
|
||||
<?php theme_update_available( $theme ); ?>
|
||||
</div>
|
||||
|
||||
<div class="themedetaildiv hide-if-js">
|
||||
<p><strong><?php _e('Version: '); ?></strong><?php echo $version; ?></p>
|
||||
<p><?php echo $theme->display('Description'); ?></p>
|
||||
<?php if ( current_user_can( 'edit_themes' ) && $theme->parent() ) :
|
||||
/* translators: 1: theme title, 2: template dir, 3: stylesheet_dir, 4: theme title, 5: parent_theme */ ?>
|
||||
<p><?php printf( __( 'The template files are located in <code>%2$s</code>. The stylesheet files are located in <code>%3$s</code>. <strong>%4$s</strong> uses templates from <strong>%5$s</strong>. Changes made to the templates will affect both themes.' ),
|
||||
$title, str_replace( WP_CONTENT_DIR, '', $theme->get_template_directory() ), str_replace( WP_CONTENT_DIR, '', $theme->get_stylesheet_directory() ), $title, $theme->parent()->display('Name') ); ?></p>
|
||||
<?php else :
|
||||
/* translators: 1: theme title, 2: template dir, 3: stylesheet_dir */ ?>
|
||||
<p><?php printf( __( 'All of this theme’s files are located in <code>%2$s</code>.' ),
|
||||
$title, str_replace( WP_CONTENT_DIR, '', $theme->get_template_directory() ), str_replace( WP_CONTENT_DIR, '', $theme->get_stylesheet_directory() ) ); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
endforeach;
|
||||
$actions = implode ( ' | ', $actions );
|
||||
?>
|
||||
<a href="<?php echo $preview_link; ?>" class="<?php echo $thickbox_class; ?> screenshot">
|
||||
<?php if ( $screenshot ) : ?>
|
||||
<img src="<?php echo $theme_root_uri . '/' . $stylesheet . '/' . $screenshot; ?>" alt="" />
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
<h3><?php
|
||||
/* translators: 1: theme title, 2: theme version, 3: theme author */
|
||||
printf( __( '%1$s %2$s by %3$s' ), $title, $version, $author ) ; ?></h3>
|
||||
<p class="description"><?php echo $description; ?></p>
|
||||
<span class='action-links'><?php echo $actions ?></span>
|
||||
<?php if ( current_user_can( 'edit_themes' ) && $parent_theme ) {
|
||||
/* translators: 1: theme title, 2: template dir, 3: stylesheet_dir, 4: theme title, 5: parent_theme */ ?>
|
||||
<p><?php printf( __( 'The template files are located in <code>%2$s</code>. The stylesheet files are located in <code>%3$s</code>. <strong>%4$s</strong> uses templates from <strong>%5$s</strong>. Changes made to the templates will affect both themes.' ), $title, str_replace( WP_CONTENT_DIR, '', $template_dir ), str_replace( WP_CONTENT_DIR, '', $stylesheet_dir ), $title, $parent_theme ); ?></p>
|
||||
<?php } else { ?>
|
||||
<p><?php printf( __( 'All of this theme’s files are located in <code>%2$s</code>.' ), $title, str_replace( WP_CONTENT_DIR, '', $template_dir ), str_replace( WP_CONTENT_DIR, '', $stylesheet_dir ) ); ?></p>
|
||||
<?php } ?>
|
||||
<?php if ( $tags ) : ?>
|
||||
<p><?php _e( 'Tags:' ); ?> <?php echo join( ', ', $tags ); ?></p>
|
||||
<?php endif; ?>
|
||||
<?php theme_update_available( $themes[$theme_name] ); ?>
|
||||
<?php endif; // end if not empty theme_name ?>
|
||||
</div>
|
||||
<?php } // end foreach $theme_names
|
||||
}
|
||||
|
||||
function search_theme( $theme ) {
|
||||
// Search the features
|
||||
foreach ( $this->features as $word ) {
|
||||
if ( ! in_array( $word, $theme->get('Tags') ) )
|
||||
return false;
|
||||
}
|
||||
$matched = 0;
|
||||
|
||||
// Match all phrases
|
||||
foreach ( $this->search_terms as $word ) {
|
||||
if ( in_array( $word, $theme->get('Tags') ) )
|
||||
continue;
|
||||
if ( count( $this->search ) > 0 ) {
|
||||
foreach ( $this->search as $word ) {
|
||||
$matched = 0;
|
||||
|
||||
foreach ( array( 'Name', 'Description', 'Author', 'AuthorURI' ) as $header ) {
|
||||
// Don't mark up; Do translate.
|
||||
if ( false !== stripos( $theme->display( $header, false, true ), $word ) )
|
||||
continue 2;
|
||||
// In a tag?
|
||||
if ( in_array( $word, array_map( 'sanitize_title_with_dashes', $theme['Tags'] ) ) )
|
||||
$matched = 1;
|
||||
|
||||
// In one of the fields?
|
||||
foreach ( array( 'Name', 'Title', 'Description', 'Author', 'Template', 'Stylesheet' ) AS $field ) {
|
||||
if ( stripos( $theme[$field], $word ) !== false )
|
||||
$matched++;
|
||||
}
|
||||
|
||||
if ( $matched == 0 )
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( false !== stripos( $theme->get_stylesheet(), $word ) )
|
||||
continue;
|
||||
|
||||
if ( false !== stripos( $theme->get_template(), $word ) )
|
||||
continue;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Now search the features
|
||||
if ( count( $this->features ) > 0 ) {
|
||||
foreach ( $this->features as $word ) {
|
||||
// In a tag?
|
||||
if ( !in_array( $word, array_map( 'sanitize_title_with_dashes', $theme['Tags'] ) ) )
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Only get here if each word exists in the tags or one of the fields
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send required variables to JavaScript land
|
||||
*
|
||||
* @since 3.4
|
||||
* @access private
|
||||
*
|
||||
* @uses $this->features Array of all feature search terms.
|
||||
* @uses get_pagenum()
|
||||
* @uses _pagination_args['total_pages']
|
||||
*/
|
||||
function _js_vars( $extra_args = array() ) {
|
||||
$search_string = isset( $_REQUEST['s'] ) ? esc_attr( stripslashes( $_REQUEST['s'] ) ) : '';
|
||||
|
||||
$args = array(
|
||||
'search' => $search_string,
|
||||
'features' => $this->features,
|
||||
'paged' => $this->get_pagenum(),
|
||||
'total_pages' => ! empty( $this->_pagination_args['total_pages'] ) ? $this->_pagination_args['total_pages'] : 1,
|
||||
);
|
||||
|
||||
if ( is_array( $extra_args ) )
|
||||
$args = array_merge( $args, $extra_args );
|
||||
|
||||
printf( "<script type='text/javascript'>var theme_list_args = %s;</script>\n", json_encode( $args ) );
|
||||
parent::_js_vars();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -374,6 +374,7 @@ class Plugin_Upgrader extends WP_Upgrader {
|
||||
$this->strings['no_package'] = __('Update package not available.');
|
||||
$this->strings['downloading_package'] = __('Downloading update from <span class="code">%s</span>…');
|
||||
$this->strings['unpack_package'] = __('Unpacking the update…');
|
||||
$this->strings['deactivate_plugin'] = __('Deactivating the plugin…');
|
||||
$this->strings['remove_old'] = __('Removing the old version of the plugin…');
|
||||
$this->strings['remove_old_failed'] = __('Could not remove the old plugin.');
|
||||
$this->strings['process_failed'] = __('Plugin update failed.');
|
||||
@@ -411,7 +412,6 @@ class Plugin_Upgrader extends WP_Upgrader {
|
||||
|
||||
// Force refresh of plugin update information
|
||||
delete_site_transient('update_plugins');
|
||||
wp_cache_delete( 'plugins', 'plugins' );
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -456,7 +456,6 @@ class Plugin_Upgrader extends WP_Upgrader {
|
||||
|
||||
// Force refresh of plugin update information
|
||||
delete_site_transient('update_plugins');
|
||||
wp_cache_delete( 'plugins', 'plugins' );
|
||||
}
|
||||
|
||||
function bulk_upgrade($plugins) {
|
||||
@@ -538,7 +537,6 @@ class Plugin_Upgrader extends WP_Upgrader {
|
||||
|
||||
// Force refresh of plugin update information
|
||||
delete_site_transient('update_plugins');
|
||||
wp_cache_delete( 'plugins', 'plugins' );
|
||||
|
||||
return $results;
|
||||
}
|
||||
@@ -596,6 +594,7 @@ class Plugin_Upgrader extends WP_Upgrader {
|
||||
return new WP_Error('bad_request', $this->strings['bad_request']);
|
||||
|
||||
if ( is_plugin_active($plugin) ) {
|
||||
$this->skin->feedback('deactivate_plugin');
|
||||
//Deactivate the plugin silently, Prevent deactivation hooks from running.
|
||||
deactivate_plugins($plugin, true);
|
||||
}
|
||||
@@ -663,80 +662,6 @@ class Theme_Upgrader extends WP_Upgrader {
|
||||
$this->strings['installing_package'] = __('Installing the theme…');
|
||||
$this->strings['process_failed'] = __('Theme install failed.');
|
||||
$this->strings['process_success'] = __('Theme installed successfully.');
|
||||
/* translators: 1: theme name, 2: version */
|
||||
$this->strings['process_success_specific'] = __('Successfully installed the theme <strong>%1$s %2$s</strong>.');
|
||||
$this->strings['parent_theme_search'] = __('This theme requires a parent theme. Checking if it is installed…');
|
||||
/* translators: 1: theme name, 2: version */
|
||||
$this->strings['parent_theme_prepare_install'] = __('Preparing to install <strong>%1$s %2$s</strong>…');
|
||||
/* translators: 1: theme name, 2: version */
|
||||
$this->strings['parent_theme_currently_installed'] = __('The parent theme, <strong>%1$s %2$s</strong>, is currently installed.');
|
||||
/* translators: 1: theme name, 2: version */
|
||||
$this->strings['parent_theme_install_success'] = __('Successfully installed the parent theme, <strong>%1$s %2$s</strong>.');
|
||||
$this->strings['parent_theme_not_found'] = __('<strong>The parent theme could not be found.</strong> You will need to install the parent theme, <strong>%s</strong>, before you can use this child theme.');
|
||||
}
|
||||
|
||||
function check_parent_theme_filter($install_result, $hook_extra, $child_result) {
|
||||
// Check to see if we need to install a parent theme
|
||||
$theme_info = $this->theme_info();
|
||||
|
||||
if ( ! $theme_info->parent() )
|
||||
return $install_result;
|
||||
|
||||
$this->skin->feedback( 'parent_theme_search' );
|
||||
|
||||
if ( ! $theme_info->parent()->errors() ) {
|
||||
$this->skin->feedback( 'parent_theme_currently_installed', $theme_info->parent()->display('Name'), $theme_info->parent()->display('Version') );
|
||||
// We already have the theme, fall through.
|
||||
return $install_result;
|
||||
}
|
||||
|
||||
// We don't have the parent theme, lets install it
|
||||
$api = themes_api('theme_information', array('slug' => $theme_info->get('Template'), 'fields' => array('sections' => false, 'tags' => false) ) ); //Save on a bit of bandwidth.
|
||||
|
||||
if ( ! $api || is_wp_error($api) ) {
|
||||
$this->skin->feedback( 'parent_theme_not_found', $theme_info->get('Template') );
|
||||
// Don't show activate or preview actions after install
|
||||
add_filter('install_theme_complete_actions', array(&$this, 'hide_activate_preview_actions') );
|
||||
return $install_result;
|
||||
}
|
||||
|
||||
// Backup required data we're going to override:
|
||||
$child_api = $this->skin->api;
|
||||
$child_success_message = $this->strings['process_success'];
|
||||
|
||||
// Override them
|
||||
$this->skin->api = $api;
|
||||
$this->strings['process_success_specific'] = $this->strings['parent_theme_install_success'];//, $api->name, $api->version);
|
||||
|
||||
$this->skin->feedback('parent_theme_prepare_install', $api->name, $api->version);
|
||||
|
||||
add_filter('install_theme_complete_actions', '__return_false', 999); // Don't show any actions after installing the theme.
|
||||
|
||||
// Install the parent theme
|
||||
$parent_result = $this->run( array(
|
||||
'package' => $api->download_link,
|
||||
'destination' => WP_CONTENT_DIR . '/themes',
|
||||
'clear_destination' => false, //Do not overwrite files.
|
||||
'clear_working' => true
|
||||
) );
|
||||
|
||||
if ( is_wp_error($parent_result) )
|
||||
add_filter('install_theme_complete_actions', array(&$this, 'hide_activate_preview_actions') );
|
||||
|
||||
// Start cleaning up after the parents installation
|
||||
remove_filter('install_theme_complete_actions', '__return_false', 999);
|
||||
|
||||
// Reset child's result and data
|
||||
$this->result = $child_result;
|
||||
$this->skin->api = $child_api;
|
||||
$this->strings['process_success'] = $child_success_message;
|
||||
|
||||
return $install_result;
|
||||
}
|
||||
|
||||
function hide_activate_preview_actions($actions) {
|
||||
unset($actions['activate'], $actions['preview']);
|
||||
return $actions;
|
||||
}
|
||||
|
||||
function install($package) {
|
||||
@@ -745,7 +670,6 @@ class Theme_Upgrader extends WP_Upgrader {
|
||||
$this->install_strings();
|
||||
|
||||
add_filter('upgrader_source_selection', array(&$this, 'check_package') );
|
||||
add_filter('upgrader_post_install', array(&$this, 'check_parent_theme_filter'), 10, 3);
|
||||
|
||||
$options = array(
|
||||
'package' => $package,
|
||||
@@ -757,16 +681,12 @@ class Theme_Upgrader extends WP_Upgrader {
|
||||
$this->run($options);
|
||||
|
||||
remove_filter('upgrader_source_selection', array(&$this, 'check_package') );
|
||||
remove_filter('upgrader_post_install', array(&$this, 'check_parent_theme_filter'), 10, 3);
|
||||
|
||||
if ( ! $this->result || is_wp_error($this->result) )
|
||||
return $this->result;
|
||||
|
||||
// Force refresh of theme update information
|
||||
delete_site_transient('update_themes');
|
||||
search_theme_directories( true );
|
||||
foreach ( wp_get_themes() as $theme )
|
||||
$theme->cache_delete();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -813,9 +733,6 @@ class Theme_Upgrader extends WP_Upgrader {
|
||||
|
||||
// Force refresh of theme update information
|
||||
delete_site_transient('update_themes');
|
||||
search_theme_directories( true );
|
||||
foreach ( wp_get_themes() as $theme )
|
||||
$theme->cache_delete();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -903,9 +820,6 @@ class Theme_Upgrader extends WP_Upgrader {
|
||||
|
||||
// Force refresh of theme update information
|
||||
delete_site_transient('update_themes');
|
||||
search_theme_directories( true );
|
||||
foreach ( wp_get_themes() as $theme )
|
||||
$theme->cache_delete();
|
||||
|
||||
return $results;
|
||||
}
|
||||
@@ -921,17 +835,14 @@ class Theme_Upgrader extends WP_Upgrader {
|
||||
if ( ! is_dir($working_directory) ) // Sanity check, if the above fails, lets not prevent installation.
|
||||
return $source;
|
||||
|
||||
// A proper archive should have a style.css file in the single subdirectory
|
||||
if ( ! file_exists( $working_directory . 'style.css' ) )
|
||||
if ( ! file_exists( $working_directory . 'style.css' ) ) // A proper archive should have a style.css file in the single subdirectory
|
||||
return new WP_Error( 'incompatible_archive', $this->strings['incompatible_archive'], __('The theme is missing the <code>style.css</code> stylesheet.') );
|
||||
|
||||
$info = get_file_data( $working_directory . 'style.css', array( 'Name' => 'Theme Name', 'Template' => 'Template' ) );
|
||||
|
||||
if ( empty( $info['Name'] ) )
|
||||
$info = get_theme_data( $working_directory . 'style.css' );
|
||||
if ( empty($info['Name']) )
|
||||
return new WP_Error( 'incompatible_archive', $this->strings['incompatible_archive'], __("The <code>style.css</code> stylesheet doesn't contain a valid theme header.") );
|
||||
|
||||
// If it's not a child theme, it must have at least an index.php to be legit.
|
||||
if ( empty( $info['Template'] ) && ! file_exists( $working_directory . 'index.php' ) )
|
||||
if ( empty($info['Template']) && ! file_exists( $working_directory . 'index.php' ) ) // If no template is set, it must have at least an index.php to be legit.
|
||||
return new WP_Error( 'incompatible_archive', $this->strings['incompatible_archive'], __('The theme is missing the <code>index.php</code> file.') );
|
||||
|
||||
return $source;
|
||||
@@ -959,15 +870,15 @@ class Theme_Upgrader extends WP_Upgrader {
|
||||
|
||||
$theme = isset($theme['theme']) ? $theme['theme'] : '';
|
||||
|
||||
if ( $theme != get_stylesheet() ) // If not current
|
||||
if ( $theme != get_stylesheet() ) //If not current
|
||||
return $return;
|
||||
|
||||
// Ensure stylesheet name hasnt changed after the upgrade:
|
||||
//Ensure stylesheet name hasnt changed after the upgrade:
|
||||
// @TODO: Note, This doesn't handle the Template changing, or the Template name changing.
|
||||
if ( $theme == get_stylesheet() && $theme != $this->result['destination_name'] ) {
|
||||
$theme_info = $this->theme_info();
|
||||
$stylesheet = $this->result['destination_name'];
|
||||
$template = $theme_info->get_template();
|
||||
$template = !empty($theme_info['Template']) ? $theme_info['Template'] : $stylesheet;
|
||||
switch_theme($template, $stylesheet, true);
|
||||
}
|
||||
|
||||
@@ -1000,7 +911,7 @@ class Theme_Upgrader extends WP_Upgrader {
|
||||
else
|
||||
return false;
|
||||
}
|
||||
return wp_get_theme( $theme, WP_CONTENT_DIR . '/themes/' );
|
||||
return get_theme_data(WP_CONTENT_DIR . '/themes/' . $theme . '/style.css');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1022,7 +933,6 @@ class Core_Upgrader extends WP_Upgrader {
|
||||
$this->strings['downloading_package'] = __('Downloading update from <span class="code">%s</span>…');
|
||||
$this->strings['unpack_package'] = __('Unpacking the update…');
|
||||
$this->strings['copy_failed'] = __('Could not copy files.');
|
||||
$this->strings['copy_failed_space'] = __('Could not copy files. You may have run out of disk space.' );
|
||||
}
|
||||
|
||||
function upgrade($current) {
|
||||
@@ -1075,9 +985,6 @@ class Core_Upgrader extends WP_Upgrader {
|
||||
|
||||
require(ABSPATH . 'wp-admin/includes/update-core.php');
|
||||
|
||||
if ( ! function_exists( 'update_core' ) )
|
||||
return new WP_Error( 'copy_failed_space', $this->strings['copy_failed_space'] );
|
||||
|
||||
return update_core($working_dir, $wp_dir);
|
||||
}
|
||||
|
||||
@@ -1199,6 +1106,7 @@ class Plugin_Upgrader_Skin extends WP_Upgrader_Skin {
|
||||
function after() {
|
||||
$this->plugin = $this->upgrader->plugin_info();
|
||||
if ( !empty($this->plugin) && !is_wp_error($this->result) && $this->plugin_active ){
|
||||
show_message(__('Reactivating the plugin…'));
|
||||
echo '<iframe style="border:0;overflow:hidden" width="100%" height="170px" src="' . wp_nonce_url('update.php?action=activate-plugin&networkwide=' . $this->plugin_network_active . '&plugin=' . $this->plugin, 'activate-plugin_' . $this->plugin) .'"></iframe>';
|
||||
}
|
||||
|
||||
@@ -1382,13 +1290,12 @@ class Bulk_Theme_Upgrader_Skin extends Bulk_Upgrader_Skin {
|
||||
}
|
||||
|
||||
function before() {
|
||||
parent::before( $this->theme_info->display('Name') );
|
||||
parent::before($this->theme_info['Name']);
|
||||
}
|
||||
|
||||
function after() {
|
||||
parent::after( $this->theme_info->display('Name') );
|
||||
parent::after($this->theme_info['Name']);
|
||||
}
|
||||
|
||||
function bulk_footer() {
|
||||
parent::bulk_footer();
|
||||
$update_actions = array(
|
||||
@@ -1396,7 +1303,7 @@ class Bulk_Theme_Upgrader_Skin extends Bulk_Upgrader_Skin {
|
||||
'updates_page' => '<a href="' . self_admin_url('update-core.php') . '" title="' . esc_attr__('Go to WordPress Updates page') . '" target="_parent">' . __('Return to WordPress Updates') . '</a>'
|
||||
);
|
||||
|
||||
$update_actions = apply_filters('update_bulk_theme_complete_actions', $update_actions, $this->theme_info );
|
||||
$update_actions = apply_filters('update_bulk_theme_complete_actions', $update_actions, $this->theme_info);
|
||||
if ( ! empty($update_actions) )
|
||||
$this->feedback(implode(' | ', (array)$update_actions));
|
||||
}
|
||||
@@ -1455,6 +1362,7 @@ class Plugin_Installer_Skin extends WP_Upgrader_Skin {
|
||||
else
|
||||
$install_actions['plugins_page'] = '<a href="' . self_admin_url('plugins.php') . '" title="' . esc_attr__('Return to Plugins page') . '" target="_parent">' . __('Return to Plugins page') . '</a>';
|
||||
|
||||
|
||||
if ( ! $this->result || is_wp_error($this->result) ) {
|
||||
unset( $install_actions['activate_plugin'] );
|
||||
unset( $install_actions['network_activate'] );
|
||||
@@ -1489,8 +1397,10 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin {
|
||||
}
|
||||
|
||||
function before() {
|
||||
if ( !empty($this->api) )
|
||||
$this->upgrader->strings['process_success'] = sprintf( $this->upgrader->strings['process_success_specific'], $this->api->name, $this->api->version);
|
||||
if ( !empty($this->api) ) {
|
||||
/* translators: 1: theme name, 2: version */
|
||||
$this->upgrader->strings['process_success'] = sprintf( __('Successfully installed the theme <strong>%1$s %2$s</strong>.'), $this->api->name, $this->api->version);
|
||||
}
|
||||
}
|
||||
|
||||
function after() {
|
||||
@@ -1498,33 +1408,22 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin {
|
||||
return;
|
||||
|
||||
$theme_info = $this->upgrader->theme_info();
|
||||
if ( empty( $theme_info ) )
|
||||
if ( empty($theme_info) )
|
||||
return;
|
||||
|
||||
$name = $theme_info->display('Name');
|
||||
$name = $theme_info['Name'];
|
||||
$stylesheet = $this->upgrader->result['destination_name'];
|
||||
$template = $theme_info->get_template();
|
||||
$template = !empty($theme_info['Template']) ? $theme_info['Template'] : $stylesheet;
|
||||
|
||||
$preview_link = add_query_arg( array(
|
||||
'preview' => 1,
|
||||
'template' => $template,
|
||||
'stylesheet' => $stylesheet,
|
||||
), trailingslashit( get_home_url() ) );
|
||||
$preview_link = htmlspecialchars( add_query_arg( array('preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'preview_iframe' => 1, 'TB_iframe' => 'true' ), trailingslashit(esc_url(get_option('home'))) ) );
|
||||
$activate_link = wp_nonce_url("themes.php?action=activate&template=" . urlencode($template) . "&stylesheet=" . urlencode($stylesheet), 'switch-theme_' . $template);
|
||||
|
||||
$activate_link = add_query_arg( array(
|
||||
'action' => 'activate',
|
||||
'template' => $template,
|
||||
'stylesheet' => $stylesheet,
|
||||
), admin_url('themes.php') );
|
||||
$activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet );
|
||||
|
||||
$install_actions = array();
|
||||
$install_actions['preview'] = '<a href="' . esc_url( $preview_link ) . '" class="hide-if-customize" title="' . esc_attr( sprintf( __('Preview “%s”'), $name ) ) . '">' . __('Preview') . '</a>';
|
||||
$install_actions['preview'] .= '<a href="' . wp_customize_url( $stylesheet ) . '" class="hide-if-no-customize load-customize" title="' . esc_attr( sprintf( __('Preview “%s”'), $name ) ) . '">' . __('Live Preview') . '</a>';
|
||||
$install_actions['activate'] = '<a href="' . esc_url( $activate_link ) . '" class="activatelink" title="' . esc_attr( sprintf( __('Activate “%s”'), $name ) ) . '">' . __('Activate') . '</a>';
|
||||
$install_actions = array(
|
||||
'preview' => '<a href="' . $preview_link . '" class="thickbox thickbox-preview" title="' . esc_attr(sprintf(__('Preview “%s”'), $name)) . '">' . __('Preview') . '</a>',
|
||||
'activate' => '<a href="' . $activate_link . '" class="activatelink" title="' . esc_attr( sprintf( __('Activate “%s”'), $name ) ) . '">' . __('Activate') . '</a>'
|
||||
);
|
||||
|
||||
if ( is_network_admin() && current_user_can( 'manage_network_themes' ) )
|
||||
$install_actions['network_enable'] = '<a href="' . esc_url( wp_nonce_url( 'themes.php?action=enable&theme=' . $stylesheet, 'enable-theme_' . $stylesheet ) ) . '" title="' . esc_attr__( 'Enable this theme for all sites in this network' ) . '" target="_parent">' . __( 'Network Enable' ) . '</a>';
|
||||
$install_actions['network_enable'] = '<a href="' . esc_url( wp_nonce_url( 'themes.php?action=enable&theme=' . $template, 'enable-theme_' . $template ) ) . '" title="' . esc_attr__( 'Enable this theme for all sites in this network' ) . '" target="_parent">' . __( 'Network Enable' ) . '</a>';
|
||||
|
||||
if ( $this->type == 'web' )
|
||||
$install_actions['themes_page'] = '<a href="' . self_admin_url('theme-install.php') . '" title="' . esc_attr__('Return to Theme Installer') . '" target="_parent">' . __('Return to Theme Installer') . '</a>';
|
||||
@@ -1564,34 +1463,22 @@ class Theme_Upgrader_Skin extends WP_Upgrader_Skin {
|
||||
function after() {
|
||||
|
||||
$update_actions = array();
|
||||
if ( ! empty( $this->upgrader->result['destination_name'] ) && $theme_info = $this->upgrader->theme_info() ) {
|
||||
$name = $theme_info->display('Name');
|
||||
if ( !empty($this->upgrader->result['destination_name']) &&
|
||||
($theme_info = $this->upgrader->theme_info()) &&
|
||||
!empty($theme_info) ) {
|
||||
|
||||
$name = $theme_info['Name'];
|
||||
$stylesheet = $this->upgrader->result['destination_name'];
|
||||
$template = $theme_info->get_template();
|
||||
$template = !empty($theme_info['Template']) ? $theme_info['Template'] : $stylesheet;
|
||||
|
||||
$preview_link = add_query_arg( array(
|
||||
'preview' => 1,
|
||||
'template' => $template,
|
||||
'stylesheet' => $stylesheet,
|
||||
), trailingslashit( get_home_url() ) );
|
||||
$preview_link = htmlspecialchars( add_query_arg( array('preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'TB_iframe' => 'true' ), trailingslashit(esc_url(get_option('home'))) ) );
|
||||
$activate_link = wp_nonce_url("themes.php?action=activate&template=" . urlencode($template) . "&stylesheet=" . urlencode($stylesheet), 'switch-theme_' . $template);
|
||||
|
||||
$activate_link = add_query_arg( array(
|
||||
'action' => 'activate',
|
||||
'template' => $template,
|
||||
'stylesheet' => $stylesheet,
|
||||
), admin_url('themes.php') );
|
||||
$activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet );
|
||||
$update_actions['preview'] = '<a href="' . $preview_link . '" class="thickbox thickbox-preview" title="' . esc_attr(sprintf(__('Preview “%s”'), $name)) . '">' . __('Preview') . '</a>';
|
||||
$update_actions['activate'] = '<a href="' . $activate_link . '" class="activatelink" title="' . esc_attr( sprintf( __('Activate “%s”'), $name ) ) . '">' . __('Activate') . '</a>';
|
||||
|
||||
if ( get_stylesheet() == $stylesheet ) {
|
||||
$update_actions['preview'] = '<a href="' . wp_customize_url( $stylesheet ) . '" class="hide-if-no-customize load-customize" title="' . esc_attr( sprintf( __('Customize “%s”'), $name ) ) . '">' . __('Customize') . '</a>';
|
||||
} else {
|
||||
$update_actions['preview'] = '<a href="' . esc_url( $preview_link ) . '" class="hide-if-customize" title="' . esc_attr( sprintf( __('Preview “%s”'), $name ) ) . '">' . __('Preview') . '</a>';
|
||||
$update_actions['preview'] .= '<a href="' . wp_customize_url( $stylesheet ) . '" class="hide-if-no-customize load-customize" title="' . esc_attr( sprintf( __('Preview “%s”'), $name ) ) . '">' . __('Live Preview') . '</a>';
|
||||
$update_actions['activate'] = '<a href="' . esc_url( $activate_link ) . '" class="activatelink" title="' . esc_attr( sprintf( __('Activate “%s”'), $name ) ) . '">' . __('Activate') . '</a>';
|
||||
}
|
||||
|
||||
if ( ! $this->result || is_wp_error( $this->result ) || is_network_admin() )
|
||||
unset( $update_actions['preview'], $update_actions['activate'] );
|
||||
if ( ( ! $this->result || is_wp_error($this->result) ) || $stylesheet == get_stylesheet() )
|
||||
unset($update_actions['preview'], $update_actions['activate']);
|
||||
}
|
||||
|
||||
$update_actions['themes_page'] = '<a href="' . self_admin_url('themes.php') . '" title="' . esc_attr__('Return to Themes page') . '" target="_parent">' . __('Return to Themes page') . '</a>';
|
||||
@@ -1676,4 +1563,4 @@ class File_Upload_Upgrader {
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,9 +209,9 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
* @since 2.1.0
|
||||
*
|
||||
* @param object $user_object
|
||||
* @param string $style Optional. Attributes added to the TR element. Must be sanitized.
|
||||
* @param string $style Optional. Attributes added to the TR element. Must be sanitized.
|
||||
* @param string $role Key for the $wp_roles array.
|
||||
* @param int $numposts Optional. Post count to display for this user. Defaults to zero, as in, a new user has made zero posts.
|
||||
* @param int $numposts Optional. Post count to display for this user. Defaults to zero, as in, a new user has made zero posts.
|
||||
* @return string
|
||||
*/
|
||||
function single_row( $user_object, $style = '', $role = '', $numposts = 0 ) {
|
||||
@@ -316,3 +316,5 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||
return $r;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||