Version Description
- Added: Typography settings for the Menu in the OceanWP Settings metabox.
- Removed: Push Monkey integration, if you used it in the Theme Panel, you just need to install the official plugin: https://wordpress.org/plugins/push-monkey-desktop-push-notifications/
Download this release
Release Info
Developer | oceanwp |
Plugin | Ocean Extra |
Version | 1.4.12 |
Comparing to | |
See all releases |
Code changes from version 1.4.11 to 1.4.12
- includes/dashboard.php +7 -0
- includes/metabox/metabox.php +99 -13
- includes/panel/assets/css/extensions.css +123 -0
- includes/panel/assets/css/extensions.min.css +1 -0
- includes/panel/assets/css/panel.css +13 -0
- includes/panel/assets/css/panel.min.css +1 -1
- includes/panel/assets/css/push-monkey.css +0 -278
- includes/panel/assets/css/push-monkey.min.css +0 -1
- includes/panel/assets/img/plugins/elementor-widgets.png +0 -0
- includes/panel/assets/img/plugins/footer-callout.png +0 -0
- includes/panel/assets/img/plugins/hooks.png +0 -0
- includes/panel/assets/img/plugins/instagram.png +0 -0
- includes/panel/assets/img/plugins/popup-login.png +0 -0
- includes/panel/assets/img/plugins/portfolio.png +0 -0
- includes/panel/assets/img/plugins/side-panel.png +0 -0
- includes/panel/assets/img/plugins/sticky-footer.png +0 -0
- includes/panel/assets/img/plugins/sticky-header.png +0 -0
- includes/panel/assets/img/plugins/white-label.png +0 -0
- includes/panel/assets/img/plugins/woo-popup.png +0 -0
- includes/panel/assets/img/push-monkey-devices.png +0 -0
- includes/panel/assets/img/push-monkey.png +0 -0
- includes/panel/assets/js/manifest.json +0 -14
- includes/panel/demos.php +5 -0
- includes/panel/extensions.php +102 -12
- includes/panel/push-monkey-client.php +0 -514
- includes/panel/push-monkey-woocommerce.php +0 -81
- includes/panel/theme-panel.php +93 -484
- ocean-extra.php +21 -3
- readme.txt +7 -3
includes/dashboard.php
CHANGED
@@ -78,6 +78,13 @@ if ( ! class_exists( 'OceanWP_Dashboard_News' ) ) :
|
|
78 |
</div>
|
79 |
<div class="owp-news-footer">
|
80 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
printf(
|
82 |
'<a href="%1$s" class="owp-post-link" target="_blank">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
|
83 |
'https://oceanwp.org/blog/',
|
78 |
</div>
|
79 |
<div class="owp-news-footer">
|
80 |
<?php
|
81 |
+
printf(
|
82 |
+
'<a href="%1$s" class="owp-post-link" target="_blank">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
|
83 |
+
'https://oceanwp.org/demos/',
|
84 |
+
__( 'Demos' ),
|
85 |
+
/* translators: accessibility text */
|
86 |
+
__( '(opens in a new window)' )
|
87 |
+
);
|
88 |
printf(
|
89 |
'<a href="%1$s" class="owp-post-link" target="_blank">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
|
90 |
'https://oceanwp.org/blog/',
|
includes/metabox/metabox.php
CHANGED
@@ -84,9 +84,6 @@ if ( ! class_exists( 'OceanWP_Post_Metabox' ) ) {
|
|
84 |
// Register fields for the posts
|
85 |
add_action( 'butterbean_register', array( $this, 'posts_register' ), 10, 2 );
|
86 |
|
87 |
-
// Register scripts and styles.
|
88 |
-
add_action( 'admin_enqueue_scripts', array( $this, 'register_scripts' ) );
|
89 |
-
|
90 |
// Load scripts and styles.
|
91 |
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
92 |
|
@@ -253,18 +250,33 @@ if ( ! class_exists( 'OceanWP_Post_Metabox' ) ) {
|
|
253 |
return;
|
254 |
}
|
255 |
|
|
|
|
|
|
|
256 |
// Return if wrong post type
|
257 |
-
if ( ! in_array( $post->post_type, $
|
258 |
return;
|
259 |
}
|
260 |
|
261 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
262 |
wp_enqueue_script( 'oceanwp-metabox-script', plugins_url( '/assets/js/metabox.min.js', __FILE__ ), array( 'jquery' ), OE_VERSION, true );
|
263 |
-
|
264 |
-
|
265 |
-
wp_enqueue_script( 'oceanwp-select2' );
|
266 |
-
|
267 |
-
|
|
|
|
|
|
|
|
|
268 |
|
269 |
}
|
270 |
|
@@ -997,6 +1009,34 @@ if ( ! class_exists( 'OceanWP_Post_Metabox' ) ) {
|
|
997 |
'sanitize_callback' => 'sanitize_key',
|
998 |
)
|
999 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1000 |
|
1001 |
$manager->register_control(
|
1002 |
'ocean_menu_link_color', // Same as setting name.
|
@@ -2625,16 +2665,27 @@ if ( ! class_exists( 'OceanWP_Post_Metabox' ) ) {
|
|
2625 |
* @since 1.0.0
|
2626 |
*/
|
2627 |
public static function head_css( $output ) {
|
|
|
2628 |
|
2629 |
// Layout
|
2630 |
-
$layout = get_post_meta(
|
2631 |
|
2632 |
// Global vars
|
2633 |
-
$content_width = get_post_meta(
|
2634 |
-
$sidebars_width = get_post_meta(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2635 |
|
2636 |
// Define css var
|
2637 |
$css = '';
|
|
|
2638 |
|
2639 |
// If Both Sidebars layout
|
2640 |
if ( 'both-sidebars' == $layout ) {
|
@@ -2660,6 +2711,41 @@ if ( ! class_exists( 'OceanWP_Post_Metabox' ) ) {
|
|
2660 |
}
|
2661 |
|
2662 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2663 |
|
2664 |
// Return CSS
|
2665 |
if ( ! empty( $css ) ) {
|
84 |
// Register fields for the posts
|
85 |
add_action( 'butterbean_register', array( $this, 'posts_register' ), 10, 2 );
|
86 |
|
|
|
|
|
|
|
87 |
// Load scripts and styles.
|
88 |
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
89 |
|
250 |
return;
|
251 |
}
|
252 |
|
253 |
+
// Post types scripts
|
254 |
+
$post_types_scripts = apply_filters( 'ocean_metaboxes_post_types_scripts', $this->post_types );
|
255 |
+
|
256 |
// Return if wrong post type
|
257 |
+
if ( ! in_array( $post->post_type, $post_types_scripts ) ) {
|
258 |
return;
|
259 |
}
|
260 |
|
261 |
+
$min = ( SCRIPT_DEBUG ) ? '' : '.min';
|
262 |
+
|
263 |
+
// Default style
|
264 |
+
wp_enqueue_style( 'oceanwp-butterbean', plugins_url( '/controls/assets/css/butterbean'. $min .'.css', __FILE__ ) );
|
265 |
+
|
266 |
+
// Default script.
|
267 |
+
wp_enqueue_script( 'oceanwp-butterbean', plugins_url( '/controls/assets/js/butterbean'. $min .'.js', __FILE__ ), array( 'butterbean' ), '', true );
|
268 |
+
|
269 |
+
// Metabox script
|
270 |
wp_enqueue_script( 'oceanwp-metabox-script', plugins_url( '/assets/js/metabox.min.js', __FILE__ ), array( 'jquery' ), OE_VERSION, true );
|
271 |
+
|
272 |
+
// Enqueue the select2 script, I use "oceanwp-select2" to avoid plugins conflicts
|
273 |
+
wp_enqueue_script( 'oceanwp-select2', plugins_url( '/controls/assets/js/select2.full.min.js', __FILE__ ), array( 'jquery' ), false, true );
|
274 |
+
|
275 |
+
// Enqueue the select2 style
|
276 |
+
wp_enqueue_style( 'select2', plugins_url( '/controls/assets/css/select2.min.css', __FILE__ ) );
|
277 |
+
|
278 |
+
// Enqueue color picker alpha
|
279 |
+
wp_enqueue_script( 'wp-color-picker-alpha', plugins_url( '/controls/assets/js/wp-color-picker-alpha.js', __FILE__ ), array( 'wp-color-picker' ), false, true );
|
280 |
|
281 |
}
|
282 |
|
1009 |
'sanitize_callback' => 'sanitize_key',
|
1010 |
)
|
1011 |
);
|
1012 |
+
|
1013 |
+
$manager->register_control(
|
1014 |
+
'ocean_menu_typo', // Same as setting name.
|
1015 |
+
array(
|
1016 |
+
'section' => 'oceanwp_mb_menu',
|
1017 |
+
'type' => 'typography',
|
1018 |
+
'label' => esc_html__( 'Typography', 'ocean-extra' ),
|
1019 |
+
'description' => esc_html__( 'Typography for the menu.', 'ocean-extra' ),
|
1020 |
+
'settings' => array(
|
1021 |
+
'family' => 'ocean_menu_typo_font_family',
|
1022 |
+
'size' => 'ocean_menu_typo_font_size',
|
1023 |
+
'weight' => 'ocean_menu_typo_font_weight',
|
1024 |
+
'style' => 'ocean_menu_typo_font_style',
|
1025 |
+
'transform' => 'ocean_menu_typo_transform',
|
1026 |
+
'line_height' => 'ocean_menu_typo_line_height',
|
1027 |
+
'spacing' => 'ocean_menu_typo_spacing'
|
1028 |
+
),
|
1029 |
+
'l10n' => array(),
|
1030 |
+
)
|
1031 |
+
);
|
1032 |
+
|
1033 |
+
$manager->register_setting( 'ocean_menu_typo_font_family', array( 'sanitize_callback' => 'sanitize_text_field', ) );
|
1034 |
+
$manager->register_setting( 'ocean_menu_typo_font_size', array( 'sanitize_callback' => 'sanitize_text_field', ) );
|
1035 |
+
$manager->register_setting( 'ocean_menu_typo_font_weight', array( 'sanitize_callback' => 'sanitize_key', ) );
|
1036 |
+
$manager->register_setting( 'ocean_menu_typo_font_style', array( 'sanitize_callback' => 'sanitize_key', ) );
|
1037 |
+
$manager->register_setting( 'ocean_menu_typo_transform', array( 'sanitize_callback' => 'sanitize_key', ) );
|
1038 |
+
$manager->register_setting( 'ocean_menu_typo_line_height', array( 'sanitize_callback' => 'sanitize_text_field', ) );
|
1039 |
+
$manager->register_setting( 'ocean_menu_typo_spacing', array( 'sanitize_callback' => 'sanitize_text_field', ) );
|
1040 |
|
1041 |
$manager->register_control(
|
1042 |
'ocean_menu_link_color', // Same as setting name.
|
2665 |
* @since 1.0.0
|
2666 |
*/
|
2667 |
public static function head_css( $output ) {
|
2668 |
+
$id = oceanwp_post_id();
|
2669 |
|
2670 |
// Layout
|
2671 |
+
$layout = get_post_meta( $id, 'ocean_post_layout', true );
|
2672 |
|
2673 |
// Global vars
|
2674 |
+
$content_width = get_post_meta( $id, 'ocean_both_sidebars_content_width', true );
|
2675 |
+
$sidebars_width = get_post_meta( $id, 'ocean_both_sidebars_sidebars_width', true );
|
2676 |
+
|
2677 |
+
// Typography
|
2678 |
+
$menu_font_family = get_post_meta( $id, 'ocean_menu_typo_font_family', true );
|
2679 |
+
$menu_font_size = get_post_meta( $id, 'ocean_menu_typo_font_size', true );
|
2680 |
+
$menu_font_weight = get_post_meta( $id, 'ocean_menu_typo_font_weight', true );
|
2681 |
+
$menu_font_style = get_post_meta( $id, 'ocean_menu_typo_font_style', true );
|
2682 |
+
$menu_text_transform = get_post_meta( $id, 'ocean_menu_typo_transform', true );
|
2683 |
+
$menu_line_height = get_post_meta( $id, 'ocean_menu_typo_line_height', true );
|
2684 |
+
$menu_letter_spacing = get_post_meta( $id, 'ocean_menu_typo_spacing', true );
|
2685 |
|
2686 |
// Define css var
|
2687 |
$css = '';
|
2688 |
+
$menu_typo_css = '';
|
2689 |
|
2690 |
// If Both Sidebars layout
|
2691 |
if ( 'both-sidebars' == $layout ) {
|
2711 |
}
|
2712 |
|
2713 |
}
|
2714 |
+
|
2715 |
+
// Add menu font size
|
2716 |
+
if ( ! empty( $menu_font_size ) ) {
|
2717 |
+
$menu_typo_css .= 'font-size:'. $menu_font_size .';';
|
2718 |
+
}
|
2719 |
+
|
2720 |
+
// Add menu font weight
|
2721 |
+
if ( ! empty( $menu_font_weight ) ) {
|
2722 |
+
$menu_typo_css .= 'font-weight:'. $menu_font_weight .';';
|
2723 |
+
}
|
2724 |
+
|
2725 |
+
// Add menu font style
|
2726 |
+
if ( ! empty( $menu_font_style ) ) {
|
2727 |
+
$menu_typo_css .= 'font-style:'. $menu_font_style .';';
|
2728 |
+
}
|
2729 |
+
|
2730 |
+
// Add menu text transform
|
2731 |
+
if ( ! empty( $menu_text_transform ) ) {
|
2732 |
+
$menu_typo_css .= 'text-transform:'. $menu_text_transform .';';
|
2733 |
+
}
|
2734 |
+
|
2735 |
+
// Add menu line height
|
2736 |
+
if ( ! empty( $menu_line_height ) ) {
|
2737 |
+
$menu_typo_css .= 'line-height:'. $menu_line_height .';';
|
2738 |
+
}
|
2739 |
+
|
2740 |
+
// Add menu letter spacing
|
2741 |
+
if ( ! empty( $menu_letter_spacing ) ) {
|
2742 |
+
$menu_typo_css .= 'letter-spacing:'. $menu_letter_spacing .';';
|
2743 |
+
}
|
2744 |
+
|
2745 |
+
// Menu typography css
|
2746 |
+
if ( ! empty( $menu_typo_css ) ) {
|
2747 |
+
$css .= '#site-navigation-wrap .dropdown-menu > li > a, .oceanwp-mobile-menu-icon a {'. $menu_typo_css .'}';
|
2748 |
+
}
|
2749 |
|
2750 |
// Return CSS
|
2751 |
if ( ! empty( $css ) ) {
|
includes/panel/assets/css/extensions.css
ADDED
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.oceanwp-extensions-panel * {
|
2 |
+
-webkit-box-sizing: border-box;
|
3 |
+
box-sizing: border-box;
|
4 |
+
}
|
5 |
+
|
6 |
+
body .oceanwp-extensions-panel h2:first-child,
|
7 |
+
.oceanwp-extensions-panel .oceanwp-desc {
|
8 |
+
padding-left: 10px;
|
9 |
+
padding-right: 10px;
|
10 |
+
}
|
11 |
+
|
12 |
+
.oceanwp-extensions-panel .oceanwp-desc {
|
13 |
+
margin: 6px 0 30px;
|
14 |
+
}
|
15 |
+
|
16 |
+
.oceanwp-extensions-panel .extensions-wrap {
|
17 |
+
display: -webkit-box;
|
18 |
+
display: -ms-flexbox;
|
19 |
+
display: flex;
|
20 |
+
-webkit-flex-wrap: wrap;
|
21 |
+
flex-wrap: wrap;
|
22 |
+
}
|
23 |
+
|
24 |
+
.oceanwp-extensions-panel .extensions-wrap li {
|
25 |
+
width: 33.33%;
|
26 |
+
padding: 0 10px 20px;
|
27 |
+
margin: 0;
|
28 |
+
overflow: hidden;
|
29 |
+
}
|
30 |
+
|
31 |
+
.oceanwp-extensions-panel .extensions-wrap li .owp-card-top {
|
32 |
+
display: -webkit-box;
|
33 |
+
display: -ms-flexbox;
|
34 |
+
display: flex;
|
35 |
+
-webkit-align-items: center;
|
36 |
+
align-items: center;
|
37 |
+
min-height: 140px;
|
38 |
+
background-color: #fff;
|
39 |
+
border: 1px solid #ddd;
|
40 |
+
border-bottom: 0;
|
41 |
+
padding: 20px;
|
42 |
+
text-decoration: none;
|
43 |
+
-webkit-transition: all .3s ease;
|
44 |
+
-moz-transition: all .3s ease;
|
45 |
+
-ms-transition: all .3s ease;
|
46 |
+
-o-transition: all .3s ease;
|
47 |
+
transition: all .3s ease;
|
48 |
+
}
|
49 |
+
|
50 |
+
.oceanwp-extensions-panel .extensions-wrap li .owp-card-top:hover {
|
51 |
+
background-color: #f1f1f1;
|
52 |
+
}
|
53 |
+
|
54 |
+
.oceanwp-extensions-panel .extensions-wrap li .owp-card-top:focus {
|
55 |
+
-webkit-box-shadow: none;
|
56 |
+
box-shadow: none;
|
57 |
+
}
|
58 |
+
|
59 |
+
.oceanwp-extensions-panel .owp-img {
|
60 |
+
padding-right: 15px;
|
61 |
+
line-height: 1;
|
62 |
+
}
|
63 |
+
|
64 |
+
.oceanwp-extensions-panel .owp-img img {
|
65 |
+
max-width: 80px;
|
66 |
+
border-radius: 50%;
|
67 |
+
}
|
68 |
+
|
69 |
+
.oceanwp-extensions-panel h3 {
|
70 |
+
margin: 0 0 15px;
|
71 |
+
}
|
72 |
+
|
73 |
+
.oceanwp-extensions-panel .owp-description p {
|
74 |
+
color: #777;
|
75 |
+
font-size: 14px;
|
76 |
+
margin: 0;
|
77 |
+
}
|
78 |
+
|
79 |
+
.oceanwp-extensions-panel .owp-card-btn {
|
80 |
+
display: block;
|
81 |
+
background-color: #13aff0;
|
82 |
+
color: #fff;
|
83 |
+
padding: 12px 10px;
|
84 |
+
font-size: 13px;
|
85 |
+
line-height: 1;
|
86 |
+
font-weight: 600;
|
87 |
+
text-transform: uppercase;
|
88 |
+
text-decoration: none;
|
89 |
+
text-align: center;
|
90 |
+
-webkit-transition: all .3s ease;
|
91 |
+
-moz-transition: all .3s ease;
|
92 |
+
-ms-transition: all .3s ease;
|
93 |
+
-o-transition: all .3s ease;
|
94 |
+
transition: all .3s ease;
|
95 |
+
}
|
96 |
+
|
97 |
+
.oceanwp-extensions-panel .owp-card-btn:hover {
|
98 |
+
background-color: #0b7cac;
|
99 |
+
}
|
100 |
+
|
101 |
+
.oceanwp-extensions-panel .owp-card-btn:focus {
|
102 |
+
-webkit-box-shadow: none;
|
103 |
+
box-shadow: none;
|
104 |
+
}
|
105 |
+
|
106 |
+
/* RTL */
|
107 |
+
.rtl .oceanwp-extensions-panel .owp-img {
|
108 |
+
padding-left: 15px;
|
109 |
+
padding-right: 0;
|
110 |
+
}
|
111 |
+
|
112 |
+
/* Responsive */
|
113 |
+
@media only screen and (max-width: 1180px) {
|
114 |
+
.oceanwp-extensions-panel .extensions-wrap li {
|
115 |
+
width: 50%;
|
116 |
+
}
|
117 |
+
}
|
118 |
+
|
119 |
+
@media only screen and (max-width: 780px) {
|
120 |
+
.oceanwp-extensions-panel .extensions-wrap li {
|
121 |
+
width: 100%;
|
122 |
+
}
|
123 |
+
}
|
includes/panel/assets/css/extensions.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.oceanwp-extensions-panel *{-webkit-box-sizing:border-box;box-sizing:border-box}.oceanwp-extensions-panel .oceanwp-desc,body .oceanwp-extensions-panel h2:first-child{padding-left:10px;padding-right:10px}.oceanwp-extensions-panel .oceanwp-desc{margin:6px 0 30px}.oceanwp-extensions-panel .extensions-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap}.oceanwp-extensions-panel .extensions-wrap li{width:33.33%;padding:0 10px 20px;margin:0;overflow:hidden}.oceanwp-extensions-panel .extensions-wrap li .owp-card-top{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-align-items:center;align-items:center;min-height:140px;background-color:#fff;border:1px solid #ddd;border-bottom:0;padding:20px;text-decoration:none;-webkit-transition:all .3s ease;-moz-transition:all .3s ease;-ms-transition:all .3s ease;-o-transition:all .3s ease;transition:all .3s ease}.oceanwp-extensions-panel .extensions-wrap li .owp-card-top:hover{background-color:#f1f1f1}.oceanwp-extensions-panel .extensions-wrap li .owp-card-top:focus{-webkit-box-shadow:none;box-shadow:none}.oceanwp-extensions-panel .owp-img{padding-right:15px;line-height:1}.oceanwp-extensions-panel .owp-img img{max-width:80px;border-radius:50%}.oceanwp-extensions-panel h3{margin:0 0 15px}.oceanwp-extensions-panel .owp-description p{color:#777;font-size:14px;margin:0}.oceanwp-extensions-panel .owp-card-btn{display:block;background-color:#13aff0;color:#fff;padding:12px 10px;font-size:13px;line-height:1;font-weight:600;text-transform:uppercase;text-decoration:none;text-align:center;-webkit-transition:all .3s ease;-moz-transition:all .3s ease;-ms-transition:all .3s ease;-o-transition:all .3s ease;transition:all .3s ease}.oceanwp-extensions-panel .owp-card-btn:hover{background-color:#0b7cac}.oceanwp-extensions-panel .owp-card-btn:focus{-webkit-box-shadow:none;box-shadow:none}.rtl .oceanwp-extensions-panel .owp-img{padding-left:15px;padding-right:0}@media only screen and (max-width:1180px){.oceanwp-extensions-panel .extensions-wrap li{width:50%}}@media only screen and (max-width:780px){.oceanwp-extensions-panel .extensions-wrap li{width:100%}}
|
includes/panel/assets/css/panel.css
CHANGED
@@ -45,6 +45,17 @@ body .oceanwp-bloc .button.owp-button { margin: 22px 0 10px; }
|
|
45 |
.oceanwp-bloc p.bottom-text { color: #5a5a5a; font-size: 12px; font-weight: 600; font-style: italic; margin: 0; }
|
46 |
.oceanwp-bloc i { position: absolute; bottom: -30px; right: -26px; width: auto; height: auto; font-size: 120px; opacity: .07; z-index: 1; }
|
47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
.oceanwp-octify .owp-img { padding: 30px 30px 0; margin: 0 0 18px; text-align: center; }
|
49 |
.oceanwp-octify .owp-img img { max-width: 200px; }
|
50 |
body .oceanwp-octify .button.owp-button { background-color: #ed5f3f; }
|
@@ -95,6 +106,8 @@ body.rtl .oceanwp-buttons .button.owp-button.owp-doc-btn { float: left; }
|
|
95 |
.oceanwp-buttons { width: 49%; }
|
96 |
.oceanwp-review,
|
97 |
.oceanwp-kinsta { float: left; }
|
|
|
|
|
98 |
.oceanwp-octify,
|
99 |
.oceanwp-buttons { float: right; }
|
100 |
.oceanwp-button { display: none; }
|
45 |
.oceanwp-bloc p.bottom-text { color: #5a5a5a; font-size: 12px; font-weight: 600; font-style: italic; margin: 0; }
|
46 |
.oceanwp-bloc i { position: absolute; bottom: -30px; right: -26px; width: auto; height: auto; font-size: 120px; opacity: .07; z-index: 1; }
|
47 |
|
48 |
+
.oceanwp-bundle { background-color: #2794da; background: -moz-linear-gradient(4deg,#2386c5 58%,#2386c5 58%,#2386c5 58%); background: -webkit-linear-gradient(4deg,#2386c5 58%,#2386c5 58%,#2794da 58%); background: linear-gradient(4deg,#2386c5 58%,#2386c5 58%,#2794da 58%); color: #fff; }
|
49 |
+
.oceanwp-bundle .owp-text { text-align: center; margin: 0; padding: 25px 10px; }
|
50 |
+
.oceanwp-bundle a.logo-text { display: inline-block; font-size: 38px; line-height: 1; color: #fff; text-decoration: none; -webkit-transition: all .3s ease; -moz-transition: all .3s ease; -o-transition: all .3s ease; -ms-transition: all .3s ease; transition: all .3s ease; }
|
51 |
+
.oceanwp-bundle a.logo-text:hover { opacity: .6; }
|
52 |
+
.oceanwp-bundle a.logo-text .circle { display: inline-block; width: 5px; height: 5px; background-color: #fff; border-radius: 50%; }
|
53 |
+
.oceanwp-bundle p.content { color: #fff; }
|
54 |
+
.oceanwp-bundle p.content a { color: #afd8f3; text-decoration: underline; }
|
55 |
+
.oceanwp-bundle p.content a:hover { text-decoration: none; }
|
56 |
+
body .oceanwp-bundle .button.owp-button { display: block; background-color: #1d2428; color: #fff; margin-top: 30px; }
|
57 |
+
body .oceanwp-bundle .button.owp-button:hover { background-color: #303e4c; }
|
58 |
+
|
59 |
.oceanwp-octify .owp-img { padding: 30px 30px 0; margin: 0 0 18px; text-align: center; }
|
60 |
.oceanwp-octify .owp-img img { max-width: 200px; }
|
61 |
body .oceanwp-octify .button.owp-button { background-color: #ed5f3f; }
|
106 |
.oceanwp-buttons { width: 49%; }
|
107 |
.oceanwp-review,
|
108 |
.oceanwp-kinsta { float: left; }
|
109 |
+
.oceanwp-kinsta { clear: left; }
|
110 |
+
.oceanwp-bundle,
|
111 |
.oceanwp-octify,
|
112 |
.oceanwp-buttons { float: right; }
|
113 |
.oceanwp-button { display: none; }
|
includes/panel/assets/css/panel.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.oceanwp-kinsta .owp-img img,.oceanwp-octify .owp-img img{max-width:200px}.clr:after,.push-monkey-tab:before{content:''}.clr:after{display:block;height:0;clear:both;visibility:hidden;zoom:1}.button,.wp-core-ui .button-link:focus,.wp-core-ui .button-secondary:focus,.wp-core-ui .button.focus,.wp-core-ui .button:focus,a:focus{-webkit-box-shadow:none!important;box-shadow:none!important}body .button.owp-button{background-color:#13aff0;color:#fff;height:auto;font-size:12px;line-height:1;font-weight:600;text-transform:uppercase;margin:0;padding:14px 20px;border:0;cursor:pointer;text-align:center;letter-spacing:.1em;border-radius:3px
|
1 |
+
.oceanwp-panels .column-name,body .button.owp-button{-webkit-transition:all .3s ease;-moz-transition:all .3s ease;-o-transition:all .3s ease;-ms-transition:all .3s ease}.oceanwp-kinsta .owp-img img,.oceanwp-octify .owp-img img{max-width:200px}.clr:after,.push-monkey-tab:before{content:''}.clr:after{display:block;height:0;clear:both;visibility:hidden;zoom:1}.button,.wp-core-ui .button-link:focus,.wp-core-ui .button-secondary:focus,.wp-core-ui .button.focus,.wp-core-ui .button:focus,a:focus{-webkit-box-shadow:none!important;box-shadow:none!important}body .button.owp-button{background-color:#13aff0;color:#fff;height:auto;font-size:12px;line-height:1;font-weight:600;text-transform:uppercase;margin:0;padding:14px 20px;border:0;cursor:pointer;text-align:center;letter-spacing:.1em;border-radius:3px;transition:all .3s ease}body .button.owp-button:active,body .button.owp-button:focus,body .button.owp-button:hover{background-color:#0b7cac;color:#fff}body .button.owp-button:active{-webkit-transform:none;-ms-transform:none;transform:none}.wrap.oceanwp-theme-panel{margin-right:40px}.oceanwp-settings .left{float:left;width:75%;margin-top:20px}.oceanwp-settings .right{float:right;width:23%;margin-top:30px}.oceanwp-settings .oceanwp-title{font-size:26px;line-height:1.6;margin:0 0 3px 8px}.oceanwp-settings .oceanwp-desc{margin:0 0 30px 8px;font-size:15px}.oceanwp-settings .divider{display:block;height:1px;margin:40px 0 33px;border-bottom:1px solid #ccc}.oceanwp-panels .column-wrap{float:left;position:relative;width:32.33%;margin:0 .5% 1%;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.oceanwp-panels .column-name{display:block;background-color:#fff;border:2px solid #eee;padding:25px 25px 20px;transition:all .3s ease}.oceanwp-panels .column-name:hover{border-color:#ddd}.oceanwp-panels .column-name h3.title{float:left;display:block;position:relative;font-size:18px;color:#333;margin:0;z-index:2}.oceanwp-panels .column-name .desc{display:block;position:relative;font-size:17px;line-height:1.6;font-weight:400;color:#777;z-index:2}.oceanwp-panels input[type=checkbox]{float:right;width:22px;height:22px;min-width:22px;margin:0}.oceanwp-panels input[type=checkbox]:checked:before{width:22px;font-size:27px}.oceanwp-panels p.submit{display:inline-block;width:100%;margin:10px 0 0 .5%;padding:0;clear:both}.oceanwp-options .options-inner{display:-webkit-box;display:-ms-flexbox;display:flex;flex-wrap:wrap;margin-top:30px}.oceanwp-options .column-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;background:#fff;border:1px solid #ccc;width:24%;min-height:150px;margin:0 .5% 1%;padding:25px 25px 20px;overflow:hidden;box-sizing:border-box}.oceanwp-options .column-wrap.hidden{display:none!important}.oceanwp-options .column-inner{display:-webkit-box;display:-ms-flexbox;display:flex;flex-direction:column}.oceanwp-options .title{display:block;position:relative;font-size:17px;color:#333;margin:0 0 20px;padding-bottom:20px;border-bottom:1px solid #eaeaea;text-transform:capitalize}.oceanwp-options .desc{flex:1 0 auto;display:block;margin:0 0 20px;font-size:14px;line-height:1.6;font-weight:400;color:#777}.oceanwp-options .bottom-column{padding:20px 0 0;border-top:1px solid #eaeaea;margin:0}.oceanwp-options .bottom-column .option-link{font-size:12px;font-weight:600;line-height:1.6;text-transform:uppercase;letter-spacing:.6px;text-decoration:none}.oceanwp-bloc{display:inline-block;position:relative;width:100%;background-color:#fff;margin:0 auto 15px;border-radius:3px;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.oceanwp-bloc h3{display:block;font-size:14px;font-weight:600;padding:12px 10px;background-color:#13aff0;color:#fff;text-transform:uppercase;letter-spacing:.4px;margin:0 0 22px;text-align:center}.oceanwp-bloc .content-wrap{position:relative;padding:0 30px 25px;z-index:2;text-align:center}.oceanwp-bloc p.content{font-size:14px;color:#5a5a5a;margin:0}body .oceanwp-bloc .button.owp-button{margin:22px 0 10px}.oceanwp-bloc p.bottom-text{color:#5a5a5a;font-size:12px;font-weight:600;font-style:italic;margin:0}.oceanwp-bloc i{position:absolute;bottom:-30px;right:-26px;width:auto;height:auto;font-size:120px;opacity:.07;z-index:1}.oceanwp-bundle{background-color:#2794da;background:-moz-linear-gradient(4deg,#2386c5 58%,#2386c5 58%,#2386c5 58%);background:-webkit-linear-gradient(4deg,#2386c5 58%,#2386c5 58%,#2794da 58%);background:linear-gradient(4deg,#2386c5 58%,#2386c5 58%,#2794da 58%);color:#fff}.oceanwp-bundle .owp-text{text-align:center;margin:0;padding:25px 10px}.oceanwp-bundle a.logo-text{display:inline-block;font-size:38px;line-height:1;color:#fff;text-decoration:none;-webkit-transition:all .3s ease;-moz-transition:all .3s ease;-o-transition:all .3s ease;-ms-transition:all .3s ease;transition:all .3s ease}.oceanwp-bundle a.logo-text:hover{opacity:.6}.oceanwp-bundle a.logo-text .circle{display:inline-block;width:5px;height:5px;background-color:#fff;border-radius:50%}.oceanwp-bundle p.content{color:#fff}.oceanwp-bundle p.content a{color:#afd8f3;text-decoration:underline}.oceanwp-bundle p.content a:hover{text-decoration:none}body .oceanwp-bundle .button.owp-button{display:block;background-color:#1d2428;color:#fff;margin-top:30px}.oceanwp-kinsta .owp-img,.oceanwp-octify .owp-img{padding:30px 30px 0;margin:0 0 18px;text-align:center}body .oceanwp-bundle .button.owp-button:hover{background-color:#303e4c}body .oceanwp-octify .button.owp-button{background-color:#ed5f3f}body .oceanwp-octify .button.owp-button:hover{background-color:#4331b1}body .oceanwp-kinsta .button.owp-button{background-color:#5333ed}body .oceanwp-kinsta .button.owp-button:hover{background-color:#7e5ffa}.oceanwp-buttons{display:inline-block;width:100%}body .oceanwp-buttons .button.owp-button{padding:14px 10px}body .oceanwp-buttons .button.owp-button.owp-yt-btn{background-color:#e62117;float:left;width:48%}body .oceanwp-buttons .button.owp-button.owp-yt-btn:hover{background-color:#b31217}body .oceanwp-buttons .button.owp-button.owp-doc-btn{background-color:#2e3243;float:right;width:48%}body .oceanwp-buttons .button.owp-button.owp-doc-btn:hover{background-color:#262939}body .oceanwp-buttons .button.owp-button.owp-support-btn{background-color:#13aff0;width:100%;margin-top:10px}body .oceanwp-buttons .button.owp-button.owp-support-btn:hover{background-color:#0b7cac}.push-monkey-tab{position:relative}.push-monkey-tab:before{display:block;background:url(../img/push-monkey.png) no-repeat;background-size:100% auto;position:absolute;right:10px;top:-36px;width:96px;height:38px}.oceanwp-settings .pm-right{width:42%}.oceanwp-settings .pm-left{width:57%}.oceanwp-settings .push-monkey p{font-size:15px;line-height:1.8;margin:0 0 20px 8px}.oceanwp-settings .push-monkey table{margin:0 0 10px 8px}body.rtl .wrap.oceanwp-theme-panel{margin-left:40px;margin-right:0}body.rtl .oceanwp-settings .left{float:right}body.rtl .oceanwp-settings .right{float:left}body.rtl .oceanwp-settings .oceanwp-title{margin:0 8px 3px 0}body.rtl .oceanwp-settings .oceanwp-desc{margin:0 8px 30px 0}body.rtl .oceanwp-panels .column-name h3.title,body.rtl .oceanwp-panels .column-wrap{float:right}body.rtl .oceanwp-panels input[type=checkbox]{float:left}body.rtl .oceanwp-panels p.submit{margin:10px .5% 0 0}body.rtl .oceanwp-bloc i{left:-26px;right:auto}body.rtl .oceanwp-buttons .button.owp-button.owp-yt-btn{float:right}body.rtl .oceanwp-buttons .button.owp-button.owp-doc-btn{float:left}@media screen and (max-width:1280px){.wrap.oceanwp-theme-panel{margin-right:20px}.oceanwp-settings .left,.oceanwp-settings .right{float:none;width:100%}.oceanwp-options .column-wrap{width:32.33%}.oceanwp-bloc,.oceanwp-buttons{width:49%}.oceanwp-kinsta,.oceanwp-review{float:left}.oceanwp-kinsta{clear:left}.oceanwp-bundle,.oceanwp-buttons,.oceanwp-octify{float:right}.oceanwp-button{display:none}body.rtl .wrap.oceanwp-theme-panel{margin-left:20px;margin-right:0}}@media screen and (max-width:1100px){.oceanwp-options .column-wrap,.oceanwp-panels .column-wrap{width:49%}}@media screen and (max-width:600px){.oceanwp-options .column-wrap,.oceanwp-panels .column-wrap{width:100%}}@media screen and (max-width:480px){.oceanwp-bloc,.oceanwp-buttons{float:none!important;width:100%;min-width:100%}}
|
includes/panel/assets/css/push-monkey.css
DELETED
@@ -1,278 +0,0 @@
|
|
1 |
-
.push-monkey-bootstrap * {
|
2 |
-
-webkit-box-sizing: border-box;
|
3 |
-
-moz-box-sizing: border-box;
|
4 |
-
box-sizing: border-box;
|
5 |
-
}
|
6 |
-
.push-monkey {
|
7 |
-
display: inline-block;
|
8 |
-
width: 100%;
|
9 |
-
margin-top: 30px;
|
10 |
-
}
|
11 |
-
.push-monkey-bootstrap .container-fluid {
|
12 |
-
display: inline-block;
|
13 |
-
width: 100%;
|
14 |
-
padding-left: 15px;
|
15 |
-
padding-right: 15px;
|
16 |
-
}
|
17 |
-
.push-monkey-bootstrap .panel {
|
18 |
-
float: left;
|
19 |
-
width: 100%;
|
20 |
-
background-color: #fff;
|
21 |
-
-moz-border-radius: 5px;
|
22 |
-
-webkit-border-radius: 5px;
|
23 |
-
border-radius: 5px;
|
24 |
-
border: 0px;
|
25 |
-
border-top: 2px solid #E5E5E5;
|
26 |
-
margin-bottom: 20px;
|
27 |
-
position: relative;
|
28 |
-
-moz-box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.2);
|
29 |
-
-webkit-box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.2);
|
30 |
-
box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.2);
|
31 |
-
}
|
32 |
-
.push-monkey-bootstrap .panel .panel-heading {
|
33 |
-
padding: 10px;
|
34 |
-
background: #F5F5F5;
|
35 |
-
border-bottom: 1px solid #E5E5E5;
|
36 |
-
border-top-right-radius: 3px;
|
37 |
-
border-top-left-radius: 3px;
|
38 |
-
}
|
39 |
-
.push-monkey-bootstrap .panel .panel-heading .panel-title-image {
|
40 |
-
float: left;
|
41 |
-
width: 30px;
|
42 |
-
border: 2px solid #D5D5D5;
|
43 |
-
-moz-border-radius: 50%;
|
44 |
-
-webkit-border-radius: 50%;
|
45 |
-
border-radius: 50%;
|
46 |
-
margin-right: 5px;
|
47 |
-
}
|
48 |
-
.push-monkey-bootstrap .panel .panel-heading .panel-title {
|
49 |
-
margin: 0 0 0 7px;
|
50 |
-
font-size: 16px;
|
51 |
-
font-weight: 400;
|
52 |
-
line-height: 30px;
|
53 |
-
display: block;
|
54 |
-
float: left;
|
55 |
-
color: #434A54;
|
56 |
-
}
|
57 |
-
.push-monkey-bootstrap .panel .panel-heading .panel-title-box {
|
58 |
-
float: left;
|
59 |
-
}
|
60 |
-
.push-monkey-bootstrap .panel .panel-heading .panel-title-box h3 {
|
61 |
-
font-size: 14px;
|
62 |
-
font-weight: 600;
|
63 |
-
line-height: 18px;
|
64 |
-
color: #434A54;
|
65 |
-
padding: 0px;
|
66 |
-
margin: 0px;
|
67 |
-
}
|
68 |
-
.push-monkey-bootstrap .panel .panel-heading .panel-title-box span {
|
69 |
-
font-size: 12px;
|
70 |
-
color: #767676;
|
71 |
-
font-weight: 400;
|
72 |
-
line-height: 12px;
|
73 |
-
}
|
74 |
-
.push-monkey-bootstrap .panel .panel-heading,
|
75 |
-
.push-monkey-bootstrap .panel .panel-footer,
|
76 |
-
.push-monkey-bootstrap .panel .panel-body {
|
77 |
-
float: left;
|
78 |
-
width: 100%;
|
79 |
-
}
|
80 |
-
.push-monkey-bootstrap .panel .panel-body {
|
81 |
-
padding: 15px;
|
82 |
-
position: relative;
|
83 |
-
}
|
84 |
-
.push-monkey-bootstrap h3 {
|
85 |
-
margin: 0 0 10px;
|
86 |
-
font-size: 18px;
|
87 |
-
font-weight: 600;
|
88 |
-
color: #434A54;
|
89 |
-
}
|
90 |
-
.push-monkey-bootstrap p {
|
91 |
-
margin: 0 0 10px;
|
92 |
-
}
|
93 |
-
.push-monkey-bootstrap .panel.panel-success {
|
94 |
-
border-top-color: #2fcc70;
|
95 |
-
}
|
96 |
-
.push-monkey-bootstrap .form-group {
|
97 |
-
display: inline-block;
|
98 |
-
width: 100%;
|
99 |
-
margin-bottom: 15px;
|
100 |
-
clear: both;
|
101 |
-
}
|
102 |
-
.push-monkey-bootstrap label {
|
103 |
-
display: inline-block;
|
104 |
-
max-width: 100%;
|
105 |
-
margin-bottom: 5px;
|
106 |
-
font-weight: 600;
|
107 |
-
position: relative;
|
108 |
-
min-height: 1px;
|
109 |
-
padding-left: 15px;
|
110 |
-
padding-right: 15px;
|
111 |
-
}
|
112 |
-
.push-monkey-bootstrap .col-xs-12 {
|
113 |
-
width: 100%;
|
114 |
-
}
|
115 |
-
@media (min-width: 992px) {
|
116 |
-
.push-monkey-bootstrap .col-md-3,
|
117 |
-
.push-monkey-bootstrap .col-md-4,
|
118 |
-
.push-monkey-bootstrap .col-md-6 {
|
119 |
-
float: left;
|
120 |
-
}
|
121 |
-
.push-monkey-bootstrap .col-md-3 {
|
122 |
-
width: 25%;
|
123 |
-
}
|
124 |
-
.push-monkey-bootstrap .col-md-4 {
|
125 |
-
width: 33.33333333%;
|
126 |
-
}
|
127 |
-
.push-monkey-bootstrap .col-md-6 {
|
128 |
-
width: 50%;
|
129 |
-
}
|
130 |
-
}
|
131 |
-
.push-monkey-bootstrap .col-md-3,
|
132 |
-
.push-monkey-bootstrap .col-md-4,
|
133 |
-
.push-monkey-bootstrap .col-md-6 {
|
134 |
-
position: relative;
|
135 |
-
min-height: 1px;
|
136 |
-
padding-left: 15px;
|
137 |
-
padding-right: 15px;
|
138 |
-
}
|
139 |
-
.push-monkey-bootstrap .switch {
|
140 |
-
cursor: pointer;
|
141 |
-
position: relative;
|
142 |
-
height: 30px;
|
143 |
-
line-height: 30px;
|
144 |
-
padding: 0;
|
145 |
-
}
|
146 |
-
.push-monkey-bootstrap .switch input {
|
147 |
-
position: absolute;
|
148 |
-
opacity: 0;
|
149 |
-
filter: alpha(opacity=0);
|
150 |
-
}
|
151 |
-
.push-monkey-bootstrap .switch input:checked + span:after {
|
152 |
-
left: 21px;
|
153 |
-
}
|
154 |
-
.push-monkey-bootstrap .switch input:checked + span {
|
155 |
-
background-color: #2fcc70;
|
156 |
-
}
|
157 |
-
.push-monkey-bootstrap .switch input:disabled + span {
|
158 |
-
background-color: #CCC;
|
159 |
-
}
|
160 |
-
.push-monkey-bootstrap .switch span {
|
161 |
-
position: relative;
|
162 |
-
width: 50px;
|
163 |
-
height: 30px;
|
164 |
-
-moz-border-radius: 30px;
|
165 |
-
-webkit-border-radius: 30px;
|
166 |
-
border-radius: 30px;
|
167 |
-
background-color: #E64330;
|
168 |
-
border: 1px solid #E5E5E5;
|
169 |
-
display: inline-block;
|
170 |
-
-webkit-transition: all 200ms ease;
|
171 |
-
-moz-transition: all 200ms ease;
|
172 |
-
-ms-transition: all 200ms ease;
|
173 |
-
-o-transition: all 200ms ease;
|
174 |
-
transition: all 200ms ease;
|
175 |
-
border-color: rgba(0, 0, 0, 0.1);
|
176 |
-
left: 0px;
|
177 |
-
}
|
178 |
-
.push-monkey-bootstrap .switch span:after {
|
179 |
-
content: "";
|
180 |
-
position: absolute;
|
181 |
-
background-color: #fff;
|
182 |
-
width: 26px;
|
183 |
-
top: 1px;
|
184 |
-
bottom: 1px;
|
185 |
-
left: 1px;
|
186 |
-
-moz-border-radius: 30px;
|
187 |
-
-webkit-border-radius: 30px;
|
188 |
-
border-radius: 30px;
|
189 |
-
-moz-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.25);
|
190 |
-
-webkit-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.25);
|
191 |
-
box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.25);
|
192 |
-
-webkit-transition: all 200ms ease;
|
193 |
-
-moz-transition: all 200ms ease;
|
194 |
-
-ms-transition: all 200ms ease;
|
195 |
-
-o-transition: all 200ms ease;
|
196 |
-
transition: all 200ms ease;
|
197 |
-
}
|
198 |
-
.push-monkey-bootstrap .switch.switch-small {
|
199 |
-
margin: 6px 0px 4px;
|
200 |
-
height: 20px;
|
201 |
-
line-height: 20px;
|
202 |
-
}
|
203 |
-
.push-monkey-bootstrap .switch.switch-small input:checked + span:after {
|
204 |
-
left: 11px;
|
205 |
-
}
|
206 |
-
.push-monkey-bootstrap .switch.switch-small span {
|
207 |
-
width: 30px;
|
208 |
-
height: 20px;
|
209 |
-
-moz-border-radius: 20px;
|
210 |
-
-webkit-border-radius: 20px;
|
211 |
-
border-radius: 20px;
|
212 |
-
}
|
213 |
-
.push-monkey-bootstrap .switch.switch-small span:after {
|
214 |
-
width: 16px;
|
215 |
-
}
|
216 |
-
.push-monkey-bootstrap .help-block {
|
217 |
-
display: block;
|
218 |
-
margin-top: 5px;
|
219 |
-
color: #737373;
|
220 |
-
}
|
221 |
-
.push-monkey-bootstrap .form-control {
|
222 |
-
display: block;
|
223 |
-
width: 100%;
|
224 |
-
height: 30px;
|
225 |
-
font-size: 12px;
|
226 |
-
line-height: 18px;
|
227 |
-
padding: 6px 12px;
|
228 |
-
-webkit-appearance: none;
|
229 |
-
border: 1px solid #D5D5D5;
|
230 |
-
background: #F9F9F9;
|
231 |
-
color: #555555;
|
232 |
-
border-radius: 4px;
|
233 |
-
}
|
234 |
-
.push-monkey-bootstrap .form-control:focus {
|
235 |
-
border-color: #C5C5C5;
|
236 |
-
-moz-box-shadow: none;
|
237 |
-
-webkit-box-shadow: none;
|
238 |
-
box-shadow: none;
|
239 |
-
border-color: #C1C1C1;
|
240 |
-
background: #FFF;
|
241 |
-
}
|
242 |
-
.push-monkey-bootstrap textarea.form-control {
|
243 |
-
height: auto;
|
244 |
-
}
|
245 |
-
.push-monkey-bootstrap .panel .panel-footer {
|
246 |
-
background: #F5F5F5;
|
247 |
-
border: 0;
|
248 |
-
border-top: 1px solid #E3E3E3;
|
249 |
-
line-height: 30px;
|
250 |
-
padding: 10px;
|
251 |
-
}
|
252 |
-
.push-monkey-bootstrap .pull-right {
|
253 |
-
float: right;
|
254 |
-
}
|
255 |
-
.push-monkey-bootstrap .btn {
|
256 |
-
background-color: #363636;
|
257 |
-
border-color: #363636;
|
258 |
-
color: #fff;
|
259 |
-
font-size: 12px;
|
260 |
-
padding: 4px 15px;
|
261 |
-
line-height: 20px;
|
262 |
-
font-weight: 400;
|
263 |
-
-moz-border-radius: 5px;
|
264 |
-
-webkit-border-radius: 5px;
|
265 |
-
border-radius: 5px;
|
266 |
-
outline: 0;
|
267 |
-
cursor: pointer;
|
268 |
-
-webkit-transition: all 200ms ease;
|
269 |
-
-moz-transition: all 200ms ease;
|
270 |
-
-ms-transition: all 200ms ease;
|
271 |
-
-o-transition: all 200ms ease;
|
272 |
-
transition: all 200ms ease;
|
273 |
-
}
|
274 |
-
.push-monkey-bootstrap .btn:hover {
|
275 |
-
background-color: #286090;
|
276 |
-
border-color: #286090;
|
277 |
-
color: #fff;
|
278 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/panel/assets/css/push-monkey.min.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
.push-monkey-bootstrap *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.push-monkey{display:inline-block;width:100%;margin-top:30px}.push-monkey-bootstrap .container-fluid{display:inline-block;width:100%;padding-left:15px;padding-right:15px}.push-monkey-bootstrap .panel{float:left;width:100%;background-color:#fff;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;border:0;border-top:2px solid #E5E5E5;margin-bottom:20px;position:relative;-moz-box-shadow:0 1px 1px 0 rgba(0,0,0,.2);-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.2);box-shadow:0 1px 1px 0 rgba(0,0,0,.2)}.push-monkey-bootstrap .panel .panel-heading{padding:10px;background:#F5F5F5;border-bottom:1px solid #E5E5E5;border-top-right-radius:3px;border-top-left-radius:3px}.push-monkey-bootstrap .panel .panel-heading .panel-title-image{float:left;width:30px;border:2px solid #D5D5D5;-moz-border-radius:50%;-webkit-border-radius:50%;border-radius:50%;margin-right:5px}.push-monkey-bootstrap .panel .panel-heading .panel-title{margin:0 0 0 7px;font-size:16px;font-weight:400;line-height:30px;display:block;float:left;color:#434A54}.push-monkey-bootstrap .panel .panel-heading .panel-title-box{float:left}.push-monkey-bootstrap .panel .panel-heading .panel-title-box h3{font-size:14px;font-weight:600;line-height:18px;color:#434A54;padding:0;margin:0}.push-monkey-bootstrap .col-md-3,.push-monkey-bootstrap .col-md-4,.push-monkey-bootstrap .col-md-6,.push-monkey-bootstrap label{min-height:1px;padding-left:15px;padding-right:15px;position:relative}.push-monkey-bootstrap .panel .panel-heading .panel-title-box span{font-size:12px;color:#767676;font-weight:400;line-height:12px}.push-monkey-bootstrap .panel .panel-body,.push-monkey-bootstrap .panel .panel-footer,.push-monkey-bootstrap .panel .panel-heading{float:left;width:100%}.push-monkey-bootstrap .panel .panel-body{padding:15px;position:relative}.push-monkey-bootstrap h3{margin:0 0 10px;font-size:18px;font-weight:600;color:#434A54}.push-monkey-bootstrap p{margin:0 0 10px}.push-monkey-bootstrap .panel.panel-success{border-top-color:#2fcc70}.push-monkey-bootstrap .form-group{display:inline-block;width:100%;margin-bottom:15px;clear:both}.push-monkey-bootstrap label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:600}.push-monkey-bootstrap .col-xs-12{width:100%}@media (min-width:992px){.push-monkey-bootstrap .col-md-3,.push-monkey-bootstrap .col-md-4,.push-monkey-bootstrap .col-md-6{float:left}.push-monkey-bootstrap .col-md-3{width:25%}.push-monkey-bootstrap .col-md-4{width:33.33333333%}.push-monkey-bootstrap .col-md-6{width:50%}}.push-monkey-bootstrap .switch{cursor:pointer;position:relative;height:30px;line-height:30px;padding:0}.push-monkey-bootstrap .switch input{position:absolute;opacity:0;filter:alpha(opacity=0)}.push-monkey-bootstrap .switch input:checked+span:after{left:21px}.push-monkey-bootstrap .switch input:checked+span{background-color:#2fcc70}.push-monkey-bootstrap .switch input:disabled+span{background-color:#CCC}.push-monkey-bootstrap .switch span{position:relative;width:50px;height:30px;-moz-border-radius:30px;-webkit-border-radius:30px;border-radius:30px;background-color:#E64330;border:1px solid #E5E5E5;display:inline-block;-webkit-transition:all .2s ease;-moz-transition:all .2s ease;-ms-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;border-color:rgba(0,0,0,.1);left:0}.push-monkey-bootstrap .switch span:after{content:"";position:absolute;background-color:#fff;width:26px;top:1px;bottom:1px;left:1px;-moz-border-radius:30px;-webkit-border-radius:30px;border-radius:30px;-moz-box-shadow:1px 1px 3px rgba(0,0,0,.25);-webkit-box-shadow:1px 1px 3px rgba(0,0,0,.25);box-shadow:1px 1px 3px rgba(0,0,0,.25);-webkit-transition:all .2s ease;-moz-transition:all .2s ease;-ms-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease}.push-monkey-bootstrap .switch.switch-small{margin:6px 0 4px;height:20px;line-height:20px}.push-monkey-bootstrap .switch.switch-small input:checked+span:after{left:11px}.push-monkey-bootstrap .switch.switch-small span{width:30px;height:20px;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px}.push-monkey-bootstrap .switch.switch-small span:after{width:16px}.push-monkey-bootstrap .help-block{display:block;margin-top:5px;color:#737373}.push-monkey-bootstrap .form-control{display:block;width:100%;height:30px;font-size:12px;line-height:18px;padding:6px 12px;-webkit-appearance:none;border:1px solid #D5D5D5;background:#F9F9F9;color:#555;border-radius:4px}.push-monkey-bootstrap .form-control:focus{-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;border-color:#C1C1C1;background:#FFF}.push-monkey-bootstrap textarea.form-control{height:auto}.push-monkey-bootstrap .panel .panel-footer{background:#F5F5F5;border:0;border-top:1px solid #E3E3E3;line-height:30px;padding:10px}.push-monkey-bootstrap .pull-right{float:right}.push-monkey-bootstrap .btn{background-color:#363636;border-color:#363636;color:#fff;font-size:12px;padding:4px 15px;line-height:20px;font-weight:400;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;outline:0;cursor:pointer;-webkit-transition:all .2s ease;-moz-transition:all .2s ease;-ms-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease}.push-monkey-bootstrap .btn:hover{background-color:#286090;border-color:#286090;color:#fff}
|
|
includes/panel/assets/img/plugins/elementor-widgets.png
ADDED
Binary file
|
includes/panel/assets/img/plugins/footer-callout.png
ADDED
Binary file
|
includes/panel/assets/img/plugins/hooks.png
ADDED
Binary file
|
includes/panel/assets/img/plugins/instagram.png
ADDED
Binary file
|
includes/panel/assets/img/plugins/popup-login.png
ADDED
Binary file
|
includes/panel/assets/img/plugins/portfolio.png
ADDED
Binary file
|
includes/panel/assets/img/plugins/side-panel.png
ADDED
Binary file
|
includes/panel/assets/img/plugins/sticky-footer.png
ADDED
Binary file
|
includes/panel/assets/img/plugins/sticky-header.png
ADDED
Binary file
|
includes/panel/assets/img/plugins/white-label.png
ADDED
Binary file
|
includes/panel/assets/img/plugins/woo-popup.png
ADDED
Binary file
|
includes/panel/assets/img/push-monkey-devices.png
DELETED
Binary file
|
includes/panel/assets/img/push-monkey.png
DELETED
Binary file
|
includes/panel/assets/js/manifest.json
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "Push Monkey Notification",
|
3 |
-
"short_name": "Notification",
|
4 |
-
"icons": [{
|
5 |
-
"src": "/static/js/chrome/images/test.png",
|
6 |
-
"sizes": "192x192",
|
7 |
-
"type": "image/png"
|
8 |
-
}],
|
9 |
-
"start_url": "./index.html?homescreen=1",
|
10 |
-
"display": "standalone",
|
11 |
-
"gcm_sender_id": "956785459164",
|
12 |
-
"//": "gcm_user_visible_only is only needed until Chrome 44 is in stable ",
|
13 |
-
"gcm_user_visible_only": true
|
14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/panel/demos.php
CHANGED
@@ -608,6 +608,11 @@ if ( ! class_exists( 'OceanWP_Demos' ) ) {
|
|
608 |
'init' => 'woocommerce/woocommerce.php',
|
609 |
'name' => 'WooCommerce',
|
610 |
),
|
|
|
|
|
|
|
|
|
|
|
611 |
),
|
612 |
'premium' => array(
|
613 |
array(
|
608 |
'init' => 'woocommerce/woocommerce.php',
|
609 |
'name' => 'WooCommerce',
|
610 |
),
|
611 |
+
array(
|
612 |
+
'slug' => 'woo-variation-swatches',
|
613 |
+
'init' => 'woo-variation-swatches/woo-variation-swatches.php',
|
614 |
+
'name' => 'WooCommerce Variation Swatches',
|
615 |
+
),
|
616 |
),
|
617 |
'premium' => array(
|
618 |
array(
|
includes/panel/extensions.php
CHANGED
@@ -19,8 +19,11 @@ class Ocean_Extra_Extensions {
|
|
19 |
* Start things up
|
20 |
*/
|
21 |
public function __construct() {
|
22 |
-
|
23 |
-
add_action( '
|
|
|
|
|
|
|
24 |
}
|
25 |
|
26 |
/**
|
@@ -39,7 +42,7 @@ class Ocean_Extra_Extensions {
|
|
39 |
esc_html__( 'Extensions', 'ocean-extra' ),
|
40 |
'<span class="dashicons dashicons-star-filled" style="font-size: 16px; color: #ec4848;"></span> <span style="color: #ec4848">' . esc_html__( 'Extensions', 'ocean-extra' ) . '</span>',
|
41 |
'manage_options',
|
42 |
-
'oceanwp-extensions',
|
43 |
array( $this, 'create_admin_page' )
|
44 |
);
|
45 |
}
|
@@ -49,10 +52,44 @@ class Ocean_Extra_Extensions {
|
|
49 |
*
|
50 |
* @since 1.0.0
|
51 |
*/
|
52 |
-
public function create_admin_page() {
|
53 |
|
54 |
-
//
|
55 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
// If affiliate ref
|
58 |
$ref_url = '';
|
@@ -63,15 +100,68 @@ class Ocean_Extra_Extensions {
|
|
63 |
$if_ref = '&';
|
64 |
} else {
|
65 |
$if_ref = '?';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
}
|
67 |
|
68 |
-
//
|
69 |
-
|
70 |
|
71 |
-
if ( isset( $_GET['page'] ) && 'oceanwp-extensions' === $_GET['page'] ) {
|
72 |
-
wp_redirect( $url . $aff_ref . $utm );
|
73 |
-
die;
|
74 |
-
}
|
75 |
}
|
76 |
}
|
77 |
new Ocean_Extra_Extensions();
|
19 |
* Start things up
|
20 |
*/
|
21 |
public function __construct() {
|
22 |
+
// Add panel menu
|
23 |
+
add_action( 'admin_menu', array( $this, 'add_page' ), 9999 );
|
24 |
+
|
25 |
+
// Add custom scripts
|
26 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) );
|
27 |
}
|
28 |
|
29 |
/**
|
42 |
esc_html__( 'Extensions', 'ocean-extra' ),
|
43 |
'<span class="dashicons dashicons-star-filled" style="font-size: 16px; color: #ec4848;"></span> <span style="color: #ec4848">' . esc_html__( 'Extensions', 'ocean-extra' ) . '</span>',
|
44 |
'manage_options',
|
45 |
+
'oceanwp-panel-extensions',
|
46 |
array( $this, 'create_admin_page' )
|
47 |
);
|
48 |
}
|
52 |
*
|
53 |
* @since 1.0.0
|
54 |
*/
|
55 |
+
public static function create_admin_page() {
|
56 |
|
57 |
+
// Extensions
|
58 |
+
$plugins = array(
|
59 |
+
'sticky-header' => array(
|
60 |
+
'description' => esc_html__( 'A must-have plugin, attach your header at the top of your screen with style.', 'ocean-extra' ),
|
61 |
+
),
|
62 |
+
'elementor-widgets' => array(
|
63 |
+
'description' => esc_html__( 'Add many extra widgets to the popular free page builder Elementor.', 'ocean-extra' ),
|
64 |
+
),
|
65 |
+
'footer-callout' => array(
|
66 |
+
'description' => esc_html__( 'Add some relevant information about your company or product in your footer.', 'ocean-extra' ),
|
67 |
+
),
|
68 |
+
'popup-login' => array(
|
69 |
+
'description' => esc_html__( 'A plugin to add a popup login, register and lost password form where you want.', 'ocean-extra' ),
|
70 |
+
),
|
71 |
+
'instagram' => array(
|
72 |
+
'description' => esc_html__( 'Fetch and customize your Instagram feed to display in a beautiful way.', 'ocean-extra' ),
|
73 |
+
),
|
74 |
+
'portfolio' => array(
|
75 |
+
'description' => esc_html__( 'A complete extension to display your portfolio and work in a beautiful way.', 'ocean-extra' ),
|
76 |
+
),
|
77 |
+
'side-panel' => array(
|
78 |
+
'description' => esc_html__( 'Add a responsive side panel with your preferred widgets inside.', 'ocean-extra' ),
|
79 |
+
),
|
80 |
+
'hooks' => array(
|
81 |
+
'description' => esc_html__( 'Add content throughout various areas of OceanWP without using child theme.', 'ocean-extra' ),
|
82 |
+
),
|
83 |
+
'sticky-footer' => array(
|
84 |
+
'description' => esc_html__( 'A simple extension to attach the footer at the bottom of your screen.', 'ocean-extra' ),
|
85 |
+
),
|
86 |
+
'woo-popup' => array(
|
87 |
+
'description' => esc_html__( 'Display a popup when a product is added to the cart, perfect to increase conversion.', 'ocean-extra' ),
|
88 |
+
),
|
89 |
+
'white-label' => array(
|
90 |
+
'description' => esc_html__( 'A plugin that allows you to replace the theme name by your own brand name.', 'ocean-extra' ),
|
91 |
+
),
|
92 |
+
);
|
93 |
|
94 |
// If affiliate ref
|
95 |
$ref_url = '';
|
100 |
$if_ref = '&';
|
101 |
} else {
|
102 |
$if_ref = '?';
|
103 |
+
} ?>
|
104 |
+
|
105 |
+
<div class="wrap oceanwp-extensions-panel oceanwp-clr">
|
106 |
+
|
107 |
+
<h2><?php esc_html_e( 'Take your website to the next level with our premium extensions', 'ocean-extra' ); ?></h2>
|
108 |
+
|
109 |
+
<p class="oceanwp-desc"><?php esc_html_e( 'From blog to eCommerce site, there is no limit to what you can do with OceanWP.', 'ocean-extra' ); ?></p>
|
110 |
+
|
111 |
+
<ul class="extensions-wrap">
|
112 |
+
|
113 |
+
<?php
|
114 |
+
// Loop through extensions
|
115 |
+
foreach ( $plugins as $key => $val ) :
|
116 |
+
|
117 |
+
// Add source
|
118 |
+
$utm = $if_ref . 'utm_source=dash&utm_medium=extension&utm_campaign='. $key;
|
119 |
+
|
120 |
+
// Plugin name
|
121 |
+
$title = str_replace( '-', ' ', $key );
|
122 |
+
$title = ucwords( $title ); ?>
|
123 |
+
|
124 |
+
<li>
|
125 |
+
<a href="https://oceanwp.org/extension/ocean-<?php echo esc_attr( $key ); ?><?php echo $utm; ?>" class="owp-card-top" target="_blank">
|
126 |
+
<div class="owp-img">
|
127 |
+
<img src="<?php echo esc_url( plugins_url( '/assets/img/plugins/'. esc_attr( $key ) .'.png', __FILE__ ) ); ?>" alt="">
|
128 |
+
</div>
|
129 |
+
<div class="owp-text">
|
130 |
+
<h3><?php esc_html_e( 'Ocean', 'ocean-extra' ); ?> <?php echo esc_attr( $title ); ?></h3>
|
131 |
+
<div class="owp-description">
|
132 |
+
<p><?php echo esc_attr( $val['description'] ); ?></p>
|
133 |
+
</div>
|
134 |
+
</div>
|
135 |
+
</a>
|
136 |
+
<a href="https://oceanwp.org/extension/ocean-<?php echo esc_attr( $key ); ?>" class="owp-card-btn" target="_blank">
|
137 |
+
<?php esc_attr_e( 'More Details >', 'ocean-extra' ); ?>
|
138 |
+
</a>
|
139 |
+
</li>
|
140 |
+
|
141 |
+
<?php endforeach; ?>
|
142 |
+
|
143 |
+
</ul>
|
144 |
+
|
145 |
+
</div>
|
146 |
+
|
147 |
+
<?php
|
148 |
+
}
|
149 |
+
|
150 |
+
/**
|
151 |
+
* Admin Scripts
|
152 |
+
*
|
153 |
+
* @since 1.0.0
|
154 |
+
*/
|
155 |
+
public static function admin_scripts( $hook ) {
|
156 |
+
|
157 |
+
// Only load extensions when needed
|
158 |
+
if ( OE_ADMIN_PANEL_HOOK_PREFIX . '-extensions' != $hook ) {
|
159 |
+
return;
|
160 |
}
|
161 |
|
162 |
+
// CSS
|
163 |
+
wp_enqueue_style( 'oceanwp-extensions-panel', plugins_url( '/assets/css/extensions.min.css', __FILE__ ) );
|
164 |
|
|
|
|
|
|
|
|
|
165 |
}
|
166 |
}
|
167 |
new Ocean_Extra_Extensions();
|
includes/panel/push-monkey-client.php
DELETED
@@ -1,514 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/* WordPress Check */
|
4 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
5 |
-
|
6 |
-
exit;
|
7 |
-
}
|
8 |
-
|
9 |
-
/**
|
10 |
-
* API Client
|
11 |
-
*/
|
12 |
-
class Ocean_Push_Monkey_Client {
|
13 |
-
|
14 |
-
public $endpointURL;
|
15 |
-
public $registerURL;
|
16 |
-
public $cartURL;
|
17 |
-
|
18 |
-
/* Public */
|
19 |
-
|
20 |
-
const PLAN_NAME_KEY = 'oe_push_monkey_plan_name_output';
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Get the stats for an Account Key.
|
24 |
-
* @param string $account_key
|
25 |
-
* @return mixed; false if nothing found; array otherwise.
|
26 |
-
*/
|
27 |
-
public function get_stats( $account_key ) {
|
28 |
-
|
29 |
-
$stats_api_url = $this->endpointURL . '/stats/api';
|
30 |
-
$args = array( 'body' => array( 'account_key' => $account_key ) );
|
31 |
-
$response = wp_remote_post( $stats_api_url, $args );
|
32 |
-
if( is_wp_error( $response ) ) {
|
33 |
-
return ( object ) array( 'error' => $response->get_error_message() );
|
34 |
-
} else {
|
35 |
-
|
36 |
-
$body = wp_remote_retrieve_body( $response );
|
37 |
-
$output = json_decode( $body );
|
38 |
-
return $output;
|
39 |
-
}
|
40 |
-
return false;
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Get the Website Push ID for an Account Key.
|
45 |
-
* @param string $account_key
|
46 |
-
* @return string; array with error info if an error occured.
|
47 |
-
*/
|
48 |
-
public function get_website_push_ID( $account_key ) {
|
49 |
-
|
50 |
-
$url = $this->endpointURL . '/v2/api/website_push_id';
|
51 |
-
$args = array( 'body' => array( 'account_key' => $account_key ) );
|
52 |
-
|
53 |
-
$response = wp_remote_post( $url, $args );
|
54 |
-
|
55 |
-
if( is_wp_error( $response ) ) {
|
56 |
-
|
57 |
-
return ( object ) array( 'error' => $response->get_error_message() );
|
58 |
-
}
|
59 |
-
$body = wp_remote_retrieve_body( $response );
|
60 |
-
$output = json_decode( $body );
|
61 |
-
return $output;
|
62 |
-
}
|
63 |
-
|
64 |
-
/**
|
65 |
-
* Sends a desktop push notification.
|
66 |
-
* @param string $account_key
|
67 |
-
* @param string $title
|
68 |
-
* @param string $body
|
69 |
-
* @param string $url_args
|
70 |
-
* @param boolean $custom
|
71 |
-
*/
|
72 |
-
public function send_push_notification( $account_key, $title, $body, $url_args, $custom, $segments, $locations, $image = NULL ) {
|
73 |
-
|
74 |
-
$url = $this->endpointURL . '/push_message';
|
75 |
-
$args = array(
|
76 |
-
'account_key' => $account_key,
|
77 |
-
'title' => $title,
|
78 |
-
'body' => $body,
|
79 |
-
'url_args' => $url_args,
|
80 |
-
'send_to_segments_string' => implode(",", $segments),
|
81 |
-
'send_to_locations_string' => implode(",", $locations),
|
82 |
-
'image' => $image
|
83 |
-
);
|
84 |
-
if ( $custom ) {
|
85 |
-
|
86 |
-
$args['custom'] = true;
|
87 |
-
}
|
88 |
-
$response = $this->post_with_file( $url, $args, $image );
|
89 |
-
if( is_wp_error( $response ) ) {
|
90 |
-
} else {
|
91 |
-
}
|
92 |
-
}
|
93 |
-
|
94 |
-
/**
|
95 |
-
* Get the plan name.
|
96 |
-
* @param string $account_key
|
97 |
-
* @return string; array with error info otherwise.
|
98 |
-
*/
|
99 |
-
public function get_plan_name( $account_key ) {
|
100 |
-
|
101 |
-
$output = $this->cache->get( self::PLAN_NAME_KEY );
|
102 |
-
if ( $output ) {
|
103 |
-
return (object) $output;
|
104 |
-
}
|
105 |
-
|
106 |
-
$url = $this->endpointURL . '/v2/api/get_plan_name';
|
107 |
-
$args = array( 'body' => array( 'account_key' => $account_key ) );
|
108 |
-
|
109 |
-
$response = wp_remote_post( $url, $args );
|
110 |
-
|
111 |
-
if( is_wp_error( $response ) ) {
|
112 |
-
|
113 |
-
return ( object ) array( 'error' => $response->get_error_message() );
|
114 |
-
}
|
115 |
-
$body = wp_remote_retrieve_body( $response );
|
116 |
-
$output = json_decode( $body );
|
117 |
-
$serialized_output = json_decode( $body, true );
|
118 |
-
if ( isset( $output->error ) ) {
|
119 |
-
return $output->error;
|
120 |
-
} else {
|
121 |
-
$this->cache->store( self::PLAN_NAME_KEY, $serialized_output );
|
122 |
-
return $output;
|
123 |
-
}
|
124 |
-
return '';
|
125 |
-
}
|
126 |
-
|
127 |
-
/**
|
128 |
-
* Get all the segments
|
129 |
-
* @param string $account_key
|
130 |
-
* @return associative array of [id=>string]
|
131 |
-
*/
|
132 |
-
public function get_segments( $account_key ) {
|
133 |
-
|
134 |
-
$segments_api_url = $this->endpointURL . '/push/v1/segments/' . $account_key;
|
135 |
-
$response = wp_remote_post( $segments_api_url, array() );
|
136 |
-
if( is_wp_error( $response ) ) {
|
137 |
-
return ( object ) array( 'error' => $response->get_error_message() );
|
138 |
-
} else {
|
139 |
-
|
140 |
-
$body = wp_remote_retrieve_body( $response );
|
141 |
-
$output = json_decode( $body, true );
|
142 |
-
if ( isset( $output["segments"] ) ) {
|
143 |
-
|
144 |
-
if ( count( $output["segments"] ) > 0 ) {
|
145 |
-
|
146 |
-
if ( gettype($output["segments"][0]) == "array" ) {
|
147 |
-
|
148 |
-
return $output["segments"];
|
149 |
-
}
|
150 |
-
}
|
151 |
-
}
|
152 |
-
}
|
153 |
-
return array();
|
154 |
-
}
|
155 |
-
|
156 |
-
/**
|
157 |
-
* Save a segments
|
158 |
-
* @param string $account_key
|
159 |
-
* @param string $name
|
160 |
-
* @return response or error
|
161 |
-
*/
|
162 |
-
public function save_segment( $account_key, $name ) {
|
163 |
-
|
164 |
-
$url = $this->endpointURL . '/push/v1/segments/create/' . $account_key;
|
165 |
-
$args = array( 'body' => array(
|
166 |
-
|
167 |
-
'name' => $name
|
168 |
-
) );
|
169 |
-
$response = wp_remote_post( $url, $args );
|
170 |
-
if ( is_wp_error( $response ) ) {
|
171 |
-
|
172 |
-
return ( object ) array( 'error' => $response->get_error_message() );
|
173 |
-
} else {
|
174 |
-
|
175 |
-
$body = wp_remote_retrieve_body( $response );
|
176 |
-
$output = json_decode( $body );
|
177 |
-
return $output;
|
178 |
-
}
|
179 |
-
return false;
|
180 |
-
}
|
181 |
-
|
182 |
-
/**
|
183 |
-
* Delete a segments
|
184 |
-
* @param string $account_key
|
185 |
-
* @param string $id of segment
|
186 |
-
* @return response or error
|
187 |
-
*/
|
188 |
-
public function delete_segment( $account_key, $id ) {
|
189 |
-
|
190 |
-
$url = $this->endpointURL . '/push/v1/segments/delete/' . $account_key;
|
191 |
-
$args = array( 'body' => array(
|
192 |
-
|
193 |
-
'id' => $id
|
194 |
-
) );
|
195 |
-
$response = wp_remote_post( $url, $args );
|
196 |
-
if ( is_wp_error( $response ) ) {
|
197 |
-
|
198 |
-
return ( object ) array( 'error' => $response->get_error_message() );
|
199 |
-
} else {
|
200 |
-
|
201 |
-
$body = wp_remote_retrieve_body( $response );
|
202 |
-
$output = json_decode( $body );
|
203 |
-
return $output;
|
204 |
-
}
|
205 |
-
return false;
|
206 |
-
}
|
207 |
-
|
208 |
-
/**
|
209 |
-
* Retrieve the status of a welcome message
|
210 |
-
* @param string $account_key
|
211 |
-
* @return associative array of JSON response
|
212 |
-
*/
|
213 |
-
public function get_welcome_message_status( $account_key ) {
|
214 |
-
|
215 |
-
$url = $this->endpointURL . '/v2/api/welcome_notification_status/' . $account_key;
|
216 |
-
$response = wp_remote_post( $url, array() );
|
217 |
-
if( is_wp_error( $response ) ) {
|
218 |
-
return ( object ) array( 'error' => $response->get_error_message() );
|
219 |
-
}
|
220 |
-
$body = wp_remote_retrieve_body( $response );
|
221 |
-
$output = json_decode( $body, true );
|
222 |
-
if ( empty( $output ) ) {
|
223 |
-
|
224 |
-
return ( object ) array( 'error' => 'empty' );
|
225 |
-
}
|
226 |
-
return $output;
|
227 |
-
}
|
228 |
-
|
229 |
-
/**
|
230 |
-
* Retrieve the status of a welcome message
|
231 |
-
* @param string $account_key
|
232 |
-
* @return associative array of JSON response
|
233 |
-
*/
|
234 |
-
public function get_custom_prompt( $account_key ){
|
235 |
-
|
236 |
-
$url = $this->endpointURL . '/v2/api/custom_prompt/' . $account_key;
|
237 |
-
$response = wp_remote_post( $url, array() );
|
238 |
-
if( is_wp_error( $response ) ) {
|
239 |
-
return ( object ) array( 'error' => $response->get_error_message() );
|
240 |
-
}
|
241 |
-
$body = wp_remote_retrieve_body( $response );
|
242 |
-
$output = json_decode( $body, true );
|
243 |
-
if ( empty( $output ) ) {
|
244 |
-
|
245 |
-
return ( object ) array( 'error' => 'empty' );
|
246 |
-
}
|
247 |
-
return $output;
|
248 |
-
}
|
249 |
-
|
250 |
-
/**
|
251 |
-
* Update the welcome message info
|
252 |
-
* @param string $account_key
|
253 |
-
* @param boolean $enabled
|
254 |
-
* @param string $message
|
255 |
-
* @param string $title
|
256 |
-
* @return boolean. True if operation finished successfully.
|
257 |
-
*/
|
258 |
-
public function update_custom_prompt( $account_key, $enabled, $title, $message ) {
|
259 |
-
|
260 |
-
$url = $this->endpointURL . '/v2/api/custom_prompt/' . $account_key . '/update';
|
261 |
-
$args = array( 'body' => array(
|
262 |
-
|
263 |
-
'custom_prompt_message' => $message,
|
264 |
-
'custom_prompt_title' => $title
|
265 |
-
) );
|
266 |
-
if ( $enabled ) {
|
267 |
-
|
268 |
-
$args['body']['enabled'] = true;
|
269 |
-
}
|
270 |
-
$response = wp_remote_post( $url, $args );
|
271 |
-
if( is_wp_error( $response ) ) {
|
272 |
-
return ( object ) array( 'error' => $response->get_error_message() );
|
273 |
-
}
|
274 |
-
$body = wp_remote_retrieve_body( $response );
|
275 |
-
$output = json_decode( $body, true );
|
276 |
-
if ( isset( $output["response"] ) ) {
|
277 |
-
|
278 |
-
if ( $output['response'] == "ok" ) {
|
279 |
-
|
280 |
-
return true;
|
281 |
-
}
|
282 |
-
}
|
283 |
-
return false;
|
284 |
-
}
|
285 |
-
|
286 |
-
/**
|
287 |
-
* Retrieve locations stored for this account key
|
288 |
-
* @param string $account_key
|
289 |
-
* @return associative array of JSON response
|
290 |
-
*/
|
291 |
-
public function get_locations( $account_key ) {
|
292 |
-
|
293 |
-
$url = $this->endpointURL . '/v2/api/locations/' . $account_key;
|
294 |
-
$response = wp_remote_post( $url, array() );
|
295 |
-
if( is_wp_error( $response ) ) {
|
296 |
-
return ( object ) array( 'error' => $response->get_error_message() );
|
297 |
-
}
|
298 |
-
$body = wp_remote_retrieve_body( $response );
|
299 |
-
$output = json_decode( $body, true );
|
300 |
-
if ( empty( $output ) ) {
|
301 |
-
|
302 |
-
return ( object ) array( 'error' => 'empty' );
|
303 |
-
}
|
304 |
-
return $output;
|
305 |
-
}
|
306 |
-
|
307 |
-
/**
|
308 |
-
* Update the welcome message info
|
309 |
-
* @param string $account_key
|
310 |
-
* @param boolean $enabled
|
311 |
-
* @param string $message
|
312 |
-
* @return boolean. True if operation finished successfully.
|
313 |
-
*/
|
314 |
-
public function update_welcome_message( $account_key, $enabled, $message ) {
|
315 |
-
|
316 |
-
$url = $this->endpointURL . '/v2/api/update_welcome_notification/' . $account_key;
|
317 |
-
$args = array( 'body' => array(
|
318 |
-
|
319 |
-
'message' => $message
|
320 |
-
) );
|
321 |
-
if ( $enabled ) {
|
322 |
-
|
323 |
-
$args['body']['enabled'] = true;
|
324 |
-
}
|
325 |
-
$response = wp_remote_post( $url, $args );
|
326 |
-
if( is_wp_error( $response ) ) {
|
327 |
-
return ( object ) array( 'error' => $response->get_error_message() );
|
328 |
-
}
|
329 |
-
$body = wp_remote_retrieve_body( $response );
|
330 |
-
$output = json_decode( $body, true );
|
331 |
-
if ( isset( $output["status"] ) ) {
|
332 |
-
|
333 |
-
if ( $output['status'] == "ok" ) {
|
334 |
-
|
335 |
-
return true;
|
336 |
-
}
|
337 |
-
}
|
338 |
-
return false;
|
339 |
-
}
|
340 |
-
|
341 |
-
/**
|
342 |
-
* Update the WooCommerce setting
|
343 |
-
* @param string $account_key
|
344 |
-
* @param string $delay
|
345 |
-
* @param string $title
|
346 |
-
* @param string $message
|
347 |
-
* @param file $image
|
348 |
-
* @return boolean. True if operation finished successfully.
|
349 |
-
*/
|
350 |
-
public function update_woo_settings( $account_key, $delay, $title, $message, $image_path, $image_name ) {
|
351 |
-
|
352 |
-
$url = $this->endpointURL . '/magento/v1/api/update/' . $account_key;
|
353 |
-
$args = array(
|
354 |
-
|
355 |
-
'abandoned_cart_delay' => $delay,
|
356 |
-
'abandoned_cart_title' => $title,
|
357 |
-
'abandoned_cart_message' => $message,
|
358 |
-
'image' => $image_name
|
359 |
-
);
|
360 |
-
$response = $this->post_with_file( $url, $args, $image_path, $image_name );
|
361 |
-
if( is_wp_error( $response ) ) {
|
362 |
-
return ( object ) array( 'error' => $response->get_error_message() );
|
363 |
-
}
|
364 |
-
$body = wp_remote_retrieve_body( $response );
|
365 |
-
$output = json_decode( $body, true );
|
366 |
-
if ( isset( $output["response"] ) ) {
|
367 |
-
|
368 |
-
if ( $output['response'] == "ok" ) {
|
369 |
-
|
370 |
-
return true;
|
371 |
-
}
|
372 |
-
}
|
373 |
-
return false;
|
374 |
-
}
|
375 |
-
|
376 |
-
/**
|
377 |
-
* Retrieve the WooCommerce setting
|
378 |
-
* @param string $account_key
|
379 |
-
* @return associative array of JSON response.
|
380 |
-
*/
|
381 |
-
public function get_woo_settings( $account_key ) {
|
382 |
-
if ( $account_key ) {
|
383 |
-
$url = $this->endpointURL . '/magento/v1/api/get/' . $account_key;
|
384 |
-
$response = wp_remote_post( $url, array() );
|
385 |
-
if( is_wp_error( $response ) ) {
|
386 |
-
return ( object ) array( 'error' => $response->get_error_message() );
|
387 |
-
}
|
388 |
-
$body = wp_remote_retrieve_body( $response );
|
389 |
-
$output = json_decode( $body, true );
|
390 |
-
if ( empty( $output ) ) {
|
391 |
-
|
392 |
-
return ( object ) array( 'error' => 'empty' );
|
393 |
-
}
|
394 |
-
return $output;
|
395 |
-
}
|
396 |
-
}
|
397 |
-
|
398 |
-
/**
|
399 |
-
* Creates cart with the API token and cart ID
|
400 |
-
* Returns false on WP errors.
|
401 |
-
* Returns true.
|
402 |
-
* @param string $api_token
|
403 |
-
* @param string $cart_id
|
404 |
-
* @return mixed; false if nothing found; array otherwise.
|
405 |
-
*/
|
406 |
-
public function create_cart( $cart_id, $api_token ) {
|
407 |
-
|
408 |
-
$cart_url = $this->cartURL;
|
409 |
-
$args = array(
|
410 |
-
'headers' => array( 'Content-Type' => 'application/json; charset=utf-8' ),
|
411 |
-
'body' => json_encode( array( 'token' => $api_token, 'cart_id' => $cart_id ) )
|
412 |
-
);
|
413 |
-
$response = wp_remote_post( $cart_url, $args );
|
414 |
-
if ( is_wp_error( $response ) ) {
|
415 |
-
|
416 |
-
return ( object ) array( 'error' => $response->get_error_message() );
|
417 |
-
}
|
418 |
-
$body = wp_remote_retrieve_body( $response );
|
419 |
-
$output = json_decode( $body, true );
|
420 |
-
if ( isset( $output["response"] ) ) {
|
421 |
-
|
422 |
-
if ( $output['response'] == "ok" ) {
|
423 |
-
return true;
|
424 |
-
}
|
425 |
-
}
|
426 |
-
return false;
|
427 |
-
}
|
428 |
-
|
429 |
-
/**
|
430 |
-
* Updates cart with the API token and cart ID
|
431 |
-
* Returns false on WP errors.
|
432 |
-
* Returns true.
|
433 |
-
* @param string $api_token
|
434 |
-
* @param string $cart_id
|
435 |
-
* @return mixed; false if nothing found; array otherwise.
|
436 |
-
*/
|
437 |
-
public function update_cart( $cart_id, $api_token ) {
|
438 |
-
$cart_url = $this->cartURL;
|
439 |
-
$args = array(
|
440 |
-
'method' => 'PUT',
|
441 |
-
'headers' => array( 'Content-Type' => 'application/json; charset=utf-8' ),
|
442 |
-
'body' => json_encode(array( 'token' => $api_token, 'cart_id' => $cart_id ) )
|
443 |
-
);
|
444 |
-
$response = wp_remote_request( $cart_url, $args );
|
445 |
-
|
446 |
-
if ( is_wp_error( $response ) ) {
|
447 |
-
|
448 |
-
return ( object ) array( 'error' => $response->get_error_message() );
|
449 |
-
}
|
450 |
-
$body = wp_remote_retrieve_body( $response );
|
451 |
-
$output = json_decode( $body,true );
|
452 |
-
if ( isset( $output["response"] ) ) {
|
453 |
-
|
454 |
-
if ( $output['response'] == "ok" ) {
|
455 |
-
|
456 |
-
return true;
|
457 |
-
}
|
458 |
-
}
|
459 |
-
return false;
|
460 |
-
}
|
461 |
-
|
462 |
-
/* Private */
|
463 |
-
|
464 |
-
function __construct( $endpoint_url ) {
|
465 |
-
|
466 |
-
$this->endpointURL = $endpoint_url;
|
467 |
-
$this->registerURL = $endpoint_url.'/v2/register';
|
468 |
-
$this->cartURL = $endpoint_url.'/magento/v1/cart';
|
469 |
-
}
|
470 |
-
|
471 |
-
function post_with_file( $url, $data, $file_path, $filename = NULL ) {
|
472 |
-
|
473 |
-
$boundary = wp_generate_password( 24 );
|
474 |
-
$headers = array(
|
475 |
-
|
476 |
-
'content-type' => 'multipart/form-data; boundary=' . $boundary
|
477 |
-
);
|
478 |
-
$payload = '';
|
479 |
-
// First, add the standard POST fields:
|
480 |
-
foreach ( $data as $name => $value ) {
|
481 |
-
|
482 |
-
$payload .= '--' . $boundary;
|
483 |
-
$payload .= "\r\n";
|
484 |
-
$payload .= 'Content-Disposition: form-data; name="' . $name . '"' . "\r\n\r\n";
|
485 |
-
$payload .= $value;
|
486 |
-
$payload .= "\r\n";
|
487 |
-
}
|
488 |
-
// Upload the file
|
489 |
-
if ( $file_path ) {
|
490 |
-
|
491 |
-
$payload .= '--' . $boundary;
|
492 |
-
$payload .= "\r\n";
|
493 |
-
if ( $filename ) {
|
494 |
-
|
495 |
-
$payload .= 'Content-Disposition: form-data; name="' . 'image' . '"; filename="' . basename( $filename ) . '"' . "\r\n";
|
496 |
-
} else {
|
497 |
-
|
498 |
-
$payload .= 'Content-Disposition: form-data; name="' . 'image' . '"; filename="' . basename( $file_path ) . '"' . "\r\n";
|
499 |
-
}
|
500 |
-
// $payload .= 'Content-Type: image/jpeg' . "\r\n";
|
501 |
-
$payload .= "\r\n";
|
502 |
-
$payload .= file_get_contents( $file_path );
|
503 |
-
$payload .= "\r\n";
|
504 |
-
}
|
505 |
-
$payload .= '--' . $boundary . '--';
|
506 |
-
$response = wp_remote_post( $url,
|
507 |
-
array(
|
508 |
-
'headers' => $headers,
|
509 |
-
'body' => $payload,
|
510 |
-
)
|
511 |
-
);
|
512 |
-
return $response;
|
513 |
-
}
|
514 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/panel/push-monkey-woocommerce.php
DELETED
@@ -1,81 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/* WordPress Check */
|
4 |
-
if ( ! defined( 'ABSPATH' ) )
|
5 |
-
{
|
6 |
-
exit;
|
7 |
-
}
|
8 |
-
|
9 |
-
/**
|
10 |
-
* WooCommerce model for push monkey.
|
11 |
-
*/
|
12 |
-
class Ocean_Woo_Commerce extends Ocean_Extra_Theme_Panel {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Public functions
|
16 |
-
*/
|
17 |
-
public function add_actions() {
|
18 |
-
|
19 |
-
$woo_enabled = get_option( self::WOO_COMMERCE_ENABLED, false );
|
20 |
-
if ( $woo_enabled !== '1' ) {
|
21 |
-
return;
|
22 |
-
}
|
23 |
-
add_filter( 'woocommerce_cart_id', array( $this,'filter_wc_cart_id'), 10, 5 );
|
24 |
-
add_action( 'woocommerce_add_to_cart', array( $this, 'add_to_cart_hook' ) );
|
25 |
-
add_action( 'woocommerce_order_status_completed', array( $this, 'update_cart_hook' ) );
|
26 |
-
add_action( 'woocommerce_checkout_update_order_meta', array( $this, 'action_woocommerce_checkout_update_order_meta' ), 10, 2 );
|
27 |
-
}
|
28 |
-
|
29 |
-
public function filter_wc_cart_id ( $cart_id, $product_id, $variation_id, $variation, $cart_item_data ) {
|
30 |
-
|
31 |
-
$cart_id = substr( $cart_id, 1, 9 ).strtotime( 'now' ).mt_rand( 10, 9999 );
|
32 |
-
return $cart_id;
|
33 |
-
}
|
34 |
-
|
35 |
-
public function add_to_cart_hook( $key ) {
|
36 |
-
|
37 |
-
global $woocommerce;
|
38 |
-
|
39 |
-
$pushmonkey = new Ocean_Extra_Theme_Panel();
|
40 |
-
$api_token = $pushmonkey::account_key();
|
41 |
-
$stored_key = WC()->session->get( '_push_monkey' );
|
42 |
-
if( $pushmonkey::has_account_key() && $stored_key == null ) {
|
43 |
-
$response = $pushmonkey::$apiClient->create_cart( $key, $api_token );
|
44 |
-
WC()->session->set( '_push_monkey', $key );
|
45 |
-
wc_setcookie( '_push_monkey_wc_cart_id', $key, time()+60*60*24*5 );
|
46 |
-
}
|
47 |
-
return $key;
|
48 |
-
}
|
49 |
-
|
50 |
-
public function update_cart_hook( $order_id ) {
|
51 |
-
|
52 |
-
global $woocommerce;
|
53 |
-
$order = new WC_order( $order_id );
|
54 |
-
$key = get_post_meta( $order_id, '_cart_id', true );
|
55 |
-
$pushmonkey = new Ocean_Extra_Theme_Panel();
|
56 |
-
$api_token = $pushmonkey::account_key();
|
57 |
-
/**
|
58 |
-
* Update cart if key is not empty.
|
59 |
-
*/
|
60 |
-
if( $key != '' ) {
|
61 |
-
|
62 |
-
$response = $pushmonkey::$apiClient->update_cart( $key, $api_token );
|
63 |
-
}
|
64 |
-
}
|
65 |
-
|
66 |
-
public function action_woocommerce_checkout_update_order_meta( $order_id ) {
|
67 |
-
|
68 |
-
$key = WC()->session->get( '_push_monkey' );
|
69 |
-
update_post_meta( $order_id, '_cart_id', $key );
|
70 |
-
wc_setcookie( '_push_monkey_wc_cart_id', '', -1 );
|
71 |
-
}
|
72 |
-
|
73 |
-
/**
|
74 |
-
* Private
|
75 |
-
*/
|
76 |
-
function __construct() {
|
77 |
-
|
78 |
-
$this->add_actions();
|
79 |
-
}
|
80 |
-
}
|
81 |
-
$push_monkey_wc = new Ocean_Woo_Commerce();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/panel/theme-panel.php
CHANGED
@@ -12,26 +12,18 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
12 |
exit;
|
13 |
}
|
14 |
|
15 |
-
require_once( OE_PATH .'/includes/panel/push-monkey-client.php' );
|
16 |
-
require_once( OE_PATH .'/includes/panel/push-monkey-woocommerce.php' );
|
17 |
-
|
18 |
// Start Class
|
19 |
class Ocean_Extra_Theme_Panel {
|
20 |
-
static $push_monkey_activate;
|
21 |
-
|
22 |
-
const WOO_COMMERCE_ENABLED = 'oe_push_monkey_woo_enabled';
|
23 |
-
|
24 |
-
static $endpointURL;
|
25 |
-
static $apiClient;
|
26 |
-
static $woocommerce_is_active;
|
27 |
-
static $woo_settings;
|
28 |
-
static $woo_enabled;
|
29 |
|
30 |
/**
|
31 |
* Start things up
|
32 |
*/
|
33 |
public function __construct() {
|
34 |
|
|
|
|
|
|
|
|
|
35 |
// Add panel menu
|
36 |
add_action( 'admin_menu', array( 'Ocean_Extra_Theme_Panel', 'add_page' ), 0 );
|
37 |
|
@@ -44,138 +36,63 @@ class Ocean_Extra_Theme_Panel {
|
|
44 |
// Register panel settings
|
45 |
add_action( 'admin_init', array( 'Ocean_Extra_Theme_Panel', 'register_settings' ) );
|
46 |
|
47 |
-
if ( self::get_push_monkey_account_key() ) {
|
48 |
-
|
49 |
-
add_action( 'wp_head', array( 'Ocean_Extra_Theme_Panel', 'add_push_monkey_manifest' ) );
|
50 |
-
add_action( 'init', array( 'Ocean_Extra_Theme_Panel', 'enqueue_push_monkey_scripts' ) );
|
51 |
-
|
52 |
-
}
|
53 |
-
|
54 |
-
add_action( 'admin_init', array( 'Ocean_Extra_Theme_Panel', 'handle_action' ) );
|
55 |
-
|
56 |
-
// Theme panel push monkey disable notice
|
57 |
-
if ( self::get_push_monkey_account_key() ) {
|
58 |
-
add_action( 'admin_menu', array( 'Ocean_Extra_Theme_Panel', 'add_woo_page' ), 999 );
|
59 |
-
add_action( 'init', array( 'Ocean_Extra_Theme_Panel', 'ocean_process_form' ) );
|
60 |
-
}
|
61 |
-
|
62 |
-
// wc notice hide
|
63 |
-
if ( isset( $_GET['notice'] ) && ( $_GET['notice'] =="wc_notice" ) ) {
|
64 |
-
update_option( 'wc_notice_hide', 1 );
|
65 |
-
}
|
66 |
-
|
67 |
-
if ( is_ssl() ) {
|
68 |
-
self::$endpointURL = "https://www.getpushmonkey.com";
|
69 |
-
} else {
|
70 |
-
self::$endpointURL = "http://www.getpushmonkey.com";
|
71 |
-
}
|
72 |
-
|
73 |
-
self::$apiClient = new Ocean_Push_Monkey_Client( self::$endpointURL );
|
74 |
-
|
75 |
-
// WooCommerce
|
76 |
-
self::$woocommerce_is_active = false;
|
77 |
-
self::$woo_settings = NULL;
|
78 |
-
if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
|
79 |
-
self::$woocommerce_is_active = true;
|
80 |
-
self::$woo_settings = self::$apiClient->get_woo_settings( self::account_key() );
|
81 |
-
}
|
82 |
-
self::$woo_enabled = get_option( self::WOO_COMMERCE_ENABLED, false );
|
83 |
-
|
84 |
-
if ( ( isset( $_GET['page'] ) ) && ( $_GET['page'] == "oceanwp-panel-woocommerce" ) ) {
|
85 |
-
add_action( 'admin_enqueue_scripts', array( 'Ocean_Extra_Theme_Panel', 'woo_setting_css' ) );
|
86 |
-
}
|
87 |
-
|
88 |
// Load addon files
|
89 |
self::load_addons();
|
90 |
|
91 |
}
|
92 |
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
* @since 1.4.
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
* @return string - the Account Key
|
108 |
-
* @since 1.4.0
|
109 |
-
*/
|
110 |
-
public function account_key() {
|
111 |
-
$account_key = self::get_push_monkey_account_key();
|
112 |
-
if( ! self::account_key_is_valid( $account_key ) ) {
|
113 |
-
return NULL;
|
114 |
-
}
|
115 |
-
return $account_key;
|
116 |
-
}
|
117 |
-
|
118 |
-
/**
|
119 |
-
* Checks if an Account Key is valid.
|
120 |
-
* @param string $account_key - the Account Key checked.
|
121 |
-
* @return boolean
|
122 |
-
* @since 1.4.0
|
123 |
-
*/
|
124 |
-
public static function account_key_is_valid( $account_key ) {
|
125 |
-
if( ! strlen( $account_key ) ) {
|
126 |
-
return false;
|
127 |
-
}
|
128 |
-
return true;
|
129 |
-
}
|
130 |
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
*/
|
147 |
-
public static function process_woo_settings( $post, $files ) {
|
148 |
-
$account_key = self::account_key();
|
149 |
-
$title = $post['abandoned_cart_title'];
|
150 |
-
$message = $post['abandoned_cart_message'];
|
151 |
-
$delay = $post['abandoned_cart_delay'];
|
152 |
-
$image = NULL;
|
153 |
-
$image_path = NULL;
|
154 |
-
if ( !empty( $files["abandoned_cart_image"]["name"] ) ) {
|
155 |
-
$image_path = $files["abandoned_cart_image"]["tmp_name"];
|
156 |
-
$image = $files["abandoned_cart_image"]["name"];
|
157 |
-
}
|
158 |
-
$woo_enabled_field = false;
|
159 |
-
if ( isset( $post['push_monkey_woo_enabled'] ) ) {
|
160 |
-
$woo_enabled_field = true;
|
161 |
-
}
|
162 |
-
update_option( self::WOO_COMMERCE_ENABLED, $woo_enabled_field );
|
163 |
-
$updated = self::$apiClient->update_woo_settings( $account_key, $delay, $title, $message, $image_path, $image );
|
164 |
-
if ( $updated ) {
|
165 |
-
add_action( 'admin_notices', array( 'Ocean_Extra_Theme_Panel', 'woo_settings_notice' ) );
|
166 |
-
self::$woo_settings = self::$apiClient->get_woo_settings( self::account_key() );
|
167 |
-
}
|
168 |
-
self::$woo_enabled = get_option( self::WOO_COMMERCE_ENABLED, false );
|
169 |
-
}
|
170 |
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
* @since 1.4.0
|
175 |
-
*/
|
176 |
-
public static function woo_settings_notice() {
|
177 |
-
echo sprintf( esc_html__( '%1$s%2$sAbandoned cart settings saved! *woohoo*%3$s%4$sDismiss this notice.%5$s', 'ocean-extra' ), '<div class="notice notice-info is-dismissible">', '<p>', '</p>', '<button type="button" class="notice-dismiss"><span class="screen-reader-text">', '</span></button></div>' );
|
178 |
-
}
|
179 |
|
180 |
/**
|
181 |
* Return customizer panels
|
@@ -284,22 +201,6 @@ class Ocean_Extra_Theme_Panel {
|
|
284 |
);
|
285 |
}
|
286 |
|
287 |
-
/**
|
288 |
-
* Add sub menu page
|
289 |
-
*
|
290 |
-
* @since 1.4.0
|
291 |
-
*/
|
292 |
-
public static function add_woo_page() {
|
293 |
-
add_submenu_page(
|
294 |
-
'oceanwp-panel',
|
295 |
-
esc_html__( 'Woocommerce', 'ocean-extra' ),
|
296 |
-
esc_html__( 'Woocommerce', 'ocean-extra' ),
|
297 |
-
'manage_options',
|
298 |
-
'oceanwp-panel-woocommerce',
|
299 |
-
array( 'Ocean_Extra_Theme_Panel', 'woocommerce_panel_html' )
|
300 |
-
);
|
301 |
-
}
|
302 |
-
|
303 |
/**
|
304 |
* Registers a new submenu page
|
305 |
*
|
@@ -324,7 +225,6 @@ class Ocean_Extra_Theme_Panel {
|
|
324 |
public static function register_settings() {
|
325 |
register_setting( 'oe_panels_settings', 'oe_panels_settings', array( 'Ocean_Extra_Theme_Panel', 'validate_panels' ) );
|
326 |
register_setting( 'oceanwp_options', 'oceanwp_options', array( 'Ocean_Extra_Theme_Panel', 'admin_sanitize_license_options' ) );
|
327 |
-
register_setting( 'oe_push_monkey_account_key', 'oe_push_monkey_account_key', array( 'Ocean_Extra_Theme_Panel', 'validate_push_monkey_account_key' ) );
|
328 |
}
|
329 |
|
330 |
/**
|
@@ -407,107 +307,6 @@ class Ocean_Extra_Theme_Panel {
|
|
407 |
|
408 |
}
|
409 |
|
410 |
-
/**
|
411 |
-
* Sanitize and activate Push Monkey
|
412 |
-
*
|
413 |
-
* @since 1.4.0
|
414 |
-
*/
|
415 |
-
public static function validate_push_monkey_account_key( $account_key ) {
|
416 |
-
$old_account_key = get_option( 'oe_push_monkey_account_key' );
|
417 |
-
$url = 'https://getpushmonkey.com/v2/api/verify';
|
418 |
-
$args = array( 'body' => array( 'account_key' => $account_key ) );
|
419 |
-
$response = wp_remote_post( $url, $args );
|
420 |
-
if ( ! is_wp_error( $response ) ) {
|
421 |
-
|
422 |
-
$body = wp_remote_retrieve_body( $response );
|
423 |
-
$output = json_decode( $body );
|
424 |
-
if ( $output->response == "ok" ) {
|
425 |
-
return $account_key;
|
426 |
-
}
|
427 |
-
}
|
428 |
-
add_settings_error(
|
429 |
-
'oe_push_monkey',
|
430 |
-
esc_attr( 'settings_updated' ),
|
431 |
-
__( 'The Account Key seems to be invalid.', 'ocean-extra' ),
|
432 |
-
'error'
|
433 |
-
);
|
434 |
-
return false;
|
435 |
-
|
436 |
-
}
|
437 |
-
|
438 |
-
/**
|
439 |
-
* Get Push Monkey key
|
440 |
-
*
|
441 |
-
* @since 1.4.0
|
442 |
-
*/
|
443 |
-
public static function get_push_monkey_account_key() {
|
444 |
-
return get_option( 'oe_push_monkey_account_key', '' );
|
445 |
-
}
|
446 |
-
|
447 |
-
/**
|
448 |
-
* Handle the 'action' query parameter
|
449 |
-
*
|
450 |
-
* @since 1.4.0
|
451 |
-
*/
|
452 |
-
public static function handle_action() {
|
453 |
-
|
454 |
-
if ( ! isset( $_GET['action'] ) ) {
|
455 |
-
return;
|
456 |
-
}
|
457 |
-
|
458 |
-
$action = $_GET['action'];
|
459 |
-
switch ( $action ) {
|
460 |
-
case 'oe_push_monkey_deactivate':
|
461 |
-
self::deactivate_push_monkey();
|
462 |
-
}
|
463 |
-
|
464 |
-
}
|
465 |
-
|
466 |
-
/**
|
467 |
-
* Deactivate Push Monkey
|
468 |
-
*
|
469 |
-
* @since 1.4.0
|
470 |
-
*/
|
471 |
-
public static function deactivate_push_monkey() {
|
472 |
-
delete_option( 'wc_notice_hide' );
|
473 |
-
delete_option( 'oe_push_monkey_account_key' );
|
474 |
-
// Push Notifications
|
475 |
-
$url = add_query_arg(
|
476 |
-
array(
|
477 |
-
'page' => 'oceanwp-panel',
|
478 |
-
'tab' => 'push-notifications',
|
479 |
-
),
|
480 |
-
'admin.php'
|
481 |
-
);
|
482 |
-
wp_redirect( $url );
|
483 |
-
exit;
|
484 |
-
}
|
485 |
-
|
486 |
-
/**
|
487 |
-
* Add a custom <link> tag for the manifest
|
488 |
-
*
|
489 |
-
* @since 1.4.0
|
490 |
-
*/
|
491 |
-
public static function add_push_monkey_manifest() {
|
492 |
-
echo '<link rel="manifest" href="' . plugins_url( '/assets/js/manifest.json', __FILE__ ) . '">';
|
493 |
-
}
|
494 |
-
|
495 |
-
/**
|
496 |
-
* Add the JS for Push Notifications
|
497 |
-
*
|
498 |
-
* @since 1.4.0
|
499 |
-
*/
|
500 |
-
public static function enqueue_push_monkey_scripts() {
|
501 |
-
|
502 |
-
if ( is_admin() ) return;
|
503 |
-
|
504 |
-
$account_key = self::get_push_monkey_account_key();
|
505 |
-
if ( ! $account_key ) return;
|
506 |
-
|
507 |
-
$url = "https://www.getpushmonkey.com/sdk/config-".$account_key.".js?subdomain_forced=1";
|
508 |
-
wp_enqueue_script( 'push_monkey_sdk', $url, array( 'jquery' ) );
|
509 |
-
}
|
510 |
-
|
511 |
/**
|
512 |
* Settings page sidebar
|
513 |
*
|
@@ -517,7 +316,10 @@ class Ocean_Extra_Theme_Panel {
|
|
517 |
|
518 |
// Images url
|
519 |
$octify = OE_URL . '/includes/panel/assets/img/octify.png';
|
520 |
-
$kinsta = OE_URL . '/includes/panel/assets/img/kinsta.png';
|
|
|
|
|
|
|
521 |
|
522 |
<div class="oceanwp-bloc oceanwp-review">
|
523 |
<h3><?php esc_html_e( 'Are you a helpful person?', 'ocean-extra' ); ?></h3>
|
@@ -529,18 +331,41 @@ class Ocean_Extra_Theme_Panel {
|
|
529 |
<i class="dashicons dashicons-wordpress"></i>
|
530 |
</div>
|
531 |
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
541 |
</div>
|
542 |
-
|
543 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
544 |
|
545 |
<div class="oceanwp-bloc oceanwp-kinsta">
|
546 |
<p class="owp-img">
|
@@ -556,7 +381,7 @@ class Ocean_Extra_Theme_Panel {
|
|
556 |
</div>
|
557 |
|
558 |
<div class="oceanwp-buttons">
|
559 |
-
<a href="https://www.youtube.com/c/OceanWP" class="button owp-button owp-yt-btn" target="_blank"><?php esc_html_e( '
|
560 |
<a href="http://docs.oceanwp.org/" class="button owp-button owp-doc-btn" target="_blank"><?php esc_html_e( 'Documentation', 'ocean-extra' ); ?></a>
|
561 |
<a href="https://oceanwp.org/support/" class="button owp-button owp-support-btn" target="_blank"><?php esc_html_e( 'Open a Support Ticket', 'ocean-extra' ); ?></a>
|
562 |
</div>
|
@@ -575,10 +400,7 @@ class Ocean_Extra_Theme_Panel {
|
|
575 |
$theme_panels = self::get_panels();
|
576 |
|
577 |
// Get options array
|
578 |
-
$options = self::get_options();
|
579 |
-
|
580 |
-
// Push monkey img url
|
581 |
-
$push_monkey = OE_URL . '/includes/panel/assets/img/push-monkey-devices.png'; ?>
|
582 |
|
583 |
<div class="wrap oceanwp-theme-panel clr">
|
584 |
|
@@ -605,26 +427,12 @@ class Ocean_Extra_Theme_Panel {
|
|
605 |
'tab' => 'push-notifications',
|
606 |
),
|
607 |
'admin.php'
|
608 |
-
);
|
609 |
-
|
610 |
-
// Deactivate Push Notifications
|
611 |
-
$deactivate_push_notification_url = add_query_arg(
|
612 |
-
array(
|
613 |
-
'page' => 'oceanwp-panel',
|
614 |
-
'tab' => 'push-notifications',
|
615 |
-
'action' => 'oe_push_monkey_deactivate',
|
616 |
-
),
|
617 |
-
'admin.php'
|
618 |
); ?>
|
619 |
|
620 |
<?php do_action( 'ocean_theme_panel_before_tab' ); ?>
|
621 |
|
622 |
<a href="<?php echo esc_url( $feature_url ); ?>" class="nav-tab <?php echo $curr_tab == 'features' ? 'nav-tab-active' : ''; ?>"><?php esc_attr_e( 'Features', 'ocean-extra' ); ?></a>
|
623 |
|
624 |
-
<?php do_action( 'ocean_theme_panel_inner_tab' ); ?>
|
625 |
-
|
626 |
-
<a href="<?php echo esc_url( $push_notification_url ); ?>" class="push-monkey-tab nav-tab <?php echo $curr_tab == 'push-notifications' ? 'nav-tab-active' : ''; ?>"><?php esc_attr_e( 'Push Notifications', 'ocean-extra' ); ?></a>
|
627 |
-
|
628 |
<?php do_action( 'ocean_theme_panel_after_tab' ); ?>
|
629 |
</h2>
|
630 |
|
@@ -743,80 +551,6 @@ class Ocean_Extra_Theme_Panel {
|
|
743 |
|
744 |
</div><!-- .oceanwp-settings -->
|
745 |
|
746 |
-
<?php do_action( 'ocean_theme_panel_inner_content' ); ?>
|
747 |
-
|
748 |
-
<div class="oceanwp-settings clr" <?php echo $curr_tab == 'push-notifications' ? '' : 'style="display:none;"'; ?>>
|
749 |
-
|
750 |
-
<?php
|
751 |
-
if ( true != apply_filters( 'oceanwp_theme_panel_sidebar_enabled', false ) ) { ?>
|
752 |
-
|
753 |
-
<div class="oceanwp-sidebar right clr">
|
754 |
-
|
755 |
-
<?php self::admin_page_sidebar(); ?>
|
756 |
-
|
757 |
-
</div>
|
758 |
-
|
759 |
-
<?php } ?>
|
760 |
-
|
761 |
-
<div class="left clr">
|
762 |
-
|
763 |
-
<form method="post" action="options.php">
|
764 |
-
|
765 |
-
<?php settings_fields( 'oe_push_monkey_account_key' ); ?>
|
766 |
-
|
767 |
-
<div class="oceanwp-panels push-monkey clr">
|
768 |
-
|
769 |
-
<h2 class="oceanwp-title"><?php esc_html_e( 'Push Notifications', 'ocean-extra' ); ?></h2>
|
770 |
-
|
771 |
-
<div class="right pm-right clr">
|
772 |
-
<img src="<?php echo esc_url( $push_monkey ); ?>" alt="Push Monkey" />
|
773 |
-
</div>
|
774 |
-
|
775 |
-
<div class="left pm-left clr">
|
776 |
-
|
777 |
-
<p><?php echo sprintf( esc_html__( 'Push notifications allow you to send news or offers directly to your subscriber\'s mobiles or desktops, even when they are not browsing your website! Visit %1$sgetpushmonkey.com%2$s to learn more.%3$sStart increasing sales, visitor retention and even re-engage subscribers.', 'ocean-extra' ), '<a href="https://getpushmonkey.com/af/OceanWP" target="_blank">', '</a>', '<br />' ); ?></p>
|
778 |
-
|
779 |
-
<p><?php echo sprintf( esc_html__( '%1$sBefore%2$s you enable push notifications for your website, you need to create a free account on %3$sgetpushmonkey.com%4$s. %5$sClick here >%6$s to create one now. %7$sNo credit cards required!%8$s', 'ocean-extra' ), '<strong>', '</strong>', '<a href="https://getpushmonkey.com/af/register/OceanWP" target="_blank">', '</a>', '<a href="https://getpushmonkey.com/af/register/OceanWP" class="button" target="_blank">', '</a>', '<strong>', '</strong>' ); ?></p>
|
780 |
-
|
781 |
-
<p><?php echo sprintf( esc_html__( 'After creating an account, copy your %1$sAccount Key%2$s from the Installation page and paste it in the field below. Check this article to see %3$show to get your account key%4$s.%5$sYou can then manage your account and see more options by signing in at %6$sgetpushmonkey.com%7$s.', 'ocean-extra' ), '<strong>', '</strong>', '<a href="http://docs.oceanwp.org/article/493-how-to-get-your-push-monkey-account-key" target="_blank">', '</a>', '<br />', '<a href="https://getpushmonkey.com/af/OceanWP" target="_blank">', '</a>' ); ?></p>
|
782 |
-
|
783 |
-
<table class="form-table">
|
784 |
-
<tbody>
|
785 |
-
<tr>
|
786 |
-
<th scope="row">
|
787 |
-
<label for="oe_push_monkey_account_key"><?php esc_html_e( 'Account Key', 'ocean-extra' ); ?></label>
|
788 |
-
</th>
|
789 |
-
<td>
|
790 |
-
<input name="oe_push_monkey_account_key" type="text" id="oe_push_monkey_account_key" value="<?php echo self::get_push_monkey_account_key(); ?>" class="regular-text">
|
791 |
-
</td>
|
792 |
-
</tr>
|
793 |
-
</tbody>
|
794 |
-
</table>
|
795 |
-
|
796 |
-
<?php
|
797 |
-
// Label
|
798 |
-
$label = esc_html__( 'Activate Your Key', 'ocean-extra' );
|
799 |
-
if ( self::get_push_monkey_account_key() ) {
|
800 |
-
$label = esc_html__( 'Update Your Key', 'ocean-extra' );
|
801 |
-
} ?>
|
802 |
-
|
803 |
-
<p>
|
804 |
-
<input type="submit" name="submit" id="submit" class="button button-primary" value="<?php echo $label; ?>">
|
805 |
-
<?php if ( self::get_push_monkey_account_key() ) { ?>
|
806 |
-
<a class="button" href="<?php echo $deactivate_push_notification_url; ?>"><?php esc_html_e( 'Deactivate Your Key', 'ocean-extra' ); ?></a>
|
807 |
-
<?php } ?>
|
808 |
-
</p>
|
809 |
-
|
810 |
-
</div>
|
811 |
-
|
812 |
-
</div>
|
813 |
-
|
814 |
-
</form>
|
815 |
-
|
816 |
-
</div>
|
817 |
-
|
818 |
-
</div><!-- .oceanwp-settings -->
|
819 |
-
|
820 |
<?php do_action( 'ocean_theme_panel_after_content' ); ?>
|
821 |
|
822 |
</div>
|
@@ -824,131 +558,6 @@ class Ocean_Extra_Theme_Panel {
|
|
824 |
<?php
|
825 |
}
|
826 |
|
827 |
-
/**
|
828 |
-
* Woo page output
|
829 |
-
*
|
830 |
-
* @since 1.4.0
|
831 |
-
*/
|
832 |
-
public static function woocommerce_panel_html() { ?>
|
833 |
-
|
834 |
-
<div class="push-monkey push-monkey-bootstrap">
|
835 |
-
<div class="container-fluid">
|
836 |
-
<div class="panel panel-default">
|
837 |
-
<div class="panel-heading">
|
838 |
-
<h3 class="panel-title"><?php esc_attr_e( 'WooCommerce + Push Monkey', 'ocean-extra' ); ?></h3>
|
839 |
-
</div>
|
840 |
-
<div class="panel-body">
|
841 |
-
<?php if ( ! self::$woocommerce_is_active ) { ?>
|
842 |
-
<h3><?php esc_attr_e( 'Did you know Push Monkey works seamlessly with WooCommerce?', 'ocean-extra' ); ?></h3>
|
843 |
-
<p>
|
844 |
-
<?php echo sprintf( esc_html__( 'The %1$sAbandoned Cart%2$s feature reminds your visitor about shopping carts that they did not check out.', 'ocean-extra' ), '<strong>', '</strong>' ); ?>
|
845 |
-
</p>
|
846 |
-
<p>
|
847 |
-
<?php esc_attr_e( 'Install and activate WooCommerce to take full advantage of this feature.', 'ocean-extra' ); ?>
|
848 |
-
</p>
|
849 |
-
<?php } else { ?>
|
850 |
-
<h3><?php esc_attr_e( 'Abandoned Shopping Cart.', 'ocean-extra' ); ?></h3>
|
851 |
-
<p>
|
852 |
-
<?php esc_attr_e( 'This will remind your visitors if they did not check out their shopping cart.', 'ocean-extra' ); ?>
|
853 |
-
</p>
|
854 |
-
<?php } ?>
|
855 |
-
</div>
|
856 |
-
</div>
|
857 |
-
<?php if ( self::$woocommerce_is_active ) { ?>
|
858 |
-
<form class="push_monkey_woo_settings" name="push_monkey_woo_settings" enctype="multipart/form-data" method="post" class="form-horizontal">
|
859 |
-
<div class="panel panel-success">
|
860 |
-
<div class="panel-heading">
|
861 |
-
<h3 class="panel-title"><?php esc_attr_e( 'Abandoned Cart Options', 'ocean-extra' ); ?></h3>
|
862 |
-
</div>
|
863 |
-
<div class="panel-body">
|
864 |
-
|
865 |
-
<div class="form-group clearfix">
|
866 |
-
<label class="col-md-3 control-label">
|
867 |
-
<?php esc_attr_e( 'Enable Abandoned Cart Notifications', 'ocean-extra' ); ?>
|
868 |
-
</label>
|
869 |
-
<div class="col-md-3">
|
870 |
-
<label class="switch">
|
871 |
-
<input type="checkbox" class="switch" name="push_monkey_woo_enabled" <?php if ( self::$woo_enabled ) { ?> checked="true" <?php } ?>
|
872 |
-
>
|
873 |
-
<span></span>
|
874 |
-
</label>
|
875 |
-
<span class="help-block"><?php esc_attr_e( 'Enable or disable this feature.', 'ocean-extra' ); ?></span>
|
876 |
-
</div>
|
877 |
-
</div>
|
878 |
-
|
879 |
-
<div class="form-group clearfix">
|
880 |
-
<label class="col-md-3 col-xs-12 control-label" for="push-monkey-abandoned-delay">
|
881 |
-
<?php esc_attr_e( 'Abandoned Cart Delay', 'ocean-extra' ); ?>
|
882 |
-
</label>
|
883 |
-
<div class="col-md-4 col-xs-12">
|
884 |
-
<input type="number" value="<?php echo self::$woo_settings['abandoned_cart_delay']; ?>" name="abandoned_cart_delay" id="push-monkey-abandoned-delay" class="form-control" min="0" step="1" />
|
885 |
-
<span class="help-block">
|
886 |
-
<?php echo sprintf( esc_html__( 'The number of %1$sminutes%2$s after which the abandoned cart reminder push notification is sent.', 'ocean-extra' ), '<strong>', '</strong>' ); ?>
|
887 |
-
</span>
|
888 |
-
</div>
|
889 |
-
</div>
|
890 |
-
|
891 |
-
<div class="form-group clearfix">
|
892 |
-
<label class="col-md-3 col-xs-12 control-label" for="push-monkey-abandoned-title">
|
893 |
-
<?php esc_attr_e( 'Abandoned Cart Title', 'ocean-extra' ); ?>
|
894 |
-
</label>
|
895 |
-
<div class="col-md-6 col-xs-12">
|
896 |
-
<input type="text" value="<?php echo self::$woo_settings['abandoned_cart_title']; ?>" name="abandoned_cart_title" id="push-monkey-abandoned-title" class="form-control" maxlength="30"/>
|
897 |
-
<span class="help-block">
|
898 |
-
<?php esc_attr_e( 'The title of the abandoned cart reminder push notifications.', 'ocean-extra' ); ?>
|
899 |
-
</span>
|
900 |
-
</div>
|
901 |
-
</div>
|
902 |
-
|
903 |
-
<div class="form-group clearfix">
|
904 |
-
<label class="col-md-3 col-xs-12 control-label" for="push-monkey-abandoned-message">
|
905 |
-
<?php esc_attr_e( 'Abandoned Cart Message', 'ocean-extra' ); ?>
|
906 |
-
</label>
|
907 |
-
<div class="col-md-6 col-xs-12">
|
908 |
-
<textarea name="abandoned_cart_message" id="push-monkey-abandoned-message" class="form-control" rows="3" maxlength="120"><?php echo self::$woo_settings['abandoned_cart_message']; ?></textarea>
|
909 |
-
<span class="help-block">
|
910 |
-
<?php esc_attr_e( 'The message of the abandoned cart reminder push notifications.', 'ocean-extra' ); ?>
|
911 |
-
</span>
|
912 |
-
</div>
|
913 |
-
</div>
|
914 |
-
|
915 |
-
<div class="form-group clearfix">
|
916 |
-
<label class="col-md-3 col-xs-12 control-label" for="push-monkey-abandoned-image">
|
917 |
-
<?php esc_attr_e( 'Abandoned Cart Image', 'ocean-extra' ); ?>
|
918 |
-
</label>
|
919 |
-
<div class="col-md-6 col-xs-12">
|
920 |
-
<input type="file" class="fileinput btn-primary" value="24" name="abandoned_cart_image" id="push-monkey-abandoned-image"/>
|
921 |
-
<span class="help-block">
|
922 |
-
<?php esc_attr_e( 'The image of the abandoned cart reminder push notifications. Recommended size 675px x 506px.', 'ocean-extra' ); ?>
|
923 |
-
</span>
|
924 |
-
<?php if ( self::$woo_settings['abandoned_cart_image'] ) {?>
|
925 |
-
<br />
|
926 |
-
<p><?php esc_attr_e( 'Your current image:', 'ocean-extra' ); ?></p>
|
927 |
-
<img style="width: 337px; height: 253px" src="https://getpushmonkey.com/<?php echo self::$woo_settings['abandoned_cart_image']; ?>" />
|
928 |
-
<?php } ?>
|
929 |
-
</div>
|
930 |
-
</div>
|
931 |
-
|
932 |
-
</div>
|
933 |
-
|
934 |
-
<div class="panel-footer">
|
935 |
-
<button type="submit" name="push_monkey_woo_settings" class="btn btn-primary pull-right"><?php esc_attr_e( 'Save', 'ocean-extra' ); ?></button>
|
936 |
-
</div>
|
937 |
-
|
938 |
-
</div>
|
939 |
-
</form>
|
940 |
-
<?php }?>
|
941 |
-
</div>
|
942 |
-
</div>
|
943 |
-
|
944 |
-
<?php
|
945 |
-
}
|
946 |
-
|
947 |
-
public static function woo_setting_css() {
|
948 |
-
// Css Add
|
949 |
-
wp_enqueue_style( 'oe-woo-styles', plugins_url( '/assets/css/push-monkey.min.css', __FILE__ ) );
|
950 |
-
}
|
951 |
-
|
952 |
/**
|
953 |
* Include addons
|
954 |
*
|
12 |
exit;
|
13 |
}
|
14 |
|
|
|
|
|
|
|
15 |
// Start Class
|
16 |
class Ocean_Extra_Theme_Panel {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
/**
|
19 |
* Start things up
|
20 |
*/
|
21 |
public function __construct() {
|
22 |
|
23 |
+
// Display notice if the Sticky Header is not activated
|
24 |
+
add_action( 'admin_notices', array( 'Ocean_Extra_Theme_Panel', 'sticky_notice' ) );
|
25 |
+
add_action( 'admin_init', array( 'Ocean_Extra_Theme_Panel', 'dismiss_sticky_notice' ) );
|
26 |
+
|
27 |
// Add panel menu
|
28 |
add_action( 'admin_menu', array( 'Ocean_Extra_Theme_Panel', 'add_page' ), 0 );
|
29 |
|
36 |
// Register panel settings
|
37 |
add_action( 'admin_init', array( 'Ocean_Extra_Theme_Panel', 'register_settings' ) );
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
// Load addon files
|
40 |
self::load_addons();
|
41 |
|
42 |
}
|
43 |
|
44 |
+
/**
|
45 |
+
* Display notice if the Sticky Header is not activated
|
46 |
+
*
|
47 |
+
* @since 1.4.12
|
48 |
+
*/
|
49 |
+
public static function sticky_notice() {
|
50 |
+
global $pagenow;
|
51 |
+
|
52 |
+
if ( class_exists( 'Ocean_Sticky_Header' )
|
53 |
+
|| apply_filters( 'oceanwp_licence_tab_enable', false )
|
54 |
+
|| '1' === get_option( 'owp_dismiss_sticky_notice' )
|
55 |
+
|| ! current_user_can( 'manage_options' ) ) {
|
56 |
+
return;
|
57 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
+
// Display on the plugins and Theme Panel pages
|
60 |
+
if ( 'plugins.php' == $pagenow
|
61 |
+
|| ( 'admin.php' == $pagenow && 'oceanwp-panel' == $_GET['page'] ) ) {
|
62 |
+
|
63 |
+
$dismiss = wp_nonce_url( add_query_arg( 'owp_sticky_notice', 'dismiss_btn' ), 'dismiss_btn' ); ?>
|
64 |
+
|
65 |
+
<div class="notice notice-warning owp-sticky-notice">
|
66 |
+
<p><?php echo sprintf(
|
67 |
+
esc_html__( '%1$sGood job! Your website is coming together nicely. To complete the functionality, install the %3$sOcean Sticky Header%4$s extension.%2$s %3$sGet the Sticky Header%4$s | %5$sDismiss this notice%6$s.', 'ocean-extra' ),
|
68 |
+
'<span style="display: block; margin-bottom: 4px; clear: both;">', '</span>',
|
69 |
+
'<a href="https://oceanwp.org/ocean-sticky-header/?utm_source=dash&utm_medium=notice&utm_campaign=sticky" target="_blank">', '</a>',
|
70 |
+
'<a href="'. $dismiss .'">', '</a>'
|
71 |
+
); ?></p>
|
72 |
+
</div>
|
73 |
+
|
74 |
+
<?php
|
75 |
+
}
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Dismiss Sticky Header admin notice
|
80 |
+
*
|
81 |
+
* @since 1.4.12
|
82 |
+
*/
|
83 |
+
public static function dismiss_sticky_notice() {
|
84 |
+
if ( ! isset( $_GET['owp_sticky_notice'] ) ) {
|
85 |
+
return;
|
86 |
+
}
|
87 |
|
88 |
+
if ( 'dismiss_btn' === $_GET['owp_sticky_notice'] ) {
|
89 |
+
check_admin_referer( 'dismiss_btn' );
|
90 |
+
update_option( 'owp_dismiss_sticky_notice', '1' );
|
91 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
|
93 |
+
wp_redirect( remove_query_arg( 'owp_sticky_notice' ) );
|
94 |
+
exit;
|
95 |
+
}
|
|
|
|
|
|
|
|
|
|
|
96 |
|
97 |
/**
|
98 |
* Return customizer panels
|
201 |
);
|
202 |
}
|
203 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
/**
|
205 |
* Registers a new submenu page
|
206 |
*
|
225 |
public static function register_settings() {
|
226 |
register_setting( 'oe_panels_settings', 'oe_panels_settings', array( 'Ocean_Extra_Theme_Panel', 'validate_panels' ) );
|
227 |
register_setting( 'oceanwp_options', 'oceanwp_options', array( 'Ocean_Extra_Theme_Panel', 'admin_sanitize_license_options' ) );
|
|
|
228 |
}
|
229 |
|
230 |
/**
|
307 |
|
308 |
}
|
309 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
310 |
/**
|
311 |
* Settings page sidebar
|
312 |
*
|
316 |
|
317 |
// Images url
|
318 |
$octify = OE_URL . '/includes/panel/assets/img/octify.png';
|
319 |
+
$kinsta = OE_URL . '/includes/panel/assets/img/kinsta.png';
|
320 |
+
|
321 |
+
// Bundle link
|
322 |
+
$bundle_link = 'https://oceanwp.org/core-extensions-bundle/?utm_source=dash&utm_medium=theme-panel&utm_campaign=bundle'; ?>
|
323 |
|
324 |
<div class="oceanwp-bloc oceanwp-review">
|
325 |
<h3><?php esc_html_e( 'Are you a helpful person?', 'ocean-extra' ); ?></h3>
|
331 |
<i class="dashicons dashicons-wordpress"></i>
|
332 |
</div>
|
333 |
|
334 |
+
<?php
|
335 |
+
// if no premium extensions activated
|
336 |
+
if ( true != apply_filters( 'oceanwp_licence_tab_enable', false ) ) { ?>
|
337 |
+
|
338 |
+
<div class="oceanwp-bloc oceanwp-bundle">
|
339 |
+
<p class="owp-text">
|
340 |
+
<a href="<?php echo esc_url( $bundle_link ); ?>" class="logo-text" target="_blank">OceanWP<span class="circle"></span></a>
|
341 |
+
</p>
|
342 |
+
<div class="content-wrap">
|
343 |
+
<p class="content"><?php echo sprintf( esc_html__( 'Take your website to the next level.%1$sGain access to all premium extensions with a single purchase. %2$sClick here%3$s for more information.', 'ocean-extra' ),
|
344 |
+
'<br>',
|
345 |
+
'<a href="'. esc_url( $bundle_link ) .'" target="_blank">', '</a>' ); ?></p>
|
346 |
+
<a href="<?php echo esc_url( $bundle_link ); ?>" class="button owp-button" target="_blank"><?php esc_html_e( 'Read More', 'ocean-extra' ); ?></a>
|
347 |
+
</div>
|
348 |
+
<i class="dashicons dashicons-admin-appearance"></i>
|
349 |
</div>
|
350 |
+
|
351 |
+
<?php
|
352 |
+
} else { ?>
|
353 |
+
|
354 |
+
<div class="oceanwp-bloc oceanwp-octify">
|
355 |
+
<p class="owp-img">
|
356 |
+
<a href="https://goo.gl/CyYJ5C" target="_blank">
|
357 |
+
<img src="<?php echo esc_url( $octify ); ?>" alt="Image Compressor" />
|
358 |
+
</a>
|
359 |
+
</p>
|
360 |
+
<div class="content-wrap">
|
361 |
+
<p class="content"><?php esc_html_e( 'Octify is the perfect image compressor plugin, a must-have for any site. Gain in speed by reducing your images weight without losing quality.', 'ocean-extra' ); ?></p>
|
362 |
+
<a href="https://goo.gl/CyYJ5C" class="button owp-button" target="_blank"><?php esc_html_e( 'Check Octify Now', 'ocean-extra' ); ?></a>
|
363 |
+
</div>
|
364 |
+
<i class="dashicons dashicons-format-image"></i>
|
365 |
+
</div>
|
366 |
+
|
367 |
+
<?php
|
368 |
+
} ?>
|
369 |
|
370 |
<div class="oceanwp-bloc oceanwp-kinsta">
|
371 |
<p class="owp-img">
|
381 |
</div>
|
382 |
|
383 |
<div class="oceanwp-buttons">
|
384 |
+
<a href="https://www.youtube.com/c/OceanWP" class="button owp-button owp-yt-btn" target="_blank"><?php esc_html_e( 'How-to Videos', 'ocean-extra' ); ?></a>
|
385 |
<a href="http://docs.oceanwp.org/" class="button owp-button owp-doc-btn" target="_blank"><?php esc_html_e( 'Documentation', 'ocean-extra' ); ?></a>
|
386 |
<a href="https://oceanwp.org/support/" class="button owp-button owp-support-btn" target="_blank"><?php esc_html_e( 'Open a Support Ticket', 'ocean-extra' ); ?></a>
|
387 |
</div>
|
400 |
$theme_panels = self::get_panels();
|
401 |
|
402 |
// Get options array
|
403 |
+
$options = self::get_options(); ?>
|
|
|
|
|
|
|
404 |
|
405 |
<div class="wrap oceanwp-theme-panel clr">
|
406 |
|
427 |
'tab' => 'push-notifications',
|
428 |
),
|
429 |
'admin.php'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
430 |
); ?>
|
431 |
|
432 |
<?php do_action( 'ocean_theme_panel_before_tab' ); ?>
|
433 |
|
434 |
<a href="<?php echo esc_url( $feature_url ); ?>" class="nav-tab <?php echo $curr_tab == 'features' ? 'nav-tab-active' : ''; ?>"><?php esc_attr_e( 'Features', 'ocean-extra' ); ?></a>
|
435 |
|
|
|
|
|
|
|
|
|
436 |
<?php do_action( 'ocean_theme_panel_after_tab' ); ?>
|
437 |
</h2>
|
438 |
|
551 |
|
552 |
</div><!-- .oceanwp-settings -->
|
553 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
554 |
<?php do_action( 'ocean_theme_panel_after_content' ); ?>
|
555 |
|
556 |
</div>
|
558 |
<?php
|
559 |
}
|
560 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
561 |
/**
|
562 |
* Include addons
|
563 |
*
|
ocean-extra.php
CHANGED
@@ -3,11 +3,11 @@
|
|
3 |
* Plugin Name: Ocean Extra
|
4 |
* Plugin URI: https://oceanwp.org/extension/ocean-extra/
|
5 |
* Description: Add extra features like widgets, metaboxes, import/export and a panel to activate the premium extensions.
|
6 |
-
* Version: 1.4.
|
7 |
* Author: OceanWP
|
8 |
* Author URI: https://oceanwp.org/
|
9 |
* Requires at least: 4.5.0
|
10 |
-
* Tested up to: 4.9.
|
11 |
*
|
12 |
* Text Domain: ocean-extra
|
13 |
* Domain Path: /languages/
|
@@ -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.4.
|
90 |
|
91 |
define( 'OE_URL', $this->plugin_url );
|
92 |
define( 'OE_PATH', $this->plugin_path );
|
@@ -105,6 +105,9 @@ final class Ocean_Extra {
|
|
105 |
define( 'TINVWL_CAMPAIGN', 'oceanwp_theme' );
|
106 |
}
|
107 |
|
|
|
|
|
|
|
108 |
register_activation_hook( __FILE__, array( $this, 'install' ) );
|
109 |
|
110 |
add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
|
@@ -161,6 +164,21 @@ final class Ocean_Extra {
|
|
161 |
return self::$_instance;
|
162 |
} // End instance()
|
163 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
164 |
/**
|
165 |
* Load the localisation file.
|
166 |
* @access public
|
3 |
* Plugin Name: Ocean Extra
|
4 |
* Plugin URI: https://oceanwp.org/extension/ocean-extra/
|
5 |
* Description: Add extra features like widgets, metaboxes, import/export and a panel to activate the premium extensions.
|
6 |
+
* Version: 1.4.12
|
7 |
* Author: OceanWP
|
8 |
* Author URI: https://oceanwp.org/
|
9 |
* Requires at least: 4.5.0
|
10 |
+
* Tested up to: 4.9.6
|
11 |
*
|
12 |
* Text Domain: ocean-extra
|
13 |
* Domain Path: /languages/
|
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.4.12';
|
90 |
|
91 |
define( 'OE_URL', $this->plugin_url );
|
92 |
define( 'OE_PATH', $this->plugin_path );
|
105 |
define( 'TINVWL_CAMPAIGN', 'oceanwp_theme' );
|
106 |
}
|
107 |
|
108 |
+
// WooCommerce Variation Swatches partner ID
|
109 |
+
add_filter( 'gwp_affiliate_id', array( $this, 'gwp_affiliate_id' ) );
|
110 |
+
|
111 |
register_activation_hook( __FILE__, array( $this, 'install' ) );
|
112 |
|
113 |
add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
|
164 |
return self::$_instance;
|
165 |
} // End instance()
|
166 |
|
167 |
+
/**
|
168 |
+
* WooCommerce Variation Swatches partner ID
|
169 |
+
*
|
170 |
+
* @since 1.0.0
|
171 |
+
*/
|
172 |
+
public function gwp_affiliate_id() {
|
173 |
+
|
174 |
+
// Return if the plugin is not active
|
175 |
+
if ( ! class_exists( 'Woo_Variation_Swatches' ) ) {
|
176 |
+
return;
|
177 |
+
}
|
178 |
+
|
179 |
+
return 69;
|
180 |
+
}
|
181 |
+
|
182 |
/**
|
183 |
* Load the localisation file.
|
184 |
* @access public
|
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== Ocean Extra ===
|
2 |
Contributors: oceanwp
|
3 |
Tags: widgets, meta box, metaboxes, metabox, oceanwp
|
4 |
-
Requires at least: 4.
|
5 |
-
Tested up to: 4.9.
|
6 |
-
Stable tag: 1.4.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -32,6 +32,10 @@ This plugin will only work with the [OceanWP](https://oceanwp.org/) theme.
|
|
32 |
|
33 |
== Changelog ==
|
34 |
|
|
|
|
|
|
|
|
|
35 |
= 1.4.11 =
|
36 |
-Tweak: Theme Panel edited.
|
37 |
|
1 |
=== Ocean Extra ===
|
2 |
Contributors: oceanwp
|
3 |
Tags: widgets, meta box, metaboxes, metabox, oceanwp
|
4 |
+
Requires at least: 4.6
|
5 |
+
Tested up to: 4.9.6
|
6 |
+
Stable tag: 1.4.12
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
32 |
|
33 |
== Changelog ==
|
34 |
|
35 |
+
= 1.4.12 =
|
36 |
+
- Added: Typography settings for the Menu in the OceanWP Settings metabox.
|
37 |
+
- Removed: Push Monkey integration, if you used it in the Theme Panel, you just need to install the official plugin: https://wordpress.org/plugins/push-monkey-desktop-push-notifications/
|
38 |
+
|
39 |
= 1.4.11 =
|
40 |
-Tweak: Theme Panel edited.
|
41 |
|