Sergey Biryukov
9c04110b46
Script Loader: Include the script or style handle in _wp_scripts_maybe_doing_it_wrong() message.
...
This makes the message more helpful and allows for easier debugging.
Props janthiel.
Fixes #50406 .
git-svn-id: https://develop.svn.wordpress.org/trunk@48070 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-17 10:14:36 +00:00
John Blackbourn
1feff0de47
Script Loader: Fix a docblock so it points to the correct page on the developer reference.
...
Props joyously, pbiron
Fixes #48503
git-svn-id: https://develop.svn.wordpress.org/trunk@47204 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-07 17:40:29 +00:00
Sergey Biryukov
cfc3b57488
Docs: Improve inline comments per the documentation standards.
...
Includes minor code layout fixes for better readability.
See #48303 .
git-svn-id: https://develop.svn.wordpress.org/trunk@47122 602fd350-edb4-49c9-b593-d223f7449a82
2020-01-29 00:43:23 +00:00
Sergey Biryukov
67e82bc32a
Docs: Correct the documentation placement for wp_print_styles and shortcode_atts_{$shortcode} hooks.
...
Props jrf.
See #48255 .
git-svn-id: https://develop.svn.wordpress.org/trunk@46688 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-09 13:41:29 +00:00
John Blackbourn
db4f746b4a
Docs: Improve documentation of known return types, plus other docs fixes.
...
See #48303
git-svn-id: https://develop.svn.wordpress.org/trunk@46660 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-05 21:21:46 +00:00
John Blackbourn
e07cf22fd0
Docs: Switch to typed array notation for the docs for asset dependency functions.
...
Props marekdedic
See #48303
git-svn-id: https://develop.svn.wordpress.org/trunk@46595 602fd350-edb4-49c9-b593-d223f7449a82
2019-10-26 21:00:08 +00:00
Sergey Biryukov
36f615eac6
Docs: Fix typo in wp_add_inline_script() and wp_add_inline_style() description.
...
Props jankimoradiya.
Fixes #45705 .
git-svn-id: https://develop.svn.wordpress.org/trunk@44350 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-20 02:41:47 +00:00
Sergey Biryukov
a2017354e2
Docs: Document that the $src parameter of WP_Dependencies::add() can be boolean.
...
Props dimadin.
Fixes #45009 .
git-svn-id: https://develop.svn.wordpress.org/trunk@43661 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-28 21:50:45 +00:00
Gary Pendergast
a75d153eee
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@43571 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-17 01:50:26 +00:00
Gary Pendergast
8f95800d52
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42343 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-30 23:09:33 +00:00
Sergey Biryukov
669ec7953e
Script Loader: Correct default value for $src in wp_enqueue_script() and wp_enqueue_style().
...
Props Frank Klein for initial patch.
See #37770 .
git-svn-id: https://develop.svn.wordpress.org/trunk@38519 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-04 04:08:11 +00:00
Sergey Biryukov
920f29616a
Docs: Use 3-digit, x.x.x-style semantic versioning for _doing_it_wrong(), _deprecated_function(), _deprecated_argument(), and _deprecated_file() throughout core.
...
Props metodiew.
Fixes #36495 .
git-svn-id: https://develop.svn.wordpress.org/trunk@37985 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-06 12:39:01 +00:00
Peter Wilson
db0195c936
DOCS: Replace HTTP links with HTTPS.
...
Replaces unsecure links in documentation and translator comments with their secure versions.
Props johnpgreen, netweb
Fixes #36993
git-svn-id: https://develop.svn.wordpress.org/trunk@37674 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-10 04:49:09 +00:00
Sergey Biryukov
1af1c2d30f
I18N: Update translator comments after [37190].
...
See #36496 .
git-svn-id: https://develop.svn.wordpress.org/trunk@37191 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-13 04:29:25 +00:00
Sergey Biryukov
8594b7922d
I18N: After [37188], display script and style tags in the message as <script> and <style>.
...
Props dd32.
See #36496 .
git-svn-id: https://develop.svn.wordpress.org/trunk@37190 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-13 04:15:40 +00:00
Sergey Biryukov
c1913d5ad3
I18N: Remove tag and function names from two translatable strings.
...
Add translator comments.
Props andg for initial patch.
Fixes #36496 .
git-svn-id: https://develop.svn.wordpress.org/trunk@37188 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-13 03:01:56 +00:00
John Blackbourn
97c7cff31f
Docs: Improvements and corrections for the $ver parameter of the dependencies API functions.
...
See #32246
git-svn-id: https://develop.svn.wordpress.org/trunk@36993 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-14 22:36:26 +00:00
Dominik Schilling (ocean90)
592da58d26
Docs: Improve inline docs for WP_Dependencies, WP_Styles, and WP_Scripts.
...
Also, make them and related files part of WordPress.
See #35964 .
git-svn-id: https://develop.svn.wordpress.org/trunk@36744 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-27 20:33:57 +00:00
Dominik Schilling (ocean90)
3a836ea224
Styles: Clarify the allowed values for the $media parameter of wp_register_style()/wp_enqueue_style().
...
Adds unit test.
Fixes #35921 .
git-svn-id: https://develop.svn.wordpress.org/trunk@36649 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 20:40:43 +00:00
John Blackbourn
858cf7d215
Docs: Miscellaneous docblock code quality tweaks.
...
See #32246
git-svn-id: https://develop.svn.wordpress.org/trunk@36074 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-23 07:52:04 +00:00
Scott Taylor
c7c55f20b5
After [32596] and [32597], ensure that wp_scripts|styles() is called to ensure an instance is created of WP_Scripts|Styles() before calling ->do_items().
...
See #32444 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32728 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-12 16:53:17 +00:00
Scott Taylor
bac34e9daa
Cleanup the use of $wp_styles global in functions.wp-styles.php.
...
See #32444 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32597 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-25 16:34:38 +00:00
John Blackbourn
39639c79da
Add a return value to wp_register_script() and wp_register_style() which matches the return value of WP_Dependencies::add().
...
Props katzwebdesign, pareshradadiya, DrewAPicture.
Fixes #31126
git-svn-id: https://develop.svn.wordpress.org/trunk@32483 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-10 19:56:15 +00:00
Drew Jaynes
1300ff854a
Add a missing return description for wp_styles().
...
See [31194]. See #31888 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32041 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-05 15:55:28 +00:00
Scott Taylor
c6ba804b33
Make _wp_scripts_maybe_doing_it_wrong( $function ) "private".
...
Props obenland for the thought leadership.
See #20513 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31196 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 02:41:07 +00:00
Scott Taylor
28d654837d
After [31192], create a function, wp_styles(), to reduce duplicated code in functions.wp-styles.php. The style functions can reuse wp_scripts_maybe_doing_it_wrong( $function ) internally.
...
See #20513 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31194 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 02:30:08 +00:00
Scott Taylor
5acc6bdb58
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31188 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 01:05:52 +00:00
Scott Taylor
0632a3de68
Improve various @param docs.
...
See #30224 .
git-svn-id: https://develop.svn.wordpress.org/trunk@30674 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-30 23:23:37 +00:00
Sergey Biryukov
937d5cdd11
Translate some previously untranslated _doing_it_wrong() messages.
...
props georgestephanis.
fixes #25614 .
git-svn-id: https://develop.svn.wordpress.org/trunk@29840 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-05 21:05:54 +00:00
Drew Jaynes
1c625a49ac
Inline documentation for hooks in wp-includes/functions.wp-styles.php.
...
Props admiralthrawn.
Fixes #25722 .
git-svn-id: https://develop.svn.wordpress.org/trunk@25950 602fd350-edb4-49c9-b593-d223f7449a82
2013-10-27 17:58:32 +00:00
Andrew Nacin
d1e1139956
Avoid printing a possible HTML element. fixes #24813 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@25809 602fd350-edb4-49c9-b593-d223f7449a82
2013-10-16 04:45:08 +00:00
Andrew Nacin
5e119ca3b4
Revert [25202] and enforce that wp_add_inline_style() does not want <style> tags.
...
Prior to 3.7, these tags were not printed (and thus needed to be provided), but only in the admin and when concatenation was enabled. They should never be required. Strip them when we find them and issue a notice for incorrect usage.
props atimmer, georgestephanis.
fixes #24813 .
git-svn-id: https://develop.svn.wordpress.org/trunk@25786 602fd350-edb4-49c9-b593-d223f7449a82
2013-10-15 14:34:33 +00:00
Drew Jaynes
d1bd6d8c6f
Improve inline documentation for wp-includes/functions.wp-styles.php.
...
Props kpdesign.
Fixes #25401 .
git-svn-id: https://develop.svn.wordpress.org/trunk@25594 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-24 02:23:09 +00:00
Sergey Biryukov
80b315f740
Update @since for wp_script_is() and wp_style_is(). props jdgrimes. see #25326 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@25449 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-16 12:45:54 +00:00
Andrew Nacin
b43712e0f7
New develop.svn.wordpress.org repository based on the old core.svn repository.
...
* All WordPress files move to a src/ directory.
* New task runner (Grunt), configured to copy a built WordPress to build/.
* svn:ignore and .gitignore for Gruntfile.js, wp-config.php, and node.js.
* Remove Akismet external from develop.svn. Still exists in core.svn.
* Drop minified files from src/. The build process will now generate these.
props koop.
see #24976 .
and see http://wp.me/p2AvED-1AI .
git-svn-id: https://develop.svn.wordpress.org/trunk@25001 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-07 05:25:25 +00:00