Commit Graph

32 Commits

Author SHA1 Message Date
Christopher Allford 070954c888 Revert #28187
The default functionality within the `ThemeSupport` class has an unintended
side-effect of breaking the existing default functionality within the
`wc_get_theme_support()` function. Since the default set in the support
class is prioritized over the one given to `ThemeSupport::get_option()`,
the WordPress options set in the Customizer are never used for images.
2021-05-21 12:10:15 -07:00
Nestor Soriano 3a895c9eed
Move ThemeSupport class to Internal namespace, and use in 2021 theme. 2021-04-21 12:57:56 +02:00
Nestor Soriano d11a20b5b4
Merge branch 'trunk' into fix/25900-take-2 2021-04-20 16:08:45 +02:00
hsing f333b373f6 Remove extra content wrapper 2021-02-12 17:50:48 -05:00
Nestor Soriano 2c957d2531 Merge branch 'master' into fix/25900-take-2 2021-01-29 10:00:51 +01:00
Jonathan Sadowski 67b3d1c5fb Fix stretched product admin images 2020-11-14 10:27:42 -05:00
Jeffrey Pearce bf8662bf67 Adds structure for Twenty Twenty One default theme support. Issue #27766
- New class class-wc-twenty-twenty-one.php
- New stylesheet twenty-twenty-one.scss
- Updates checks for default themes in theme_support_includes() and wc_is_wp_default_theme_active()
2020-11-16 06:41:39 -06:00
Nestor Soriano d620f1d232 Fix #25900 - image size customisation controls not shown
- Added the `ThemeSupport class`, with methods to add and get
  theme support options.
  - It also has a new `add_default_options` method that adds the
    options under a `_defaults` key.
- The `WC_Twenty_*` classes now use `ThemeSupport` instead of
  the `add_theme_support` function to define image and thumbnail sizes.
  - The values are defined as default options.
- The `WC_Shop_Customizer` class now uses `ThemeSupport` instead of
  `wc_get_theme_support` to check if image and thumbnail sizes UI
  should be rendered.
  - The check is made excluding default values.

With these changes the UI to change the image and thumbnail sizes
is hidden only if the options are added as non-defaults elsewhere.

Additional changes:

- The code of the `wc_get_theme_support` function is replaced with
  a simple call to `get_option` in `ThemeSupport`.
- Added the utility class `ArrayUtil`.
2020-11-04 13:01:53 +01:00
Nestor Soriano cd443581cf Fix code sniffer errors 2020-11-04 12:39:45 +01:00
Claudio Sanches d48f1d4e2e Fixed package tag usage 2020-08-05 13:36:24 -03:00
Christopher Allford 1d1413b4ee Replaced direct access of many constants with the Constants library 2020-01-31 22:18:47 -08:00
Rodrigo Primo 7337ab60c2 Fix PEAR.Functions.FunctionCallSignature violations
This commit fixes all violations of the PEAR.Functions.FunctionCallSignature sniff automatically using phpcbf.
2019-12-20 15:25:23 -03:00
Rodrigo Primo 62d6b05b58 Fix Generic.Formatting.MultipleStatementAlignment violations
This commit fixes all violations of the Generic.Formatting.MultipleStatementAlignment sniff automatically using phpcbf.
2019-12-20 14:21:08 -03:00
Peter Fabian f50d8ffdd1 Fixed PHPCS. 2019-11-26 20:54:04 +01:00
Peter Fabian f3892359f3 Make thumbnail larger, improve shop layout. 2019-11-24 09:51:15 +01:00
Peter Fabian 9c74bf79ea Rather than setting the background in CSS, use the color picked in the
customizer.

This also fixes the background in the block editor and tinymce.
2019-11-22 15:37:54 +01:00
Peter Fabian daf4a53acf Make single images larger. 2019-11-19 19:36:10 +01:00
Peter Fabian bc04b8f45b Added basic declaration for WC support to Twentytwenty. 2019-11-19 17:58:16 +01:00
Tiago Noronha 89eec8652f Add support for Twenty Nineteen color scheme option 2018-11-19 15:02:26 +00:00
Tiago Noronha 4e01bf18dd Twenty Nineteen basic styling 2018-11-16 16:38:05 +00:00
Tiago Noronha 3168f13d9d Skeleton for Twenty Nineteen integration 2018-11-16 16:38:05 +00:00
Mike Jolley 1d43233306 Adds missing 2017 RTL styles 2018-05-31 10:34:08 +01:00
Mike Jolley e30b8e8a5f Rename script so required label logic works 2018-04-05 17:02:06 +01:00
Mike Jolley 6e83fcec50 Sizes for 3 cols default 2018-01-25 17:03:01 +00:00
Mike Jolley e025caf177 Widths and aspect ratios 2017-11-07 18:32:43 +00:00
Mike Jolley fb8c6cd0d2 Add compat class for each wp default theme 2017-11-07 12:11:37 +00:00
Mike Jolley 6139ec8de1 Add theme support in the theme compat file 2017-11-07 11:46:43 +00:00
Mike Jolley 175e93deb1 Custom colors 2017-07-13 15:05:22 +01:00
Akeda Bagus 53807185a8
Fixed typos.
These typos are catched by `misspell` program.

```
find . -type f | grep -v assets | grep -v dummy-data | grep -v i18n | grep -v node_modules | grep -v .git | grep -v apigen |  xargs misspell -w
```

Some results were excluded because of 3rd party ownership and non-english
sentences.
2017-07-10 12:56:28 +07:00
Claudio Sanches 6f434ee828 Make WC_Twenty_Seventeen::init() static
@mikejolley
2017-02-24 16:10:34 -03:00
Mike Jolley 1aaefd9ed7 Make methods static 2017-02-24 12:41:15 +00:00
Mike Jolley 6d908cfba2 Code cleanup and move class into subdirectory 2016-12-07 12:45:54 +00:00