Skip to content

Commit

Permalink
Fix typos (#870)
Browse files Browse the repository at this point in the history
  • Loading branch information
szepeviktor committed Jul 18, 2023
1 parent 994ef71 commit 37551b6
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 37 deletions.
6 changes: 3 additions & 3 deletions docs/design-styles/design-styles.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The easiest way to add a custom design style is to create a plugin with a functi
Then you'd be able to add all sorts of design styles to your site, instantly changing the look and feel of your site - without risking any compatibility/theme conflicts that arise when traditionally changing themes:

![customize](https://user-images.githubusercontent.com/1813435/77576898-4d633900-6eac-11ea-8a2f-10e3ca761b9c.jpg)
Note how the "Brutalist" style is added to the list of availble design styles. 👆
Note how the "Brutalist" style is added to the list of available design styles. 👆

## Registering a design style
Add a function to make the design styles available within the Customizer:
Expand All @@ -15,7 +15,7 @@ Add a function to make the design styles available within the Customizer:
*
* @since 0.1.0
*
* @param array $default_design_styles Array containings the supported design styles,
* @param array $default_design_styles Array containing the supported design styles,
* where the index is the slug of design style and value an array of options that sets up the design styles.
*/
function prefix_get_available_design_styles( $default_design_styles ) {
Expand Down Expand Up @@ -59,5 +59,5 @@ function prefix_get_available_design_styles( $default_design_styles ) {
add_filter( 'go_design_styles', 'prefix_get_available_design_styles' );
```

## Registering a styleseheet and modify CSS custom properties
## Registering a stylesheet and modify CSS custom properties
2. Add a stylesheet to override any default CSS custom properties in Go, using any existing property throughout the theme's shared.css stylesheet. I go into detail how Go's CSS custom properties are formatted and compiled a non-exhaustive of properties [here](https://github.com/godaddy-wordpress/go/blob/master/docs/design-styles/properties.md).
2 changes: 1 addition & 1 deletion docs/design-styles/example/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @since 0.1.0
*
* @param array $default_design_styles Array containings the supported design styles,
* @param array $default_design_styles Array containing the supported design styles,
* where the index is the slug of design style and value an array of options that sets up the design styles.
*/
function prefix_get_available_design_styles( $default_design_styles ) {
Expand Down
2 changes: 1 addition & 1 deletion docs/design-styles/properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Here are properties that may be leveraged within design style stylesheets:
| --go-caption--color--text | Text color for all captions |
| --go-caption--font-size | Font size for captions |
| --go-caption--text-align | Text alignment for captions: right, left, center |
| --go-caption--text-align--rtl | Text alignment for RTL langauges|
| --go-caption--text-align--rtl | Text alignment for RTL languages|


### Forms
Expand Down
2 changes: 1 addition & 1 deletion docs/development-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ We bundle PHPUnit locally with Go as a composer package. This makes installing P
$ composer install
```

Once PHPUnit is installed, you'll need to install the WordPress test library, and create a new, empty, test database. We have included a bash script with Go to make this process a bit more streamlined. You can execute install the WordPress test library with the following commnad:
Once PHPUnit is installed, you'll need to install the WordPress test library, and create a new, empty, test database. We have included a bash script with Go to make this process a bit more streamlined. You can execute install the WordPress test library with the following command:

```sh
$ composer install-phpunit
Expand Down
20 changes: 10 additions & 10 deletions includes/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ function get_default_design_style() {
}

/**
* Returns the avaliable design styles.
* Returns the available design styles.
*
* @return array
*/
Expand Down Expand Up @@ -996,7 +996,7 @@ function get_available_design_styles() {
*
* @since 0.1.0
*
* @param array $design_styles Array containings the supported design styles,
* @param array $design_styles Array containing the supported design styles,
* where the index is the slug of design style and value an array of options that sets up the design styles.
*/
$supported_design_styles = (array) apply_filters( 'go_design_styles', $default_design_styles );
Expand Down Expand Up @@ -1044,7 +1044,7 @@ function get_default_header_variation() {
}

/**
* Returns the avaliable header variations.
* Returns the available header variations.
*
* @return array
*/
Expand Down Expand Up @@ -1085,7 +1085,7 @@ function get_available_header_variations() {
*
* @since 0.1.0
*
* @param array $header_variations Array containings the supported header variations,
* @param array $header_variations Array containing the supported header variations,
* where the index is the slug of header variation and the value an array of options that sets up the header variation.
*/
$supported_header_variations = (array) apply_filters( 'go_header_variations', $default_header_variations );
Expand All @@ -1095,7 +1095,7 @@ function get_available_header_variations() {
}

/**
* Returns the avaliable footer variations.
* Returns the available footer variations.
*
* @return array
*/
Expand Down Expand Up @@ -1136,7 +1136,7 @@ function get_available_footer_variations() {
*
* @since 0.1.0
*
* @param array $footer_variations Array containings the supported header variations,
* @param array $footer_variations Array containing the supported header variations,
* where the index is the slug of header variation and the value an array of options that sets up the header variation.
*/
$supported_footer_variations = (array) apply_filters( 'go_footer_variations', $default_footer_variations );
Expand Down Expand Up @@ -1267,9 +1267,9 @@ function get_available_social_icons() {
*
* @since 0.1.0
*
* @param array $social_icons Array containings the supported social icons.
* @param array $social_icons Array containing the supported social icons.
*/
return (array) apply_filters( 'go_avaliable_social_icons', $social_icons );
return (array) apply_filters( 'go_available_social_icons', $social_icons );

}

Expand All @@ -1290,15 +1290,15 @@ function get_social_icons() {
}

/**
* Returns the avaliable color schemes
* Returns the available color schemes
*
* @return array
*/
function get_available_color_schemes() {
$design_style = get_design_style();

/**
* Filters the avaliable color schemes
* Filters the available color schemes
*
* @since 0.1.0
*
Expand Down
12 changes: 6 additions & 6 deletions includes/customizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,18 +210,18 @@ function enqueue_controls_assets() {
);

$color_scheme = str_replace( get_theme_mod( 'design_style' ) . '-', '', get_theme_mod( 'color_scheme', \Go\Core\get_default_color_scheme() ) );
$avaliable_color_schemes = \Go\Core\get_available_color_schemes();
$available_color_schemes = \Go\Core\get_available_color_schemes();
$color_scheme_colors = array();

if ( $color_scheme && ! empty( $avaliable_color_schemes[ $color_scheme ] ) ) {
if ( $color_scheme && ! empty( $available_color_schemes[ $color_scheme ] ) ) {

if ( ! empty( $avaliable_color_schemes[ $color_scheme ]['label'] ) ) {
if ( ! empty( $available_color_schemes[ $color_scheme ]['label'] ) ) {

unset( $avaliable_color_schemes[ $color_scheme ]['label'] );
unset( $available_color_schemes[ $color_scheme ]['label'] );

}

$color_scheme_colors = $avaliable_color_schemes[ $color_scheme ];
$color_scheme_colors = $available_color_schemes[ $color_scheme ];

}

Expand Down Expand Up @@ -467,7 +467,7 @@ function register_global_controls( \WP_Customize_Manager $wp_customize ) {
}

/**
* Callback to retreive the copyright kses HTML
* Callback to retrieve the copyright kses HTML
*
* @param string $input Input value.
Expand Down
24 changes: 12 additions & 12 deletions includes/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,12 @@ function get_palette_color( $color, $format = 'RGB' ) {

$color_override = get_theme_mod( $override_colors[ $color ] );

$avaliable_color_schemes = get_available_color_schemes();
$available_color_schemes = get_available_color_schemes();

$the_color = '';

if ( $color_scheme && isset( $avaliable_color_schemes[ $color_scheme ] ) && isset( $avaliable_color_schemes[ $color_scheme ][ $color ] ) ) {
$the_color = $avaliable_color_schemes[ $color_scheme ][ $color ];
if ( $color_scheme && isset( $available_color_schemes[ $color_scheme ] ) && isset( $available_color_schemes[ $color_scheme ][ $color ] ) ) {
$the_color = $available_color_schemes[ $color_scheme ][ $color ];
}

if ( $color_override ) {
Expand Down Expand Up @@ -347,17 +347,17 @@ function get_palette_color( $color, $format = 'RGB' ) {
function get_default_palette_color( $color, $format = 'RGB' ) {
$default = \Go\Core\get_default_color_scheme();
$color_scheme = get_theme_mod( 'color_scheme', $default );
$avaliable_color_schemes = get_available_color_schemes();
$available_color_schemes = get_available_color_schemes();

$the_color = '';

if ( $color_scheme && empty( $avaliable_color_schemes[ $color_scheme ] ) ) {
$color_scheme_keys = array_keys( $avaliable_color_schemes );
if ( $color_scheme && empty( $available_color_schemes[ $color_scheme ] ) ) {
$color_scheme_keys = array_keys( $available_color_schemes );
$color_scheme = array_shift( $color_scheme_keys );
}

if ( $color_scheme && isset( $avaliable_color_schemes[ $color_scheme ] ) && isset( $avaliable_color_schemes[ $color_scheme ][ $color ] ) ) {
$the_color = $avaliable_color_schemes[ $color_scheme ][ $color ];
if ( $color_scheme && isset( $available_color_schemes[ $color_scheme ] ) && isset( $available_color_schemes[ $color_scheme ][ $color ] ) ) {
$the_color = $available_color_schemes[ $color_scheme ][ $color ];
}

if ( ! empty( $the_color ) ) {
Expand Down Expand Up @@ -393,9 +393,9 @@ function hex_to_rgb( $color, $opacity = false ) {
$hex = array( $color[0] . $color[0], $color[1] . $color[1], $color[2] . $color[2] );
} else {
$default = \Go\Core\get_default_color_scheme();
$avaliable_color_schemes = get_available_color_schemes();
if ( isset( $avaliable_color_schemes[ $default ] ) && isset( $avaliable_color_schemes[ $default ]['primary'] ) ) {
$default = $avaliable_color_schemes[ $default ]['primary'];
$available_color_schemes = get_available_color_schemes();
if ( isset( $available_color_schemes[ $default ] ) && isset( $available_color_schemes[ $default ]['primary'] ) ) {
$default = $available_color_schemes[ $default ]['primary'];
}
return $default;
}
Expand Down Expand Up @@ -490,7 +490,7 @@ function has_header_background() {
}

/**
* Includes the selected footer varation
* Includes the selected footer variation
*
* @return void
*/
Expand Down
4 changes: 2 additions & 2 deletions includes/tgm.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ function register_required_plugins() {
);

/**
* Filters the list of plugin depedencies.
* Filters the list of plugin dependencies.
*
* @since 0.1.0
*
* @param array $plugins Array containings the plugin dependencies in the TGM format.
* @param array $plugins Array containing the plugin dependencies in the TGM format.
*/
$plugins = (array) apply_filters( 'go_plugin_dependencies', $plugins );

Expand Down
2 changes: 1 addition & 1 deletion includes/woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ function woocommerce_cart_link() {
}

/**
* Render the markup for yhe WooCommerce slideout cart
* Render the markup for the WooCommerce slideout cart
*
* @return mixed Markup for the slideout cart.
*/
Expand Down

0 comments on commit 37551b6

Please sign in to comment.