diff --git a/changelog.txt b/changelog.txt index 473f63e..600f819 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,10 @@ == Changelog == += 2.0.6 - NOV 9 2022 = +- NEW: Typography: Option to choose font format for local Google fonts feature (Customize > Typography > General). +- Fixed: Custom CSS: Custom Styling Location option doesn't store custom css. +- Updated: Plugin description. + = 2.0.5 = - Fixed: Customizer Styling Import: Potential vulnerability patch: WPScan report #5596728. diff --git a/includes/admin-bar/admin-bar.php b/includes/admin-bar/admin-bar.php index dc79b0c..6150a3e 100644 --- a/includes/admin-bar/admin-bar.php +++ b/includes/admin-bar/admin-bar.php @@ -21,6 +21,7 @@ public function __construct() { } add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_css' ) ); + add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_css' ) ); add_action( 'admin_bar_menu', array( $this, 'register' ), 999 ); } @@ -43,7 +44,7 @@ public function has_access() { * Add "Ocean" item to new-content admin bar menu item */ public function admin_bar( $wp_admin_bar ) { - if ( ! is_admin_bar_showing() || ! wpforms_current_user_can( 'create_forms' ) ) { + if ( ! is_admin_bar_showing() ) { return; } diff --git a/includes/admin-bar/assets/css/admin-bar.css b/includes/admin-bar/assets/css/admin-bar.css index 2b8c93d..e293352 100644 --- a/includes/admin-bar/assets/css/admin-bar.css +++ b/includes/admin-bar/assets/css/admin-bar.css @@ -21,6 +21,7 @@ .wp-ui-notification.ocean-menu-notification-counter, .wp-ui-notification.ocean-menu-notification-indicator { background-color: #19bbf1 !important; + color: #ffffff; } #wpadminbar .ocean-menu-notification-indicator:after { diff --git a/includes/admin-bar/assets/css/admin-bar.min.css b/includes/admin-bar/assets/css/admin-bar.min.css index 7f7f3e7..414ef1d 100644 --- a/includes/admin-bar/assets/css/admin-bar.min.css +++ b/includes/admin-bar/assets/css/admin-bar.min.css @@ -1 +1 @@ -#wpadminbar .ocean-menu-notification-counter{display:inline-block!important;min-width:18px!important;height:18px!important;border-radius:9px!important;margin:7px 0 0 2px!important;vertical-align:top!important;font-size:11px!important;line-height:1.6!important;text-align:center!important}#wpadminbar .ocean-menu-notification-indicator{float:right!important;margin:10px 0 0!important;width:8px!important;height:8px!important;border-radius:2px!important}.wp-ui-notification.ocean-menu-notification-counter,.wp-ui-notification.ocean-menu-notification-indicator{background-color:#19bbf1!important}#wpadminbar .ocean-menu-notification-indicator:after{display:block!important;content:"";position:absolute!important;width:inherit!important;height:inherit!important;border-radius:inherit!important;background-color:inherit!important;animation:ocean-menu-notification-indicator-pulse 1.5s infinite!important}@keyframes ocean-menu-notification-indicator-pulse{0%{transform:scale(1);opacity:1}100%{transform:scale(3);opacity:0}} \ No newline at end of file +#wpadminbar .ocean-menu-notification-counter{display:inline-block!important;min-width:18px!important;height:18px!important;border-radius:9px!important;margin:7px 0 0 2px!important;vertical-align:top!important;font-size:11px!important;line-height:1.6!important;text-align:center!important}#wpadminbar .ocean-menu-notification-indicator{float:right!important;margin:10px 0 0!important;width:8px!important;height:8px!important;border-radius:2px!important}.wp-ui-notification.ocean-menu-notification-counter,.wp-ui-notification.ocean-menu-notification-indicator{background-color:#19bbf1!important;color:#ffffff;}#wpadminbar .ocean-menu-notification-indicator:after{display:block!important;content:"";position:absolute!important;width:inherit!important;height:inherit!important;border-radius:inherit!important;background-color:inherit!important;animation:ocean-menu-notification-indicator-pulse 1.5s infinite!important}@keyframes ocean-menu-notification-indicator-pulse{0%{transform:scale(1);opacity:1}100%{transform:scale(3);opacity:0}} \ No newline at end of file diff --git a/includes/admin-bar/notifications.php b/includes/admin-bar/notifications.php index 3b04f3a..7321c86 100644 --- a/includes/admin-bar/notifications.php +++ b/includes/admin-bar/notifications.php @@ -124,7 +124,7 @@ public function check_dates( $notifications ) { public function get() { $option = $this->get_option(); - if (empty($option['update']) || time() > $option['update'] + DAY_IN_SECONDS) { + if ( empty( $option['update'] ) || time() > $option['update'] + DAY_IN_SECONDS ) { if ( ! wp_next_scheduled( 'ocean_admin_notifications_update' ) ) { wp_schedule_single_event( time() + 60, 'ocean_admin_notifications_update' ); } diff --git a/includes/compatibility/ocean.php b/includes/compatibility/ocean.php index 403e6f2..07f1025 100644 --- a/includes/compatibility/ocean.php +++ b/includes/compatibility/ocean.php @@ -171,10 +171,28 @@ function ocean_get_google_font_css( $url ) { if ( strpos( $url, 'https:' ) === false && strpos( $url, 'http:' ) === false ) { $url = 'https:' . $url; } + + $font_format = get_theme_mod( 'ocean_local_google_font_format', 'ttf' ); + switch ( $font_format ) { + case 'ttf': + $user_agent = 'Mozilla/5.0 (Windows; U; Windows NT 6.1; et; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9'; + break; + case 'woff': + $user_agent = 'Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0'; + break; + case 'woff2': + $user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36'; + break; + default: + $user_agent = 'Mozilla/5.0 (Windows; U; Windows NT 6.1; et; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9'; + break; + } + $request = wp_safe_remote_get( $url, array( 'sslverify' => false, + 'user-agent' => $user_agent, ) ); if ( is_wp_error( $request ) ) { @@ -242,7 +260,6 @@ function oceanwp_webfonts_local_font_url( $url ) { // Setup theme => Generate the custom CSS file. add_action( 'admin_bar_init', 'ocean_save_customizer_css_in_file', 9999 ); if ( ! function_exists( 'ocean_save_customizer_css_in_file' ) ) { - function ocean_save_customizer_css_in_file( $output = null ) { // If Custom File is not selected. @@ -259,17 +276,16 @@ function ocean_save_customizer_css_in_file( $output = null ) { // Minified the Custom CSS. $output .= oceanwp_minify_css( $output_custom_css ); - // We will probably need to load this file. - require_once ABSPATH . 'wp-admin' . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'file.php'; - $upload_dir = wp_upload_dir(); // Grab uploads folder array. $dir = trailingslashit( $upload_dir['basedir'] ) . 'oceanwp' . DIRECTORY_SEPARATOR; // Set storage directory path. - - if ( ! file_exists( untrailingslashit( $dir ) ) ) { - if ( mkdir( untrailingslashit( $dir ), FS_CHMOD_DIR ) ) { - if ( file_put_contents( $dir . 'custom-style.css', $output ) ) { - chmod( $filename, 0644 ); - } + $untraling_dir = untrailingslashit( $dir ); + if ( ! file_exists( $untraling_dir ) ) { + mkdir( $untraling_dir, FS_CHMOD_DIR ); + } + if( file_exists( $untraling_dir ) ) { + $filename = $dir . 'custom-style.css'; + if ( file_put_contents( $filename, $output ) ) { + chmod( $filename, 0644 ); } } } diff --git a/includes/panel/demos.php b/includes/panel/demos.php index 5ba950b..9b9c8df 100644 --- a/includes/panel/demos.php +++ b/includes/panel/demos.php @@ -1007,14 +1007,14 @@ public static function ajax_demo_data() {

', '' ); ?>

-

+

', '' + esc_html__('Importing a demo template allows you to kick-start your website fast, instead of creating content from scratch. It is recommended to upload a demo template on a fresh WordPress install to prevent conflict with your current content or content loss. You can use this plugin to reset your site if needed: %1$sWordpress Database Reset%2$s.', 'ocean-extra'), '', '' ); ?>

-

+

token = 'ocean-extra'; $this->plugin_url = plugin_dir_url( __FILE__ ); $this->plugin_path = plugin_dir_path( __FILE__ ); - $this->version = '2.0.5'; + $this->version = '2.0.6'; define( 'OE_URL', $this->plugin_url ); define( 'OE_PATH', $this->plugin_path ); @@ -113,13 +113,13 @@ public function __construct( $widget_areas = array() ) { // Menu icons $theme = wp_get_theme(); - if ( 'OceanWP' == $theme->name || 'oceanwp' == $theme->template ) { + if ( 'OceanWP' == $theme->name || 'oceanwp' == $theme->template ) { if ( get_template_directory() == get_stylesheet_directory() ) { $current_theme_version = theme_version(); } else { - $parent = wp_get_theme()->parent(); - // get parent version + $parent = wp_get_theme()->parent(); + // get parent version if ( ! empty( $parent) ) { $current_theme_version = $parent->Version; } diff --git a/readme.txt b/readme.txt index 27eb520..149c496 100644 --- a/readme.txt +++ b/readme.txt @@ -2,22 +2,139 @@ Contributors: oceanwp, apprimit, wpfleek Tags: widgets, meta box, metaboxes, metabox, oceanwp Requires at least: 5.6 -Tested up to: 6.0.2 -Stable tag: 2.0.5 +Tested up to: 6.1 +Stable tag: 2.0.6 Requires PHP: 7.2 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html == Description == -Ocean Extra add extra features to [OceanWP](https://oceanwp.org/) like widgets, metaboxes, activate/deactivate the customizer sections, enable/disable the theme's scripts and styles, import/export and a panel to activate the premium extensions. -This plugin requires the [OceanWP](https://oceanwp.org/) theme to be installed. +Ocean Extra adds extra features and flexibility to the [OceanWP](https://oceanwp.org/) theme for a turbocharged experience. + +Build any type of a professional looking website without any coding knowledge and by controlling every aspect of it with ease. With Ocean Extra you're in command and have full authority over available features and options. + +👉 [Ocean Core Extensions Bundle](https://oceanwp.org/core-extensions-bundle/) +👉 [Ocean Full Website Templates](https://oceanwp.org/demos/) +📘 [Documentation](https://docs.oceanwp.org/) +🎬 [Video Tutorials](https://www.youtube.com/@OceanWP) + +💙 Join the [official OceanWP Facebook community](https://www.facebook.com/groups/oceanwptheme) and always be up to speed with the latest news. + +Check out the video when Ocean Extra's Theme Panel received a makeover to become OceanWP Panel and an overview of its capabilities [youtube https://www.youtube.com/watch?v=twUc0rHnBo0] + +Ocean Extra is a 100% free WordPress plugin that enriches your website building experience by adding extra features to the OceanWP free theme. Save time and effort, and reduce the need for additional plugins or custom codes. + +Everyone deserves a polished website with expert features, and so do you. + +🔥 [Check out the Premium Features](https://oceanwp.org/core-extensions-bundle/) for additional power, energy and ability. + +== Features == + +Features listed below are just a fraction of the most significant Ocean Extra possibilities: +* Host Google fonts Locally +* Custom templates support +* Individual page / post control +* Freemium website templates import +* WordPress widgets +* Mega Menu +* Menu icons +* Various shortcodes +* Customizer sections control +* Customizer search +* Customizer reset +* Customizer styling import / export +* Integration +* Extra settings +* Admin settings +* Premium licenses panel & more + += HOST GOOGLE FONTS LOCALLY = + +1-click solution, no font upload required. Any Google font you apply from the Customizer will load from your site automatically, making your website faster and GDPR friendly in an instant. This feature also supports the Elementor page builder and Google fonts applied through it. + += CUSTOM TEMPLATES SUPPORT = + +Create as many templates as you like, using any page builder you want, including Gutenberg. Create and apply a custom header or footer directly through the Customizer. Display custom templates using shortcodes, hooks or even custom codes. + += INDIVIDUAL PAGE / POST CONTROL = + +This feature is enabled through the metabox settings and gives you full control over every page or post on your website independantly from your global Customizer settings. For example, you can apply a different page layout or a custom sidebar; you can enable or disable the Header, Top Bar, Page Title, Footer Widgets, Footer Copyright. You can apply a different navigation menu, header style, page title style, play with colors, custom titles, apply templates through shortcodes and much, much, much more. + += FREEMIUM WEBSITE TEMPLATES = + +Don't feel like starting a website from scratch? Import one of the freemium full website templates and edit content and styling as you go. Depending on the template type, each contains sample pages, sample posts and Customizer styling. Website templates are also known as demos or site kits. + += WORDPRESS WIDGETS = + +Enrich your widget areas such as sidebars or footer with additional widgets like: About Me, Contact Info, Recent Posts (with thumbnails), Custom Menu, Social Icons, Social Share and more. + += MEGA MENU = + +Turn your website navigation into a mega menu with a simple setup directly through the WordPress Menus option. + += MENU ICONS = + +Add icons to some or all of your menu items. Several icon libraries are supported, like Font Awesome, Simple Line Icons, Dashicons and more. + += VARIOUS SHORTCODES = + +Use [OceanWP shortcodes](https://docs.oceanwp.org/category/369-shortcodes) to display dynamic content on your website, such as: current year, current user, login / logout link, breadcrumbs, WooCommerce cart and more. + += CUSTOMIZER SECTIONS CONTROL = + +Disable any of the Customizer panels from loading, to increase the Customizer loading time or focus on your tasks. This feature allows you to disable only those panels created by the OceanWP theme or any of the Ocean plugins. Likewise, you can enable all panels back again. + += CUSTOMIZER SEARCH = + +The search option within the Customizer helps you find all relevant settings instantly. Enable or disable per need. + += CUSTOMIZER RESET = + +Unhappy with your Customizer settings and styling? Or you would like to import different styling? Reset all current settings to OceanWP's default values and apply your design. + += CUSTOMIZER STYLING IMPORT / EXPORT = + +Export your Customizer styling options to use on other sites, to save as backup or simply speed up the design process. Likewise, import an existing Customizer styling file and apply all settings in a breeze. + += INTEGRATION = + +The Integration panel helps you enable SVG file upload support for the WordPress Media Library, connect with MailChimp, Google reCaptcha, Google Maps and more. + += EXTRA SETTINGS = + +The Extra Settings panel allows you to disable or enable Ocean Extra plugin components, like the meta box, custom templates support, widgets, etc. + += ADMIN SETTINGS = + +The Admin Settings panel offers control over additional features, like regenerating the local Google fonts CSS file, disabling the "edit" link on post archive pages which is visible to admins, and more. + += PREMIUM OCEAN FEATURES = + +Some of the most outsanding premium features controled by the Ocean Extra's OceanWP Panel include: +* Ocean Images: Import royalty free images and icons directly to your Media Library, a feature that is included in the Ocean Core Extensions Bundle and the Ocean Pro Demos plugin. +* Full Website Templates: Import any of the 220+ full website templates (demos, site kits) to kick start your website fast. +* Elementor Widgets: Disable or enable any of the widgets that come with the Ocean Elementor Widgets plugin. +* Elementor Library: Control the settings of the Elementor Sections Library, that counts over 60 various designs. Create your page content as you. This feature is included in the Ocean Core Extensions Bundle and the Ocean Pro Demos plugin. +* Gutenberg Blocks: Disable or enable any of the blocks that come with the Ocean Gutenberg Blocks plugin. +* White Label: Whitelabel your OceanWP theme, personalize it and make it your own, with the Ocean White Label plugin. == Installation == -1. Upload `ocean-extra` to the `/wp-content/plugins/` directory; -2. Activate the plugin through the 'Plugins > Installed Plugins' menu in WordPress dashboard; -3. Done! += USING WORDPRESS PLUGIN INSTALLER = + +1. Go to your WordPress Dashboard, 'Plugins > Add New'. +2. Search for 'Ocean Extra'. +3. Click 'Install' and then 'Activate'. +4. Done! + += MANUAL INSTALLATION = + +1. Download the 'ocean-extra' zip file. +2. Extract the content and copy to the `/wp-content/plugins/` directory of your WordPress installation. +3. Navigate to your WordPress dashboard, 'Plugins > Installed Plugins'. +4. Find the 'Ocean Extra' plugin and activate. +5. Done! == Frequently Asked Questions == @@ -25,14 +142,59 @@ This plugin requires the [OceanWP](https://oceanwp.org/) theme to be installed. This plugin will only function with the [OceanWP](https://oceanwp.org/) theme. += Is Ocean Extra free? = + +Ocean Extra is a 100% free WordPress plugin on full power mode and without any limitations on its features. +Some of the additional and premium features are controled through the OceanWP Panel which is an Ocean Extra feature, but there is no premium version of the Ocean Extra plugin itself. + += Do I need to get the premium license to import freemium demos? = + +Some features or content parts have been created using [Ocean premium extensions](https://oceanwp.org/core-extensions-bundle/). +Unless you have a premium license, those features or content parts will not be displayed or enabled on your website. + +However, you can still import any of the freemium Ocean demos / website templates and recreate those features using any other plugin of your choice. + += Do you use third-party premium plugins in your demos? = + +No. Both freemium and premium Ocean demos / website templates make use only of the free version of third-party plugins. + += Where can I get support? = + +You can post your questions on the [plugin support forum](https://wordpress.org/support/plugin/ocean-extra/) or the [OceanWP support forum](https://wordpress.org/support/topic/ocean-popup-login-error/) which is mostly used by all our users. +If you have a premium license, you can also submit a [customer support ticket](https://oceanwp.org/support/). + += How do I know it's safe to update the plugin? = + +We do our best to test all changes before the official release. However, we will never be able to replicate all website conditions. +No matter what plugins you are running, it's always recommended to test an update on a staging or test environment. + +You can also check [Support Notes and User Feedback](https://docs.oceanwp.org/article/776-known-bugs-issues) before updating your plugin. + += Where can I report problems or bugs? = + +You can report problems on [this support forum](https://wordpress.org/support/plugin/ocean-extra/) or on [GitHub](https://github.com/oceanwp/ocean-extra/issues). + == Screenshots == -1. The meta boxes. -2. Customizer panels. -3. Custom CSS. +1. The OceanWP meta box Settings allow you full control over every page and post. +2. The OceanWP Panel homepage overview. +3. The OceanWP Panel Customizer options and controls. +4. The OceanWP Panel website template import feature overview - part I. +5. The OceanWP Panel website template import feature overview - part II. +6. The OceanWP Panel, Admin Settings overview. +7. The OceanWP Panel, Integration options overview. +8. The OceanWP Panel, Help section overview. +9. My Library, custom template support for header, footer, etc. +10. Various custom WordPress widgets. +11. WordPress Menu icons support feature, various icon libraries support. == Changelog == += 2.0.6 - NOV 9 2022 = +- NEW: Typography: Option to choose font format for local Google fonts feature (Customize > Typography > General). +- Fixed: Custom CSS: Custom Styling Location option doesn't store custom css. +- Updated: Plugin description. + = 2.0.5 = - Fixed: Customizer Styling Import: Potential vulnerability patch: WPScan report #5596728.