Commit Graph

63 Commits

Author SHA1 Message Date
Sergey Biryukov 7cf933b2c9 * Pass ellipsis as a parameter to wp_html_excerpt() instead of appending it manually.
* Consolidate the logic to avoid appending ellipsis if the entire string is shown.
* Show ellipsis after truncated filenames and post titles.

props solarissmoke, bpetty, SergeyBiryukov. fixes #11446.

git-svn-id: https://develop.svn.wordpress.org/trunk@24214 602fd350-edb4-49c9-b593-d223f7449a82
2013-05-09 00:22:02 +00:00
Sergey Biryukov bb2a27be5b Use ellipsis instead of three dots. props tjsingleton, jordie23, wojtek.szkutnik, DrewAPicture, SergeyBiryukov. see #8714.
git-svn-id: https://develop.svn.wordpress.org/trunk@24207 602fd350-edb4-49c9-b593-d223f7449a82
2013-05-08 21:27:31 +00:00
Sergey Biryukov 67a775ec5b Fix typos in phpdoc. props bradparbs. fixes #23481.
git-svn-id: https://develop.svn.wordpress.org/trunk@23604 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-04 04:23:00 +00:00
Ryan Boren 6d2a8d2ef0 Use wp_unslash() instead of stripslashes() and stripslashes_deep(). Use wp_slash() instead of add_magic_quotes().
see #21767


git-svn-id: https://develop.svn.wordpress.org/trunk@23594 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-03 21:11:40 +00:00
Ryan Boren c363aea627 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: https://develop.svn.wordpress.org/trunk@23554 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-01 16:28:40 +00:00
Ryan Boren a6c8efadb9 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: https://develop.svn.wordpress.org/trunk@23416 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-14 22:51:06 +00:00
Ryan Boren 2b186b0c45 Lose EOF ?>. Clean up EOF newlines. fixes #12307
git-svn-id: https://develop.svn.wordpress.org/trunk@19712 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-08 17:01:11 +00:00
Andrew Nacin c9dfb91763 Spelling and grammar fun. Fixes #11875 props cnorris23
git-svn-id: https://develop.svn.wordpress.org/trunk@13382 602fd350-edb4-49c9-b593-d223f7449a82
2010-02-24 20:13:23 +00:00
Peter Westwood 2a93c55f43 Switch to passing arrays instead of query strings to functions. Fixes #6647 props filosofo and hakre.
git-svn-id: https://develop.svn.wordpress.org/trunk@12657 602fd350-edb4-49c9-b593-d223f7449a82
2010-01-08 08:34:39 +00:00
Andrew Ozz 387ac8c9b5 Fix notices and phpdoc, props hakre, fixes #10758
git-svn-id: https://develop.svn.wordpress.org/trunk@12284 602fd350-edb4-49c9-b593-d223f7449a82
2009-11-26 11:29:54 +00:00
Ryan Boren 52c593458d Strip commas and spaces from charset. Props Jose Carlos Norte
git-svn-id: https://develop.svn.wordpress.org/trunk@12032 602fd350-edb4-49c9-b593-d223f7449a82
2009-10-14 16:21:28 +00:00
Ryan Boren e25996c368 File file level phpdoc from jacobsantos. see #7037
git-svn-id: https://develop.svn.wordpress.org/trunk@7991 602fd350-edb4-49c9-b593-d223f7449a82
2008-05-25 15:50:15 +00:00
Ryan Boren e911cca913 Allow wp-config.php to exist one level up from WordPress root directory. Props sambauers. fixes #6933
git-svn-id: https://develop.svn.wordpress.org/trunk@7971 602fd350-edb4-49c9-b593-d223f7449a82
2008-05-21 05:59:27 +00:00
Ryan Boren fdc05b24f6 Prepare DB queries in more places. Props filosofo. see #6644
git-svn-id: https://develop.svn.wordpress.org/trunk@7645 602fd350-edb4-49c9-b593-d223f7449a82
2008-04-14 16:13:25 +00:00
Ryan Boren 22ce6cd795 Drop trackbacks that request UTF-7
git-svn-id: https://develop.svn.wordpress.org/trunk@7559 602fd350-edb4-49c9-b593-d223f7449a82
2008-03-28 06:51:19 +00:00
Ryan Boren cd9d655c72 Multi-byte character safe excerpting from nbachiyski. fixes #6077
git-svn-id: https://develop.svn.wordpress.org/trunk@7140 602fd350-edb4-49c9-b593-d223f7449a82
2008-03-03 21:05:23 +00:00
Ryan Boren 40f80710a4 Add filters to comments_open() and pings_open(). Props tellyworth. fixes #5761
git-svn-id: https://develop.svn.wordpress.org/trunk@6716 602fd350-edb4-49c9-b593-d223f7449a82
2008-02-04 20:27:45 +00:00
Mark Jaquith 02df990e1f Consistently include wp-config.php. fixes #3349
git-svn-id: https://develop.svn.wordpress.org/trunk@5843 602fd350-edb4-49c9-b593-d223f7449a82
2007-08-03 00:45:06 +00:00
Matt Mullenweg b1f6f9a6a8 (int)er the dragon.
git-svn-id: https://develop.svn.wordpress.org/trunk@5087 602fd350-edb4-49c9-b593-d223f7449a82
2007-03-23 00:59:21 +00:00
Ryan Boren d96777ab37 Remove redundant check. Props Mittineague. fixes #3665
git-svn-id: https://develop.svn.wordpress.org/trunk@4801 602fd350-edb4-49c9-b593-d223f7449a82
2007-01-25 02:03:55 +00:00
Mark Jaquith cc801d6aac Delay Trackback data escaping until after mb_convert_encoding(). Props to Stefan Esser.
git-svn-id: https://develop.svn.wordpress.org/trunk@4676 602fd350-edb4-49c9-b593-d223f7449a82
2007-01-05 05:45:46 +00:00
Ryan Boren e44ea1ff93 Remove trailing spaces and convert spaces to tabs. Props Nazgul. fixes #986
git-svn-id: https://develop.svn.wordpress.org/trunk@4495 602fd350-edb4-49c9-b593-d223f7449a82
2006-11-19 07:56:05 +00:00
Ryan Boren 7e82eef627 Use get_option instead of get_settings. Just 'cause.
git-svn-id: https://develop.svn.wordpress.org/trunk@4144 602fd350-edb4-49c9-b593-d223f7449a82
2006-08-30 21:46:31 +00:00
Ryan Boren cd766e57e9 s/URI/URL/. Props Nazgul. fixes #2666
git-svn-id: https://develop.svn.wordpress.org/trunk@4133 602fd350-edb4-49c9-b593-d223f7449a82
2006-08-30 16:40:17 +00:00
Ryan Boren 23e2a0a25f Use wp_redirect().
git-svn-id: https://develop.svn.wordpress.org/trunk@3928 602fd350-edb4-49c9-b593-d223f7449a82
2006-06-27 05:38:56 +00:00
Ryan Boren 19a75024be Use mb_strcut instead of mb_substr. fixes #2163
git-svn-id: https://develop.svn.wordpress.org/trunk@3369 602fd350-edb4-49c9-b593-d223f7449a82
2005-12-28 01:06:57 +00:00
Ryan Boren 2bf017f58a Use mb_substr for trackback titles. Props zet. fixes #1474
git-svn-id: https://develop.svn.wordpress.org/trunk@3107 602fd350-edb4-49c9-b593-d223f7449a82
2005-11-16 09:38:54 +00:00
Matt Mullenweg 7318490e2c Cut international trackbacks, fixes #1647
git-svn-id: https://develop.svn.wordpress.org/trunk@3081 602fd350-edb4-49c9-b593-d223f7449a82
2005-11-14 10:14:43 +00:00
Ryan Boren 7d6fc8af08 Break blog header up into functional chunks. Stick it all in a WP class for now. Make wp() the front door. Move template/theme loader code into template-loader.php. Clean up feed file loadup. Modularize.
git-svn-id: https://develop.svn.wordpress.org/trunk@2627 602fd350-edb4-49c9-b593-d223f7449a82
2005-06-10 23:15:13 +00:00
Matt Mullenweg 474c6ec210 Better charset audo-detection - http://mosquito.wordpress.org/view.php?id=788
git-svn-id: https://develop.svn.wordpress.org/trunk@2563 602fd350-edb4-49c9-b593-d223f7449a82
2005-04-20 22:06:28 +00:00
Matt Mullenweg 2e3c23045c Line ending fixes and commenting cleanups from Scott Reilly
git-svn-id: https://develop.svn.wordpress.org/trunk@2556 602fd350-edb4-49c9-b593-d223f7449a82
2005-04-20 03:37:23 +00:00
Ryan Boren debd8e0e5f Convert tb_id to int.
git-svn-id: https://develop.svn.wordpress.org/trunk@2555 602fd350-edb4-49c9-b593-d223f7449a82
2005-04-20 03:20:31 +00:00
Ryan Boren e20c0260e4 Make sure trackback template is not double processed.
git-svn-id: https://develop.svn.wordpress.org/trunk@2305 602fd350-edb4-49c9-b593-d223f7449a82
2005-02-13 21:25:08 +00:00
Matt Mullenweg 1a23b31e2f Don't die before action
git-svn-id: https://develop.svn.wordpress.org/trunk@2282 602fd350-edb4-49c9-b593-d223f7449a82
2005-02-12 07:30:21 +00:00
Ryan Boren fc67ae3e7d Generate feed and trackback rules for pages. Bug 742.
git-svn-id: https://develop.svn.wordpress.org/trunk@2146 602fd350-edb4-49c9-b593-d223f7449a82
2005-01-25 00:23:57 +00:00
Matt Mullenweg f3f5516c99 Don't accept duplicate pings
git-svn-id: https://develop.svn.wordpress.org/trunk@2080 602fd350-edb4-49c9-b593-d223f7449a82
2005-01-11 02:56:43 +00:00
Matt Mullenweg b39c4f8273 Comments refactoring and cleanup
git-svn-id: https://develop.svn.wordpress.org/trunk@1964 602fd350-edb4-49c9-b593-d223f7449a82
2004-12-16 02:57:05 +00:00
Matt Mullenweg 953caf1484 Axing htmlspecialchars because it double-encodes-encodes. Better error handling around queries.
git-svn-id: https://develop.svn.wordpress.org/trunk@1940 602fd350-edb4-49c9-b593-d223f7449a82
2004-12-12 20:41:19 +00:00
Ryan Boren 43609bbdbf Perform empty() check on $doing_trackback. Bug 426.
git-svn-id: https://develop.svn.wordpress.org/trunk@1918 602fd350-edb4-49c9-b593-d223f7449a82
2004-12-08 01:00:12 +00:00
Matt Mullenweg b4984a31c2 Trackback and pingback cleanups.
git-svn-id: https://develop.svn.wordpress.org/trunk@1794 602fd350-edb4-49c9-b593-d223f7449a82
2004-10-14 07:26:41 +00:00
Matt Mullenweg 7d277fbd0d Code cleanup and some fixes from the WP Japan folks.
git-svn-id: https://develop.svn.wordpress.org/trunk@1734 602fd350-edb4-49c9-b593-d223f7449a82
2004-10-04 08:03:52 +00:00
michelvaldrighi 4e644c8b52 moved die() command, fixes bug #309
git-svn-id: https://develop.svn.wordpress.org/trunk@1708 602fd350-edb4-49c9-b593-d223f7449a82
2004-09-23 12:27:52 +00:00
michelvaldrighi 65a78d2dd6 fixes for bug #311, by bronski
git-svn-id: https://develop.svn.wordpress.org/trunk@1705 602fd350-edb4-49c9-b593-d223f7449a82
2004-09-22 19:44:35 +00:00
Ryan Boren d278d6b8ae Trackback fix ups.
git-svn-id: https://develop.svn.wordpress.org/trunk@1696 602fd350-edb4-49c9-b593-d223f7449a82
2004-09-18 22:47:43 +00:00
Matt Mullenweg bee9686570 Move trackbacks to new comment function.
git-svn-id: https://develop.svn.wordpress.org/trunk@1616 602fd350-edb4-49c9-b593-d223f7449a82
2004-09-07 02:34:12 +00:00
Matt Mullenweg 94c29fd51e Track and check user agent for comments.
git-svn-id: https://develop.svn.wordpress.org/trunk@1603 602fd350-edb4-49c9-b593-d223f7449a82
2004-09-05 01:50:39 +00:00
Matt Mullenweg 6b0bcbf2f5 Massive options cleanup and another step of cleaning up the upgrade/install.
git-svn-id: https://develop.svn.wordpress.org/trunk@1599 602fd350-edb4-49c9-b593-d223f7449a82
2004-09-05 00:24:28 +00:00
Matt Mullenweg 6e1c571490 Vanquishing the terror of iso-8859-1.
git-svn-id: https://develop.svn.wordpress.org/trunk@1575 602fd350-edb4-49c9-b593-d223f7449a82
2004-08-30 07:16:40 +00:00
Ryan Boren fdaf705b04 Support timestamp permalinks. Make wider use of is_single(). Bug 0000194.
git-svn-id: https://develop.svn.wordpress.org/trunk@1491 602fd350-edb4-49c9-b593-d223f7449a82
2004-07-28 02:43:54 +00:00
Ryan Boren b721c5b54f index.php now handles feeds and trackbacks.
git-svn-id: https://develop.svn.wordpress.org/trunk@1376 602fd350-edb4-49c9-b593-d223f7449a82
2004-05-31 23:35:32 +00:00