Skip to content

Commit

Permalink
Merge branch 'release/1.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubmikita committed Jan 9, 2018
2 parents 0e5cc67 + 42abb12 commit d844161
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
*.sublime-project
*.sublime-workspace
docker-compose.yml
public
public
node_modules
yarn.lock
2 changes: 1 addition & 1 deletion assets/dist/css/style.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions assets/dist/js/scripts.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/dist/map/scripts.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/dist/map/style.css.map

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions assets/src/sass/partials/_settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@
font-weight: normal;
}

td pre code {
display: block;
padding: 1rem;
}

}

}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "settings",
"version": "1.2",
"version": "1.3",
"description": "Settings library for WordPress plugins/themes",
"main": "index.js",
"scripts": {
Expand Down
38 changes: 38 additions & 0 deletions src/Settings/CoreFields/Message.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php
/**
* Message field class
*/

namespace underDEV\Utils\Settings\CoreFields;

class Message {

/**
* Message field
* @param Field $field Field instance
* @return void
*/
public function input( $field ) {

if ( $field->addon( 'code' ) ) {
echo '<pre><code>';
}

echo $field->addon( 'message' );

if ( $field->addon( 'code' ) ) {
echo '</code></pre>';
}

}

/**
* Sanitize input value
* @param string $value Saved value
* @return string Sanitized text
*/
public function sanitize( $value ) {
return $value;
}

}
2 changes: 1 addition & 1 deletion views/settings-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
$field_description = $field->description();
?>
<?php if ( ! empty( $field_description ) ): ?>
<p><?php echo esc_html( $field_description ); ?></p>
<p><?php echo $field_description; ?></p>
<?php endif ?>
</td>
</tr>
Expand Down

0 comments on commit d844161

Please sign in to comment.