Commit Graph

35 Commits

Author SHA1 Message Date
Sergey Biryukov 7932193708 Coding Standards: Use strict comparison where static strings are involved.
This reduces the number of `WordPress.PHP.StrictComparisons.LooseComparison` issues in half, from 1897 to 890.

Includes minor code layout fixes for better readability.

See #49542.
Built from https://develop.svn.wordpress.org/trunk@47808


git-svn-id: http://core.svn.wordpress.org/trunk@47584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-16 18:42:12 +00:00
Sergey Biryukov 001ffe81fb Docs: Improve inline comments per the documentation standards.
Includes minor code layout fixes for better readability.

See #48303.
Built from https://develop.svn.wordpress.org/trunk@47122


git-svn-id: http://core.svn.wordpress.org/trunk@46922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-29 00:45:18 +00:00
Sergey Biryukov 8aae5cb572 Twenty Eleven: Add missing `@deprecated` tag to PHP 4 constructor in `Twenty_Eleven_Ephemera_Widget`.
Props jrf.
See #48252.
Built from https://develop.svn.wordpress.org/trunk@46628


git-svn-id: http://core.svn.wordpress.org/trunk@46428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-11-02 20:08:00 +00:00
Sergey Biryukov ac10f9b9e4 Bundled Themes: Replace Codex URLs with a corresponding HelpHub or DevHub article.
Props ianbelanger, tobifjellner, SergeyBiryukov.
See #47771.
Built from https://develop.svn.wordpress.org/trunk@45675


git-svn-id: http://core.svn.wordpress.org/trunk@45486 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-25 22:46:55 +00:00
Gary Pendergast 0d23be600e Coding Standards: Fix the `Squiz.PHP.DisallowMultipleAssignments` violations in the default themes.
See #47632


Built from https://develop.svn.wordpress.org/trunk@45581


git-svn-id: http://core.svn.wordpress.org/trunk@45392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-01 08:23:57 +00:00
Gary Pendergast 08e8270a48 Coding Standards: Extract `extract()` from the codebase.
Of the last four instances of `extract()` occurring, three of them are removed by this commit, and the fourth is appropriately documented.

See #45934.


Built from https://develop.svn.wordpress.org/trunk@44569


git-svn-id: http://core.svn.wordpress.org/trunk@44400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-12 03:20:48 +00:00
Gary Pendergast 56c162fbc9 Coding Standards: Upgrade WPCS to 1.0.0
WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues.

This change includes three notable additions:
- Multiline function calls must now put each parameter on a new line.
- Auto-formatting files is now part of the `grunt precommit` script. 
- Auto-fixable coding standards issues will now cause Travis failures.

Fixes #44600.


Built from https://develop.svn.wordpress.org/trunk@43571


git-svn-id: http://core.svn.wordpress.org/trunk@43400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-17 01:51:36 +00:00
Gary Pendergast aaf99e6913 Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.


Built from https://develop.svn.wordpress.org/trunk@42343


git-svn-id: http://core.svn.wordpress.org/trunk@42172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-30 23:11:00 +00:00
Tammie Lister c0302df02f Twenty Elevent Ephemera widget fix for caching in Customizer preview.
Fixes #36429. Props anneschmidt, westonruter.

Built from https://develop.svn.wordpress.org/trunk@37590


git-svn-id: http://core.svn.wordpress.org/trunk@37558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-29 16:06:30 +00:00
Weston Ruter f3f84d2f21 Customize: Require opt-in for selective refresh of widgets.
* Introduces `customize-selective-refresh-widgets` theme support feature and adds to themes.
* Introduces `customize_selective_refresh` arg for `WP_Widget::$widget_options` and adds to all core widgets.
* Remove `selective_refresh` from being a component that can be removed via `customize_loaded_components` filter.
* Add `WP_Customize_Widgets::get_selective_refreshable_widgets()` and `WP_Customize_Widgets::is_widget_selective_refreshable()`.
* Fix default `selector` for `Partial` instances.
* Implement and improve Masronry sidebar refresh logic in Twenty Thirteen and Twenty Fourteen, including preservation of initial widget position after refresh.
* Re-initialize ME.js when refreshing `Twenty_Fourteen_Ephemera_Widget`.

See #27355.
Fixes #35855.

Built from https://develop.svn.wordpress.org/trunk@37040


git-svn-id: http://core.svn.wordpress.org/trunk@37007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-21 21:59:29 +00:00
Konstantin Obenland 72ae151dfd Remove deprecated constructor notice.
Since Twenty Eleven can be used with WordPress releases prior to 4.3, it can't
contain calls to functions that were introduced after its initial release.

Props ocean90.
Fixes #32881.


Built from https://develop.svn.wordpress.org/trunk@33086


git-svn-id: http://core.svn.wordpress.org/trunk@33057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-04 20:43:25 +00:00
Konstantin Obenland cc43eae995 Deprecate PHP4 style contructor in Twenty Eleven's Ephemera widget.
See #31982.

Props Frank Klein.
Fixes #32881.


Built from https://develop.svn.wordpress.org/trunk@33085


git-svn-id: http://core.svn.wordpress.org/trunk@33056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-04 20:29:23 +00:00
Dominik Schilling 64fc7294b6 Use HTTPS URLs for codex.wordpress.org.
see #27115.
Built from https://develop.svn.wordpress.org/trunk@32116


git-svn-id: http://core.svn.wordpress.org/trunk@32095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-12 21:29:32 +00:00
Lance Willett dcf53d5bbb Twenty Eleven: fix escaping and minor code style issues. See #29127.
Built from https://develop.svn.wordpress.org/trunk@31265


git-svn-id: http://core.svn.wordpress.org/trunk@31246 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-22 00:42:23 +00:00
Lance Willett a3b09ba9d7 Twenty Eleven: remove doc block comments for `@return void`. See #27098.
Built from https://develop.svn.wordpress.org/trunk@27597


git-svn-id: http://core.svn.wordpress.org/trunk@27440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-18 22:48:16 +00:00
Andrew Nacin 5361a8abca Spell out duplicate hook locations.
props DrewAPicture.
fixes #25658.

Built from https://develop.svn.wordpress.org/trunk@25868


git-svn-id: http://core.svn.wordpress.org/trunk@25868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:59:20 +00:00
Andrew Nacin 8ae8e01b67 Remove the old wp_auto_updates_maybe_update cron event. Schedule the new wp_maybe_auto_update event at 7 a.m. and 7 p.m. in the site's timezone.
see #27704.

Built from https://develop.svn.wordpress.org/trunk@25825


git-svn-id: http://core.svn.wordpress.org/trunk@25825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:53:14 +00:00
Andrew Nacin 74488bdcb0 Spell out duplicate hook locations.
props DrewAPicture.
fixes #25658.

Built from https://develop.svn.wordpress.org/trunk@25868


git-svn-id: http://core.svn.wordpress.org/trunk@25780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-22 17:22:11 +00:00
Lance Willett 25d1363a66 Twenty Eleven: update code comments to reflect WP inline docs standards. Props DrewAPicture, see #25256.
Built from https://develop.svn.wordpress.org/trunk@25625


git-svn-id: http://core.svn.wordpress.org/trunk@25542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-25 16:50:11 +00:00
Lance Willett a738cc3c83 Bundled themes: remove `the_title_attribute()` title attributes where it duplicates `the_title()` in anchor text. Props nacin, fixes #24203.
git-svn-id: http://core.svn.wordpress.org/trunk@24131 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-29 16:57:30 +00:00
Lance Willett 4f8d3b5b61 Twenty Eleven: use new URL extraction function, `get_the_url()` for link post formats in the Ephemera widget. Props obenland, fixes #23618.
git-svn-id: http://core.svn.wordpress.org/trunk@23792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-22 22:42:37 +00:00
Helen Hou-Sandí b1f1579604 its <=> it's in documentation, along with a rogue the, The, and looses. props trepmal. fixes #22665.
git-svn-id: http://core.svn.wordpress.org/trunk@23191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-12-20 15:55:32 +00:00
Lance Willett 9886963778 Twenty Eleven: escape i18n attributes as late as possible, props mfields. See #21756.
git-svn-id: http://core.svn.wordpress.org/trunk@22199 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-11 21:30:42 +00:00
nacin 869e0ace47 Indent code within an inside Twenty Eleven's ephemera widget. props lloydbudd, fixes #18751.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-11-16 00:08:29 +00:00
dd32 27ec6b7e00 Remove debug comments & more housecleaning. See #17748
git-svn-id: http://svn.automattic.com/wordpress/trunk@18266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-06-11 03:44:42 +00:00
ryan a6e286b3bd Use no_found_rows for some queries. Props pavelevap. fixes #17745
git-svn-id: http://svn.automattic.com/wordpress/trunk@18239 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-06-10 20:14:59 +00:00
iandstewart 46daad4d6d Twenty Eleven: Add the Ephemera title to the theme textdomain; Props knutsp; Fixes #17572
git-svn-id: http://svn.automattic.com/wordpress/trunk@18059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-05-26 20:50:53 +00:00
nacin 7f98b9beaf Fix Twenty Eleven phpdoc subpackage names. props zeo, fixes #17444.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-05-18 19:06:09 +00:00
lancewillett 6b26de11a4 Twenty Eleven: run twentyeleven_url_grabber once in widgets.php, props duck_ -- closes #17279
git-svn-id: http://svn.automattic.com/wordpress/trunk@17917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-05-13 16:25:53 +00:00
iandstewart ff4d0e5249 Twenty Eleven: updated DocBlock comments following Twenty Ten's example; See #17198
git-svn-id: http://svn.automattic.com/wordpress/trunk@17787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-05-02 21:04:44 +00:00
nacin 03104c5cfd Escape urls in the Epherma widget. see #17198.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-28 23:59:08 +00:00
iandstewart 262a27b5cf Twenty Eleven: make sure that link color options set in theme-options.php will override showcase.php recent posts and ephemera widget link colors; See #17198
git-svn-id: http://svn.automattic.com/wordpress/trunk@17755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-28 22:04:39 +00:00
nacin 2b71bba9c2 In Twenty Eleven: Register the widget from functions.php. Kill create_function. Attach twentyeleven_widgets_init() to widgets_init, rather than init. Eliminate use of the $post global in the widget. see #17198.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-28 09:47:30 +00:00
lancewillett 5daf376821 Twenty Eleven: fix spacing and add a few missing esc_attr() calls in widgets.php - see #17198
git-svn-id: http://svn.automattic.com/wordpress/trunk@17723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-27 04:45:11 +00:00
lancewillett 2bcbcf31ec Twenty Eleven: move widgets.php into /inc - see #17198
git-svn-id: http://svn.automattic.com/wordpress/trunk@17720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-26 21:05:43 +00:00