Skip to content

Commit

Permalink
update Carbon Fields and Gravity Forms utilities to be compliant with…
Browse files Browse the repository at this point in the history
… WPCS
  • Loading branch information
atanas-dev committed Aug 23, 2018
1 parent 3396979 commit 240606f
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/CarbonFields/carbon-fields.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
<?php
/**
* Bootstrap Carbon Fields
* Load Carbon Fields.
*
* @package WPEmergeCli
*/

/**
* Bootstrap Carbon Fields.
*/
function app_boot_carbon_fields() {
\Carbon_Fields\Carbon_Fields::boot();
}

/**
* Bootstrap Carbon Fields container definitions
* Bootstrap Carbon Fields container definitions.
*/
function app_boot_carbon_fields_register_fields() {
include_once APP_APP_SETUP_DIR . 'carbon-fields' . DIRECTORY_SEPARATOR . 'theme-options.php';
Expand All @@ -17,7 +23,7 @@ function app_boot_carbon_fields_register_fields() {
}

/**
* Filter Google Maps API key for Carbon Fields
* Filter Google Maps API key for Carbon Fields.
*/
function app_filter_carbon_fields_google_maps_api_key() {
return carbon_get_theme_option( 'crb_google_maps_api_key' );
Expand Down
4 changes: 4 additions & 0 deletions src/CarbonFields/carbon-fields/post-meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@
* Here, you can register custom post meta fields using the Carbon Fields library.
*
* @see https://carbonfields.net/docs/containers-post-meta/
*
* @package WPEmergeCli
*/

use Carbon_Fields\Container\Container;
use Carbon_Fields\Field\Field;

// phpcs:disable
/*
Container::make( 'post_meta', __( 'Custom Data', 'app' ) )
->where( 'post_type', '=', 'page' )
Expand All @@ -25,3 +28,4 @@
Field::make( 'file', 'crb_pdf' ),
));
*/
// phpcs:enable
4 changes: 4 additions & 0 deletions src/CarbonFields/carbon-fields/term-meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@
* Here, you can register custom post meta fields using the Carbon Fields library.
*
* @see https://carbonfields.net/docs/containers-post-meta/
*
* @package WPEmergeCli
*/

use Carbon_Fields\Container\Container;
use Carbon_Fields\Field\Field;

// phpcs:disable
/*
Container::make( 'term_meta', __( 'Custom Data', 'app' ) )
->where( 'term_taxonomy', '=', 'category' )
->add_fields( array(
Field::make( 'image', 'crb_img' ),
));
*/
// phpcs:enable
2 changes: 2 additions & 0 deletions src/CarbonFields/carbon-fields/theme-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* Here, you can register Theme Options using the Carbon Fields library.
*
* @see https://carbonfields.net/docs/containers-theme-options/
*
* @package WPEmergeCli
*/

use Carbon_Fields\Container\Container;
Expand Down
4 changes: 4 additions & 0 deletions src/CarbonFields/carbon-fields/user-meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@
* Here, you can register custom post meta fields using the Carbon Fields library.
*
* @see https://carbonfields.net/docs/containers-post-meta/
*
* @package WPEmergeCli
*/

use Carbon_Fields\Container\Container;
use Carbon_Fields\Field\Field;

// phpcs:disable
/*
Container::make( 'user_meta', __( 'Custom Data', 'app' ) )
->add_fields( array(
Field::make( 'image', 'crb_img' ),
));
*/
// phpcs:enable
2 changes: 2 additions & 0 deletions src/GravityForms/gravity-forms.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php
/**
* Gravity Forms utilities.
*
* @package WPEmergeCli
*/

/**
Expand Down

0 comments on commit 240606f

Please sign in to comment.