Commit Graph

4681 Commits

Author SHA1 Message Date
Ian Stewart
eeda30610c Twenty Fifteen: create consistent spacing with embeds and images.
Props afercia, fixes #30286



git-svn-id: https://develop.svn.wordpress.org/trunk@30303 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-11 19:03:55 +00:00
Ian Stewart
85df1aea07 Twenty Fifteen: simpler CSS by using divs instead of spans for menu descriptions.
Props philiparthurmoore, fixes #30296



git-svn-id: https://develop.svn.wordpress.org/trunk@30302 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-11 19:01:47 +00:00
Boone Gorges
96eb9a93d9 Correct grammar error in WP_Date_Query error message.
Props Offereins.
See #25834.

git-svn-id: https://develop.svn.wordpress.org/trunk@30301 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-11 14:55:52 +00:00
Boone Gorges
a26cf7ba6e Improve localization for WP_Date_Query error strings.
* Don't create an extra variable for the string when it's only used once.
* Avoid using `<code>` HTML tags inside of translatable string.
* Improve data types and escaping on sprintfed values.

Props dd32.
Fixes #25834.

git-svn-id: https://develop.svn.wordpress.org/trunk@30300 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-11 13:24:01 +00:00
Gary Pendergast
c2fb136b47 wpdb: When flushing results on a mysqli connection, make sure that wpdb::$dbh is a valid mysqli connection handle.
Fixes a unit test failure introduced in [30297].

Fixes #28155.

Props soulseekah.



git-svn-id: https://develop.svn.wordpress.org/trunk@30299 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-11 02:16:19 +00:00
Gary Pendergast
4b1aa89206 wpdb::flush() was not flushing results correctly when using mysqli.
This change also allows stored procedures or queries made with `mysqli_multi_query()` to be flushed.

Includes unit tests.

Fixes #28155.

Props soulseekah.


git-svn-id: https://develop.svn.wordpress.org/trunk@30297 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-10 05:39:50 +00:00
Andrew Ozz
c8340a2cda TinyMCE: enable direct calls to _WP_Editors::wp_mce_translation(). When using TinyMCE directly, this makes it easier to load the translation of the default strings. Fixes #30293.
git-svn-id: https://develop.svn.wordpress.org/trunk@30296 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-10 02:07:00 +00:00
Andrew Ozz
d011f4ef00 TinyMCE: remove strings that are not translated before outputting the translations. Fixes #27797.
git-svn-id: https://develop.svn.wordpress.org/trunk@30294 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-10 01:59:23 +00:00
Andrew Ozz
18f75bf2f7 Heartbeat:
- Use the page visibility API (when available) and document.hasFocus() instead of window.onfocus/onblur. Improves speeding up/slowing down the interval and works for iframes by default.
- Add a setting for minimal interval. Maximum value is 10 min. This overrides all other intervals and cannot be changed after setting it at initialization. Can be used to reduce the frequency of requests on hosts that have low limits for used CPU time, etc.
- Extend the setting of interval to support 120 sec. (60 sec, is still the default).
- Always suspend after one hour of keyboard/mouse/touch inactivity.
Fixes #29779.

git-svn-id: https://develop.svn.wordpress.org/trunk@30293 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-10 01:46:04 +00:00
Gary Pendergast
3b3a33b583 WPDB's __get() function should perform strict comparisons against member names
git-svn-id: https://develop.svn.wordpress.org/trunk@30292 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-09 12:03:31 +00:00
Drew Jaynes (DrewAPicture)
68f8703893 Fix incorrect documentation in the DocBlocks for get_lastpostmodified() and _get_last_post_time().
Props ericlewis for the initial patch.
Fixes #30249.


git-svn-id: https://develop.svn.wordpress.org/trunk@30287 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-08 21:07:46 +00:00
Drew Jaynes (DrewAPicture)
72cc949b5d Fix the syntax for some status-related documentation introduced in [30155].
* Variables in DocBlocks should be backtick-escaped
* Parameter and return types should be as specific as possible
* `@param` types and variables should align with each other, but not intentionally with the `@return` description

See #30230.


git-svn-id: https://develop.svn.wordpress.org/trunk@30284 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-08 20:55:14 +00:00
Drew Jaynes (DrewAPicture)
136b853399 Cross-reference WP_Comment_Query::query() as the location for finding information on default arguments for WP_Comment_Query.
Also updates the return types on `get_comments()` and `get_approved_comments()`, as an integer can also be returned if the `$count` argument is true.

Fixes #30111.


git-svn-id: https://develop.svn.wordpress.org/trunk@30281 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-08 20:35:00 +00:00
Drew Jaynes (DrewAPicture)
9df38af4f7 Document default arguments for WP_Comment_Query class as a hash notation.
Props boonebgorges, DrewAPicture.
See #30111.


git-svn-id: https://develop.svn.wordpress.org/trunk@30280 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-08 20:18:50 +00:00
Ian Stewart
a4ecf4b080 Twenty Fifteen: updates to customize-preview.js missed in r30274.
Props celloexpressions, See #29988.



git-svn-id: https://develop.svn.wordpress.org/trunk@30275 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-07 21:10:10 +00:00
Ian Stewart
975ee2d0a8 Twenty Fifteen: add instant updating of color schemes to the customizer with postMessage.
Props celloexpressions, bradyvercher, westonruter, fixes #29988.




git-svn-id: https://develop.svn.wordpress.org/trunk@30274 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-07 20:54:48 +00:00
Ian Stewart
72e9e8d3ea Twenty Fifteen: Removing email obfuscation from social links menu.
We really should be doing this in all menus, at which point this becomes core or plugin functionality, not a theme feature.

Closes #30214.



git-svn-id: https://develop.svn.wordpress.org/trunk@30273 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-07 17:37:36 +00:00
Ian Stewart
8102942f58 Twenty Fifteen: adding help text to explain how color changes to header and sidebar are affected by responsive design.
Props iamtakashi, iandstewart, fixes #30165.



git-svn-id: https://develop.svn.wordpress.org/trunk@30272 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-07 17:30:29 +00:00
Ian Stewart
79ba410eae Twenty Fifteen: improve naming and documentation of customizer js files to match core filenaming conventions.
Props celloexpressions, fixes #30160.



git-svn-id: https://develop.svn.wordpress.org/trunk@30271 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-07 17:19:55 +00:00
Ian Stewart
900307e343 Twenty Fifteen: use antispambot to obfuscate email adresses in the social links menu.
Props tywayne, fixes #30214.



git-svn-id: https://develop.svn.wordpress.org/trunk@30270 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-07 16:45:53 +00:00
Ian Stewart
cdae4f352d Twenty Fifteen: update earlier patch to borders on linked images so we're not affecting the display of linked icons in widgets.
Props iamtakashi, fixes #29963.



git-svn-id: https://develop.svn.wordpress.org/trunk@30269 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-07 16:33:23 +00:00
Boone Gorges
642e826cd9 Don't force child_of=0 for non-hierarchical taxonomies in get_terms().
This forcing appears to have been introduced to save unnecessary queries, but
(a) in some cases it appeared to be causing *more* queries, and (b) it caused
incorrect results when the 'exclude_tree' param of `get_terms()` called
`get_terms()` on each item in the tree using the 'child_of' param.

Fixes #30275.

git-svn-id: https://develop.svn.wordpress.org/trunk@30265 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-06 21:46:18 +00:00
Boone Gorges
6f7880bcf4 In get_adjacent_post(), $excluded_terms should check term_id rather than term_taxonom_id.
See #29663, #22112.

git-svn-id: https://develop.svn.wordpress.org/trunk@30263 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-06 20:11:34 +00:00
Ian Stewart
49d5227e76 Twenty Fifteen: Our next-previous labels were reversed.
Props iamtakashi, fixes #30265.



git-svn-id: https://develop.svn.wordpress.org/trunk@30247 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-05 20:30:53 +00:00
Scott Taylor
5a2c0fef1e In get_page_children(), only check $page->ancestors once to avoid duplicates when the function recurses. Adds an argument, $ancestors.
Fixes #18962.


git-svn-id: https://develop.svn.wordpress.org/trunk@30246 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-05 20:04:55 +00:00
Scott Taylor
885502ecab Improve wp.media documentation.
Props ericlewis.
See #28459.


git-svn-id: https://develop.svn.wordpress.org/trunk@30245 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-05 19:38:20 +00:00
Scott Taylor
94e0d1b969 Improve wp.Uploader documentation.
Props ericlewis.
See #30260.


git-svn-id: https://develop.svn.wordpress.org/trunk@30244 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-05 19:36:27 +00:00
Ian Stewart
e25adfb7ba Twenty Fifteen: "detach" widgets from the header in mobile views.
Props iamtakashi, fixes #30252.



git-svn-id: https://develop.svn.wordpress.org/trunk@30243 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-05 18:02:44 +00:00
Jeremy Felt
a6fe21fe62 Create new $wp_roles object in install_blog() to avoid protected _init() call
Our call to `$wp_roles->_init()` relied on the `__call()` method in `WP_Roles` to handle the link to the protected method. This works back to PHP 5.2.9, when a bug was fixed allowing access to protected methods through this exact approach.

`install_blog()` needs a fresh `$wp_roles` object after `populate_roles()` resets everything in its path. We can create this new object from scratch, effectively doing the same thing with the call to `_init()` via the constructor.

Fixes #29692 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@30242 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-05 05:11:36 +00:00
Boone Gorges
328de7115a Split shared taxonomy terms during term update.
When updating an existing taxonomy term that shares its `term_id` with
another term, we generate a new row in `wp_terms` and associate the updated
term_taxonomy_id with the new term. This separates the terms, such that
updating the name of one term does not change the name of any others.

Note that this term splitting only occurs on installations whose database
schemas have been upgraded to version 30133 or higher. Note also that shared
terms are only split when run through `wp_update_term()`, as on edit-tags.php;
we will wait until a future release of WordPress to force the splitting of all
shared taxonomy terms.

Props boonebgorges, rmccue, greuben, garyc40, wonderboymusic, imath, jesin.
Fixes #5809.

git-svn-id: https://develop.svn.wordpress.org/trunk@30241 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-05 02:02:48 +00:00
Boone Gorges
88167ddc1a Do not create shared taxonomy terms.
A "shared" term occurs when two entries in the `wp_term_taxonomy` table share a
single `term_id`, and thereby correspond to the same row in `wp_terms`. This
changeset stops the practice of creating shared terms: each new row in
`wp_term_taxonomy` will receive its own row in `wp_terms`. The new strategy
for term creation depends on whether the installation's database schema is up
to date for 4.1:

* If so, terms are allowed to be created with the same slug as an existing term, as long as they are in different taxonomies and do not share a parent. Thus, a new tag with the slug 'wordpress' can exist alongside a category with the slug 'wordpress'.
* If not, new terms will be forced to have unique slugs. Thus, on an installation containing a category with the slug 'wordpress', a new tag 'WordPress' will get the slug 'wordpress-2'.

Fixes #21950. See #5809.

git-svn-id: https://develop.svn.wordpress.org/trunk@30240 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-05 01:41:58 +00:00
Boone Gorges
8096af102a Enforce ORDER BY and LIMIT clauses in term_exists() queries.
In case of edge cases where a duplicate term might exist in a replicated
database for a split second, these explicit query clauses ensure that
`term_exists()` will always recognize the oldest matched term as the
canonical one. See [30238] for background.

Props pento.
See #22023, #5809.

git-svn-id: https://develop.svn.wordpress.org/trunk@30239 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-05 01:08:44 +00:00
Boone Gorges
3f7051bf81 In wp_insert_term(), clean up accidental duplicate terms after insert.
In [30056], the UNIQUE index was removed from the 'slug' column of `wp_terms`.
While we have numerous checks in place to avoid the creation of unwanted
duplicate term+term_taxonomy pairs, it's possible that in certain edge cases -
such as during the lag caused by database replication, or a race condition
involving near-simultaneous creation of more than one term - we'll end up
unwittingly inserting two identical rows.

The current changeset minimizes this risk by introducing a failsafe mechanism
into `wp_insert_term()`. After a term and term_taxonomy are INSERTed, we check
to see whether the term just created is a duplicate of an existing term; if so,
we delete the new one and keep the old one. This prevents problems caused by
replication lag, because SELECT queries that take place after an INSERT will
hit the master database; it mitigates race conditions by enforcing that the
term that was created first (ie, the one with the lowest `term_id`) is
always the "canonical" one.

Props nacin, markjaquith.
See #22023, #5809.

git-svn-id: https://develop.svn.wordpress.org/trunk@30238 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-05 00:59:51 +00:00
Ian Stewart
367b8e340e Twenty Fifteen: use continue reading links for auto-generated excerpts to provide a readable link for screenreaders.
Props davidakennedy, kraftbj, fixes #30135.



git-svn-id: https://develop.svn.wordpress.org/trunk@30237 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-04 21:18:22 +00:00
Ian Stewart
15485e1945 Twenty Fifteen: Use the new archive template tags and make archive template titling way simpler!
Props obenland, fixes #30246.



git-svn-id: https://develop.svn.wordpress.org/trunk@30236 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-04 21:00:20 +00:00
Ian Stewart
c8d11a139f Twenty Fifteen: adding licensing info for the image used in the screenshot.
Props sakinshrestha, fixes #30156.



git-svn-id: https://develop.svn.wordpress.org/trunk@30235 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-04 20:54:05 +00:00
Scott Taylor
f251fde34e Add some docs to wp.media.view.EditorUploader.
Props ericlewis.
See #29951.


git-svn-id: https://develop.svn.wordpress.org/trunk@30234 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-04 20:47:17 +00:00
Ian Stewart
b70707b4c1 Twenty Fifteen: Formatting cleanup for documentation, crossing eyes, dotting tees.
Props lancewillett, MikeHansenMe, fixes #30149.


git-svn-id: https://develop.svn.wordpress.org/trunk@30233 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-04 20:25:04 +00:00
Ian Stewart
be2a929e4e Twenty Fifteen: missing spaces for code standards.
Props Jayjdk, fixes #30076.



git-svn-id: https://develop.svn.wordpress.org/trunk@30232 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-04 20:15:05 +00:00
Ian Stewart
94db67ffa7 Twenty Fifteen: accessible alt text for post thumbnail links.
Props joedolson, fixes #30076.



git-svn-id: https://develop.svn.wordpress.org/trunk@30231 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-04 18:56:10 +00:00
Ian Stewart
47c5c58e47 Twenty Fifteen: Simplify the header, sidebar, background controls and make customization faster for users to do. This has the added benefit of fixing our bug where hidden header text wasn't being updated on color scheme switch. Nice.
Props celloexpressions, iamtakashi, fixes #30164 and #29980.


git-svn-id: https://develop.svn.wordpress.org/trunk@30230 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-04 18:41:56 +00:00
Ian Stewart
2045e94fc2 Twenty Fifteen: Crashing chrome if you don't have Noto installed probably isn't the best experience -- removing font kerning.
Props iamtakashi, fixes #30195


git-svn-id: https://develop.svn.wordpress.org/trunk@30229 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-04 17:40:45 +00:00
Drew Jaynes (DrewAPicture)
d40e689fe1 Ensure the requires for the admin bootstrap are documented in all wp-admin/user/ files.
Props NikV for the initial patch.
Fixes #29111.


git-svn-id: https://develop.svn.wordpress.org/trunk@30228 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-04 16:31:31 +00:00
Drew Jaynes (DrewAPicture)
155561f631 Fix a couple of typos in the hook documentation for the $option filter in wp-admin/includes/class-wp-list-table.php.
Props bobbingwide.
Fixes #30229.


git-svn-id: https://develop.svn.wordpress.org/trunk@30227 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-04 16:04:37 +00:00
Drew Jaynes (DrewAPicture)
9cbffbdb44 Merge a multi-line comment into a single-line comment in wp-includes/link-template.php.
See [30166]. See #30224.


git-svn-id: https://develop.svn.wordpress.org/trunk@30226 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-04 15:58:44 +00:00
Drew Jaynes (DrewAPicture)
ecec9d3595 Add parameter and return descriptions to the WP_List_Table::get_pagination_arg() DocBlock.
See #30224.


git-svn-id: https://develop.svn.wordpress.org/trunk@30225 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-04 15:54:50 +00:00
Drew Jaynes (DrewAPicture)
73a79a8160 Cross reference get_the_archive_title() and get_the_archive_description() in the inline documentation for their corresponding template tags.
Also define the default values for `$before` and `$after` in the template tag documentation.

See [30223]. See #21995.


git-svn-id: https://develop.svn.wordpress.org/trunk@30224 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-04 06:51:06 +00:00
John Blackbourn
2599e32a67 Introduce some new template functions for archive titles and descriptions:
* `get_the_archive_title()` and `the_archive_title()` for returning/displaying the title of the current term, date, post type, post format, or author archive.
 * `get_the_archive_description()` and `the_archive_description()` for returning/displaying the description associated with the current term archive.

Fixes #21995
Props obenland, DrewAPicture


git-svn-id: https://develop.svn.wordpress.org/trunk@30223 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-04 00:35:00 +00:00
Ian Stewart
2203ed4ca5 Twenty Fifteen: correct image alignment for RTL.
Props iamtakashi, fixes #30239.




git-svn-id: https://develop.svn.wordpress.org/trunk@30222 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-03 23:11:11 +00:00
Ian Stewart
ed459a0b4e Twenty Fifteen: check if user-selected custom colors are the same as default so we're not duplicating styles.
Props iamtakashi, fixes #30234



git-svn-id: https://develop.svn.wordpress.org/trunk@30221 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-03 21:58:56 +00:00