Skip to content

Commit

Permalink
minor improvements and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla committed Feb 24, 2016
1 parent 999fa0b commit 90e91a2
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions documentation/1-containers/2-post-meta.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ To access field values you need to use the function `carbon_get_post_meta($id, $
| `$name` | The name of the field to be retrieved. |
| `$type` *(optional)* | If the field you want to retrieve is of type complex, you need to pass `"complex"`. |

```
```php
<!-- Simple field -->
<p>Article was published in: <?php echo carbon_get_post_meta(get_the_ID(), 'crb_location'); ?></p>

Expand All @@ -103,7 +103,7 @@ if ( $slides ) {

You can also use `carbon_get_the_post_meta($name, $type = null)` to access the values for the current post in [The Loop](http://codex.wordpress.org/The_Loop).

```
```php
<p>Article was published in: <?php echo carbon_get_the_post_meta('crb_location'); ?></p>

<?php $slides = carbon_get_the_post_meta('crb_slides', 'complex'); ?>
Expand Down
2 changes: 1 addition & 1 deletion documentation/1-containers/3-theme-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ To retrieve field values from a theme options container, you need to use the fun
| `$name` | The name of the field to be retrieved. |
| `$type` *(optional)* | If the field you want to retrieve is of type complex, you need to pass `"complex"`. |

```
```php
<p>Copyright <?php echo carbon_get_theme_option('crb_copyright'); ?></p>
<p>
Office locations:
Expand Down
2 changes: 1 addition & 1 deletion documentation/1-containers/4-term-meta.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ To access field values you need to use the function `carbon_get_term_meta($term_
| `$name` | The name of the field to be retrieved. |
| `$type` *(optional)* | If the field you want to retrieve is of type complex, you need to pass `"complex"`. |

```
```php
<!-- Simple field -->
<p>Editor of this category: <?php echo carbon_get_term_meta($category->term_id, 'crb_editor'); ?></p>

Expand Down
2 changes: 1 addition & 1 deletion documentation/1-containers/5-user-meta.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ To access field values you need to use the function `carbon_get_user_meta($user_
| `$name` | The name of the field to be retrieved. |
| `$type` *(optional)* | If the field you want to retrieve is of type complex, you need to pass `"complex"`. |

```
```php
<!-- Simple field -->
<?php $author = get_the_author(); ?>
<p>Author address: <?php echo carbon_get_user_meta($author->ID, 'crb_street'); ?></p>
Expand Down
2 changes: 1 addition & 1 deletion documentation/1-containers/8-nav-menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function crb_nav_menu_link_attributes($atts, $item, $args, $depth) {

Both of the above examples will result in:

```
```php
<div class="menu-main-menu-container">
<ul id="menu-main-menu" class="menu">
<li id="menu-item-23" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-23">
Expand Down
2 changes: 1 addition & 1 deletion documentation/2-fields/10-set.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The method can be called multiple times, in which case the options between the c

Set options as an associative array or a [callback](http://php.net/manual/en/language.types.callable.php).

The method is not indented to be called multiple times – each call will overwrite the previous options.
The method is not intended to be called multiple times – each call will overwrite the previous options.

`limit_options($count)`

Expand Down
2 changes: 1 addition & 1 deletion documentation/2-fields/8-select.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The method can be called multiple times, in which case the options between the c

Set options as an associative array or a [callback](http://php.net/manual/en/language.types.callable.php).

The method is not indented to be called multiple times – each call will overwrite the previous options.
The method is not intended to be called multiple times – each call will overwrite the previous options.

##### NB! If you provide indexed array with no key values, the default indexes **(0, 1, 2 …)** of the elements will be used.

Expand Down
2 changes: 1 addition & 1 deletion documentation/2-fields/9-radio.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The method can be called multiple times, in which case the options between the c

Set options as an associative array or a [callback](http://php.net/manual/en/language.types.callable.php).

The method is not indented to be called multiple times – each call will overwrite the previous options.
The method is not intended to be called multiple times – each call will overwrite the previous options.

##### NB! If you provide indexed array with no key values, the default indexes **(0, 1, 2 …)** of the elements will be used.

Expand Down
6 changes: 3 additions & 3 deletions documentation/4-advanced-topics/2-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Carbon Fields are using the [Underscore](http://underscorejs.org/#template) template engine. Each field has a `template` method that prints the Underscore template code.

```
```php
use Carbon_Fields\Field\Field;

class Example_Field extends Field {
Expand All @@ -18,7 +18,7 @@ class Example_Field extends Field {

Some fields have more than one template – in those cases the extra templates should be printed in separate methods and registered via `add_template($name, $callback)` method.

```
```php
use Carbon_Fields\Field\Field;

class Example_Field extends Field {
Expand Down Expand Up @@ -56,7 +56,7 @@ Interpolate a value, and have it be HTML-escaped.

The variables that can be used inside a template are added by the `to_json()` PHP method. Here is an example of adding two new variables (rows & height):

```
```php
// Textarea Field PHP Class
class Textarea_Field extends Field {
protected $height = 170;
Expand Down

0 comments on commit 90e91a2

Please sign in to comment.