* WIP working to convert attributes and URLs.
* Ensure media is added to local.
* Use a list of tokens and sprintf to generate the formatted string.
* Only format the string if tokens are present.
* Update content with html test.
Update remaining tests with inner markup.
Try and fix tests.
Format tests.
* Remove whitespace.
* Process all attributes
Escape at the end.
Provide better translation note.
* Refactor token processing to its own class.
* Update tests with string replacements and translation.
* Check if % exists in the text and escape it.
* Add a test case for a localizing text that includes a %.
* Add new line at the end of translators note
* Reformat numbers in translators note
* Update test
* Move new line to theme-locale
* Handle self closing tags
* Refactor how new line is added
* Attempt to fix tests
* Attempt to fix tests again
---------
Co-authored-by: Grant Kinney <1699996+creativecoder@users.noreply.github.com>
Co-authored-by: Sarah Norris <sarah@sekai.co.uk>
Co-authored-by: Matias Benedetto <matias.benedetto@gmail.com>
* Add a field for required wordpress version.
* Add a minimum required version if none exists.
* Sanitize the requires_wp attribute.
* Use SelectControl instead of TextControl and rename attribute to requires_wp.
* Update includes/create-theme/theme-styles.php
Co-authored-by: Grant Kinney <creativecoder@users.noreply.github.com>
* Try generating the minimum versions instead.
* Ensure Required WP version is updated when readme is updated.
* Use current wordpress version if none is provided.
* Use a dynamic value for Requires at least when theme readme and style.css are created.
* Make variable names consistent.
* Check for empty string and use current wordpress version as fallback.
* Add minimum version to additional metadata panel.
---------
Co-authored-by: Grant Kinney <creativecoder@users.noreply.github.com>
* Update escaping function
* update tests
* add method specific for attributes
* update tests
* Updates to only use wp_kses_post when strings contain html
* remove wp_kses_post as escaping function
* update tests
---------
Co-authored-by: Grant Kinney <hi@grant.mk>
* adds an endpoints that returns a list of font families used by a theme, including their style variants
* remove unwanted line
* move some logic into get_all_fonts
* Added get_fonts unit test
---------
Co-authored-by: Jason Crist <jcrist@pbking.com>
* refactor ThemeReadme class
* update phpunit tests config to make it more similar to core
* Add tests for ThemeReadme class public methods
* simplify copyright text creation
* Fix cloned theme reference to original theme
* updates comment
* Theme_Reade::update receives a parameter with the readme content.
* remove not so useful write method
* Moved readme data fetching logic from utils to readme class and fleshed it out to get all sections.
* Fetch and use the readme data in the metadata panel (for recomended plugins)
---------
Co-authored-by: Jason Crist <jcrist@pbking.com>
* Added tests to validate replacing theme namespace and refactored to support it
* Pass slug to patternize content when cloning theme
* Fixed creating of theme slug from name using no -'s to fix namespace swapping issue
* Extracted any logic that may need to be tested from the api class
* Refactored to facilitate testing
* Refactored zip construction to use shared code with saving logic
* Consolidated template and css parsing logic for theme exporting
* removed queryID removal from query blocks
* Fixed the image processing so that the id is removed from inner content correctly
* Added tests that evaluate encoded patterns and test patterns created from templates with media
* Added taxQuery removal tests and fixed taxQuery attribute removal logic
* Refactored image/cover processing to more cleanly handle id classes
* Add test and fixed bugs around escaping <'s and >'s
* localized quote blocks
* Added localization processing to list, verse, table and media-text blocks
---------
Co-authored-by: Vicente Canales <vicente.canales@automattic.com>
Co-authored-by: Madhu Dollu <madhusudhan.dollu@gmail.com>