Aaron Jorbin
a1aae78c7d
Theme: Escape error messages
...
[36185] for 4.4 branch
Built from https://develop.svn.wordpress.org/branches/4.4@36186
git-svn-id: http://core.svn.wordpress.org/branches/4.4@36153 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-06 17:24:27 +00:00
Scott Taylor
79a2915a9b
Upgrade: New themes are not automatically installed on upgrade. This can still be explicitly asked for by defining CORE_UPGRADE_SKIP_NEW_BUNDLED
as false
.
...
In `populate_options()`, if the theme specified by `WP_DEFAULT_THEME` doesn't exist, fall back to the latest core default theme. If we can't find a core default theme, `WP_DEFAULT_THEME` is the best we can do.
Props nacin, jeremyfelt, dd32.
See #34306 .
Built from https://develop.svn.wordpress.org/trunk@35738
git-svn-id: http://core.svn.wordpress.org/trunk@35702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-25 21:45:25 +00:00
Drew Jaynes
1b1e18027d
Template: Make it possible to both ''add'' and ''remove'' items from the page templates list using the theme_page_templates
filter.
...
The `theme_page_templates` hook was originally added in [27297] as `page_templates`, and later renamed in [27470]. Previously, it was only possible to remove or rename page templates via this hook.
Fixes #13265 . Fixes #25879 .
Built from https://develop.svn.wordpress.org/trunk@34995
git-svn-id: http://core.svn.wordpress.org/trunk@34960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-09 21:51:25 +00:00
Jeremy Felt
9926983b66
Revert [34778], continue using _site_option()
for the current network.
...
The `_network_option()` parameter order will be changing to accept `$network_id` first. The `_site_option()` functions will remain in use throughout core as our way of retrieving a network option for the current network.
See #28290 .
Built from https://develop.svn.wordpress.org/trunk@34912
git-svn-id: http://core.svn.wordpress.org/trunk@34877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-07 17:11:25 +00:00
Jeremy Felt
54512d64cb
MS: Use *_network_option()
functions throughout core.
...
Replaces all uses of `*_site_option()` with the corresponding "network" function.
This excludes one usage in `wp-admin/admin-footer.php` that needs more investigation.
Props spacedmonkey.
See #28290 .
Built from https://develop.svn.wordpress.org/trunk@34778
git-svn-id: http://core.svn.wordpress.org/trunk@34743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 19:08:26 +00:00
Drew Jaynes
4a69b4d275
Docs: Fix some syntactical issues with the DocBlock for the WP_Theme->update
property, introduced in [33957].
...
Adds an `@since`.
See #33491 . See #32246 .
Built from https://develop.svn.wordpress.org/trunk@34236
git-svn-id: http://core.svn.wordpress.org/trunk@34200 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 13:29:25 +00:00
Scott Taylor
5e9e1d14bd
WP_Theme
has an ad hoc property in WP_MS_Themes_List_Table
, $update
. This can be set to a default value on the class, as it's not obtained via __get()
.
...
See #33491 .
Built from https://develop.svn.wordpress.org/trunk@33957
git-svn-id: http://core.svn.wordpress.org/trunk@33926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-09 01:02:24 +00:00
Scott Taylor
19a3aacc94
Add @static*
annotations where they are missing.
...
Initialize all static vars that are not, most to `null`.
See #32444 .
Built from https://develop.svn.wordpress.org/trunk@32650
git-svn-id: http://core.svn.wordpress.org/trunk@32620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-29 15:43:29 +00:00
Scott Taylor
bd8fafea54
Use void
instead of null
where appropriate when pipe-delimiting @return
types. If a @return
only contains void
, remove it.
...
See #32444 .
Built from https://develop.svn.wordpress.org/trunk@32568
git-svn-id: http://core.svn.wordpress.org/trunk@32538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-24 05:40:25 +00:00
Scott Taylor
ecf4c668b3
Upgrade the doc blocks in class-wp-xmlrpc-server.php
. Rehabilitate some unfortunate use of tabbing.
...
See #32444 .
Built from https://develop.svn.wordpress.org/trunk@32550
git-svn-id: http://core.svn.wordpress.org/trunk@32520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-22 19:37:24 +00:00
Scott Taylor
1b960d56b6
Add missing doc blocks to class-wp-theme.php
.
...
See #32444 .
Built from https://develop.svn.wordpress.org/trunk@32547
git-svn-id: http://core.svn.wordpress.org/trunk@32517 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-22 17:31:27 +00:00
Drew Jaynes
b2e442c247
Add a missing @return
tag and description to the DocBlock for WP_Theme::scandir()
.
...
Props lamosty.
Fixes #31872 .
Built from https://develop.svn.wordpress.org/trunk@32345
git-svn-id: http://core.svn.wordpress.org/trunk@32316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-05 00:34:25 +00:00
Drew Jaynes
261e461f9d
Properly document WP_Theme::scandir()
as a static method, adjust parameter documentation for formatting and clarity.
...
See #31872 .
Built from https://develop.svn.wordpress.org/trunk@32344
git-svn-id: http://core.svn.wordpress.org/trunk@32315 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-05 00:33:26 +00:00
Gary Pendergast
e2d3bdf615
Correctly escape theme version numbers when displaying them.
...
Props collinsinternet.
Built from https://develop.svn.wordpress.org/trunk@32170
git-svn-id: http://core.svn.wordpress.org/trunk@32145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-20 06:27:25 +00:00
Scott Taylor
fe6b5983df
In PHP 5.0.0, is_a()
became deprecated in favour of the instanceof
operator. Calling is_a()
would result in an E_STRICT
warning.
...
In PHP 5.3.0, `is_a()` is no longer deprecated, and will therefore no longer throw `E_STRICT` warnings.
To avoid warnings in PHP < 5.3.0, convert all `is_a()` calls to `$var instanceof WP_Class` calls.
`instanceof` does not throw any error if the variable being tested is not an object, it simply returns `false`.
Props markoheijnen, wonderboymusic.
Fixes #25672 .
Built from https://develop.svn.wordpress.org/trunk@31188
git-svn-id: http://core.svn.wordpress.org/trunk@31169 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 01:06:24 +00:00
Sergey Biryukov
e24b443f50
Correct @return value for WP_Theme::load_textdomain() after [30681].
...
see #30224 .
Built from https://develop.svn.wordpress.org/trunk@31108
git-svn-id: http://core.svn.wordpress.org/trunk@31089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-09 04:54:24 +00:00
Scott Taylor
e619abda6e
Improve various @param
docs for src/wp-includes/*
.
...
See #30224 .
Built from https://develop.svn.wordpress.org/trunk@30681
git-svn-id: http://core.svn.wordpress.org/trunk@30671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-01 01:34:24 +00:00
Drew Jaynes
f8657d5890
Remove redundant and erroneous @uses
tag from most core inline documentation.
...
Per our inline documentation standards, no further use of the `@uses` tag is recommended as used and used-by relationships can be derived through other means. This removes most uses of the tag in core documentation, with remaining tags to be converted to `@global` or `@see` as they apply.
Fixes #30191 .
Built from https://develop.svn.wordpress.org/trunk@30105
git-svn-id: http://core.svn.wordpress.org/trunk@30105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-30 01:05:24 +00:00
Andrew Nacin
be7825789d
Set Twenty Fifteen as the new default theme. see #29799 .
...
Built from https://develop.svn.wordpress.org/trunk@29895
git-svn-id: http://core.svn.wordpress.org/trunk@29650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-14 19:58:19 +00:00
Sergey Biryukov
26d0ad5e12
Remove redundant 'Visit author homepage' title attributes for plugins and themes.
...
props joedolson.
fixes #26554 .
Built from https://develop.svn.wordpress.org/trunk@28673
git-svn-id: http://core.svn.wordpress.org/trunk@28491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-05 04:52:16 +00:00
Scott Taylor
c5ba45a11b
break
is unreachable in WP_Theme::translate_header()
.
...
See #27882 .
Built from https://develop.svn.wordpress.org/trunk@28547
git-svn-id: http://core.svn.wordpress.org/trunk@28373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-22 19:05:14 +00:00
Drew Jaynes
35fb93858a
Use suggested language conventions in the hook docs description for the theme_page_templates
filter.
...
See #27700 .
Built from https://develop.svn.wordpress.org/trunk@28000
git-svn-id: http://core.svn.wordpress.org/trunk@27830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-07 20:18:14 +00:00
Andrew Nacin
bf5447f435
WP_Theme: Return false from the display() method when get() fails.
...
Fixes a potential warning on the themes page when the active theme is deleted.
fixes #26873 .
Built from https://develop.svn.wordpress.org/trunk@27745
git-svn-id: http://core.svn.wordpress.org/trunk@27582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-26 18:22:13 +00:00
Andrew Nacin
a4a88aeceb
I am having a bad day. see #13265 .
...
Built from https://develop.svn.wordpress.org/trunk@27471
git-svn-id: http://core.svn.wordpress.org/trunk@27316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-08 04:20:14 +00:00
Andrew Nacin
17ccbc86c9
Rename the new page_templates filter to theme_page_templates, and pass it a post object for proper context.
...
see #13265 .
Built from https://develop.svn.wordpress.org/trunk@27470
git-svn-id: http://core.svn.wordpress.org/trunk@27315 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-08 04:19:16 +00:00
Andrew Nacin
044ab93430
Add a filter to remove or rename page templates for a theme. This does not yet handle adding page templates. see #13265 .
...
Built from https://develop.svn.wordpress.org/trunk@27297
git-svn-id: http://core.svn.wordpress.org/trunk@27152 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-26 20:31:15 +00:00
Drew Jaynes
870b415dbd
Inline documentation for hooks in wp-includes/class-wp-theme.php.
...
Props richard2222, kpdesign.
Fixes #26217 .
Built from https://develop.svn.wordpress.org/trunk@26891
git-svn-id: http://core.svn.wordpress.org/trunk@26774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-02 01:54:10 +00:00
Andrew Nacin
9ecfa135d8
Map old -width theme tags to new -layout tags for the purposes of translation in the admin.
...
see #21442 .
Built from https://develop.svn.wordpress.org/trunk@26725
git-svn-id: http://core.svn.wordpress.org/trunk@26614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-06 14:37:10 +00:00
Sergey Biryukov
72d4b140fb
Make Twenty Fourteen the default theme. props markmcwilliams. fixes #25702 .
...
Built from https://develop.svn.wordpress.org/trunk@26024
git-svn-id: http://core.svn.wordpress.org/trunk@25955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-06 20:02:09 +00:00
Andrew Nacin
7de2054ece
Show a proper error message on the dashboard when the current theme is broken.
...
Clean up Appearance -> Themes when we don't have enough information to show for a broken theme.
Clean up broken/ugly "alt" row styling when we are displaying broken themes.
props johnbillion for initial patch.
fixes #21670 .
Built from https://develop.svn.wordpress.org/trunk@25666
git-svn-id: http://core.svn.wordpress.org/trunk@25582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-02 20:50:09 +00:00
Andrew Nacin
55b3c67413
Revert [23394] until there is a consensus on target="_blank" (or not) for these external links. see #20839 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@24583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-08 13:04:07 +00:00
Sergey Biryukov
74638ccb5a
Fix typos in phpdoc. props TheLastCicada. fixes #24302 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@24229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-10 01:39:30 +00:00
Andrew Nacin
afd9cbced9
Make Twenty Thirteen the default theme.
...
Has the added benefit of ensuring the WordPress Beta Tester plugin allows updates of Twenty Thirteen.
props JustinSainton.
fixes #23573 .
git-svn-id: http://core.svn.wordpress.org/trunk@23529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-28 19:01:07 +00:00
Helen Hou-Sandí
1c816c795b
Open external links to plugin homepages, plugin author homepages, and theme author homepages in a new window/tab. props SergeyBiryukov. fixes #20839 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@23394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-08 16:20:01 +00:00
Ryan Boren
54ac1d939b
Make current_user_can_for_blog() safe to run single site.
...
Props nacin, MarkJaquith
fixes #22803
git-svn-id: http://core.svn.wordpress.org/trunk@23117 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-12-07 09:53:27 +00:00
Andrew Nacin
5da775fe3b
WP_Theme: If the parent theme is missing, instantiate a WP_Theme object anyway, so it can hold errors.
...
Fixes the installation of parent themes when installing a child theme from WordPress.org.
see #22515 .
git-svn-id: http://core.svn.wordpress.org/trunk@22784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-21 18:58:19 +00:00
Andrew Nacin
582d46c937
Make Twenty Twelve the default theme for new installs. props markoheijnen, SergeyBiryukov. see #21789 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-27 07:47:51 +00:00
Andrew Nacin
e03640b121
URL encode the stylesheet directory values passed to WP_Theme's get_stylesheet_directory_uri() and get_template_directory_uri(). props SergeyBiryukov, see #21749 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@21712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-03 23:57:43 +00:00
Andrew Nacin
5f2f385087
Restore the 'allowed_themes' filter.
...
This filter has wrapped the network-wide themes, outside of the network-wide
allowed function (dating back to MU), hence the unusual placement. This restores
previous behavior; we will introduce new filters to enable greater flexibility.
see #21099 .
for trunk.
git-svn-id: http://core.svn.wordpress.org/trunk@21686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-31 17:05:18 +00:00
Andrew Nacin
4d014c4f40
Fix WP_Theme's get_template_directory_uri() method. props batmoo. see #21549 for trunk.
...
git-svn-id: http://core.svn.wordpress.org/trunk@21503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-14 18:38:26 +00:00
ryan
5ca54e7d2f
Deprecate get_blog_option(), add_blog_option(), update_blog_option(), and delete_blog_option().
...
Use the regular option functions wrapped in switch_to_blog() and restore_current_blog() instead.
Group multiple operations within a single switch where possible.
fixes #21432
git-svn-id: http://core.svn.wordpress.org/trunk@21414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-03 17:51:42 +00:00
nacin
6c62701b8f
Revert detection of page templates to 3.3 functionality.
...
WP_Theme in 3.4.0 used get_file_data(), which is far too strict when
compared to the original regular expression in get_page_templates().
This causes missing templates when, for example, the PHP comment
starts on the same line as the header.
see #20955 for trunk.
git-svn-id: http://core.svn.wordpress.org/trunk@21117 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-25 21:07:07 +00:00
westi
cd8c0e74ab
Restore the 'extra_theme_headers' filter in the deprecated get_theme_data function so that plugins/themes using this function can still access their extra headers.
...
Fixes #20897 props nacin, georgestephanis, SergeyBiryukov.
git-svn-id: http://core.svn.wordpress.org/trunk@21050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-11 17:30:57 +00:00
nacin
9355ae1abe
WP_Theme: If no 'Domain Path' header is specified, default to looking in the /languages directory. see #20103 , see #20448 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@20945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-27 16:42:38 +00:00
ryan
8c114f0c54
Pinking shears
...
git-svn-id: http://core.svn.wordpress.org/trunk@20715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-03 16:41:59 +00:00
nacin
81861e8cf8
Don't try to translate tags in WP_Theme::translate_header() if we are not in the admin and get_theme_feature_list() isn't defined. see #20103 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-01 18:02:40 +00:00
nacin
69e0af9e3c
Remove support from WP_Theme for multiple screenshots until we bring it to the UI. fixes #20546 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-25 17:40:43 +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
efcaf98c41
Make WP_Theme::get_files() a general method for retrieving any file types, at any depth, optionally to include parent files. see #20546 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-25 17:31:39 +00:00
nacin
c1e2962573
Documentation and visibility cleanups in WP_Theme.
...
* Declare `__toString()` as public.
* Use parent() and error() internally, rather than the properties.
* Add and correct inline documentation throughout.
* Attempt to clarify that display() is superior to get().
see #20546 , see #20103 .
git-svn-id: http://svn.automattic.com/wordpress/trunk@20586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-25 16:37:49 +00:00