Skip to content

Commit dea1787

Browse files
WIP
1 parent 61ef2bd commit dea1787

File tree

5 files changed

+409
-3
lines changed

5 files changed

+409
-3
lines changed

classes/Visualizer/Module/Admin.php

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -582,9 +582,24 @@ public function setupVisualizerTab( $tabs ) {
582582
* @access public
583583
*/
584584
public function registerAdminMenu() {
585-
$title = esc_html__( 'Visualizer Library', 'visualizer' );
586-
$callback = array( $this, 'renderLibraryPage' );
587-
$this->_libraryPage = add_submenu_page( 'upload.php', $title, $title, 'edit_posts', Visualizer_Plugin::NAME, $callback );
585+
$this->_libraryPage = add_menu_page( __( 'Visualizer', 'visualizer' ), __( 'Visualizer', 'visualizer' ), 'edit_posts', Visualizer_Plugin::NAME, array( $this, 'renderLibraryPage' ), 'dashicons-chart-pie', 99.7666 );
586+
587+
add_submenu_page(
588+
Visualizer_Plugin::NAME,
589+
__( 'Chart Library', 'visualizer' ),
590+
__( 'Chart Library', 'visualizer' ),
591+
'edit_posts',
592+
admin_url( 'admin.php?page=' . Visualizer_Plugin::NAME )
593+
);
594+
add_submenu_page(
595+
Visualizer_Plugin::NAME,
596+
__( 'Support', 'visualizer' ),
597+
__( 'Support', 'visualizer' ) . '<span class="dashicons dashicons-editor-help more-features-icon" style="width: 17px; height: 17px; margin-left: 4px; color: #ffca54; font-size: 17px; vertical-align: -3px;"></span>',
598+
'edit_posts',
599+
'viz-support',
600+
array( $this, 'renderSupportPage' )
601+
);
602+
remove_submenu_page( Visualizer_Plugin::NAME, Visualizer_Plugin::NAME );
588603
}
589604

590605
/**
@@ -643,6 +658,18 @@ private function getQuery() {
643658
return $q;
644659
}
645660

661+
/**
662+
* Renders support page.
663+
*
664+
* @since 3.3.0
665+
*
666+
* @access public
667+
*/
668+
public function renderSupportPage() {
669+
wp_enqueue_style( 'visualizer-upsell', VISUALIZER_ABSURL . 'css/upsell.css', array(), Visualizer_Plugin::VERSION );
670+
include_once VISUALIZER_ABSPATH . '/templates/support.php';
671+
}
672+
646673
/**
647674
* Renders visualizer library page.
648675
*

css/upsell.css

Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
#viz-features .viz-features-header {
2+
box-sizing: border-box;
3+
padding: 20px 30px 30px;
4+
border-top: 5px solid #252b37;
5+
background: #fff;
6+
}
7+
8+
#viz-features .slogan {
9+
display: inline-block;
10+
margin: 0 0 0 8px;
11+
padding: 0;
12+
color: #858585;
13+
font-family: "Open Sans", sans-serif;
14+
font-size: 17px;
15+
line-height: 1;
16+
vertical-align: 4px;
17+
}
18+
19+
#viz-features .slogan a {
20+
color: #858585;
21+
font-weight: 600;
22+
font-style: italic;
23+
text-decoration: none;
24+
-webkit-transition: all 0.250s ease-in-out;
25+
transition: all 0.250s ease-in-out;
26+
}
27+
28+
#viz-features .slogan a:hover {
29+
color: #ff6160;
30+
}
31+
32+
#viz-features .slogan a:focus {
33+
outline: none;
34+
box-shadow: none;
35+
}
36+
37+
#viz-features .header-btns {
38+
margin: 7px auto;
39+
}
40+
41+
#viz-features .header-btns .buy-now {
42+
display: inline-block;
43+
margin-top: 2px;
44+
margin-right: 5px;
45+
padding: 15px 25px;
46+
border-radius: 3px;
47+
border-radius: 3px;
48+
color: #fff;
49+
background: #e33b3f;
50+
font-family: "Open Sans", sans-serif;
51+
font-size: 18px;
52+
font-weight: bold;
53+
text-decoration: none;
54+
text-transform: uppercase;
55+
-webkit-transition: all 0.250s ease-in-out;
56+
transition: all 0.250s ease-in-out;
57+
}
58+
59+
#viz-features .header-btns .buy-now:hover {
60+
background: #252b37;
61+
}
62+
63+
#viz-features .header-btns .buy-now .dashicons {
64+
padding-right: 3px;
65+
}
66+
67+
#viz-features {
68+
padding: 0;
69+
}
70+
71+
#viz-features .viz-features-content {
72+
width: 100%;
73+
padding: 0;
74+
}
75+
76+
#viz-features .viz-features-header,
77+
#viz-features .viz-feature {
78+
box-sizing: border-box;
79+
width: 100%;
80+
margin: 30px 0 0;
81+
padding: 30px;
82+
background-color: #fff;
83+
box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
84+
}
85+
86+
#viz-features .viz-feature .viz-feature-features,
87+
#viz-features .viz-feature .viz-feature-image {
88+
margin: 0;
89+
vertical-align: middle;
90+
}
91+
92+
#viz-features .viz-feature .viz-feature-features {
93+
box-sizing: border-box;
94+
padding: 0 0 20px;
95+
}
96+
97+
#viz-features .viz-feature .viz-feature-image img {
98+
max-width: 470px;
99+
}
100+
101+
#viz-features .viz-feature .viz-feature-image iframe {
102+
max-width: 100%;
103+
}
104+
105+
#viz-features .viz-feature .viz-feature-features h2 {
106+
margin: 0 0 20px;
107+
font-size: 28px;
108+
font-weight: 700;
109+
line-height: 1.2;
110+
}
111+
112+
#viz-features .viz-feature .viz-feature-features h4 {
113+
margin: 0 0 10px;
114+
font-size: 24px;
115+
}
116+
117+
#viz-features .viz-feature .viz-feature-features p {
118+
margin: 0 0 15px;
119+
font-size: 18px;
120+
line-height: 1.5;
121+
}
122+
123+
#viz-features .viz-feature .viz-feature-image img {
124+
width: 100%;
125+
height: auto;
126+
}
127+
128+
@media screen and (min-width: 768px) {
129+
#viz-features {
130+
padding: 0 15px;
131+
}
132+
}
133+
134+
@media screen and (min-width: 1200px) {
135+
#viz-features .viz-feature {
136+
padding: 30px 60px;
137+
}
138+
139+
#viz-features .viz-feature .viz-feature-features {
140+
padding: 0 30px 0 0;
141+
}
142+
143+
#viz-features .viz-feature .viz-feature-features h2 {
144+
font-size: 30px;
145+
}
146+
147+
#viz-features .viz-feature .viz-feature-features p {
148+
font-size: 20px;
149+
}
150+
}
151+
152+
@media screen and (min-width: 1500px) {
153+
#viz-features .viz-feature .viz-feature-features {
154+
padding: 0 120px 0 0;
155+
}
156+
}
157+
158+
@media screen and (max-width: 1100px) {
159+
#viz-features {
160+
text-align: center;
161+
}
162+
163+
#viz-features .logo {
164+
margin-left: 0;
165+
}
166+
167+
#viz-features .header-btns {
168+
display: block;
169+
float: none;
170+
margin: 10px 0 0;
171+
text-align: center;
172+
}
173+
}
174+
175+
@media screen and (max-width: 1200px) {
176+
#viz-features .viz-feature .viz-feature-features,
177+
#viz-features .viz-feature .viz-feature-image {
178+
display: block;
179+
}
180+
181+
#viz-features .viz-feature .viz-feature-image {
182+
display: inline-block;
183+
max-width: 100%;
184+
margin: 0 auto 30px;
185+
}
186+
187+
#viz-features .slogan {
188+
display: none;
189+
}
190+
}
191+
192+
#viz-features.viz-settings .viz-feature {
193+
margin-top: 0;
194+
border: none;
195+
}
196+
197+
#viz-features.viz-settings .nav-tab-wrapper {
198+
border-bottom: none;
199+
}
200+
201+
#viz-features.viz-settings .nav-tab-wrapper a.nav-tab-active,
202+
#viz-features.viz-settings .nav-tab-wrapper a:hover {
203+
background: #fff;
204+
}
205+
206+
#viz-features.viz-settings .nav-tab-wrapper a {
207+
margin-top: 10px;
208+
padding: 10px 20px;
209+
border: 0;
210+
color: #000;
211+
background: #e0e0e0;
212+
box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
213+
}
214+
215+
.viz-feature-centered {
216+
text-align: center;
217+
}

templates/docs.php

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<!--
2+
Layout For Tutorial Page of Feedzy RSS Feeds
3+
4+
@since ?
5+
@package feedzy-rss-feeds
6+
-->
7+
<div id="viz-features">
8+
9+
<div class="viz-features-content">
10+
11+
<a name="shortcode"></a>
12+
<div class="viz-feature">
13+
<div class="viz-feature-features">
14+
<h2>Shortcode</h2>
15+
<p>Show feed items using the <code>[feedzy-rss-feeds]</code>shortcode in a few easy steps.</p>
16+
<p>You can view our documentation <a href="https://docs.themeisle.com/article/658-feedzy-rss-feeds" target="_blank">here</a></p>
17+
</div>
18+
<div class="viz-feature-image">
19+
<iframe width="600" height="300" src="https://www.youtube.com/embed/GEFAY2IxxEc?start=84" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
20+
</div>
21+
</div>
22+
23+
<div class="viz-feature">
24+
<div class="viz-feature-features viz-feature-centered">
25+
<h2>Grow your WordPress business with Feedzy today.</h4>
26+
<div class="header-btns">
27+
<?php
28+
29+
if ( ! VISUALIZER_PRO ) {
30+
?>
31+
<a href="<?php echo esc_url( admin_url( 'admin.php?page=feedzy-support&tab=more' ) ); ?>" class="buy-now"><span
32+
class="dashicons dashicons-cart"></span> Click here to see the additional features in Feedzy Pro</a>
33+
<?php
34+
}
35+
?>
36+
</div>
37+
38+
</div><!-- .viz-features-content -->
39+
40+
</div>

templates/support.php

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<div id="viz-features" class="viz-settings">
2+
3+
<?php
4+
$active_tab = isset( $_REQUEST['tab'] ) ? sanitize_text_field( $_REQUEST['tab'] ) : 'help';
5+
$show_more = ! VISUALIZER_PRO;
6+
?>
7+
8+
<h2 class="nav-tab-wrapper">
9+
<a href="<?php echo esc_url( admin_url( 'admin.php?page=viz-support&tab=help' ) ); ?>"
10+
class="nav-tab <?php echo $active_tab === 'help' ? 'nav-tab-active' : ''; ?>"><?php _e( 'Support', 'visualizer' ); ?></a>
11+
<?php
12+
if ( $show_more ) {
13+
?>
14+
<a href="<?php echo esc_url( admin_url( 'admin.php?page=viz-support&tab=more' ) ); ?>"
15+
class="nav-tab <?php echo $active_tab === 'more' ? 'nav-tab-active' : ''; ?>"><?php _e( 'More Features', 'visualizer' ); ?></a>
16+
<?php
17+
}
18+
?>
19+
</h2>
20+
21+
<div class="viz-features-content">
22+
<div class="viz-feature">
23+
<div id="feedzy_import_feeds" class="viz-feature-features">
24+
<?php
25+
switch ( $active_tab ) {
26+
case 'help':
27+
include_once VISUALIZER_ABSPATH . '/templates/docs.php';
28+
break;
29+
case 'more':
30+
include_once VISUALIZER_ABSPATH . '/templates/upsell.php';
31+
break;
32+
}
33+
?>
34+
</div>
35+
</div>
36+
</div>
37+
38+
</div>

0 commit comments

Comments
 (0)