Ocean Extra - Version 1.0.4

Version Description

  • Modified capability to manage options for the Custom CSS tab.
Download this release

Release Info

Developer oceanwp
Plugin Icon 128x128 Ocean Extra
Version 1.0.4
Comparing to
See all releases

Code changes from version 1.0.3 to 1.0.4

includes/metabox/assets/ocean-metabox.css CHANGED
@@ -23,6 +23,13 @@
23
 
24
  #ocean-metabox .inside .ocean-wrap .ocean-mb-desc p.ocean-mb-description { font-size: 12px; font-weight: normal; margin: 8px 0 0; padding: 0; color: #939393; }
25
 
 
 
 
 
 
 
 
26
  #ocean-metabox .inside .ocean-wrap .uploader input[type="text"] { width: 78%; }
27
  #ocean-metabox .inside .ocean-wrap .uploader .ocean-mb-uploader { float: right; width: 18%; height: 35px; margin: 1px; border-radius: 0; outline: 0; -webkit-box-shadow: none; box-shadow: none; vertical-align: middle; }
28
  #ocean-metabox .inside .ocean-wrap .uploader .ocean-mb-uploader:hover { border-color: #bbb; }
23
 
24
  #ocean-metabox .inside .ocean-wrap .ocean-mb-desc p.ocean-mb-description { font-size: 12px; font-weight: normal; margin: 8px 0 0; padding: 0; color: #939393; }
25
 
26
+ #ocean-metabox .inside .ocean-wrap .ocean-multiple-links .ocean-custom-links { margin-top: 14px; }
27
+ #ocean-metabox .inside .ocean-wrap .ocean-multiple-links .ocean-custom-links:first-child { margin-top: 0; }
28
+ #ocean-metabox .inside .ocean-wrap .ocean-multiple-links .first,
29
+ #ocean-metabox .inside .ocean-wrap .ocean-multiple-links .last { width: 48%; }
30
+ #ocean-metabox .inside .ocean-wrap .ocean-multiple-links .first { float: left; }
31
+ #ocean-metabox .inside .ocean-wrap .ocean-multiple-links .last { float: right; }
32
+
33
  #ocean-metabox .inside .ocean-wrap .uploader input[type="text"] { width: 78%; }
34
  #ocean-metabox .inside .ocean-wrap .uploader .ocean-mb-uploader { float: right; width: 18%; height: 35px; margin: 1px; border-radius: 0; outline: 0; -webkit-box-shadow: none; box-shadow: none; vertical-align: middle; }
35
  #ocean-metabox .inside .ocean-wrap .uploader .ocean-mb-uploader:hover { border-color: #bbb; }
includes/metabox/metabox.php CHANGED
@@ -149,21 +149,22 @@ class Ocean_Post_Metaboxes {
149
  foreach ( $tab['settings'] as $setting ) {
150
 
151
  // Vars
152
- $meta_id = $setting['id'];
153
- $title = $setting['title'];
154
- $hidden = isset ( $setting['hidden'] ) ? $setting['hidden'] : false;
155
- $type = isset ( $setting['type'] ) ? $setting['type'] : 'text';
156
- $default = isset ( $setting['default'] ) ? $setting['default'] : '';
157
  // Add 0 number if nothing to the number type
158
  if ( 'number' == $type ) {
159
  $default = '0';
160
  }
161
- $description = isset ( $setting['description'] ) ? $setting['description'] : '';
162
- $input_min = isset ( $setting['input_attrs']['min'] ) ? $setting['input_attrs']['min'] : '0';
163
- $input_max = isset ( $setting['input_attrs']['max'] ) ? $setting['input_attrs']['max'] : '10';
164
- $input_step = isset ( $setting['input_attrs']['step'] ) ? $setting['input_attrs']['step'] : '1';
165
- $meta_value = get_post_meta( $post_id, $meta_id, true );
166
- $meta_value = $meta_value ? $meta_value : $default; ?>
 
167
 
168
  <div<?php if ( $hidden ) echo ' style="display:none;"'; ?> id="<?php echo $meta_id; ?>_tr" class="ocean-field clr">
169
  <div class="ocean-mb-desc">
@@ -186,7 +187,7 @@ class Ocean_Post_Metaboxes {
186
  // Number Field
187
  if ( 'number' == $type ) { ?>
188
 
189
- <div class="ocean-mb-field"><input name="<?php echo $meta_id; ?>" type="number" value="<?php echo $meta_value; ?>" min="<?php echo $input_min; ?>" max="<?php echo $input_max; ?>" step="<?php echo $input_step; ?>"></div>
190
 
191
  <?php }
192
 
@@ -638,7 +639,7 @@ class Ocean_Post_Metaboxes {
638
  public static function metaboxes_css() { ?>
639
 
640
  <style type="text/css">
641
- #ocean-metabox .clr:after{content:"";display:block;height:0;clear:both;visibility:hidden;zoom:1}#ocean-metabox .inside{margin:0!important;padding:0}#ocean-metabox ul.ocean-tabs{float:left;width:17%;background-color:#f8f8f8;border-right:1px solid #e2dddb;margin:0;padding:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#ocean-metabox ul.ocean-tabs li{display:block;font-size:13px;text-decoration:none;padding:0;margin:0;border:0;border-bottom:1px solid #e2dddb;word-wrap:break-word}#ocean-metabox ul.ocean-tabs li a{display:block;padding:13px;color:#222;text-decoration:none;-webkit-box-shadow:none;box-shadow:none}#ocean-metabox ul.ocean-tabs .wp-tab-active{margin-right:-1px}#ocean-metabox ul.ocean-tabs#ocean-mb-tab-1{display:block;background-color:#fff}#ocean-metabox .ocean-tab-panel{float:left;width:83%;padding:20px 30px;background-color:#fff;border:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#ocean-metabox .wp-tab-panel{display:none;max-height:none!important;border:0;background-color:transparent}#ocean-metabox .wp-tab-panel#ocean-mb-tab-1{display:block}#ocean-metabox .wp-tab-panel .ocean-wrap{margin:0}#ocean-metabox .inside .ocean-wrap .ocean-field{border-top:1px solid #f1f1f1;padding:15px 0}#ocean-metabox .inside .ocean-wrap .ocean-field:first-child{border:none;padding-top:0}#ocean-metabox .inside .ocean-wrap .ocean-mb-desc{float:left;width:45%}#ocean-metabox .inside .ocean-wrap .ocean-mb-field{position:relative;float:right;width:50%}#ocean-metabox .inside .ocean-wrap label{display:block;font-size:13px;color:#222}#ocean-metabox .inside .ocean-wrap .ocean-mb-desc label span{margin-right:7px}#ocean-metabox .inside .ocean-wrap .ocean-mb-desc p.ocean-mb-description{font-size:12px;font-weight:400;margin:8px 0 0;padding:0;color:#939393}#ocean-metabox .inside .ocean-wrap .uploader input[type=text]{width:78%}#ocean-metabox .inside .ocean-wrap .uploader .ocean-mb-uploader{float:right;width:18%;height:35px;margin:1px;border-radius:0;outline:0;-webkit-box-shadow:none;box-shadow:none;vertical-align:middle}#ocean-metabox .inside .ocean-wrap .uploader .ocean-mb-uploader:hover{border-color:#bbb}#ocean-metabox .inside .ocean-wrap .uploader .ocean-mb-uploader:focus{border-color:#bbb;-webkit-box-shadow:none;box-shadow:none}#ocean-metabox .inside .ocean-wrap input[type=text],#ocean-metabox .inside .ocean-wrap input[type=number]{width:100%;padding:7px 15px}#ocean-metabox .inside .ocean-wrap input.ocean-mb-color-field{width: 90px;padding: 3px 10px}#ocean-metabox .inside .ocean-wrap textarea{width:100%}#ocean-metabox .inside .ocean-wrap select{display:block;width:100%;min-width:40%;height:auto;border:1px solid #d9d9d9;color:#333;font-size:13px;outline:0;padding:7px 15px;cursor:pointer;z-index:5}
642
  </style>
643
 
644
  <?php
149
  foreach ( $tab['settings'] as $setting ) {
150
 
151
  // Vars
152
+ $meta_id = $setting['id'];
153
+ $title = $setting['title'];
154
+ $hidden = isset ( $setting['hidden'] ) ? $setting['hidden'] : false;
155
+ $type = isset ( $setting['type'] ) ? $setting['type'] : 'text';
156
+ $default = isset ( $setting['default'] ) ? $setting['default'] : '';
157
  // Add 0 number if nothing to the number type
158
  if ( 'number' == $type ) {
159
  $default = '0';
160
  }
161
+ $description = isset ( $setting['description'] ) ? $setting['description'] : '';
162
+ $input_min = isset ( $setting['input_attrs']['min'] ) ? $setting['input_attrs']['min'] : '0';
163
+ $input_max = isset ( $setting['input_attrs']['max'] ) ? $setting['input_attrs']['max'] : '10';
164
+ $input_step = isset ( $setting['input_attrs']['step'] ) ? $setting['input_attrs']['step'] : '1';
165
+ $links_count = isset ( $setting['links_count'] ) ? $setting['links_count'] : '4';
166
+ $meta_value = get_post_meta( $post_id, $meta_id, true );
167
+ $meta_value = $meta_value ? $meta_value : $default; ?>
168
 
169
  <div<?php if ( $hidden ) echo ' style="display:none;"'; ?> id="<?php echo $meta_id; ?>_tr" class="ocean-field clr">
170
  <div class="ocean-mb-desc">
187
  // Number Field
188
  if ( 'number' == $type ) { ?>
189
 
190
+ <div class="ocean-mb-field"><input name="<?php echo $meta_id; ?>" type="number" value="<?php echo $meta_value; ?>" min="<?php echo floatval( $input_min ); ?>" max="<?php echo floatval( $input_max ); ?>" step="<?php echo floatval( $input_step ); ?>"></div>
191
 
192
  <?php }
193
 
639
  public static function metaboxes_css() { ?>
640
 
641
  <style type="text/css">
642
+ #ocean-metabox .clr:after{content:"";display:block;height:0;clear:both;visibility:hidden;zoom:1}#ocean-metabox .inside{margin:0!important;padding:0}#ocean-metabox ul.ocean-tabs{float:left;width:17%;background-color:#f8f8f8;border-right:1px solid #e2dddb;margin:0;padding:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#ocean-metabox ul.ocean-tabs li{display:block;font-size:13px;text-decoration:none;padding:0;margin:0;border:0;border-bottom:1px solid #e2dddb;word-wrap:break-word}#ocean-metabox ul.ocean-tabs li a{display:block;padding:13px;color:#222;text-decoration:none;-webkit-box-shadow:none;box-shadow:none}#ocean-metabox ul.ocean-tabs .wp-tab-active{margin-right:-1px}#ocean-metabox ul.ocean-tabs#ocean-mb-tab-1{display:block;background-color:#fff}#ocean-metabox .ocean-tab-panel{float:left;width:83%;padding:20px 30px;background-color:#fff;border:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#ocean-metabox .wp-tab-panel{display:none;max-height:none!important;border:0;background-color:transparent}#ocean-metabox .wp-tab-panel#ocean-mb-tab-1{display:block}#ocean-metabox .wp-tab-panel .ocean-wrap{margin:0}#ocean-metabox .inside .ocean-wrap .ocean-field{border-top:1px solid #f1f1f1;padding:15px 0}#ocean-metabox .inside .ocean-wrap .ocean-field:first-child{border:none;padding-top:0}#ocean-metabox .inside .ocean-wrap .ocean-mb-desc{float:left;width:45%}#ocean-metabox .inside .ocean-wrap .ocean-mb-field{position:relative;float:right;width:50%}#ocean-metabox .inside .ocean-wrap label{display:block;font-size:13px;color:#222}#ocean-metabox .inside .ocean-wrap .ocean-mb-desc label span{margin-right:7px}#ocean-metabox .inside .ocean-wrap .ocean-mb-desc p.ocean-mb-description{font-size:12px;font-weight:400;margin:8px 0 0;padding:0;color:#939393}#ocean-metabox .inside .ocean-wrap .ocean-multiple-links .ocean-custom-links{margin-top:14px}#ocean-metabox .inside .ocean-wrap .ocean-multiple-links .ocean-custom-links:first-child{margin-top:0}#ocean-metabox .inside .ocean-wrap .ocean-multiple-links .first,#ocean-metabox .inside .ocean-wrap .ocean-multiple-links .last{width:48%}#ocean-metabox .inside .ocean-wrap .ocean-multiple-links .first{float:left}#ocean-metabox .inside .ocean-wrap .ocean-multiple-links .last{float:right}#ocean-metabox .inside .ocean-wrap .uploader input[type=text]{width:78%}#ocean-metabox .inside .ocean-wrap .uploader .ocean-mb-uploader{float:right;width:18%;height:35px;margin:1px;border-radius:0;outline:0;-webkit-box-shadow:none;box-shadow:none;vertical-align:middle}#ocean-metabox .inside .ocean-wrap .uploader .ocean-mb-uploader:hover{border-color:#bbb}#ocean-metabox .inside .ocean-wrap .uploader .ocean-mb-uploader:focus{border-color:#bbb;-webkit-box-shadow:none;box-shadow:none}#ocean-metabox .inside .ocean-wrap input[type=text],#ocean-metabox .inside .ocean-wrap input[type=number]{width:100%;padding:7px 15px}#ocean-metabox .inside .ocean-wrap input.ocean-mb-color-field{width:90px;padding:3px 10px}#ocean-metabox .inside .ocean-wrap textarea{width:100%}#ocean-metabox .inside .ocean-wrap select{display:block;width:100%;min-width:40%;height:auto;border:1px solid #d9d9d9;color:#333;font-size:13px;outline:0;padding:7px 15px;cursor:pointer;z-index:5}
643
  </style>
644
 
645
  <?php
includes/panel/custom-css.php CHANGED
@@ -40,7 +40,7 @@ if ( ! class_exists( 'Ocean_Custom_CSS' ) ) {
40
  'ocean-panel',
41
  esc_html__( 'Custom CSS', 'ocean-extra' ),
42
  esc_html__( 'Custom CSS', 'ocean-extra' ),
43
- 'administrator',
44
  'ocean-panel-custom-css',
45
  array( $this, 'create_admin_page' )
46
  );
40
  'ocean-panel',
41
  esc_html__( 'Custom CSS', 'ocean-extra' ),
42
  esc_html__( 'Custom CSS', 'ocean-extra' ),
43
+ 'manage_options',
44
  'ocean-panel-custom-css',
45
  array( $this, 'create_admin_page' )
46
  );
ocean-extra.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Ocean Extra
4
  * Plugin URI: https://oceanwp.org/extension/ocean-extra/
5
  * Description: Add extra features like metaboxes, custom CSS and a panel to activate the premium extensions.
6
- * Version: 1.0.3
7
  * Author: OceanWP
8
  * Author URI: https://oceanwp.org/
9
  * Requires at least: 4.0.0
@@ -86,7 +86,7 @@ final class Ocean_Extra {
86
  $this->token = 'ocean-extra';
87
  $this->plugin_url = plugin_dir_url( __FILE__ );
88
  $this->plugin_path = plugin_dir_path( __FILE__ );
89
- $this->version = '1.0.3';
90
 
91
  define( 'OE_ROOT', dirname( __FILE__ ) );
92
  define( 'OE_ADMIN_PANEL_HOOK_PREFIX', 'theme-panel_page_ocean-panel' );
3
  * Plugin Name: Ocean Extra
4
  * Plugin URI: https://oceanwp.org/extension/ocean-extra/
5
  * Description: Add extra features like metaboxes, custom CSS and a panel to activate the premium extensions.
6
+ * Version: 1.0.4
7
  * Author: OceanWP
8
  * Author URI: https://oceanwp.org/
9
  * Requires at least: 4.0.0
86
  $this->token = 'ocean-extra';
87
  $this->plugin_url = plugin_dir_url( __FILE__ );
88
  $this->plugin_path = plugin_dir_path( __FILE__ );
89
+ $this->version = '1.0.4';
90
 
91
  define( 'OE_ROOT', dirname( __FILE__ ) );
92
  define( 'OE_ADMIN_PANEL_HOOK_PREFIX', 'theme-panel_page_ocean-panel' );
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: oceanwp
3
  Tags: meta boxes, meta box, metaboxes, metabox, social sharing, ocean
4
  Requires at least: 3.5
5
  Tested up to: 4.6.1
6
- Stable tag: 1.0.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -33,16 +33,19 @@ This plugin will only work with the [Ocean](https://oceanwp.org/) theme.
33
 
34
  == Changelog ==
35
 
 
 
 
36
  = 1.0.3 =
37
- New field in the Ocean Settings meta box to add an overlay to the background image title.
38
 
39
  = 1.0.2 =
40
- New extension "Custom Sidebar" added in the extensions tab.
41
- New field in the Main tab in the metabox to add shorcode to the top of the page.
42
- Posts Slider shortcode added, see the documentation for more infos.
43
 
44
  = 1.0.1 =
45
- Add documentation link in the panel.
46
 
47
  = 1.0.0 =
48
- Initial release.
3
  Tags: meta boxes, meta box, metaboxes, metabox, social sharing, ocean
4
  Requires at least: 3.5
5
  Tested up to: 4.6.1
6
+ Stable tag: 1.0.4
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
33
 
34
  == Changelog ==
35
 
36
+ = 1.0.4 =
37
+ - Modified capability to manage options for the Custom CSS tab.
38
+
39
  = 1.0.3 =
40
+ - New field in the Ocean Settings meta box to add an overlay to the background image title.
41
 
42
  = 1.0.2 =
43
+ - New extension "Custom Sidebar" added in the extensions tab.
44
+ - New field in the Main tab in the metabox to add shorcode to the top of the page.
45
+ - Posts Slider shortcode added, see the documentation for more infos.
46
 
47
  = 1.0.1 =
48
+ - Add documentation link in the panel.
49
 
50
  = 1.0.0 =
51
+ - Initial release.