Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #16

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion legacy/v2/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ Take a look at a quick example of instancing a `Form` with a resource, action an
if( current_user_can( 'read' ) ) {
$form = tr_form('users', 'update', get_current_user_id());
$form->open();
$form->text('Github Handle');
$form->text('GitHub Handle');
$form->close('Save Changes');
}
```
2 changes: 1 addition & 1 deletion legacy/v3/builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Description: Build modular designs in a slide deck style.

## About Page Builder

The page builder plugin was designed to help developers and designers work together with clients to deliver the best experience when building [modular/component based designes](http://alistapart.com/article/language-of-modular-design).
The page builder plugin was designed to help developers and designers work together with clients to deliver the best experience when building [modular/component based designs](http://alistapart.com/article/language-of-modular-design).

![typerocket-builder-plugin](https://typerocket.com/wp-content/uploads/2016/09/typerocket-builder-plugin.gif)

Expand Down
4 changes: 2 additions & 2 deletions legacy/v3/field-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ $form->password('Your Password');

## Hidden

This field should always go at the top or bottom of a form to prevent formating issues.
This field should always go at the top or bottom of a form to prevent formatting issues.

```php
$form->hidden('Hidden Field');
Expand Down Expand Up @@ -360,7 +360,7 @@ Here is an example for a component named "Banner":
- `resources/components/page_builder/banner.php` - Backend fields.
- `wordpress/assets/components/page_builder/banner.png` - Thumbnail.

### Using a compnent
### Using a component

Once the files are created you can begin adding code to the front end and backend files. For example, the "Content" component.

Expand Down
2 changes: 1 addition & 1 deletion legacy/v3/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ Take a look at a quick example of instancing a `Form` with a resource, action an
if( current_user_can( 'read' ) ) {
$form = tr_form('user', 'update', get_current_user_id());
$form->open();
$form->text('Github Handle');
$form->text('GitHub Handle');
$form->close('Save Changes');
}
```
Expand Down
4 changes: 2 additions & 2 deletions legacy/v3/ioc-resolver.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Title: IoC Resolver
Description: Inversion of control resolver automatically tries to instance a class with its dependancies.
Description: Inversion of control resolver automatically tries to instance a class with its dependencies.

---

## IoC Resolver

The inversion of control resolver automatically tries to instance a class with its dependancies. The `Resolver` object will look at a classes constructor and automatically inject its dependencies.
The inversion of control resolver automatically tries to instance a class with its dependencies. The `Resolver` object will look at a classes constructor and automatically inject its dependencies.

## Resolving

Expand Down
2 changes: 1 addition & 1 deletion legacy/v3/post-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ $person->addColumn('Job Title');

*If the custom field is grouped then you need to use the base group name.*

The `addColum()` method takes up to 5 aurguments.
The `addColumn()` method takes up to 5 aurguments.

1. `field` - The name of the field to add. You can use any string format but lowercase letters and `_` (underscores) should be used for precision.
2. `sort` - The column is sortable `true` or `false`.
Expand Down
2 changes: 1 addition & 1 deletion v1/automatic-updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The required endpoint format is JSON.
"sections": {
"description": "<p>My plugin</p>",
"installation": "<p>Install things this way...</p>",
"changelog": "<h4>1.0.0</h4><ul><li>Sart project.</li></ul>"
"changelog": "<h4>1.0.0</h4><ul><li>Start project.</li></ul>"
},
"download_url": "https://example.com/downloads/latest-version.zip",
"last_updated": "2020-01-01 14:59:53"
Expand Down
2 changes: 1 addition & 1 deletion v1/composer-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ For beginners, the MU install is the fittest place to start.

### 2.1 MU Install

From the command line, go to your `wordpress/wp-content/mu-plugins` folder. Then, replace `YOUR_URL_HERE` in the following command with the "Composer URL" from your acount page and run it:
From the command line, go to your `wordpress/wp-content/mu-plugins` folder. Then, replace `YOUR_URL_HERE` in the following command with the "Composer URL" from your account page and run it:

```
composer create-project --prefer-dist typerocket/pro typerocket --add-repository --repository=YOUR_URL_HERE
Expand Down
4 changes: 2 additions & 2 deletions v1/curl-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ Description: A simple cURL client.
TypeRocket provides a simple [cURL](https://www.php.net/manual/en/book.curl.php) Http client. Take a look at sending a POST request.

```php
$url = 'https://exmaple.com';
$url = 'https://example.com';
$data = [
'app' => 'TypeRocket',
'downlaods' => '10000',
'downloads' => '10000',
];
$json = true; // Make request as JSON

Expand Down
2 changes: 1 addition & 1 deletion v1/field-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ Here is an example of a component named "Banner":
- `resources/components/page_builder/banner.php` - Backend fields.
- `wordpress/assets/components/page_builder/banner.png` - Thumbnail.

### Using a compnent
### Using a component

Once the files are created, you can begin adding code to the front end and backend files. For example, the "Content" component.

Expand Down
2 changes: 1 addition & 1 deletion v1/fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ $name = $field->getName();

## Groups

*Note: Field and From groups are independant.*
*Note: Field and From groups are independent.*

There are times when you want to have fields grouped together when being saved. A great case for this is when you are saving data to `wp_options` using the `OptionController`.

Expand Down
6 changes: 3 additions & 3 deletions v1/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ echo $form->text('First Name');

### Setting the Model

If you need to set the data resource after the a `Form` obejct is initalized use the `setModel()` method. You can pass and `array` or `Model` into this method. you can also pass the `string` class name or a model.
If you need to set the data resource after the a `Form` object is initialized use the `setModel()` method. You can pass and `array` or `Model` into this method. you can also pass the `string` class name or a model.

```php
$form->setModel(['first_name' => 'John']);
Expand Down Expand Up @@ -251,7 +251,7 @@ You could also omit the `create` action because TypeRocket automatically reasons

```php
// Also, sends a POST request with the
// action omited. TypeRocket magic.
// action omitted. TypeRocket magic.
$form = tr_form('post');
```

Expand Down Expand Up @@ -708,7 +708,7 @@ echo $form->section([
In some cases, you want fields grouped into a `<fieldset>`. This can be for styling with CSS or when you want to toggle a group of fields with conditionals. To make a section use the `fieldset()` method.

```php
echo $form->fieldset('Title', 'A desription.', [
echo $form->fieldset('Title', 'A description.', [
$form->text('First'),
$form->text('Last')
]);
Expand Down
2 changes: 1 addition & 1 deletion v1/front-end-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ You can use a [form](/docs/v1/forms/) on the front-end of your site and have it
For example, if you have the following route in your `routes/public.php` file.

```php
tr_route()->put()->do('/seats/*', funcion($id) {
tr_route()->put()->do('/seats/*', function($id) {
tr_frontend_enable();
$form = tr_form('seat', $id)->toUrl('/seats/'.$id.'/');
return tr_view('my.view.file', compact('id', 'form'));
Expand Down
4 changes: 2 additions & 2 deletions v1/ioc-resolver.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Title: Services & DI Container
Description: Inversion of control resolver automatically tries to instance a class with its dependancies.
Description: Inversion of control resolver automatically tries to instance a class with its dependencies.

---

Expand Down Expand Up @@ -63,7 +63,7 @@ You can then access the service instance using `tr_service('MyService')`. If you
Register a class to the DI Container.

```php
// singlton and alias are both optional arguments
// singleton and alias are both optional arguments
$singleton = true;
$alias = 'my.class';

Expand Down
2 changes: 1 addition & 1 deletion v1/menu-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Description: Add custom fields to menu items in WordPress 5.4+.

---

## Requirments
## Requirements

Adding menu item fields is possible in **WordPress 5.4+** with the addition of the `wp_nav_menu_item_custom_fields` action hook. Prior to WordPress 5.4, adding custom fields to menu items was not possible without creating major conflicts between plugins.

Expand Down
2 changes: 1 addition & 1 deletion v1/meta-boxes.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ To disable a metabox in Gutenberg.
$box->gutenbergOff();
```

### Compatability Flags
### Compatibility Flags

In WordPress 5.3 Gutenberg compatibility flags were added.

Expand Down
2 changes: 1 addition & 1 deletion v1/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ class Doc extends Model

## Format

To format a model's values before it is saved, use the `$format` property. Formating can be used to sanitize data being saved to the database.
To format a model's values before it is saved, use the `$format` property. Formatting can be used to sanitize data being saved to the database.

```php
class Doc extends Model
Expand Down
2 changes: 1 addition & 1 deletion v1/nginx.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ We encountered an issue where TypeRocket’s page builder interface kept throwin
fastcgi_param PATH_INFO $fastcgi_path_info;
```

This omission was resulting in the URL rewrite functionality, which Wordpress uses a great deal, to behave inconsistently. Adding the correct entry to the site’s Nginx config in the` location ~ \.php$ {}` block resolved the error. Alternatively, adding this entry to the server’s `fastcgi_params` file (usually located at `etc/nginx/fastcgi_params`), will also fix the problem for all Nginx & PHP-FPM sites on the server. Nginx & PHP-FPM will need to be restarted after this adjustment is made to either the site config or the global fastcgi_params config.
This omission was resulting in the URL rewrite functionality, which WordPress uses a great deal, to behave inconsistently. Adding the correct entry to the site’s Nginx config in the` location ~ \.php$ {}` block resolved the error. Alternatively, adding this entry to the server’s `fastcgi_params` file (usually located at `etc/nginx/fastcgi_params`), will also fix the problem for all Nginx & PHP-FPM sites on the server. Nginx & PHP-FPM will need to be restarted after this adjustment is made to either the site config or the global fastcgi_params config.
2 changes: 1 addition & 1 deletion v1/post-types-ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ You can also move the menu location of the Post Types UI to another location by
// Add to the tools menu
define('TR_POST_TYPES_MENU', 'tools');

// Add to the setings menu
// Add to the settings menu
define('TR_POST_TYPES_MENU', 'settings');
```
4 changes: 2 additions & 2 deletions v1/post-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ $book->apply( [$bookDetails, $publisher] );
To apply a taxonomy that already exists use the `addTaxonomy()` method and pass the taxonomies ID as a parameter.

```php
$book->addTaxonomy('categoy');
$book->addTaxonomy('category');
$book->addTaxonomy('post_tag');
```

Expand Down Expand Up @@ -364,7 +364,7 @@ $person->addColumn('Job Title');

*If the custom field is grouped then you need to use the base group name.*

The `addColum()` method takes up to 4 aurguments.
The `addColumn()` method takes up to 4 aurguments.

1. `field` - The name of the field to add. You can use any string format but lowercase letters and `_` (underscores) should be used for precision.
2. `sort_by` - The column is sortable `true` or `false`. Doubles as order_by when string value is passed. String options include: `int`, `double`, `date`, `datetime`, `time`, and `str`.
Expand Down
2 changes: 1 addition & 1 deletion v1/redirects.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ tr_redirect_errors();

## With Flash

Redirect with WordPresss admin flash message. Works with the TypeRocket REST API. Types include: `success`, `error`, and `warning`.
Redirect with WordPress admin flash message. Works with the TypeRocket REST API. Types include: `success`, `error`, and `warning`.

```php
$type = 'success';
Expand Down
18 changes: 9 additions & 9 deletions v1/requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ $request->getHeader('ACCEPT');
## Get Accepts

```php
$rquest->getAccepts();
$request->getAccepts();
// Returns and array
```

Expand All @@ -137,7 +137,7 @@ $rquest->getAccepts();
If you need to search the content type, a request accepts in return.

```php
$rquest->acceptContains('application/json');
$request->acceptContains('application/json');
```

Or, you can use the shorthand `wants()`. This method accepts the following options:
Expand All @@ -150,17 +150,17 @@ Or, you can use the shorthand `wants()`. This method accepts the following optio
- image

```php
$rquest->wants('json');
$request->wants('json');
```

## GET & POST Data

```php
$all = $rquest->getDataPost();
$single = $rquest->getDataPost('page');
$all = $request->getDataPost();
$single = $request->getDataPost('page');

$all = $rquest->getDataGet();
$single = $rquest->getDataGet('page');
$all = $request->getDataGet();
$single = $request->getDataGet('page');
```

## Get Input
Expand Down Expand Up @@ -198,14 +198,14 @@ $body = $request->getDataJson();
## Get Files

```php
$rquest->getDataFiles();
$request->getDataFiles();
```

## Get Cookies

```php
$all = $request->getDataCookies();
$single = $rquest->getDataCookies('my_cookie');
$single = $request->getDataCookies('my_cookie');
```

## Check Nonce
Expand Down
2 changes: 1 addition & 1 deletion v1/routes.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ tr_route()->get()->match('login')->do('login@Member');

The action component, `login`, of this shorthand calls the `login()` method of the controller; and the `Member` string selects `\App\Controllers\MemberController` as the controller.

#### Contoller Override
#### Controller Override

You can override what controller is used by using the full class name of the controller.

Expand Down
4 changes: 2 additions & 2 deletions v1/theme-templating.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ In WordPress, the theme templates do three things:

For example, if your theme has a `single-post.php` template file, all requests for a "single blog post" will be routed to that template file. The file will also control the logic flow and display the view for the page. This bundling of responsibilities is not ideal as it can lead to numerous bugs and scalability issues.

On the other hand, TypeRocket's template router seamlessly integrates into the WordPress template hierarchy pattern allowing you to use the MVC pattern while maintaining backward compatibility withing WordPress. Using the TypeRocket template router has several advantages:
On the other hand, TypeRocket's template router seamlessly integrates into the WordPress template hierarchy pattern allowing you to use the MVC pattern while maintaining backward compatibility within WordPress. Using the TypeRocket template router has several advantages:

- WordPress core templates only allow for 400 error handling. The template router allows for 500, 401, 403, or any other error templates to be used.
- Takes your view out of the global scope, greatly reducing your chances of variable naming collisions, thus reducing the odds for bugs.
Expand Down Expand Up @@ -134,7 +134,7 @@ The main benefit of using models over the WordPress loops, in our view, will be

## Replacing The WP Loop

Now, we can begin replacing the WordPress loop and use the modern pattern of MVC. Back in the `BlogContoller` add the following constructor.
Now, we can begin replacing the WordPress loop and use the modern pattern of MVC. Back in the `BlogController` add the following constructor.

```php
class BlogController extends TemplateController
Expand Down
2 changes: 1 addition & 1 deletion v1/webpack.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ npm run prod

## Versioning

TypeRocket Pro supports with versioning for Webpack files that use the `verson()` method. You can use the `tr_manifest_cache()` method to locate your `mix-manifest.json` file.
TypeRocket Pro supports with versioning for Webpack files that use the `version()` method. You can use the `tr_manifest_cache()` method to locate your `mix-manifest.json` file.

```php
// Define Theme Directory
Expand Down
2 changes: 1 addition & 1 deletion v4/builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ If you installed TypeRocket manually follow these steps:

## About Page Builder

The page builder plugin was designed to help developers and designers work together with clients to deliver the best experience when building [modular/component based designes](http://alistapart.com/article/language-of-modular-design).
The page builder plugin was designed to help developers and designers work together with clients to deliver the best experience when building [modular/component based designs](http://alistapart.com/article/language-of-modular-design).

![typerocket-builder-plugin](https://typerocket.com/wp-content/uploads/2016/09/typerocket-builder-plugin.gif)

Expand Down
2 changes: 1 addition & 1 deletion v4/custom-composer-packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Description: Make your own TypeRocket composer packages.

---

## TypeRocket Compatable Composer Packages
## TypeRocket Compatible Composer Packages

You can create your own custom composer pages that are compatible with TypeRocket. When you do TypeRocket comes with a Galaxy CLI command to help you publish your plugin (this is like activating a plugin in WordPress).

Expand Down
2 changes: 1 addition & 1 deletion v4/custom-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ public function add() {
}
```

If you encouter issues keep in mind the TypeRocket JSON API requires strict adherence to the controller action naming scheme: `showRest`, `create`, `update`, and `destroy`.
If you encounter issues keep in mind the TypeRocket JSON API requires strict adherence to the controller action naming scheme: `showRest`, `create`, `update`, and `destroy`.



Expand Down
2 changes: 1 addition & 1 deletion v4/field-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ Here is an example of a component named "Banner":
- `resources/components/page_builder/banner.php` - Backend fields.
- `wordpress/assets/components/page_builder/banner.png` - Thumbnail.

### Using a compnent
### Using a component

Once the files are created you can begin adding code to the front end and backend files. For example, the "Content" component.

Expand Down
2 changes: 1 addition & 1 deletion v4/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ Take a look at a quick example of instancing a `Form` with a resource, action an
if( current_user_can( 'read' ) ) {
$form = tr_form('user', 'update', get_current_user_id());
$form->open();
$form->text('Github Handle');
$form->text('GitHub Handle');
$form->close('Save Changes');
}
```
Expand Down
4 changes: 2 additions & 2 deletions v4/ioc-resolver.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Title: DI Container
Description: Inversion of control resolver automatically tries to instance a class with its dependancies.
Description: Inversion of control resolver automatically tries to instance a class with its dependencies.

---

Expand All @@ -8,7 +8,7 @@ Description: Inversion of control resolver automatically tries to instance a cla
Register a class to the DI Container.

```php
// singlton and alias are both optional arguments
// singleton and alias are both optional arguments
$singleton = true;
$alias = 'my.class';

Expand Down
Loading