You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs/basics/architecture-concepts.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,9 +22,9 @@ Eightshift Libs is entirely object-oriented, providing abstract classes for inte
22
22
23
23
Our use of OOP allows you to extend, modify or even replace Eightshift Development Kit functionality safely, without breaking compatibility or harming your project.
24
24
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.
26
26
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).
28
28
29
29
Read more about [namespaces and Imposter](namespaces), [extending classes and service classes](extending-classes), and [dependency injection and autowiring](autowiring).
30
30
@@ -53,7 +53,7 @@ To learn more about the differences between blocks and components, read [Igor's
53
53
54
54
Every Eightshift project has one global `manifest.json` file stored in `src/Blocks/manifest.json`, which contains global settings, properties, and variables.
55
55
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.
57
57
58
58
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.
59
59
@@ -109,13 +109,13 @@ This chapter also doesn't cover all of the namespaces and classes in Eightshift
109
109
110
110
#### Blocks
111
111
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.
113
113
114
114
Read about blocks in detail in the [Blocks chapter](blocks).
115
115
116
116
#### Columns
117
117
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`.
119
119
120
120
#### Config
121
121
@@ -138,7 +138,7 @@ This namespace contains classes that register all custom taxonomy hooks for your
138
138
These Enqueue namespace classes handle loading JavaScript and CSS assets, depending on the location you want to use it:
139
139
-**Admin** - Used in the admin (not block editor) panel. You can find the files inside the `assets` folder with the `-admin` suffix.
140
140
-**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.
142
142
143
143
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.
144
144
@@ -242,7 +242,6 @@ Provides definitions used for linting PHP files. Read more [about PHPCS](https:/
242
242
243
243
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/).
244
244
245
-
246
245
#### webpack.config.js
247
246
248
247
`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).
Copy file name to clipboardExpand all lines: website/docs/basics/library.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ title: SCSS Library
7
7
8
8
Eightshift Frontend Libs contains a collection of useful SCSS mixins, functions and helpers you can use in projects.
9
9
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.
11
11
12
12
Check out our documentation and import what you need from Eightshift Frontend Libs.
Copy file name to clipboardExpand all lines: website/docs/basics/wp-cli.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,6 +65,7 @@ We use these common prefixes for commands:
65
65
> **Make WP-CLI your best friend, and your coding life will be much more comfortable, trust us.**
66
66
67
67
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
+
68
69
## Running commands in multisite
69
70
70
71
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