Skip to content

Commit 5f6a652

Browse files
add more links to docs
1 parent dddfca8 commit 5f6a652

File tree

4 files changed

+31
-10
lines changed

4 files changed

+31
-10
lines changed

classes/Visualizer/Render/Layout.php

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -595,9 +595,19 @@ public static function _renderTabAdvanced( $args ) {
595595
public static function _renderTabHelp( $args ) {
596596
$chart_id = $args[1];
597597
$type = get_post_meta( $chart_id, Visualizer_Plugin::CF_CHART_TYPE, true );
598-
if ( $type === 'dataTable' ) {
599-
$type = 'table';
598+
switch ( $type ) {
599+
case 'dataTable':
600+
$type = 'table';
601+
break;
602+
case 'polarArea':
603+
$type = 'polar-area';
604+
break;
605+
case 'radar':
606+
$type = 'radar-spider';
607+
break;
600608
}
609+
610+
$displayType = str_replace( '-', '/', $type );
601611
?>
602612
<ul class="viz-group-wrapper full-height">
603613
<li class="viz-group open" id="vz-chart-help">
@@ -607,7 +617,13 @@ public static function _renderTabHelp( $args ) {
607617
Visualizer_Render_Sidebar::_renderSectionStart( esc_html__( 'General', 'visualizer' ), false );
608618
?>
609619
<h4><span class="dashicons dashicons-editor-help"></span><a href="<?php echo VISUALIZER_MAIN_DOC; ?>" target="_blank"><?php _e( 'Main documentation page', 'visualizer' ); ?></a></h4>
610-
<h4><span class="dashicons dashicons-search"></span><a href="<?php echo str_replace( '#', $type, VISUALIZER_DOC_COLLECTION ); ?>" target="_blank"><?php echo sprintf( __( 'Articles containing "%s"', 'visualizer' ), $type ); ?></a></h4>
620+
<h4><span class="dashicons dashicons-media-code"></span><a href="<?php echo VISUALIZER_CODE_SNIPPETS_URL; ?>" target="_blank"><?php _e( 'Custom code snippets', 'visualizer' ); ?></a></h4>
621+
<?php
622+
Visualizer_Render_Sidebar::_renderSectionEnd();
623+
Visualizer_Render_Sidebar::_renderSectionStart( sprintf( __( '%s chart', 'visualizer' ), ucwords( $displayType ) ), false );
624+
?>
625+
<h4><span class="dashicons dashicons-video-alt2"></span>&nbsp;<a href="<?php echo str_replace( '#', "$type-chart", VISUALIZER_DEMO_URL ); ?>" target="_blank"><?php _e( 'View demo', 'visualizer' ); ?></a></h4>
626+
<h4><span class="dashicons dashicons-search"></span><a href="<?php echo str_replace( '#', $type, VISUALIZER_DOC_COLLECTION ); ?>" target="_blank"><?php echo sprintf( __( 'Articles containing "%s"', 'visualizer' ), $displayType ); ?></a></h4>
611627
<?php
612628
Visualizer_Render_Sidebar::_renderSectionEnd();
613629
Visualizer_Render_Sidebar::_renderGroupEnd();

classes/Visualizer/Render/Page/Data.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ protected function _renderSidebarContent() {
8383
<div id="viz-tab-help-content"><?php Visualizer_Render_Layout::show( 'tab-help', $this->chart->ID ); ?></div>
8484
</div>
8585

86-
<li class="viz-group bottom-fixed" id="vz-chart-copyright">Visualizer &copy;
86+
<li class="viz-group bottom-fixed" id="vz-chart-copyright">
87+
Hate it? Love it? <a href="https://wordpress.org/support/plugin/visualizer/reviews/#new-post" target="_blank">Rate it!</a>
88+
<br/>
89+
Visualizer &copy;
8790
<?php
8891
// phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date, WordPress.DateTime.CurrentTimeTimestamp.Requested
8992
echo date( 'Y', current_time( 'timestamp' ) );

index.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ function visualizer_launch() {
9292
define( 'VISUALIZER_DB_QUERY_DOC_URL', 'https://docs.themeisle.com/article/970-visualizer-sample-queries-to-generate-charts' );
9393
define( 'VISUALIZER_MAIN_DOC', 'https://docs.themeisle.com/category/657-visualizer' );
9494
define( 'VISUALIZER_DOC_COLLECTION', 'https://docs.themeisle.com/search?collectionId=561ec249c69791452ed4bceb&query=#+visualizer' );
95+
define( 'VISUALIZER_DEMO_URL', 'https://demo.themeisle.com/visualizer/#' );
96+
define( 'VISUALIZER_CODE_SNIPPETS_URL', 'https://docs.themeisle.com/category/726-visualizer' );
9597

9698
// to redirect all themeisle_log_event to error log.
9799
define( 'VISUALIZER_LOCAL_DEBUG', false );

templates/docs.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
</ul>
2121

2222
<?php if ( ! $is_pro ) { ?>
23-
<p>We have many more features and charts, and offer email & chat support if you purchase our <a href="<?php echo Visualizer_Plugin::PRO_TEASER_URL; ?>">Pro Version</a>.</p>
23+
<p>We have many more features and charts, and offer email & chat support if you purchase our <a href="<?php echo Visualizer_Plugin::PRO_TEASER_URL; ?>" target="_blank">Pro Version</a>.</p>
2424
<?php } ?>
2525

26-
<p>Ready to begin? Let's <a href="<?php echo admin_url( 'admin.php?page=' . Visualizer_Plugin::NAME . '&vaction=addnew' ); ?>">create a chart!</a>
26+
<p>Ready to begin? Let's <a href="<?php echo admin_url( 'admin.php?page=' . Visualizer_Plugin::NAME . '&vaction=addnew' ); ?>">create a chart</a> or <a href="<?php echo VISUALIZER_DEMO_URL; ?>" target="_blank">view a demo</a>!
2727
</div>
2828
</div>
2929
</div>
@@ -33,10 +33,10 @@
3333
<div class="pro-feature-inner">
3434
<div class="pro-feature-features">
3535
<h2>Documentation</h2>
36-
<p>To get started with Visualizer, we recommend you first bookmark our main documentation page <a href="<?php echo VISUALIZER_MAIN_DOC; ?>">here</a>.</p>
36+
<p>To get started with Visualizer, we recommend you first bookmark our main documentation page <a href="<?php echo VISUALIZER_MAIN_DOC; ?>" target="_blank">here</a>.</p>
3737

3838
<p>
39-
Notably, you could take a look at this first introductory tutorial: <a href="https://docs.themeisle.com/article/597-create-chart">How to create my first chart</a>.
39+
Notably, you could take a look at this first introductory tutorial: <a href="https://docs.themeisle.com/article/597-create-chart" target="_blank">How to create my first chart</a>.
4040
</p>
4141

4242
<p>If you prefer learning through video, this could prove useful. It is a little dated however.</p>
@@ -55,9 +55,9 @@
5555
<div class="pro-feature-features">
5656
<h2>Need help?</h2>
5757
<?php if ( ! $is_pro ) { ?>
58-
<p>Our support channel for users of the free version can be found <a href="https://wordpress.org/support/plugin/visualizer/">here</a>.</p>
58+
<p>Our support channel for users of the free version can be found <a href="https://wordpress.org/support/plugin/visualizer/" target="_blank">here</a>.</p>
5959
<?php } else { ?>
60-
<p>Contact our premium support by logging in to your account <a href="https://store.themeisle.com/login/">here</a>.</p>
60+
<p>Contact our premium support by logging in to your account <a href="https://store.themeisle.com/login/" target="_blank">here</a>.</p>
6161
<?php } ?>
6262
</div>
6363
<div class="clear"></div>

0 commit comments

Comments
 (0)