@@ -113,7 +113,7 @@ |
||
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | /** |
| 116 | - * Bind a singleton instance to the container |
|
| 116 | + * Bind a singleton instance to the container |
|
| 117 | 117 | * @param string $alias |
| 118 | 118 | * @param callable|string|null $binding |
| 119 | 119 | * @return void |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | public static function load() |
| 39 | 39 | { |
| 40 | - if( empty( static::$instance )) { |
|
| 40 | + if( empty(static::$instance) ) { |
|
| 41 | 41 | static::$instance = new static; |
| 42 | 42 | } |
| 43 | 43 | return static::$instance; |
@@ -49,14 +49,14 @@ discard block |
||
| 49 | 49 | */ |
| 50 | 50 | public function __get( $property ) |
| 51 | 51 | { |
| 52 | - if( property_exists( $this, $property ) && !in_array( $property, static::PROTECTED_PROPERTIES )) { |
|
| 52 | + if( property_exists( $this, $property ) && !in_array( $property, static::PROTECTED_PROPERTIES ) ) { |
|
| 53 | 53 | return $this->$property; |
| 54 | 54 | } |
| 55 | - $constant = 'static::'.strtoupper( $this->make( Helper::class )->snakeCase( $property )); |
|
| 56 | - if( defined( $constant )) { |
|
| 55 | + $constant = 'static::'.strtoupper( $this->make( Helper::class )->snakeCase( $property ) ); |
|
| 56 | + if( defined( $constant ) ) { |
|
| 57 | 57 | return constant( $constant ); |
| 58 | 58 | } |
| 59 | - return isset( $this->storage[$property] ) |
|
| 59 | + return isset($this->storage[$property]) |
|
| 60 | 60 | ? $this->storage[$property] |
| 61 | 61 | : null; |
| 62 | 62 | } |
@@ -68,14 +68,14 @@ discard block |
||
| 68 | 68 | */ |
| 69 | 69 | public function __set( $property, $value ) |
| 70 | 70 | { |
| 71 | - if( !property_exists( $this, $property ) || in_array( $property, static::PROTECTED_PROPERTIES )) { |
|
| 71 | + if( !property_exists( $this, $property ) || in_array( $property, static::PROTECTED_PROPERTIES ) ) { |
|
| 72 | 72 | $this->storage[$property] = $value; |
| 73 | 73 | } |
| 74 | - else if( !isset( $this->$property )) { |
|
| 74 | + else if( !isset($this->$property) ) { |
|
| 75 | 75 | $this->$property = $value; |
| 76 | 76 | } |
| 77 | 77 | else { |
| 78 | - throw new Exception( sprintf( 'The "%s" property cannot be changed once set.', $property )); |
|
| 78 | + throw new Exception( sprintf( 'The "%s" property cannot be changed once set.', $property ) ); |
|
| 79 | 79 | } |
| 80 | 80 | } |
| 81 | 81 | |
@@ -97,16 +97,16 @@ discard block |
||
| 97 | 97 | */ |
| 98 | 98 | public function make( $abstract ) |
| 99 | 99 | { |
| 100 | - if( !isset( $this->services[$abstract] )) { |
|
| 100 | + if( !isset($this->services[$abstract]) ) { |
|
| 101 | 101 | $abstract = $this->addNamespace( $abstract ); |
| 102 | 102 | } |
| 103 | - if( isset( $this->services[$abstract] )) { |
|
| 103 | + if( isset($this->services[$abstract]) ) { |
|
| 104 | 104 | $abstract = $this->services[$abstract]; |
| 105 | 105 | } |
| 106 | - if( is_callable( $abstract )) { |
|
| 106 | + if( is_callable( $abstract ) ) { |
|
| 107 | 107 | return call_user_func_array( $abstract, [$this] ); |
| 108 | 108 | } |
| 109 | - if( is_object( $abstract )) { |
|
| 109 | + if( is_object( $abstract ) ) { |
|
| 110 | 110 | return $abstract; |
| 111 | 111 | } |
| 112 | 112 | return $this->resolve( $abstract ); |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | */ |
| 121 | 121 | public function singleton( $alias, $binding ) |
| 122 | 122 | { |
| 123 | - $this->bind( $alias, $this->make( $binding )); |
|
| 123 | + $this->bind( $alias, $this->make( $binding ) ); |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | /** |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | */ |
| 131 | 131 | protected function addNamespace( $abstract ) |
| 132 | 132 | { |
| 133 | - if( strpos( $abstract, __NAMESPACE__ ) === false && !class_exists( $abstract )) { |
|
| 133 | + if( strpos( $abstract, __NAMESPACE__ ) === false && !class_exists( $abstract ) ) { |
|
| 134 | 134 | $abstract = __NAMESPACE__.'\\'.$abstract; |
| 135 | 135 | } |
| 136 | 136 | return $abstract; |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | throw new Exception( 'Target ['.$concrete.'] is not instantiable.' ); |
| 153 | 153 | } |
| 154 | 154 | $constructor = $reflector->getConstructor(); |
| 155 | - if( empty( $constructor )) { |
|
| 155 | + if( empty($constructor) ) { |
|
| 156 | 156 | return new $concrete; |
| 157 | 157 | } |
| 158 | 158 | return $reflector->newInstanceArgs( |
@@ -18,16 +18,16 @@ |
||
| 18 | 18 | |
| 19 | 19 | defined( 'WPINC' ) || die; |
| 20 | 20 | |
| 21 | -if( !class_exists( 'GL_Plugin_Check_v1' )) { |
|
| 21 | +if( !class_exists( 'GL_Plugin_Check_v1' ) ) { |
|
| 22 | 22 | require_once __DIR__.'/activate.php'; |
| 23 | 23 | } |
| 24 | -if( GL_Plugin_Check_v1::shouldDeactivate( __FILE__, array( 'wordpress' => '4.7.0' )))return; |
|
| 24 | +if( GL_Plugin_Check_v1::shouldDeactivate( __FILE__, array( 'wordpress' => '4.7.0' ) ) )return; |
|
| 25 | 25 | |
| 26 | 26 | require_once __DIR__.'/autoload.php'; |
| 27 | 27 | require_once __DIR__.'/helpers.php'; |
| 28 | 28 | |
| 29 | 29 | $app = new GeminiLabs\SiteReviews\Application; |
| 30 | 30 | $app->make( 'Provider' )->register( $app ); |
| 31 | -register_activation_hook( __FILE__, array( $app, 'activate' )); |
|
| 32 | -register_deactivation_hook( __FILE__, array( $app, 'deactivate' )); |
|
| 31 | +register_activation_hook( __FILE__, array( $app, 'activate' ) ); |
|
| 32 | +register_deactivation_hook( __FILE__, array( $app, 'deactivate' ) ); |
|
| 33 | 33 | $app->init(); |
@@ -20,22 +20,22 @@ discard block |
||
| 20 | 20 | 'class' => 'widefat', |
| 21 | 21 | 'label' => __( 'Title', 'site-reviews' ), |
| 22 | 22 | 'name' => 'title', |
| 23 | - ]); |
|
| 23 | + ] ); |
|
| 24 | 24 | if( count( glsr()->reviewTypes ) > 1 ) { |
| 25 | 25 | $this->renderField( 'select', [ |
| 26 | 26 | 'class' => 'widefat', |
| 27 | 27 | 'label' => __( 'Which type of review would you like to use?', 'site-reviews' ), |
| 28 | 28 | 'name' => 'type', |
| 29 | 29 | 'options' => ['' => __( 'All review types', 'site-reviews' )] + glsr()->reviewTypes, |
| 30 | - ]); |
|
| 30 | + ] ); |
|
| 31 | 31 | } |
| 32 | - if( !empty( $terms )) { |
|
| 32 | + if( !empty($terms) ) { |
|
| 33 | 33 | $this->renderField( 'select', [ |
| 34 | 34 | 'class' => 'widefat', |
| 35 | 35 | 'label' => __( 'Limit summary to this category', 'site-reviews' ), |
| 36 | 36 | 'name' => 'category', |
| 37 | 37 | 'options' => ['' => __( 'All Categories', 'site-reviews' )] + $terms, |
| 38 | - ]); |
|
| 38 | + ] ); |
|
| 39 | 39 | } |
| 40 | 40 | $this->renderField( 'text', [ |
| 41 | 41 | 'class' => 'widefat', |
@@ -43,12 +43,12 @@ discard block |
||
| 43 | 43 | 'description' => sprintf( __( "Separate multiple ID's with a comma. You may also enter %s to automatically represent the current page/post ID.", 'site-reviews' ), '<code>post_id</code>' ), |
| 44 | 44 | 'label' => __( 'Limit summary to reviews assigned to a page/post ID', 'site-reviews' ), |
| 45 | 45 | 'name' => 'assigned_to', |
| 46 | - ]); |
|
| 46 | + ] ); |
|
| 47 | 47 | $this->renderField( 'text', [ |
| 48 | 48 | 'class' => 'widefat', |
| 49 | 49 | 'label' => __( 'Enter any custom CSS classes here', 'site-reviews' ), |
| 50 | 50 | 'name' => 'class', |
| 51 | - ]); |
|
| 51 | + ] ); |
|
| 52 | 52 | $this->renderField( 'checkbox', [ |
| 53 | 53 | 'name' => 'hide', |
| 54 | 54 | 'options' => [ |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | 'summary' => __( 'Hide the summary text?', 'site-reviews' ), |
| 59 | 59 | 'if_empty' => __( 'Hide the summary if no reviews are found?', 'site-reviews' ), |
| 60 | 60 | ], |
| 61 | - ]); |
|
| 61 | + ] ); |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | /** |
@@ -20,30 +20,30 @@ discard block |
||
| 20 | 20 | 'class' => 'widefat', |
| 21 | 21 | 'label' => __( 'Title', 'site-reviews' ), |
| 22 | 22 | 'name' => 'title', |
| 23 | - ]); |
|
| 23 | + ] ); |
|
| 24 | 24 | $this->renderField( 'textarea', [ |
| 25 | 25 | 'class' => 'widefat', |
| 26 | 26 | 'label' => __( 'Description', 'site-reviews' ), |
| 27 | 27 | 'name' => 'description', |
| 28 | - ]); |
|
| 28 | + ] ); |
|
| 29 | 29 | $this->renderField( 'select', [ |
| 30 | 30 | 'class' => 'widefat', |
| 31 | 31 | 'label' => __( 'Automatically assign a category', 'site-reviews' ), |
| 32 | 32 | 'name' => 'category', |
| 33 | 33 | 'options' => ['' => __( 'Do not assign a category', 'site-reviews' )] + $terms, |
| 34 | - ]); |
|
| 34 | + ] ); |
|
| 35 | 35 | $this->renderField( 'text', [ |
| 36 | 36 | 'class' => 'widefat', |
| 37 | 37 | 'default' => '', |
| 38 | 38 | 'description' => sprintf( __( 'You may also enter %s to assign to the current post.', 'site-reviews' ), '<code>post_id</code>' ), |
| 39 | 39 | 'label' => __( 'Assign reviews to a custom page/post ID', 'site-reviews' ), |
| 40 | 40 | 'name' => 'assign_to', |
| 41 | - ]); |
|
| 41 | + ] ); |
|
| 42 | 42 | $this->renderField( 'text', [ |
| 43 | 43 | 'class' => 'widefat', |
| 44 | 44 | 'label' => __( 'Enter any custom CSS classes here', 'site-reviews' ), |
| 45 | 45 | 'name' => 'class', |
| 46 | - ]); |
|
| 46 | + ] ); |
|
| 47 | 47 | $this->renderField( 'checkbox', [ |
| 48 | 48 | 'name' => 'hide', |
| 49 | 49 | 'options' => [ |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | 'terms' => __( 'Hide the terms field', 'site-reviews' ), |
| 53 | 53 | 'title' => __( 'Hide the title field', 'site-reviews' ), |
| 54 | 54 | ], |
| 55 | - ]); |
|
| 55 | + ] ); |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | /** |
@@ -20,14 +20,14 @@ discard block |
||
| 20 | 20 | 'class' => 'widefat', |
| 21 | 21 | 'label' => __( 'Title', 'site-reviews' ), |
| 22 | 22 | 'name' => 'title', |
| 23 | - ]); |
|
| 23 | + ] ); |
|
| 24 | 24 | $this->renderField( 'number', [ |
| 25 | 25 | 'class' => 'small-text', |
| 26 | 26 | 'default' => 5, |
| 27 | 27 | 'label' => __( 'How many reviews would you like to display?', 'site-reviews' ), |
| 28 | 28 | 'max' => 100, |
| 29 | 29 | 'name' => 'count', |
| 30 | - ]); |
|
| 30 | + ] ); |
|
| 31 | 31 | $this->renderField( 'select', [ |
| 32 | 32 | 'label' => __( 'What is the minimum rating to display?', 'site-reviews' ), |
| 33 | 33 | 'name' => 'rating', |
@@ -38,22 +38,22 @@ discard block |
||
| 38 | 38 | '2' => sprintf( _n( '%s star', '%s stars', 2, 'site-reviews' ), 2 ), |
| 39 | 39 | '1' => sprintf( _n( '%s star', '%s stars', 1, 'site-reviews' ), 1 ), |
| 40 | 40 | ], |
| 41 | - ]); |
|
| 41 | + ] ); |
|
| 42 | 42 | if( count( glsr()->reviewTypes ) > 1 ) { |
| 43 | 43 | $this->renderField( 'select', [ |
| 44 | 44 | 'class' => 'widefat', |
| 45 | 45 | 'label' => __( 'Which reviews would you like to display?', 'site-reviews' ), |
| 46 | 46 | 'name' => 'display', |
| 47 | 47 | 'options' => ['' => __( 'All Reviews', 'site-reviews' )] + glsr()->reviewTypes, |
| 48 | - ]); |
|
| 48 | + ] ); |
|
| 49 | 49 | } |
| 50 | - if( !empty( $terms )) { |
|
| 50 | + if( !empty($terms) ) { |
|
| 51 | 51 | $this->renderField( 'select', [ |
| 52 | 52 | 'class' => 'widefat', |
| 53 | 53 | 'label' => __( 'Limit reviews to this category', 'site-reviews' ), |
| 54 | 54 | 'name' => 'category', |
| 55 | 55 | 'options' => ['' => __( 'All Categories', 'site-reviews' )] + $terms, |
| 56 | - ]); |
|
| 56 | + ] ); |
|
| 57 | 57 | } |
| 58 | 58 | $this->renderField( 'text', [ |
| 59 | 59 | 'class' => 'widefat', |
@@ -61,12 +61,12 @@ discard block |
||
| 61 | 61 | 'description' => sprintf( __( "Separate multiple ID's with a comma. You may also enter %s to automatically represent the current page/post ID.", 'site-reviews' ), '<code>post_id</code>' ), |
| 62 | 62 | 'label' => __( 'Limit reviews to those assigned to this page/post ID', 'site-reviews' ), |
| 63 | 63 | 'name' => 'assigned_to', |
| 64 | - ]); |
|
| 64 | + ] ); |
|
| 65 | 65 | $this->renderField( 'text', [ |
| 66 | 66 | 'class' => 'widefat', |
| 67 | 67 | 'label' => __( 'Enter any custom CSS classes here', 'site-reviews' ), |
| 68 | 68 | 'name' => 'class', |
| 69 | - ]); |
|
| 69 | + ] ); |
|
| 70 | 70 | $this->renderField( 'checkbox', [ |
| 71 | 71 | 'name' => 'hide', |
| 72 | 72 | 'options' => [ |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | 'response' => __( 'Hide the review response?', 'site-reviews' ), |
| 78 | 78 | 'title' => __( 'Hide the review title?', 'site-reviews' ), |
| 79 | 79 | ], |
| 80 | - ]); |
|
| 80 | + ] ); |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | /** |
@@ -87,10 +87,10 @@ discard block |
||
| 87 | 87 | */ |
| 88 | 88 | public function update( $newInstance, $oldInstance ) |
| 89 | 89 | { |
| 90 | - if( !is_numeric( $newInstance['count'] )) { |
|
| 90 | + if( !is_numeric( $newInstance['count'] ) ) { |
|
| 91 | 91 | $newInstance['count'] = 10; |
| 92 | 92 | } |
| 93 | - $newInstance['count'] = min( 50, max( 0, intval( $newInstance['count'] ))); |
|
| 93 | + $newInstance['count'] = min( 50, max( 0, intval( $newInstance['count'] ) ) ); |
|
| 94 | 94 | return parent::update( $newInstance, $oldInstance ); |
| 95 | 95 | } |
| 96 | 96 | |
@@ -15,13 +15,13 @@ discard block |
||
| 15 | 15 | public function __construct( $idBase, $name, $values ) |
| 16 | 16 | { |
| 17 | 17 | $controlOptions = $widgetOptions = []; |
| 18 | - if( isset( $values['class'] )) { |
|
| 18 | + if( isset($values['class']) ) { |
|
| 19 | 19 | $widgetOptions['classname'] = $values['class']; |
| 20 | 20 | } |
| 21 | - if( isset( $values['description'] )) { |
|
| 21 | + if( isset($values['description']) ) { |
|
| 22 | 22 | $widgetOptions['description'] = $values['description']; |
| 23 | 23 | } |
| 24 | - if( isset( $values['width'] )) { |
|
| 24 | + if( isset($values['width']) ) { |
|
| 25 | 25 | $controlOptions['width'] = $values['width']; |
| 26 | 26 | } |
| 27 | 27 | parent::__construct( $idBase, $name, $widgetOptions, $controlOptions ); |
@@ -34,10 +34,10 @@ discard block |
||
| 34 | 34 | protected function renderField( $tag, array $args = [] ) |
| 35 | 35 | { |
| 36 | 36 | $args = $this->normalizeFieldAttributes( $tag, $args ); |
| 37 | - $field = glsr( Builder::class )->{$tag}( $args['name'], $args ); |
|
| 37 | + $field = glsr( Builder::class )->{$tag}($args['name'], $args); |
|
| 38 | 38 | echo glsr( Builder::class )->div( $field, [ |
| 39 | 39 | 'class' => 'glsr-field', |
| 40 | - ]); |
|
| 40 | + ] ); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /** |
@@ -46,10 +46,10 @@ discard block |
||
| 46 | 46 | */ |
| 47 | 47 | protected function normalizeFieldAttributes( $tag, array $args ) |
| 48 | 48 | { |
| 49 | - if( empty( $args['value'] )) { |
|
| 49 | + if( empty($args['value']) ) { |
|
| 50 | 50 | $args['value'] = $this->widgetArgs[$args['name']]; |
| 51 | 51 | } |
| 52 | - if( empty( $this->widgetArgs['options'] ) && in_array( $tag, ['checkbox', 'radio'] )) { |
|
| 52 | + if( empty($this->widgetArgs['options']) && in_array( $tag, ['checkbox', 'radio'] ) ) { |
|
| 53 | 53 | $args['checked'] = in_array( $args['value'], (array)$this->widgetArgs[$args['name']] ); |
| 54 | 54 | } |
| 55 | 55 | $args['id'] = $this->get_field_id( $args['name'] ); |
@@ -15,12 +15,12 @@ discard block |
||
| 15 | 15 | return [[ |
| 16 | 16 | 'type' => 'container', |
| 17 | 17 | 'html' => '<p class="strong">'.esc_html__( 'All settings are optional.', 'site-reviews' ).'</p>', |
| 18 | - ],[ |
|
| 18 | + ], [ |
|
| 19 | 19 | 'label' => esc_html__( 'Title', 'site-reviews' ), |
| 20 | 20 | 'name' => 'title', |
| 21 | 21 | 'tooltip' => __( 'Enter a custom shortcode heading.', 'site-reviews' ), |
| 22 | 22 | 'type' => 'textbox', |
| 23 | - ],[ |
|
| 23 | + ], [ |
|
| 24 | 24 | 'label' => esc_html__( 'Description', 'site-reviews' ), |
| 25 | 25 | 'minHeight' => 60, |
| 26 | 26 | 'minWidth' => 240, |
@@ -35,29 +35,29 @@ discard block |
||
| 35 | 35 | 'name' => 'assign_to', |
| 36 | 36 | 'tooltip' => __( 'Assign submitted reviews to a custom page/post ID. You can also enter "post_id" to assign reviews to the ID of the current page.', 'site-reviews' ), |
| 37 | 37 | 'type' => 'textbox', |
| 38 | - ],[ |
|
| 38 | + ], [ |
|
| 39 | 39 | 'label' => esc_html__( 'Classes', 'site-reviews' ), |
| 40 | 40 | 'name' => 'class', |
| 41 | 41 | 'tooltip' => __( 'Add custom CSS classes to the shortcode.', 'site-reviews' ), |
| 42 | 42 | 'type' => 'textbox', |
| 43 | - ],[ |
|
| 43 | + ], [ |
|
| 44 | 44 | 'columns' => 2, |
| 45 | 45 | 'items' => [[ |
| 46 | 46 | 'name' => 'hide_email', |
| 47 | 47 | 'text' => esc_html__( 'Email', 'site-reviews' ), |
| 48 | 48 | 'tooltip' => __( 'Hide the email field?', 'site-reviews' ), |
| 49 | 49 | 'type' => 'checkbox', |
| 50 | - ],[ |
|
| 50 | + ], [ |
|
| 51 | 51 | 'name' => 'hide_name', |
| 52 | 52 | 'text' => esc_html__( 'Name', 'site-reviews' ), |
| 53 | 53 | 'tooltip' => __( 'Hide the name field?', 'site-reviews' ), |
| 54 | 54 | 'type' => 'checkbox', |
| 55 | - ],[ |
|
| 55 | + ], [ |
|
| 56 | 56 | 'name' => 'hide_terms', |
| 57 | 57 | 'text' => esc_html__( 'Terms', 'site-reviews' ), |
| 58 | 58 | 'tooltip' => __( 'Hide the terms field?', 'site-reviews' ), |
| 59 | 59 | 'type' => 'checkbox', |
| 60 | - ],[ |
|
| 60 | + ], [ |
|
| 61 | 61 | 'name' => 'hide_title', |
| 62 | 62 | 'text' => esc_html__( 'Title', 'site-reviews' ), |
| 63 | 63 | 'tooltip' => __( 'Hide the title field?', 'site-reviews' ), |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | 'layout' => 'grid', |
| 68 | 68 | 'spacing' => 5, |
| 69 | 69 | 'type' => 'container', |
| 70 | - ],[ |
|
| 70 | + ], [ |
|
| 71 | 71 | 'hidden' => true, |
| 72 | 72 | 'name' => 'id', |
| 73 | 73 | 'type' => 'textbox', |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | public function getTerms() |
| 81 | 81 | { |
| 82 | 82 | $terms = glsr( Database::class )->getTerms(); |
| 83 | - if( empty( $terms )) { |
|
| 83 | + if( empty($terms) ) { |
|
| 84 | 84 | return []; |
| 85 | 85 | } |
| 86 | 86 | return [ |
@@ -15,8 +15,8 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | protected function sanitize( array $args ) |
| 17 | 17 | { |
| 18 | - if( empty( $args['id'] )) { |
|
| 19 | - $args['id'] = substr( md5( serialize( $args )), 0, 8 ); |
|
| 18 | + if( empty($args['id']) ) { |
|
| 19 | + $args['id'] = substr( md5( serialize( $args ) ), 0, 8 ); |
|
| 20 | 20 | } |
| 21 | 21 | return $args; |
| 22 | 22 | } |
@@ -12,10 +12,10 @@ discard block |
||
| 12 | 12 | public function fields() |
| 13 | 13 | { |
| 14 | 14 | return [[ |
| 15 | - 'html' => sprintf( '<p class="strong">%s</p>', esc_html__( 'All settings are optional.', 'site-reviews' )), |
|
| 15 | + 'html' => sprintf( '<p class="strong">%s</p>', esc_html__( 'All settings are optional.', 'site-reviews' ) ), |
|
| 16 | 16 | 'minWidth' => 320, |
| 17 | 17 | 'type' => 'container', |
| 18 | - ],[ |
|
| 18 | + ], [ |
|
| 19 | 19 | 'label' => esc_html__( 'Title', 'site-reviews' ), |
| 20 | 20 | 'name' => 'title', |
| 21 | 21 | 'tooltip' => __( 'Enter a custom shortcode heading.', 'site-reviews' ), |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | 'name' => 'assigned_to', |
| 29 | 29 | 'tooltip' => __( 'Limit reviews to those assigned to this post ID (separate multiple IDs with a comma). You can also enter "post_id" to use the ID of the current page.', 'site-reviews' ), |
| 30 | 30 | 'type' => 'textbox', |
| 31 | - ],[ |
|
| 31 | + ], [ |
|
| 32 | 32 | 'label' => esc_html__( 'Schema', 'site-reviews' ), |
| 33 | 33 | 'name' => 'schema', |
| 34 | 34 | 'options' => [ |
@@ -37,34 +37,34 @@ discard block |
||
| 37 | 37 | ], |
| 38 | 38 | 'tooltip' => __( 'Rich snippets are disabled by default.', 'site-reviews' ), |
| 39 | 39 | 'type' => 'listbox', |
| 40 | - ],[ |
|
| 40 | + ], [ |
|
| 41 | 41 | 'label' => esc_html__( 'Classes', 'site-reviews' ), |
| 42 | 42 | 'name' => 'class', |
| 43 | 43 | 'tooltip' => __( 'Add custom CSS classes to the shortcode.', 'site-reviews' ), |
| 44 | 44 | 'type' => 'textbox', |
| 45 | - ],[ |
|
| 45 | + ], [ |
|
| 46 | 46 | 'columns' => 2, |
| 47 | 47 | 'items' => [[ |
| 48 | 48 | 'type' => 'checkbox', |
| 49 | 49 | 'name' => 'hide_bars', |
| 50 | 50 | 'text' => esc_html__( 'Bars', 'site-reviews' ), |
| 51 | 51 | 'tooltip' => esc_attr__( 'Hide the percentage bars?', 'site-reviews' ), |
| 52 | - ],[ |
|
| 52 | + ], [ |
|
| 53 | 53 | 'type' => 'checkbox', |
| 54 | 54 | 'name' => 'hide_if_empty', |
| 55 | 55 | 'text' => esc_html__( 'If Empty', 'site-reviews' ), |
| 56 | 56 | 'tooltip' => esc_attr__( 'Hide the summary if no reviews are found?', 'site-reviews' ), |
| 57 | - ],[ |
|
| 57 | + ], [ |
|
| 58 | 58 | 'type' => 'checkbox', |
| 59 | 59 | 'name' => 'hide_rating', |
| 60 | 60 | 'text' => esc_html__( 'Rating', 'site-reviews' ), |
| 61 | 61 | 'tooltip' => esc_attr__( 'Hide the rating?', 'site-reviews' ), |
| 62 | - ],[ |
|
| 62 | + ], [ |
|
| 63 | 63 | 'type' => 'checkbox', |
| 64 | 64 | 'name' => 'hide_stars', |
| 65 | 65 | 'text' => esc_html__( 'Stars', 'site-reviews' ), |
| 66 | 66 | 'tooltip' => esc_attr__( 'Hide the stars?', 'site-reviews' ), |
| 67 | - ],[ |
|
| 67 | + ], [ |
|
| 68 | 68 | 'type' => 'checkbox', |
| 69 | 69 | 'name' => 'hide_summary', |
| 70 | 70 | 'text' => esc_html__( 'Summary', 'site-reviews' ), |