Commit Graph

142 Commits

Author SHA1 Message Date
Sergey Biryukov
57c10eadbb Use ellipsis instead of three dots. props tjsingleton, jordie23, wojtek.szkutnik, DrewAPicture, SergeyBiryukov. see #8714.
git-svn-id: http://core.svn.wordpress.org/trunk@24207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-08 21:27:31 +00:00
Andrew Nacin
b96c604833 Don't unslash variables that came from wp_reset_vars(). see #21767.
git-svn-id: http://core.svn.wordpress.org/trunk@23580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 18:59:54 +00:00
Ryan Boren
f3a83744e9 Use wp_unslash() instead of stripslashes() and stripslashes_deep(). Use wp_slash() instead of add_magic_quotes().
git-svn-id: http://core.svn.wordpress.org/trunk@23567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 17:14:09 +00:00
Ryan Boren
43a7e695e9 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: http://core.svn.wordpress.org/trunk@23554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 16:28:40 +00:00
Andrew Nacin
12c4b9bae9 Do not unslash variables reset by wp_reset_vars(). Remove variables that have never been used in plugin-editor.php. see #21767.
git-svn-id: http://core.svn.wordpress.org/trunk@23419 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-15 02:01:36 +00:00
Ryan Boren
cc5ed3a485 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: http://core.svn.wordpress.org/trunk@23416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-14 22:51:06 +00:00
Mark Jaquith
da5c7a7c62 "Lookup" is a noun. "Look up" is the verb form. If you doubt me, you should have lookuped in a dictionary.
props johnbillion, SergeyBiryukov. fixes #22386

git-svn-id: http://core.svn.wordpress.org/trunk@23393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-08 16:19:04 +00:00
Andrew Nacin
fb36abe6b7 Always URL-encode a stylesheet directory value before using it in a URL. These situations are saved by wp_nonce_url(), but we should not depend on that. see #21749, for trunk only.
git-svn-id: http://core.svn.wordpress.org/trunk@21755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-04 22:35:12 +00:00
azaozz
67d4a5f71a Move the description for tabbing out of the plugin and theme editors textareas to the Help tab, fixes #21347
git-svn-id: http://core.svn.wordpress.org/trunk@21358 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-27 16:49:48 +00:00
azaozz
34535097b7 Remove nearly all tabindex attributes from the admin, leaving them only where absolutely necessary (for now that's only the toolbar).
Add tabindex="-1" for the menu images links to avoid double tab stops there when the menu is expanded.

Fix/add auto-focus on the first input fields on the Add/Edit Post, all taxonomy, all edit taxonomy, Log In and Edit Comment screens.

See #21340.

git-svn-id: http://core.svn.wordpress.org/trunk@21311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-24 00:15:15 +00:00
azaozz
6d556cbcdb Make it possible to tab out of the plugin and theme editors textareas by pressing Esc followed by Tab, fixes #21347
git-svn-id: http://core.svn.wordpress.org/trunk@21310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-23 23:46:27 +00:00
ryan
b66fb16fe5 Show the template name instead of just the filename. Props arieputranto, SergeyBiryukov. fixes #20718
git-svn-id: http://core.svn.wordpress.org/trunk@20844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-22 15:25:35 +00:00
nacin
1e500bd76a Remove WP_Theme::is_child_theme() in favor of WP_Theme::parent(). see #20546.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-25 17:34:19 +00:00
nacin
53bdf5bffc Issue a 'This theme is broken' error (when applicable) on the theme editor. see #20103.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-21 21:23:27 +00:00
nacin
d62b91f228 Adjust [20557] and check only parent(), as it is more semantic. We don't care if the theme considers itself to be a child theme, we care if it has a valid parent. see #20103.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-21 21:03:23 +00:00
nacin
a5a13979bd A child theme with a missing parent might be is_child_theme() but not have a valid parent() object, so we need to check parent() too. see #20103.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-21 21:00:24 +00:00
nacin
f73524c272 Don't allow themes without a style.css editor to be edited. These themes are too broken to be salvaged by the theme editor. see #20103.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-21 20:57:54 +00:00
nacin
789b3714d3 Use WP_Theme::exists(). see #20361.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-06 19:21:31 +00:00
nacin
70aa7f9607 Clear theme cache after editing. Reduce default cache persistence to 1800. (Could go lower.) see #20331.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20328 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-30 14:39:05 +00:00
nacin
5b8037afe6 Always set WP_Theme->template even when there is an error and we have no idea what the template is. (Assume it is the stylesheet.) Prevents a number of issues including WP_Theme->is_child_theme() lying. Tidy the theme editor for broken themes and themes with no templates (PHP files), or no template (parent), or are broken. Allow broken themes to be edited. see #20103.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20315 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-29 04:16:17 +00:00
nacin
107733e263 urldecode() the incoming $file in the theme editor. see [20313] when the encode was added. see #2994 for the original bug report. see #20103.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-29 03:34:51 +00:00
nacin
23abe58a59 Rewrite theme-editor.php to use the new WP_Theme API. see #20103.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20313 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-29 03:00:38 +00:00
ryan
83b131f8e3 User lowercase true, false, null instead of uppercase. Props c3mdigital, mfields. fixes #16302
git-svn-id: http://svn.automattic.com/wordpress/trunk@19687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-05 20:50:54 +00:00
ryan
6bba5a265b Pinking shears
git-svn-id: http://svn.automattic.com/wordpress/trunk@19528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-01 04:51:35 +00:00
ryan
efbbab1b3c Help tabs. Props chexee. see #19020
git-svn-id: http://svn.automattic.com/wordpress/trunk@19445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-11-24 00:21:39 +00:00
nacin
cece838d8f More s/add_help_sidebar/set_help_sidebar/. fixes #19020.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-11-02 21:32:16 +00:00
ryan
366db8c10b Use add_help_sidebar(). see #19020
git-svn-id: http://svn.automattic.com/wordpress/trunk@19114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-11-02 05:33:53 +00:00
azaozz
1cdec6ff6e Merge most admin css files, first run, see #18314
git-svn-id: http://svn.automattic.com/wordpress/trunk@18577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-08-21 03:46:43 +00:00
ryan
03602f19e6 url_encode file names in theme and plugin editor urls. Props kawauso. fixes #17038
git-svn-id: http://svn.automattic.com/wordpress/trunk@18094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-06-01 16:14:58 +00:00
nacin
30bf87b24d Ensure we're matching the complete theme directory when excluding parent templates from the theme editor. props chrisbliss18, fixes #16607 for trunk.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-21 18:57:09 +00:00
nacin
afd6a5e453 Slight tweak. props andrea_r, #15314.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17047 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-18 18:37:11 +00:00
nacin
be9bd035b3 Network-specific language on the plugin and theme editor help tabs. props andrea_r, see #15314.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-18 18:33:21 +00:00
nacin
4dd3b77b48 Link to network/update-core when running multisite. Remove theme/plugin editors from blog menu when running multisite. Redirect to network/* when accessing theme/plugin-install/editor. props ocean90, see #15525.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-06 15:41:19 +00:00
nacin
88d961937e Always land on style.css by default, rather than whichever stylesheet came first in the directory scan. Prevents useless trips to editor-style-rtl.css and the like. see #15672.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16718 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-04 04:31:55 +00:00
nacin
3fb64e512a Remove unused logic. see #15672.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-04 04:16:23 +00:00
nacin
c7fe205805 Don't even show parent theme files when viewing the child theme. see #15672.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-04 03:52:59 +00:00
nacin
67f2b68ed6 Sanity text in the theme editor when you have a child theme. fixes #15672.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-03 22:58:56 +00:00
markjaquith
6482610f9a esc_textarea() and application for obvious textarea escaping. props alexkingorg. fixes #15454
git-svn-id: http://svn.automattic.com/wordpress/trunk@16431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-17 17:12:01 +00:00
markjaquith
fc6e89da45 Expand submit_button() capabilities. Replace all (or almost all) manual HTML instances in WP. props sbressler. see #15064
git-svn-id: http://svn.automattic.com/wordpress/trunk@16061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-28 21:56:43 +00:00
ryan
022cdc5e6c Plugin editing for network admin. Props PeteMall. see #14435
git-svn-id: http://svn.automattic.com/wordpress/trunk@15853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-19 18:23:23 +00:00
nacin
80b2f75bb9 Initialize a variable. fixes #15025.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-04 08:48:43 +00:00
nacin
6c7120ff14 target=blank help fixes. props zeo, fixes #13467.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-04 03:42:43 +00:00
nacin
34c1fa6d0b target=blank for help. props jorbin, see #13467
git-svn-id: http://svn.automattic.com/wordpress/trunk@15132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-03 21:00:39 +00:00
nbachiyski
bb00d56a67 Menu translatable strings cleanup.
* Take out <strong> of the translatable part of For more information:
 * Include support forums and Codex links inside translations, because most translators would want to change them to their local documentation sites or Codex prefixes


git-svn-id: http://svn.automattic.com/wordpress/trunk@14989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-27 11:52:15 +00:00
ryan
013d15ebd4 Help for Appearance screens. Props duck_, jane. see #13467
git-svn-id: http://svn.automattic.com/wordpress/trunk@14951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-26 18:27:13 +00:00
nacin
8845d1f61f Hide Flash uploader and theme/plugin editor documentation feature, if no JS. Also some validation fixes in the theme editor. props ocean90. see #13383.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14930 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-26 03:57:55 +00:00
nacin
c370c84d19 Remove autocomplete and codepress. for autocomplete, see #13283. for codepress, see #13307.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14718 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-18 03:48:22 +00:00
nacin
c6d21e7fbb Introduce _ex(), a hybrid between _e() and _x() -- translate with context, then echo. props westi, see #13395.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-14 21:46:25 +00:00
nacin
37ce82fd24 Use valid HTML in the theme editor. span instead of div inside an anchor. props Utkarsh, see #13383.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-14 07:04:17 +00:00
nacin
f9df8a36ae s/blog/site/ in more places. props PeteMall, see #11644.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14313 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-30 01:54:32 +00:00