Commit Graph

565 Commits

Author SHA1 Message Date
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
Drew Jaynes
359a2ce779 Inline documentation for hooks in wp-admin/edit-form-advanced.php.
Props ericlewis.
Fixes #25434.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-16 22:59:09 +00:00
Andrew Nacin
a00df382a3 Move the revisions upgrade handler to POST, to avoid esoteric metadata stomping.
props SergeyBiryukov.
see #25023.
for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-07 18:35:09 +00:00
Andrew Nacin
fd57b239d2 Don't rely on include_path to include files.
Always use dirname() or, once available, ABSPATH.

props ketwaroo, hakre.
fixes #17092.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-25 00:18:11 +00:00
Andrew Nacin
5febb6045f Introduce a meta_box_cb argument for register_taxonomy().
The specified callback function is used as the meta box callback for the taxonomy.

props garyc40, helen.
fixes #14206.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-23 17:12:10 +00:00
Helen Hou-Sandí
d729fbf8e6 Allow the "Add New" URL on post edit screens to be filtered via admin_url(). props SergeyBiryukov, jeremyfelt, c3mdigital. fixes #18504.
Built from https://develop.svn.wordpress.org/trunk@25527


git-svn-id: http://core.svn.wordpress.org/trunk@25447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-20 20:31:09 +00:00
Sergey Biryukov
3137e83126 Check if the post type supports title. see #24423.
Built from https://develop.svn.wordpress.org/trunk@25461


git-svn-id: http://core.svn.wordpress.org/trunk@25382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-16 20:51:09 +00:00
Andrew Nacin
737bcf1123 Only focus the title field when it is empty. Remove ancient code that provided for an alternate condition.
props scruffian for initial patches.
props helen.
fixes #24423.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-16 20:37:09 +00:00
Ryan Boren
54bf0b713c Don't show the "Get Shortlink" button for pages with a ?page_id=x permalink.
Props sillybean
fixes #14760

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


git-svn-id: http://core.svn.wordpress.org/trunk@25102 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-26 16:06:08 +00:00
Ryan Boren
564d80e29f wp_get_shortlink() improvements.
* Return shortlinks for pages and public CPTs.
* Return shortlinks even when cruft-free links are not enabled.
* Unit tests

Props sillybean, layotte, cais
fixes #18632
see #14760


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


git-svn-id: http://core.svn.wordpress.org/trunk@25017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-15 20:09:09 +00:00
Andrew Nacin
6ed7794598 Restore the revisions meta box for 3.6. Hidden by default as before. Can be useful for a few lingering use cases. see #24804.
git-svn-id: http://core.svn.wordpress.org/trunk@24955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-01 17:06:38 +00:00
Helen Hou-Sandí
43724e7735 Add an edit_form_top hook to the post edit form. props yurivictor. fixes #24861.
git-svn-id: http://core.svn.wordpress.org/trunk@24831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-28 22:29:36 +00:00
Jon Cave
df3a2bb591 Fix notice and show generic last update message if _edit_last references a nonexistent user.
Fixes #15498.


git-svn-id: http://core.svn.wordpress.org/trunk@24816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-28 20:35:51 +00:00
Andrew Nacin
c8fe64a602 Revisions changes.
* Eliminates the bloated Revisions meta box in favor of 'Revisions: #' in the publish box.
 * Adds ability to compare autosave to current post, when revisions are disabled.
 * Makes autosaves stand out visually, including "Restore This Autosave".

Also:
 * Adds missing capability check for restoring a revision.
 * When no revision matches the post's current modified time, avoid marking an autosave as 'current'.
 * Fixes wp_get_post_autosave() to return an autosave even when revisions are disabled.
 * Add 'check_enabled' arg to wp_get_post_revisions(); false avoids the wp_revisions_enabled() check.
 * Adds a responsive slider that is narrower for fewer versions. props markjaquith.

see #24804.



git-svn-id: http://core.svn.wordpress.org/trunk@24790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-24 06:08:14 +00:00
Andrew Nacin
85cf232e23 Autosave: Don't save an autosave unnecessarily when the post editor loads and TinyMCE is the default editor.
Delete such useless autosaves when we detect them in edit-form-advanced.php.

see #7392.



git-svn-id: http://core.svn.wordpress.org/trunk@24787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-24 05:37:53 +00:00
Andrew Nacin
c2a543566c Move _local_storage_notice() to admin/includes/template.php. props azaozz, see #24756.
git-svn-id: http://core.svn.wordpress.org/trunk@24762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-22 05:09:49 +00:00
Andrew Nacin
5bb2f20164 Better 'Connection lost' notice that includes an indication of activity. fixes #24695.
git-svn-id: http://core.svn.wordpress.org/trunk@24743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-18 21:33:59 +00:00
Helen Hou-Sandí
a8cb46d9a3 Remove the conditional wrappers for the edit_form_after_* hooks. Using the .edit-form-section class will still add a 20px bottom margin; devs will just want to add wrapping containers as appropriate. fixes #24334; see #23240.
git-svn-id: http://core.svn.wordpress.org/trunk@24586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-08 15:45:53 +00:00
Andrew Nacin
3231e8cbd0 Pass $post to hooks in edit-form-advanced.php including edit_form_advanced and edit_form_after_*. fixes #24611.
git-svn-id: http://core.svn.wordpress.org/trunk@24446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-06-19 21:10:51 +00:00
Mark Jaquith
89fd06e44b First pass at removing Post Format UI.
see #24452. fixes #24455.

git-svn-id: http://core.svn.wordpress.org/trunk@24388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-30 21:33:46 +00:00
Sergey Biryukov
8faa6f0260 Fix switching post formats when JavaScript is disabled. props kovshenin. see #24360.
git-svn-id: http://core.svn.wordpress.org/trunk@24373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-27 01:02:10 +00:00
Andrew Ozz
7255abb66c Fix showing and hiding of UI elements when disabling the Post Formats UI, props kovshenin, see #24327
git-svn-id: http://core.svn.wordpress.org/trunk@24264 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-15 20:43:09 +00:00
Ryan Boren
164b3e71e6 Update some copy in the Post Formats UI.
see #24227


git-svn-id: http://core.svn.wordpress.org/trunk@24184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-07 13:56:07 +00:00
Sergey Biryukov
3348a6a0ad Avoid an undefined variable notice. fixes #24236.
git-svn-id: http://core.svn.wordpress.org/trunk@24149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-01 02:38:51 +00:00
Sergey Biryukov
d324462cb0 Avoid an undefined variable notice. props sc0ttkclark. see #24236.
git-svn-id: http://core.svn.wordpress.org/trunk@24148 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-01 02:27:07 +00:00
Sergey Biryukov
6cf5361850 Remove unused variable and CSS class. see #24046.
git-svn-id: http://core.svn.wordpress.org/trunk@24099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-26 12:36:12 +00:00
Mark Jaquith
1b554db95a Post format UI refresh.
* Post format switcher does not go away after clicking
* Refresh of format switcher style
* Highlighting of active post format
* Prompt text goes under the switcher
* Better animations

see #24046. props wonderboymusic, johnjamesjacoby, aaroncampbell, PeteMall.

Also, because I forgot it on [24006]: props saracannon.

git-svn-id: http://core.svn.wordpress.org/trunk@24098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-26 12:22:55 +00:00
Sergey Biryukov
57cb2a36bb Avoid an undefined variable notice. props lightningspirit. fixes #24190.
git-svn-id: http://core.svn.wordpress.org/trunk@24097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-25 23:31:20 +00:00
Mark Jaquith
082e067a2d Screen option for Post Format UI.
props nacin. see #23930.

git-svn-id: http://core.svn.wordpress.org/trunk@24092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-25 07:28:33 +00:00
Mark Jaquith
4dffefb166 Fix some issues related to status/aside editor height changing.
props wonderboymusic. fixes #23992.

git-svn-id: http://core.svn.wordpress.org/trunk@24084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-25 04:06:06 +00:00
Mark Jaquith
90fc15e6d9 post-new.php?format=X will pre-fill the format, to allow for Post-Format-chosen-first editor jump-starting.
props kovshenin, wonderboymusic. fixes #24116.

git-svn-id: http://core.svn.wordpress.org/trunk@24081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-25 02:44:23 +00:00
Andrew Nacin
874f650a39 Rename the show_post_format_ui filter to enable_post_format_ui. 'show' is a different concept - this filter entirely disables the UI. see #23929.
git-svn-id: http://core.svn.wordpress.org/trunk@24063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-22 21:07:42 +00:00
Mark Jaquith
2d382c1a5c Post Formats: use the content body for the body of the Quote post format.
* Searchable, better editing tools
* Less cluttered Post Format UI

props kovshenin, DrewAPicture. see #24009

git-svn-id: http://core.svn.wordpress.org/trunk@24034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-18 18:07:58 +00:00
Andrew Ozz
6573ffa1e1 Revisions: look at the version of the earliest revision when checking whether to upgrade the revisions authors, see #16215
git-svn-id: http://core.svn.wordpress.org/trunk@24026 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-18 05:02:57 +00:00
Sergey Biryukov
a1bbc975b4 Make sure the variables are always defined. props tlovett1, danielbachhuber. fixes #24034. fixes #24112.
git-svn-id: http://core.svn.wordpress.org/trunk@24011 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-17 15:36:13 +00:00
Mark Jaquith
56d5d62a19 New Post Format UI chooser treatment in response to testing.
* Bigger icons
* Format description under each
* UI hides after choice
* Saving without choosing implies "Standard"
* Helpful text, with "Change format" link

see #24046. props lessbloat, wonderboymusic.

git-svn-id: http://core.svn.wordpress.org/trunk@24006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-17 04:08:46 +00:00
Sergey Biryukov
4cb9074985 Remove unused variables introduced in [23843]. see #19570.
git-svn-id: http://core.svn.wordpress.org/trunk@23993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-15 18:16:01 +00:00
Ryan Boren
63e67b414b Allow turning off the post formats UI via a show_post_format_ui filter.
Props johnbillion
see #23929


git-svn-id: http://core.svn.wordpress.org/trunk@23946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-09 22:43:28 +00:00
Andrew Ozz
9fe85b154e Revisions: move the call to _wp_upgrade_revisions_of_post() to edit-form-advanced.php, in the code block checking whether we should show the revisions postbox. See #16215
git-svn-id: http://core.svn.wordpress.org/trunk@23929 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-06 23:43:05 +00:00
Andrew Ozz
2466f6a726 Autosave: use heartbeat to determine when connection is lost and disable the Save and Publish buttons. Re-enable the buttons when connection is restored. Props dh-shredder, see #23220
git-svn-id: http://core.svn.wordpress.org/trunk@23886 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-02 22:51:09 +00:00
Sergey Biryukov
969cf51e6f Fix incorrect script handle and a notice. props ocean90. fixes #23896.
git-svn-id: http://core.svn.wordpress.org/trunk@23868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-29 17:33:35 +00:00
Mark Jaquith
bcc9c61e57 Post Format prompt copy tweaks. props sabreuse. see #19570
git-svn-id: http://core.svn.wordpress.org/trunk@23845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-29 04:19:44 +00:00
Mark Jaquith
c93e0231af Post Format UI.
* Icons
* Selection
* Prompt text
* Special fields
* Styling
* Sparkles

This is going to need testing, polish, and love.

see #19570. props melchoyce, helen, wonderboymusic, lessbloat, rachelbaker, aaroncampbell, DrewAPicture, ryelle.

git-svn-id: http://core.svn.wordpress.org/trunk@23843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-29 03:35:41 +00:00
Mark Jaquith
12d3fc7999 Add functions for generating metadata for video and audio, using the
ID3 library. Also allows themes/plugins to add thumbnail support
to these media types. Think stuff like album art, movie covers, and
video freeze-frames.

props wonderboymusic. fixes #23673

git-svn-id: http://core.svn.wordpress.org/trunk@23766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-21 04:55:42 +00:00
Helen Hou-Sandí
25c272856b Remove separate meta fields for image and gallery post formats. These are proving to be more confusing and labor-intensive from both a user and dev perspective than entering into the regular content editor. We will rely on good content parsing instead. See #19570, #23347.
git-svn-id: http://core.svn.wordpress.org/trunk@23753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-19 17:18:07 +00:00
Andrew Ozz
e9245269a7 Autosave to the browser's sessionStorage, compare this autosave to the post content on page load and let the user restore it when the data is not the same. First run, see #23220
git-svn-id: http://core.svn.wordpress.org/trunk@23683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-13 10:08:16 +00:00
Andrew Nacin
ebe758b5c6 Use auto-draft rather than post_ID = 0 to detect whether we are adding a new post. see #23665.
git-svn-id: http://core.svn.wordpress.org/trunk@23631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-06 23:55:54 +00:00
Helen Hou-Sandí
fffc2e1ab1 Prevent an unseemly gap on the edit screen when nothing else displays before normal meta boxes. Give better HTML and visual structure to items added via edit_form_after_title and edit_form_after_editor. Using a class of .edit-form-section will now get you a 20px bottom margin; perfect for your additions to the post edit screen. fixes #23240.
git-svn-id: http://core.svn.wordpress.org/trunk@23615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-04 23:22:17 +00:00
Ryan Boren
09d2c65970 Always wp_unslash() the return of wp_get_referer().
see #21767


git-svn-id: http://core.svn.wordpress.org/trunk@23570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 17:20:32 +00:00
Ryan Boren
5f809d1d22 Use wp_unslash() instead of stripslashes() and stripslashes_deep(). Use wp_slash() instead of add_magic_quotes().
see #21767


git-svn-id: http://core.svn.wordpress.org/trunk@23563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 17:00:25 +00:00