Commit graph

1066 commits

Author SHA1 Message Date
Aki Hamano
ddf7459282
Remove unused REST API endpoint (#670) 2024-06-10 21:36:31 +09:00
Vicente Canales
8d652184f2
Refactor theme fonts class for readability (#661)
* refactor theme fonts class for readability

* add test for src and url handling

* add more assertions to theme deactivation fn

* refactor missing array cast

* Update includes/create-theme/theme-fonts.php

Co-authored-by: Jason Crist <jcrist@pbking.com>

* re-add $user_settings

* add additional assertion

---------

Co-authored-by: Jason Crist <jcrist@pbking.com>
2024-06-04 13:18:22 -04:00
Vicente Canales
d6f7432f68
Check if theme fonts present before removing (#660)
* Check if theme fonts present before removing

Fixes: https://github.com/WordPress/create-block-theme/issues/659

* make sure remove_deactivated_font_assets is static

* use correct condition for asset removal

ie. bail on null

* remove unused variable

* add comments and reword some of the existing ones
2024-06-04 09:38:26 -04:00
Matias Benedetto
e862dd6cef
Add an about section in the editor (#667)
* Add an about section in the editor

* replace <hr/> by Divider component

* using wordpress base-styles/colors instead of hardcodinf color
2024-06-03 15:46:56 +02:00
Matias Benedetto
a621674bcd
Update escaping function (#665)
* update escaping function

* simplify check to know if the text is already escaped.
2024-06-03 12:44:14 +02:00
Aki Hamano
4552b05a9e
Make external links translatable (#663) 2024-06-03 18:46:19 +09:00
Matias Benedetto
25da402206
update url for blueprint (#658)
Co-authored-by: Jason Crist <146530+pbking@users.noreply.github.com>
2024-06-03 11:19:35 +02:00
Matias Benedetto
ee38f2328c
Add image credits edit capabilities to the edit theme modal (#662)
* add image credits edit capabilities

* fix typo and add translation mark

Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com>

---------

Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com>
2024-06-03 11:18:53 +02:00
Aki Hamano
c3666a50b0
Quality: Remove unused PHP classes (#664) 2024-06-03 14:45:59 +09:00
github-actions[bot]
eabd38201d
Version bump & changelog update (#657)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-30 13:15:25 +02:00
Madhu Dollu
2c63cdc4b4
Update modal width to 65vw (#638)
* update modal width to 65vw

* set the modal size to large

* update wp_enqueue_style arguments

Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com>

---------

Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com>
Co-authored-by: Jason Crist <jcrist@pbking.com>
Co-authored-by: Matias Benedetto <matias.benedetto@gmail.com>
2024-05-30 13:04:42 +02:00
Jason Crist
485f8937de
Fixed font utilities to work with font sources as an (optional) array. (#645)
Co-authored-by: Matias Benedetto <matias.benedetto@gmail.com>
2024-05-30 12:59:42 +02:00
Matias Benedetto
10b9dcb93b
Handle font licenses when editing theme metadata (#649)
* handle font licenses when editing theme metadata

* move download file util

* split string

Co-authored-by: Vicente Canales <1157901+vcanales@users.noreply.github.com>

* remove console log

Co-authored-by: Vicente Canales <1157901+vcanales@users.noreply.github.com>

* fix handle error in getting license

---------

Co-authored-by: Vicente Canales <1157901+vcanales@users.noreply.github.com>
2024-05-30 12:05:17 +02:00
Matias Benedetto
5470e489eb
Adds an endpoints that returns a list of font families used by a theme (#648)
* 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>
2024-05-30 11:49:44 +02:00
Matias Benedetto
4b1181d5fe
Flush cache after creating new themes (#654)
* Flush cache after create new themes

* remove duplicated call
2024-05-30 11:20:01 +02:00
Jason Crist
2b17395ef2
Replace/admin interface (#637)
Co-authored-by: Vicente Canales <vicente.canales@automattic.com>
Co-authored-by: Vicente Canales <1157901+vcanales@users.noreply.github.com>
Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com>
2024-05-28 07:53:06 -04:00
Jason Crist
244cb1c5c3
Added subfolder to initial theme state to eliminate render error (#652) 2024-05-23 11:23:08 -04:00
Jason Crist
3b69810360
Fix the jslint warning (or infinate loop error when fixed) from useSelect usage (#651) 2024-05-23 11:18:39 -04:00
Vicente Canales
16f26cf0f4
Enforce specifying which eslint rule is disabled when using eslint disable comments (#650)
* Enforce specifying which eslint rule is disabled

Applying and enforcing this new rule reveals a lot of, for instance,
no-undef rules being broken.

* fix outstanding no-undef rules being broken
2024-05-23 09:34:52 -04:00
Matias Benedetto
2f17e8cdee
handle font credits in the backend (#647) 2024-05-22 15:38:32 +02:00
Matias Benedetto
2e43b2aa32
Move lib-font and add GPL license text (#646) 2024-05-22 15:12:27 +02:00
github-actions[bot]
8f03e53e63
Version bump & changelog update (#642) 2024-05-16 19:05:10 -04:00
Jason Crist
88c4b1c39e
Add screenshot to valid theme properties during sanitization (#643) 2024-05-16 16:59:59 -04:00
Matias Benedetto
ca0851410b
Fix template texts localizing/escaping (#641)
Co-authored-by: Jason Crist <jcrist@pbking.com>
2024-05-16 14:04:45 -04:00
Jason Crist
d3ffe65742
Use only major.minor version in 'Tested up to' field (#635)
Co-authored-by: Matias Benedetto <matias.benedetto@gmail.com>
2024-05-16 11:37:47 -04:00
Jason Crist
cbd0ba9133
Don't Clobber Metadata (#634)
* Add version to sanitized theme data so it isn't wiped when updating
* Pull license data from style.css
* Don't overwrite existing copyright in style.css
* Use WordPress minimum version from style.css
* allow blank fields when sanitizing theme data
* Use get_file_data for license parsing
2024-05-16 11:30:40 -04:00
Matias Benedetto
4f1e383365
clean and complete the changelog (#636) 2024-05-15 10:27:09 -03:00
Matias Benedetto
424ebee3b1
Add prefix to the names in the PHP global namespace. (#628)
Co-authored-by: Jason Crist <jcrist@pbking.com>
2024-05-14 07:27:30 -04:00
Aki Hamano
cd7f1ecbbb
Improve tags UI (#630)
* Improve tags ui

* Added the styled external link

* Fix focus style

---------

Co-authored-by: Jason Crist <jcrist@pbking.com>
2024-05-14 10:45:51 +09:00
Matias Benedetto
7aed6ce339
Refactor Theme_Readme (readme.txt) PHP class (#626)
* 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>
2024-05-13 10:47:39 -03:00
Jason Crist
6273f0228c
Metadata screenshot (#621)
Co-authored-by: Tetsuaki Hamano <tetsuaki.hamano@gmail.com>
2024-05-10 08:21:09 -04:00
Jason Crist
f3dc5c9f52
Allow spaces in slugs. Changed logic to correctly replace functions. Updated tests. (#622) 2024-05-10 07:55:20 -04:00
Jason Crist
b496fc090a
Reset changelog and version on clone and theme creation (#623) 2024-05-10 07:54:57 -04:00
Vicente Canales
0524255734
Use non-default port for wp-env (#611) 2024-05-09 09:48:47 -04:00
Aki Hamano
d1ed884dab
Update package-lock.json (#620)
Co-authored-by: Sarah Norris <sarah@sekai.co.uk>
2024-05-09 09:48:01 -04:00
Vicente Canales
ddc91e2c0c
Tests: use tests-wordpress wp-env for phpunit (#618)
Running tests on the `cli` environment causes coflicts with the `dev`
environment; the tests will log you out, modify the theme, etc.

Running tests on `tests-wordpress` will allow you to run tests along
with the `dev` environment without interference.
2024-05-09 09:47:41 -04:00
Sarah Norris
9612377ec0
Add Repository Management section to contributing docs (#614)
* Add Repository Management section

* Add bullet point list to Repository Management section

* Add link to GH project board

* Update CONTRIBUTING.md

Co-authored-by: Vicente Canales <1157901+vcanales@users.noreply.github.com>

* Remove link to core-themes channel

* Add Discussions section with links to Slack

---------

Co-authored-by: Vicente Canales <1157901+vcanales@users.noreply.github.com>
2024-05-07 02:45:48 +01:00
Matias Benedetto
c9d1b43a74
update wp-env version (#619) 2024-05-06 14:13:17 -03:00
Matias Benedetto
a2befa0e08
Update Node version to 20 (#617)
* Update Node version to 20

* undo unwanted change
2024-05-06 13:55:15 -03:00
Aki Hamano
59c3aac75e
ESLint: Add new rules (#616) 2024-05-06 12:49:30 +09:00
github-actions[bot]
17121fcea7
Version bump & changelog update (#610)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-30 15:52:36 -04:00
Aki Hamano
089c616cdd
Editor Sidebar: Persist "Save Changes" panel settings (#607) 2024-04-30 12:41:26 -04:00
Aki Hamano
35cbb46035
Fix problem with zip file creation on Windows (#606)
---------

Co-authored-by: Vicente Canales <1157901+vcanales@users.noreply.github.com>
Co-authored-by: Jason Crist <jcrist@pbking.com>
2024-04-30 12:34:57 -04:00
Matias Benedetto
058c6fe255
Fix custom fonts assets path (#601)
* fix custom fonts assets path
* improve syntax
* Update admin/create-theme/theme-zip.php

Co-authored-by: Vicente Canales <1157901+vcanales@users.noreply.github.com>
2024-04-30 12:26:49 -04:00
Aki Hamano
6aa9391d9a
Remove unused UpdateThemePanel component (#608) 2024-04-30 12:12:10 -04:00
Aki Hamano
9830e9de79
Check ZipArchive class before zip export (#609) 2024-04-30 12:10:57 -04:00
Aki Hamano
b0c48cdfbc
Editor Sidebar: Make save panel text translatable (#603)
* Editor Sidebar: Make save panel text translatable

* add another missing translation fn

---------

Co-authored-by: Vicente Canales <vicente.canales@automattic.com>
2024-04-28 09:58:50 -04:00
Aki Hamano
1787f9048f
Editor Sidebar: Improve screen title UI (#605) 2024-04-28 09:48:43 -04:00
Matias Benedetto
352a397d2d
move files (#598) 2024-04-26 12:36:43 -03:00
github-actions[bot]
39c9cd87a5
Version bump & changelog update (#596)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-25 18:06:10 -04:00