Commit Graph

35 Commits

Author SHA1 Message Date
Sergey Biryukov
caca9cb77b Build Tools: Add non-minified @wordpress scripts to the build output.
Props atimmer.
Merges [43886] to trunk.
See #45156.

git-svn-id: https://develop.svn.wordpress.org/trunk@44245 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-16 23:27:36 +00:00
Anton Timmermans
19800c7b76 Build Tools: Upgrade @wordpress packages to the latest version.
This also includes the new @wordpress/format-library and @wordpress/notices packages.

package-lock.json has been completely regenerated in this commit.

Props pento.
Merges [43840] to trunk.
See #45145.


git-svn-id: https://develop.svn.wordpress.org/trunk@44177 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-14 10:53:17 +00:00
Gary Pendergast
934f0ca2b8 Build Tools: Copy package JavaScript and CSS into wp-includes.
- `grunt webpack:dev` now copies packages JS into `/src/wp-includes/js/dist`, and CSS into `/src/wp-includes/css/dist`.
- `grunt webpack:prod` does the same, but into `/build` instead of `/src`.
- `grunt build` now runs the `webpack:prod` task.

Merges [43760] from the 5.0 branch to trunk.

Props atimmer, pento.
Fixes #45119.



git-svn-id: https://develop.svn.wordpress.org/trunk@44159 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-14 04:10:26 +00:00
Jonathan Desrosiers
93091fac36 Blocks: Parse blocks when displaying posts.
Posts containing blocks are now correctly handled when displaying on the front end, including dynamic blocks and nested blocks.

Props pento.

Merges [43752] to trunk.

See #45109.

git-svn-id: https://develop.svn.wordpress.org/trunk@44118 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-13 18:11:10 +00:00
Jonathan Desrosiers
f8c9698722 Blocks: Introduce the block parser.
The `WP_Block_Parser` class, and the accompanying `parse_blocks()` helper function, can be used to parse an array of blocks out of a content string.

`WP_Block_Parser` is copied from the `@wordpress/block-serialization-default-parser` package. To ensure it stays in sync with the JavaScript parser, changes should be implemented in the package first, then the package version should be upgraded to include the changes.

Props pento.

Merges [43751] to trunk.

See #45109.

git-svn-id: https://develop.svn.wordpress.org/trunk@44116 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-13 17:39:59 +00:00
Jonathan Desrosiers
8909554d2e Script loader: Adjust JS packages registration.
Adjusts the packages registration after [43723]:

    Combine the different registration functions into one `wp_default_packages` function. To reach this goal move the prefix logic into a function so it can be called from different locations. Use a static variable there to prevent duplicate inclusion of `version.php`.

    Call this function from the `wp_default_scripts` action by registering it as a default filter.

    Combine some of the logic in `_WP_Editors::print_tinymce_scripts` into `wp_register_tinymce_scripts`. The logic to force an uncompressed TinyMCE script file stays in `_WP_Editors::force_uncompressed_tinymce` because that logic is very specific to the classic editor.

    The script handle `wp-tinymce` is now a dependency of the editor script handle. In combination with the previous item, this makes the classic editor work.

    Adjust the syntax of the script paths to be more consistent with other WordPress code.

    Always use "production" mode for the media files to prevent people from inadvertently committing development files.

Props pento, omarreiss, atimmer.

Merges [43738] into trunk.

Fixes #45065.

git-svn-id: https://develop.svn.wordpress.org/trunk@44115 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-13 17:26:09 +00:00
Jonathan Desrosiers
7f071ae431 Script loader: Register @wordpress scripts.
This allows the packages to be consumed by plugins and core itself.
The code has been based on the work done in the Gutenberg plugin.

We've added an array with all the packages and the vendor packages to
loop through. This sets a convention so all packages will be
registered in the same way. This array can eventually be generated by
a webpack plugin.

We need to register TinyMCE explicitly. Previously TinyMCE was used
by inserting custom `<script>` tags into the relevant admin pages.
This is not suitable for the new editor, so we need to explicitly
register TinyMCE. We could, in the future, refactor the custom
`<script>` tags to use the registered TinyMCE script instead.

Polyfills are inserted into the page only when necessary using
`document.write`.

Props omarreiss, herregroen, youknowriad, gziolo, atimmer.

Merges [43723] to trunk.

Fixes #45065.

git-svn-id: https://develop.svn.wordpress.org/trunk@44114 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-13 16:49:58 +00:00
Anton Timmermans
7a2fa10e28 Build tools: Build @wordpress packages with webpack.
We decided to split the media webpack config into it's own file. The
main webpack config then combines this file with the packages config.

Include vendor scripts by copying them. We copy the minified files if
they are available. If they aren't available we minify the original
files ourselves.

Props omarreiss, herregroen, gziolo, youknowriad, netweb, adamsilverstein.
Merges [43719] to trunk.
See #45065.


git-svn-id: https://develop.svn.wordpress.org/trunk@44112 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-13 15:25:37 +00:00
Dion Hulse
21ad5a9e40 Remove the svn:executable property from files that don't need it.
See #42594


git-svn-id: https://develop.svn.wordpress.org/trunk@42200 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-17 02:57:27 +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
Dominik Schilling (ocean90)
f8af8cdc6c i18n tools: In StringExtractor don't strip slashes from URLs.
Props SergeyBiryukov, ocean90.
Fixes #36015.

git-svn-id: https://develop.svn.wordpress.org/trunk@36781 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-29 20:44:31 +00:00
Dominik Schilling (ocean90)
388d20fa50 i18n tools: Sync makepot.php with i18n.svn.
Changes: https://i18n.trac.wordpress.org/log/tools/trunk/makepot.php?rev=40331&stop_rev=24749

Fixes #34910, #34749.

git-svn-id: https://develop.svn.wordpress.org/trunk@36752 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-28 10:33:15 +00:00
Dominik Schilling (ocean90)
78ed4e109a i18n-tools: Respect the coding standards when adding textdomains with add-textdomain.php.
Props GaryJ, groovecoder.
Fixes #21616.

git-svn-id: https://develop.svn.wordpress.org/trunk@36603 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-20 21:43:51 +00:00
Dominik Schilling (ocean90)
113288c4b1 i18n-tools: Add the ability to parse a whole directory with add-textdomain.php.
Props iamntz.
Fixes #35499.

git-svn-id: https://develop.svn.wordpress.org/trunk@36600 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-20 21:02:33 +00:00
Dominik Schilling (ocean90)
4c4add2837 i18n-tools: Remove PHP4 constructor from add-textdomain.php.
`_deprecated_constructor()` isn't available in non-WordPress context.

See #31982.

git-svn-id: https://develop.svn.wordpress.org/trunk@36599 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-20 20:33:48 +00:00
Peter Westwood
3c88ac14ee i18n tools: Add the text domain to translate_nooped_plural() calls as well.
Fixes #34126 props jrf.


git-svn-id: https://develop.svn.wordpress.org/trunk@36390 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-24 15:28:40 +00:00
Peter Westwood
1e1ac57375 i18n tools: Add a test for the add-textdomain.php script.
git-svn-id: https://develop.svn.wordpress.org/trunk@36389 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-24 15:25:11 +00:00
Dominik Schilling (ocean90)
4e00e36e0f i18n tools: Use https for msgid-bugs-address URLs.
git-svn-id: https://develop.svn.wordpress.org/trunk@33448 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-27 19:37:13 +00:00
Aaron Jorbin
4a60647ab7 Deprecate php4 style constructors
PHP7 is deprecating PHP4 style constructors, so we need to modify our code to have _construct methods that fire before the named PHP4 style constructors.  The PHP4 style constructors will call the PHP5 style constructor in case it is being called directly (usually via parent::METHOD).

This modifies external libraries to add PHP5 style constructors, but doesn't add a notice for when they are used.  In WordPress core code, PHP4 style constructors are being given a call to _deprecated_constructor. To the PHP4 style constructor I say "I know that I can't take no more | It ain't no lie | I wanna see you out that door | Baby, bye, bye, bye..."

Upstream: https://wiki.php.net/rfc/remove_php4_constructors

Props jdgrimes, netweb, jorbin
See #31982



git-svn-id: https://develop.svn.wordpress.org/trunk@32990 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-28 15:26:41 +00:00
Dominik Schilling (ocean90)
eefd9e3a4c i18n tools: Delete data/not-gettexted-0-work.php.
In NotGettextedTest this file is a copy of `data/not-gettexted-0.php` which will be removed after the test has finished.

git-svn-id: https://develop.svn.wordpress.org/trunk@31499 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-22 12:55:34 +00:00
Dominik Schilling (ocean90)
684b992597 i18n tools: Improve support for multi-line comments in StringExtractor.
props SergeyBiryukov.
fixes #30972.

git-svn-id: https://develop.svn.wordpress.org/trunk@31498 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-22 12:46:12 +00:00
Dominik Schilling (ocean90)
917af97d4f i18n tools: Sync makepot.php with i18n.svn.
fixes #31193.

git-svn-id: https://develop.svn.wordpress.org/trunk@31319 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-31 22:01:33 +00:00
Dominik Schilling (ocean90)
606c88fe75 i18n tools: Exclude wp-includes/class-pop3.php in wp_frontend().
The external library uses the underscore alias for the native gettext() function. Makepot extracts these strings too, which results in having 25 unused translations.

fixes #31179.

git-svn-id: https://develop.svn.wordpress.org/trunk@31315 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-31 20:27:16 +00:00
Dominik Schilling (ocean90)
125897c70e i18n tools: Tabs, not spaces for indentation.
git-svn-id: https://develop.svn.wordpress.org/trunk@31314 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-31 19:51:03 +00:00
Sergey Biryukov
2b3bf48338 Fix strict notices in makepot.
props jdgrimes.
fixes #29254.

git-svn-id: https://develop.svn.wordpress.org/trunk@29563 602fd350-edb4-49c9-b593-d223f7449a82
2014-08-21 02:53:16 +00:00
Andrew Nacin
58dc8ab25c i18n tools: Have makepot search for the main file of the plugin.
props Otto42.
fixes #25665.


git-svn-id: https://develop.svn.wordpress.org/trunk@27399 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-04 21:06:48 +00:00
Nikolay Bachiyski
04dd14f3b5 Extract: rename method extract_entries to extract_from_code
The other extract methods are named `extract_from_<something>`, this was
te only one, which wasn't.

Also, it was returning an instance of `Translations`,
not an array of entries, which the name suggested.


git-svn-id: https://develop.svn.wordpress.org/trunk@25920 602fd350-edb4-49c9-b593-d223f7449a82
2013-10-26 00:54:27 +00:00
Nikolay Bachiyski
54e6261a34 Extract: _ and _c aren't among the common gettext function names
Let's just remove them from the default rules


git-svn-id: https://develop.svn.wordpress.org/trunk@25919 602fd350-edb4-49c9-b593-d223f7449a82
2013-10-26 00:46:34 +00:00
Nikolay Bachiyski
97a7dfc936 Extract: add default rules
Two purposes:

 * Helps people, reading the code to have a better idea of the structure of the array
 * Reciprocity with `$comment_prefix`, which has a default value

See #25691


git-svn-id: https://develop.svn.wordpress.org/trunk@25918 602fd350-edb4-49c9-b593-d223f7449a82
2013-10-26 00:45:16 +00:00
Nikolay Bachiyski
38f7bf86c6 Extract: add a phpdoc to clarify the class responsibility
First step towards making it do only one thing and cleaning it up


git-svn-id: https://develop.svn.wordpress.org/trunk@25917 602fd350-edb4-49c9-b593-d223f7449a82
2013-10-26 00:41:34 +00:00
Scott Taylor
16ef2c2e36 Remove lingering instances of call time pass-by-reference, limited to instances of callable - use $this instead of &$this.
Props jdgrimes.
See #25160.



git-svn-id: https://develop.svn.wordpress.org/trunk@25254 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-05 16:33:50 +00:00
Andrew Nacin
d6cac0502c i18n Tools: Update the default msgid-bugs-address. see #21444.
git-svn-id: https://develop.svn.wordpress.org/trunk@25096 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-22 22:07:08 +00:00
Andrew Nacin
790938d31b i18n Tools: Update msgid-bugs-address for plugins and themes in POT files.
props convissor, fixes #21444.



git-svn-id: https://develop.svn.wordpress.org/trunk@25095 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-22 22:06:16 +00:00
Nikolay Bachiyski
f9ff73dc61 Use correct path to src/
See #24976


git-svn-id: https://develop.svn.wordpress.org/trunk@25015 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-07 20:59:09 +00:00
Andrew Nacin
e89082c01a Import internationalization tools from i18n.svn.wordpress.org.
Imported from https://i18n.svn.wordpress.org/tools/trunk@22088.

see #24976.



git-svn-id: https://develop.svn.wordpress.org/trunk@25003 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-07 06:44:08 +00:00