Skip to content

Commit 4fe2256

Browse files
Mario Borna Mjertandingo-d
andauthored
Apply suggestions from code review
Co-authored-by: Denis Žoljom <dingo-d@users.noreply.github.com>
1 parent fca829f commit 4fe2256

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

website/docs/basics/architecture-concepts.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ Eightshift Libs is entirely object-oriented, providing abstract classes for inte
2222

2323
Our use of OOP allows you to extend, modify or even replace Eightshift Development Kit functionality safely, without breaking compatibility or harming your project.
2424

25-
One of the most important interfaces in Eightshift Libs is the `ServiceInterface`. Classes which implement it are Service. This isn't a common pattern in PHP OOP. In Eightshift Development Kit, a Service class represents a part of the project's functionality, and has a `register() : void` method that sets up the action and filter hooks for the Service. By convention, it also contains a method which provided as a callback to the registered hooks. If you need to add an action or a filter, you should do that in a Service. All your Service classes are automatically loaded, and can be injected using dependency injection.
25+
One of the most important interfaces in Eightshift Libs is the `ServiceInterface`. Classes that implement it are called service classes. This isn't a common pattern in PHP OOP. In Eightshift Development Kit, a service class represents a part of the project's functionality and has a `register` method that sets up the action and filter hooks for the service. If you need to add an action or a filter, you should do that in a service class. All your service classes are automatically loaded and can have dependencies injected using dependency injection.
2626

27-
To ensure there are no naming collisions caused by Composer dependencies, we use Imposter to contain them in the `{ProjectName}Vendor` namespace. This comes with a few caveats which you should be aware of, and about which you can read more in the [namespaces chapter](namespaces)
27+
To ensure there are no naming collisions caused by Composer dependencies, we use the [Imposter Composer plugin](https://github.com/infinum/imposter-plugin) to contain them in the `{ProjectName}Vendor` namespace. This comes with a few caveats which you should be aware of, and about which you can read more in the [namespaces chapter](namespaces).
2828

2929
Read more about [namespaces and Imposter](namespaces), [extending classes and service classes](extending-classes), and [dependency injection and autowiring](autowiring).
3030

@@ -53,7 +53,7 @@ To learn more about the differences between blocks and components, read [Igor's
5353

5454
Every Eightshift project has one global `manifest.json` file stored in `src/Blocks/manifest.json`, which contains global settings, properties, and variables.
5555

56-
Furthermore, every Eightshift block, component and variation has its own manifest file which is used to provide data required for block registration, such as a list of attributes, the block name and the template for the inserter example. These local manifest files allow you to define arrays of options for attribute values which your blocks or components can consume. Manifest files also allow you to define relationships between attribute values and CSS variable values, which allows you a great deal of power when styling your blocks and components, as well as saves time as you don't have to provide conditional CSS classes.
56+
Furthermore, every Eightshift block, component, and variation has its own manifest file which is used to provide data required for block registration, such as a list of attributes, the block name, and the template for the inserter example. These local manifest files allow you to define arrays of options for attribute values that your blocks or components can consume. Manifest files also allow you to define relationships between attribute values and CSS variable values, which allows you a great deal of power when styling your blocks and components, as well as saves time as you don't have to provide conditional CSS classes.
5757

5858
To learn more about the [global manifest](blocks-global-manifest.md), [block manifest](block-manifest.md), [component manifest](blocks-component-manifest.md) and using [the manifest to provide CSS variables for use in block styling](blocks-styles.md), read the respective articles in the [Blocks chapter](blocks-important). For information about manifest structure, refer to the manifest schemas available in Eightshift Frontend Libs and linked to in the manifest files.
5959

@@ -109,13 +109,13 @@ This chapter also doesn't cover all of the namespaces and classes in Eightshift
109109

110110
#### Blocks
111111

112-
The Blocks namespace contains the Blocks class used for block registration. This directory also contains shared assets, components, blocks, variations and the wrapper.
112+
The Blocks namespace contains the Blocks class used for block registration. This directory also contains shared assets, components, blocks, variations, and the wrapper.
113113

114114
Read about blocks in detail in the [Blocks chapter](blocks).
115115

116116
#### Columns
117117

118-
This namespace contains all the custom admin listing columns hooks in your project. These include listing column hooks for post types, taxonomy and user lists, such as `manage_{$post_type}_posts_columns`.
118+
This namespace contains all the custom admin listing columns hooks in your project. These include listing column hooks for post types, taxonomy, and user lists, such as `manage_{$post_type}_posts_columns`.
119119

120120
#### Config
121121

@@ -138,7 +138,7 @@ This namespace contains classes that register all custom taxonomy hooks for your
138138
These Enqueue namespace classes handle loading JavaScript and CSS assets, depending on the location you want to use it:
139139
- **Admin** - Used in the admin (not block editor) panel. You can find the files inside the `assets` folder with the `-admin` suffix.
140140
- **Blocks** - Used in the block editor. You can find the files inside the `src/Blocks/assets` folder. As blocks are complicated, we have files loaded only in the admin-editor part of the project, those files have an `-editor` suffix. The rest of the files with no suffix load on the admin-editor part and the project's front end.
141-
- **Theme** - Used in the theme (frontend) part of your project. You can find the files inside the `assets` folder with no suffix. You would use these files for stuff related to your project that is not associated with components and blocks. These files are rarely used, as styles and JavaScript functionality are usually provided at component, block or wrapper levels.
141+
- **Theme** - Used in the theme (frontend) part of your project. You can find the files inside the `assets` folder with no suffix. You would use these files for the assets related to your project that is not associated with components and blocks. These files are rarely used, as styles and JavaScript functionality are usually provided at component, block, or wrapper levels.
142142

143143
Using any of these classes is optional, and you can use only what you need. The `wp boilerplate setup_theme` command will set up all of the three classes already implemented. Keep in mind that Enqueue classes work in combination with the Webpack build of your project.
144144

@@ -242,7 +242,6 @@ Provides definitions used for linting PHP files. Read more [about PHPCS](https:/
242242

243243
PostCSS works in collaboration with Webpack and defines what additional plugins you are going to use when building your CSS files. Read more [about PostCSS](https://postcss.org/).
244244

245-
246245
#### webpack.config.js
247246

248247
`webpack.config.js` provides Webpack configuration, used when building your JavaScript and CSS files. This is covered in more detail in the [Webpack chapter](webpack).

website/docs/basics/library.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ title: SCSS Library
77

88
Eightshift Frontend Libs contains a collection of useful SCSS mixins, functions and helpers you can use in projects.
99

10-
For years, we have collected a list of them. At one point, we felt it was stupid to copy-paste code across multiple projects, so we created Eightshift Frontend Libs. This allows you to use whatever we offer without all that unnecessary clutter.
10+
For years, we have collected a list of them. At one point, we felt it was ineffective to copy-paste code across multiple projects, so we created Eightshift Frontend Libs. This allows you to use whatever we offer without all that unnecessary clutter.
1111

1212
Check out our documentation and import what you need from Eightshift Frontend Libs.
1313

website/docs/basics/wp-cli.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ We use these common prefixes for commands:
6565
> **Make WP-CLI your best friend, and your coding life will be much more comfortable, trust us.**
6666
6767
While we might go into more details about some of these commands, we won't be documenting all of them here - use the built-in manuals for more information about particular commands and to discover what's available. Don't gloss over them, as using `wp boilerplate` is a particularly useful tool when building projects with Eightshift Development Kit.
68+
6869
## Running commands in multisite
6970

7071
When you are running a multisite setup, you should always provide the additional `--url` parameter. Otherwise, WP-CLI will always run the command on the main site.

0 commit comments

Comments
 (0)