Weston Ruter
83b059aa19
Customize: Implement customized state persistence with changesets.
...
Includes infrastructure developed in the Customize Snapshots feature plugin.
See https://make.wordpress.org/core/2016/10/12/customize-changesets-technical-design-decisions/
Props westonruter, valendesigns, utkarshpatel, stubgo, lgedeon, ocean90, ryankienstra, mihai2u, dlh, aaroncampbell, jonathanbardo, jorbin.
See #28721 .
See #31089 .
Fixes #30937 .
Fixes #31517 .
Fixes #30028 .
Fixes #23225 .
Fixes #34142 .
Fixes #36485 .
git-svn-id: https://develop.svn.wordpress.org/trunk@38810 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-18 20:04:36 +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
80439d1c48
I18N: Add translator comments for strings in wp-includes/functions.wp-scripts.php
.
...
Props ramiy.
Fixes #37803 .
git-svn-id: https://develop.svn.wordpress.org/trunk@38345 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-23 23:52:31 +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
Drew Jaynes
194583a770
Docs: Apply inline @see
tags to hooks referenced in DocBlocks in a variety of wp-includes/* files.
...
Applying these specially-crafted `@see` tags allows the Code Reference parser to recognize and link these elements as actions and filters.
See #36921 .
git-svn-id: https://develop.svn.wordpress.org/trunk@37543 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-23 19:00:41 +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)
276635f8a3
Docs: Use correct @since
tags for script enqueue functions.
...
See [4968], [3788].
See #35964 .
git-svn-id: https://develop.svn.wordpress.org/trunk@36729 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-26 12:49:37 +00:00
Dominik Schilling (ocean90)
9a7488aaf8
Spelling: Standardize on "front end"/"back end" (noun) and "front-end"/"back-end" (adjective).
...
Props obrienlabs, thewanderingbrit.
Fixes #34887 .
git-svn-id: https://develop.svn.wordpress.org/trunk@36709 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-25 12:52:33 +00:00
Drew Jaynes
eaaef09d83
Docs: Use a third-person singular verb in the DocBlock summary for wp_add_inline_script()
, introduced in [36633].
...
See #14853 . See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@36707 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-25 05:13:14 +00:00
Pascal Birchler
0e13a57288
Script Loader: Introduce wp_add_inline_script()
.
...
This new function can be used to add inline JavaScript before and after enqueued scripts, just like `wp_add_inline_style()` works for CSS.
Props atimmer, abiralneupane, ocean90, swissspidy.
Fixes #14853 .
git-svn-id: https://develop.svn.wordpress.org/trunk@36633 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 16:43:41 +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
Konstantin Kovshenin
318455ff24
Docs: Remove some more dittography.
...
See #34885 , r35793.
git-svn-id: https://develop.svn.wordpress.org/trunk@35796 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-06 21:49:43 +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
bc164ef635
Cleanup the use of $wp_scripts
global in functions.wp-scripts.php
.
...
See #32444 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32596 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-25 16:23:46 +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
Scott Taylor
fbdbba9e01
Revert [31030] and [31033]. Incidentally, there is no lazy-loading happening here anyway.
...
Pushing #26111 to future.
git-svn-id: https://develop.svn.wordpress.org/trunk@32124 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-14 15:12:49 +00:00
Drew Jaynes
5be0ba0ae8
Add a variety of missing descriptions and fix syntax for wp_scripts()
, _wp_scripts_maybe_doing_it_wrong()
, and wp_script_add_data()
.
...
See #31888 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32040 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-05 15:54:08 +00:00
Dominik Schilling (ocean90)
135be2826d
Avoid a PHP notice in wp_enqueue_script()
if $handle is an array.
...
Calling `wp_enqueue_script()` with an array as the first argument is a "hidden feature" and should be avoided. Use dependencies instead.
props sorich87 for initial patch.
fixes #31636 .
see #14488 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31887 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-25 17:54:50 +00:00
Andrew Ozz
f18854e866
Add support for IE conditional comments for WP_Scripts to match the functionality of WP_Styles, including unit tests. Props filosofo, aaroncampbell, ethitter, georgestephanis, valendesigns. Fixes #16024 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@31223 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-17 01:36:55 +00:00
Scott Taylor
7c707c6633
Add @ignore
to _wp_scripts_maybe_doing_it_wrong()
.
...
Props DrewAPicture for the thought leadership.
See #20513 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31202 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 05:37:06 +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
e1da69195d
In wp_print_scripts()
, bail if $handles
is false
and the $wp_scripts
global has not been instantiated.
...
See [31192], #20513 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31193 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 02:27:49 +00:00
Scott Taylor
7ccdc6b470
functions.wp-scripts.php
contains a lot of duplicated code. Make 2 new functions: wp_scripts()
and wp_scripts_maybe_doing_it_wrong( $function )
, to encapsulate the repeated logic.
...
Props GaryJ, scribu, wonderboymusic.
Fixes #20513 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31192 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-16 02:06:03 +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
c69dbc8b5a
Allow the 3rd argument to wp_localize_script()/WP_Scripts->localize()
to be a callable
, allowing data to be lazy-loaded when the script is actually enqueued.
...
Props jtsternberg.
Fixes #26111 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31030 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-03 03:53:30 +00:00
Scott Taylor
8476a2e2fa
When calling wp_enqueue_script()
with a registered $handle
, no $src
(using the default value, false
), and true
as the value for $in_footer
, ensure that the script actually loads in the footer. If the handle was registered with $in_footer
equal to true
, this already worked. Make it work for scripts like where $in_footer
was initially false
, example: wp_enqueue_script( 'json2', false, array(), false, true );
...
Props SergeyBiryukov.
Fixes #14488 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31028 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-03 02:40:11 +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
Drew Jaynes (DrewAPicture)
d93bfdce56
Ensure inline code is markdown-escaped as such, HTML tags are removed from summaries, and that code snippets in descriptions are properly indented.
...
Affects DocBlocks for the following core elements:
* Markdown-indent a code snippet in the description for `_deprecated_argument()`
* Markdown-indent a code snippet in the description for `wp_localize_script()`
* Backtick-escape HTML tags in two parameter descriptions for `wp_register()`
* Various DocBlock formatting in the description for `get_bloginfo()`
* Remove HTML tag from the summary for `_wp_render_title_tag()`
* Backtick-escape a HTML tag in the description for `get_archives_link()`
* Markdown-indent a code snippet in the description for `wp_admin_css_color()`
* Markdown-indent a code snippet in the description for the `welcome_panel` hook
Props rarst.
See #30473 .
git-svn-id: https://develop.svn.wordpress.org/trunk@30541 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-24 05:38:44 +00:00
Mark Jaquith
7063377539
Use HTTPS URLs for core.trac.wordpress.org
...
see #27115
git-svn-id: https://develop.svn.wordpress.org/trunk@29788 602fd350-edb4-49c9-b593-d223f7449a82
2014-09-29 13:27:55 +00:00
Andrew Nacin
9c82e2854e
Revert [28840]; wp_localize_script() must be called on a registered handle.
...
see #24724 .
git-svn-id: https://develop.svn.wordpress.org/trunk@29677 602fd350-edb4-49c9-b593-d223f7449a82
2014-09-02 19:34:42 +00:00
Scott Taylor
f106f80768
In wp_localize_script()
, instantiate the $wp_scripts
global instead of bailing when it is called before wp_enqueue_scripts
. This allows wp_enqueue_media()
to be called on the front end with no JS errors.
...
Props ericlewis.
Fixes #24724 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28840 602fd350-edb4-49c9-b593-d223f7449a82
2014-06-26 01:37:13 +00:00
Drew Jaynes
1c127e99bd
Inline documentation for hooks in wp-includes/functions.wp-scripts.php.
...
Props ninio for the initial patch.
Fixes #25720 .
git-svn-id: https://develop.svn.wordpress.org/trunk@25949 602fd350-edb4-49c9-b593-d223f7449a82
2013-10-27 17:50:38 +00:00
Drew Jaynes
1b984a7f05
Improve inline documentation for wp-includes/functions.wp-scripts.php.
...
Props kpdesign.
Fixes #25402 .
git-svn-id: https://develop.svn.wordpress.org/trunk@25597 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-24 02:57:56 +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
730574eeb5
Don't allow critical scripts to be deregistered on wp-login.php, just as we do in the rest of the admin.
...
props atimmer.
fixes #25017 .
git-svn-id: https://develop.svn.wordpress.org/trunk@25443 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-14 20:20:46 +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