Commit Graph

82 Commits

Author SHA1 Message Date
Andrew Nacin 7a9f91869e Fix usage of undeclared variables.
* the_weekday_date() needs the global $currentday
 * ms_site_check() needs the global $current_site
 * media list table does not need to check for $total_orphans
 * upgrader has no $feedback variable, appears to be copypasta from other upgrade APIs
 * install_themes_feature_list() has no $features variable, return array() instead of a new return type of WP_Error

see #24210.



git-svn-id: https://develop.svn.wordpress.org/trunk@24189 602fd350-edb4-49c9-b593-d223f7449a82
2013-05-07 16:35:03 +00:00
Sergey Biryukov ece505b122 Remove redundant echo calls from list tables. Don't mix string concatenation with direct output. see #24210.
git-svn-id: https://develop.svn.wordpress.org/trunk@24123 602fd350-edb4-49c9-b593-d223f7449a82
2013-04-29 01:10:50 +00:00
Ryan Boren 436b32ef62 Use wp_unslash() instead of stripslashes() and stripslashes_deep(). Use wp_slash() instead of add_magic_quotes().
git-svn-id: https://develop.svn.wordpress.org/trunk@23567 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-01 17:14:09 +00:00
Ryan Boren c363aea627 Revert 23416, 23419, 23445 except for wp_reset_vars() changes. We are going a different direction with the slashing cleanup, so resetting to a clean slate. see #21767
git-svn-id: https://develop.svn.wordpress.org/trunk@23554 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-01 16:28:40 +00:00
Ryan Boren a6c8efadb9 Change all core API to expect unslashed rather than slashed arguments.
The exceptions to this are update_post_meta() and add_post_meta() which are often used by plugins in POST handlers and will continue accepting slashed data for now.

Introduce wp_upate_post_meta() and wp_add_post_meta() as unslashed alternatives to update_post_meta() and add_post_meta(). These functions could become methods in WP_Post so don't use them too heavily yet.

Remove all escape() calls from wp_xmlrpc_server. Now that core expects unslashed data this is no longer needed.

Remove addslashes(), addslashes_gpc(), add_magic_quotes() calls on data being prepared for handoff to core functions that until now expected slashed data. Adding slashes in no longer necessary.

Introduce wp_unslash() and use to it remove slashes from GPCS data before using it in core API. Almost every instance of stripslashes() in core should now be wp_unslash(). In the future (a release or three) when GPCS is no longer slashed, wp_unslash() will stop stripping slashes and simply return what is passed. At this point wp_unslash() calls can be removed from core.

Introduce wp_slash() for slashing GPCS data. This will also turn into a noop once GPCS is no longer slashed. wp_slash() should almost never be used. It is mainly of use in unit tests.

Plugins should use wp_unslash() on data being passed to core API.

Plugins should no longer slash data being passed to core. So when you get_post() and then wp_insert_post() the post data from get_post() no longer needs addslashes(). Most plugins were not bothering with this. They will magically start doing the right thing. Unfortunately, those few souls who did it properly will now have to avoid calling addslashes() for 3.6 and newer.

Use wp_kses_post() and wp_kses_data(), which expect unslashed data, instead of wp_filter_post_kses() and wp_filter_kses(), which expect slashed data. Filters are no longer passed slashed data.

Remove many no longer necessary calls to $wpdb->escape() and esc_sql().

In wp_get_referer() and wp_get_original_referer(), return unslashed data.

Remove old stripslashes() calls from WP_Widget::update() handlers. These haven't been necessary since WP_Widget.

Switch several queries over to prepare().

Expect something to break.

Props alexkingorg
see #21767


git-svn-id: https://develop.svn.wordpress.org/trunk@23416 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-14 22:51:06 +00:00
Peter Westwood d927271553 Tighten our braces. Fixes #23118 props evansolomon.
git-svn-id: https://develop.svn.wordpress.org/trunk@23265 602fd350-edb4-49c9-b593-d223f7449a82
2013-01-04 10:13:51 +00:00
Andrew Nacin 05861ebb8c Use 3 * HOUR_IN_SECONDS rather than 10800.
git-svn-id: https://develop.svn.wordpress.org/trunk@23175 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-12 07:30:28 +00:00
Andrew Nacin 85efa182f7 Forms with the class .wp-upload-form will now have their submit button disabled until a file is selected. props kovshenin, helenyhou, lessbloat, SergeyBiryukov, tommcfarlin. fixes #20855.
git-svn-id: https://develop.svn.wordpress.org/trunk@22459 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 23:54:03 +00:00
Ryan Boren dd15327790 More screen reader text for list table checkboxes and theme install search. Props MikeLittle, SergeyBiryukov. see #21325
git-svn-id: https://develop.svn.wordpress.org/trunk@21323 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-25 16:18:14 +00:00
Ryan Boren e08cdca958 Add screen reader text for search fields in theme-install.php. Props MikeLittle. see #21325
git-svn-id: https://develop.svn.wordpress.org/trunk@21318 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-24 18:31:03 +00:00
Mark Jaquith 4374f93904 Autofocus the search box on the Theme and Plugin installation pages. Faster flow for people who know what they are looking for. props SergeyBiryukov. fixes #21080. see #21027.
git-svn-id: https://develop.svn.wordpress.org/trunk@21143 602fd350-edb4-49c9-b593-d223f7449a82
2012-06-26 20:55:46 +00:00
Daryl Koopersmith b4277fcd40 Theme Installer: Prevent unnecessary admin code from printing and print markup in correct order. Remove dead code. props ocean90, fixes #20695.
git-svn-id: https://develop.svn.wordpress.org/trunk@20812 602fd350-edb4-49c9-b593-d223f7449a82
2012-05-16 23:38:53 +00:00
Andrew Nacin f553c11f28 Default to keyword searches for the plugin and theme installers in case no search type is posted back. fixes #19619.
props georgestephanis, SergeyBiryukov for initial patches.



git-svn-id: https://develop.svn.wordpress.org/trunk@20639 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-30 00:44:47 +00:00
Andrew Nacin cfe73da905 Reduce clutter and repetive functionality from the initial landing page for installing plugins and themes by removing the tag/author/term dropdown.
The tag cloud (plugins) and feature filter (themes) is sufficient for tag functionality. All three "search by" fields are already weighted for a standard keyword search through the WP.org API.

fixes #19619 for 3.4.



git-svn-id: https://develop.svn.wordpress.org/trunk@20592 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-25 19:37:19 +00:00
Andrew Nacin 467905e308 Use 'Keyword' instead of 'Term' in the search type selector in the plugin and theme installers. see #19619.
git-svn-id: https://develop.svn.wordpress.org/trunk@20333 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-30 21:17:22 +00:00
Andrew Ozz fcbd8f7f57 Set proper HTML5 input types in the admin, props georgestephanis, fixes #17863
git-svn-id: https://develop.svn.wordpress.org/trunk@20168 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-10 01:23:48 +00:00
Andrew Nacin b1ba2dd995 Deprecate display_theme(). see #19910.
git-svn-id: https://develop.svn.wordpress.org/trunk@20141 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-07 18:29:36 +00:00
Daryl Koopersmith 7464fa9565 Theme Customizer: Make theme installer no-js compatible. Fix JS click handler that caught clicks on the 'Activate' link. Relocate display_theme() to WP_Theme_Install_List_Table->single_row(). see #19910.
git-svn-id: https://develop.svn.wordpress.org/trunk@20140 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-07 18:24:34 +00:00
Daryl Koopersmith 6e93f773b4 Theme Customizer: Begin integration into the install process. Combine previews, details, and install into a single workflow. see #19910.
git-svn-id: https://develop.svn.wordpress.org/trunk@20138 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-07 17:35:17 +00:00
Andrew Nacin 53a209a4ee Introduce WP_Theme, wp_get_themes(), and wp_get_theme() to replace get_themes(), get_theme(), get_theme_data(), current_theme_info(), and others.
* Getters and Helpers: Introduces a series of methods to allow for easy generation of headers for display, and other theme metadata, including page templates.
 * Screenshots: Handles support for multiple screenshots. (see # Additional screenshots must be PNG and start with screenshot-2.png, and be sequential to be counted. see #19816.
 * Error Handling: Broken themes have a WP_Error object attached to them.
 * Caching: Introduces a wp_cache_themes_persistently filter (also in [20020]) to enable persistent caching of all filesystem and sanitization operations normally handled by WP_Theme (and formerly get_file_data() and get_themes()). Themes are cached individually and across five different cache keys for different data pieces.
 * Compatibility: A WP_Theme object is backwards compatible with a theme's array formerly returned by get_themes() and get_theme(), and an stdClass object formerly returned by current_theme_info().
 * i18n/L10n: Theme headers are now localizable with proper Text Domain and Domain Path headers, like plugins. (Language packs may remove the requirement for headers.) For page templates, see #6007 (not fixed yet, but will be easy now). For headers, fixes #15858.
 * PHP and CSS files: New methods that fetch a list of theme files (for the theme editor) only on demand, rather than only loading them into memory. fixes #11214.

Functions deprecated:
 * get_themes(), get_allowed_themes() and get_broken_themes() -- use wp_get_themes()
 * get_theme() and current_theme_info() -- use wp_get_theme()
 * get_site_allowed_themes() -- use WP_Theme::get_allowed_on_network()
 * wpmu_get_blog_allowedthemes() -- use WP_theme::get_allowed_on_site()

see also [20016], [20018], [20019], [20020], [20021], [20022], [20025], [20026], [20027]. also fixes #19244.

see #20103.



git-svn-id: https://develop.svn.wordpress.org/trunk@20029 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-28 21:24:44 +00:00
Andrew Nacin 082f9f9739 Use version_compare() when checking installed themes in the theme installer. fixes #20097.
git-svn-id: https://develop.svn.wordpress.org/trunk@19979 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-22 14:03:59 +00:00
Ryan Boren 7cd04da2e6 Change feature filter from post to get so feature selections aren't lost when paging. Props SergeyBiryukov. fixes #18094
git-svn-id: https://develop.svn.wordpress.org/trunk@19857 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-07 21:06:52 +00:00
Ryan Boren f8dc7fe757 Hide theme details by default. Props helenyhou, DH-Shredder. fixes #19853
git-svn-id: https://develop.svn.wordpress.org/trunk@19840 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-06 20:54:01 +00:00
Ryan Boren 2b186b0c45 Lose EOF ?>. Clean up EOF newlines. fixes #12307
git-svn-id: https://develop.svn.wordpress.org/trunk@19712 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-08 17:01:11 +00:00
Ryan Boren 54067a5f20 Remove extraneous spaces. Props kenan3008, dimadin. fixes #19501 #19433
git-svn-id: https://develop.svn.wordpress.org/trunk@19596 602fd350-edb4-49c9-b593-d223f7449a82
2011-12-14 17:36:38 +00:00
Andrew Nacin 1287ec492a Translated strings in attributes require esc_attr(). s/_e/esc_attr_e/g
git-svn-id: https://develop.svn.wordpress.org/trunk@19028 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-20 15:04:46 +00:00
Mark Jaquith a3bdf19206 Be more consistent with ERROR: messages. fixes #15887
git-svn-id: https://develop.svn.wordpress.org/trunk@18841 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-30 17:18:35 +00:00
Dion Hulse 4429d66a15 Cast $themes to an array to avoid a PHP Warning when there are no themes currently installed. Fixes #18213
git-svn-id: https://develop.svn.wordpress.org/trunk@18462 602fd350-edb4-49c9-b593-d223f7449a82
2011-07-22 10:57:34 +00:00
Dion Hulse 2ed7ccf052 Add new star.gif replacement with a Grey background (& White counterpart). Props chexee for star icons. Fixes #17428
git-svn-id: https://develop.svn.wordpress.org/trunk@18318 602fd350-edb4-49c9-b593-d223f7449a82
2011-06-17 05:41:35 +00:00
Andrew Nacin 00eaa56f22 RTL for theme installer. props yoavf, fixes #15984.
git-svn-id: https://develop.svn.wordpress.org/trunk@17149 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-26 06:31:46 +00:00
Peter Westwood 96129e7e4b Give the button an id so it validates.
git-svn-id: https://develop.svn.wordpress.org/trunk@17008 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-16 21:35:39 +00:00
Mark Jaquith d65cdf4ba8 Expand submit_button() capabilities. Replace all (or almost all) manual HTML instances in WP. props sbressler. see #15064
git-svn-id: https://develop.svn.wordpress.org/trunk@16061 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-28 21:56:43 +00:00
Andrew Nacin df81af604c Network admin theme install. props PeteMall, fixes #15184.
git-svn-id: https://develop.svn.wordpress.org/trunk@15898 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-21 17:06:52 +00:00
Ryan Boren e40c09a140 Move themes_api() to theme.php so that it is available to themes.php. see #14936
git-svn-id: https://develop.svn.wordpress.org/trunk@15727 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-05 13:24:41 +00:00
Ryan Boren beb20a5bd5 get_theme_feature_list() replaces install_themes_feature_list(). Does translation and works if feature_list is not accessible from api.wordpress.org. see #14936
git-svn-id: https://develop.svn.wordpress.org/trunk@15655 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-24 15:28:28 +00:00
scribu 1c4aeef40e replace $table with $wp_list_table. See #14651
git-svn-id: https://develop.svn.wordpress.org/trunk@15519 602fd350-edb4-49c9-b593-d223f7449a82
2010-08-22 11:22:46 +00:00
scribu fb9394167f Ajaxify list-type screens in the admin. See #14579
git-svn-id: https://develop.svn.wordpress.org/trunk@15491 602fd350-edb4-49c9-b593-d223f7449a82
2010-08-11 21:54:51 +00:00
Dion Hulse 87c99854d6 Increase height of Theme install thickbox to remove useless scrollbars. Props ocean90
git-svn-id: https://develop.svn.wordpress.org/trunk@14818 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-23 12:04:24 +00:00
Andrew Nacin 47136b319f Introduce _ex(), a hybrid between _e() and _x() -- translate with context, then echo. props westi, see #13395.
git-svn-id: https://develop.svn.wordpress.org/trunk@14647 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-14 21:46:25 +00:00
Dion Hulse 12c0c3d475 Highlight correct submenu for Theme Installs. Fix PHP Notice for unset object properties (requires among others may not be set).
git-svn-id: https://develop.svn.wordpress.org/trunk@13763 602fd350-edb4-49c9-b593-d223f7449a82
2010-03-19 08:03:52 +00:00
Dion Hulse 468d0d7cff Variable Cleanup, Unused variables, Typo'd variables, unused code blocks. Fixes #12299
git-svn-id: https://develop.svn.wordpress.org/trunk@13242 602fd350-edb4-49c9-b593-d223f7449a82
2010-02-20 02:01:46 +00:00
Ryan Boren 71bef9fe26 Convert update_themes, update_plugins, update_core, and dismissed_update_core into site transients/plugins. Remove no longer need compat code.
git-svn-id: https://develop.svn.wordpress.org/trunk@12673 602fd350-edb4-49c9-b593-d223f7449a82
2010-01-08 20:49:55 +00:00
Andrew Ozz c6ad66eb26 Fix margin on Find Themes button
git-svn-id: https://develop.svn.wordpress.org/trunk@11497 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-31 01:11:07 +00:00
Peter Westwood 285296c772 Add context to the translation of Tag in the theme installer. Fixes #9981.
git-svn-id: https://develop.svn.wordpress.org/trunk@11494 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-30 10:33:51 +00:00
Ryan Boren 7c0c4c5bf9 Don't use short tag. Props DD32. fixes #9920
git-svn-id: https://develop.svn.wordpress.org/trunk@11459 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-26 04:38:09 +00:00
Mark Jaquith ba1c3bdd5b Deprecate sanitize_url() and clean_url() in favor of esc_url_raw() and esc_url()
git-svn-id: https://develop.svn.wordpress.org/trunk@11383 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-18 16:00:33 +00:00
Mark Jaquith f0336cfa7d deprecate wp_specialchars() in favor of esc_html(). Encode quotes for esc_html() as in esc_attr(), to improve plugin security.
git-svn-id: https://develop.svn.wordpress.org/trunk@11380 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-18 15:11:07 +00:00
Andrew Ozz b008acad7d Clear float in themes search results, props hakre, fixes #9694
git-svn-id: https://develop.svn.wordpress.org/trunk@11286 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-12 00:08:31 +00:00
Mark Jaquith c638e8d8de _a(), _ea(), _xa(), attr() are now esc_attr__(), esc_attr_e(), esc_attr_x(), esc_attr() -- still short, but less cryptic. see #9650
git-svn-id: https://develop.svn.wordpress.org/trunk@11204 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-05 19:43:53 +00:00
Andrew Ozz 3bf18aa189 Banishing ASCII quotes and apostrophes, props demetris, fixes #9655
git-svn-id: https://develop.svn.wordpress.org/trunk@11190 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-05 04:28:05 +00:00