Skip to content

Commit 5f61d57

Browse files
release: fixes
- Updated promotional links and buttons
2 parents 71b99cc + 4dcd247 commit 5f61d57

File tree

9 files changed

+87
-11
lines changed

9 files changed

+87
-11
lines changed

.github/workflows/test-php.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Setup PHP version
1414
uses: shivammathur/setup-php@v2
1515
with:
16-
php-version: '7.1'
16+
php-version: '7.4'
1717
extensions: simplexml
1818
- name: Checkout source code
1919
uses: actions/checkout@v2
@@ -49,7 +49,7 @@ jobs:
4949
- name: Setup PHP version
5050
uses: shivammathur/setup-php@v2
5151
with:
52-
php-version: '7.1'
52+
php-version: '7.4'
5353
extensions: simplexml, mysql
5454
tools: phpunit-polyfills
5555
- name: Checkout source code

classes/Visualizer/Module/Admin.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,58 +444,69 @@ public static function _getChartTypesLocalized( $enabledOnly = false, $get2Darra
444444
'enabled' => $enabled,
445445
// in ChartJS, the fill option is used to make Line chart an area: https://www.chartjs.org/docs/latest/charts/area.html
446446
'supports' => array( 'Google Charts' ),
447+
'demo_url' => 'https://demo.themeisle.com/visualizer/area-chart/',
447448
),
448449
'geo' => array(
449450
'name' => esc_html__( 'Geo', 'visualizer' ),
450451
'enabled' => $enabled,
451452
'supports' => array( 'Google Charts' ),
453+
'demo_url' => 'https://demo.themeisle.com/visualizer/geo-chart/',
452454
),
453455
'column' => array(
454456
'name' => esc_html__( 'Column', 'visualizer' ),
455457
'enabled' => $enabled,
456458
'supports' => array( 'Google Charts', 'ChartJS' ),
459+
'demo_url' => 'https://demo.themeisle.com/visualizer/column-chart/',
457460
),
458461
'bubble' => array(
459462
'name' => esc_html__( 'Bubble', 'visualizer' ),
460463
'enabled' => $enabled,
461464
// chartjs' bubble is ugly looking (and it won't work off the default bubble.csv) so it is being excluded for the time being.
462465
'supports' => array( 'Google Charts' ),
466+
'demo_url' => 'https://demo.themeisle.com/visualizer/bubble-chart/',
463467
),
464468
'scatter' => array(
465469
'name' => esc_html__( 'Scatter', 'visualizer' ),
466470
'enabled' => $enabled,
467471
'supports' => array( 'Google Charts' ),
472+
'demo_url' => 'https://demo.themeisle.com/visualizer/scatter-chart/',
468473
),
469474
'gauge' => array(
470475
'name' => esc_html__( 'Gauge', 'visualizer' ),
471476
'enabled' => $enabled,
472477
'supports' => array( 'Google Charts' ),
478+
'demo_url' => 'https://demo.themeisle.com/visualizer/gauge-chart/',
473479
),
474480
'candlestick' => array(
475481
'name' => esc_html__( 'Candlestick', 'visualizer' ),
476482
'enabled' => $enabled,
477483
'supports' => array( 'Google Charts' ),
484+
'demo_url' => 'https://demo.themeisle.com/visualizer/candlestick-chart/',
478485
),
479486
// pro types
480487
'timeline' => array(
481488
'name' => esc_html__( 'Timeline', 'visualizer' ),
482489
'enabled' => false,
483490
'supports' => array( 'Google Charts', 'ChartJS' ),
491+
'demo_url' => 'https://demo.themeisle.com/visualizer/timeline-chart/',
484492
),
485493
'combo' => array(
486494
'name' => esc_html__( 'Combo', 'visualizer' ),
487495
'enabled' => false,
488496
'supports' => array( 'Google Charts' ),
497+
'demo_url' => 'https://demo.themeisle.com/visualizer/combo-chart/',
489498
),
490499
'polarArea' => array(
491500
'name' => esc_html__( 'Polar Area', 'visualizer' ),
492501
'enabled' => false,
493502
'supports' => array( 'ChartJS' ),
503+
'demo_url' => 'https://demo.themeisle.com/visualizer/polar-area-chart/',
494504
),
495505
'radar' => array(
496506
'name' => esc_html__( 'Radar/Spider', 'visualizer' ),
497507
'enabled' => false,
498508
'supports' => array( 'ChartJS' ),
509+
'demo_url' => 'https://demo.themeisle.com/visualizer/radar-spider-chart/',
499510
),
500511
)
501512
);
@@ -731,7 +742,7 @@ public function handleGetProSubMenu() {
731742
font-weight: 600;
732743
color: #fff;
733744
}
734-
#toplevel_page_visualizer ul.wp-submenu li:last-child > a {
745+
#toplevel_page_visualizer ul.wp-submenu li:last-child > a > span {
735746
color: #fff !important;
736747
}
737748
#toplevel_page_visualizer ul.wp-submenu li:last-child > a:hover {
@@ -1134,7 +1145,7 @@ public function getPluginMetaLinks( $plugin_meta, $plugin_file ) {
11341145
// flattr link
11351146
$plugin_meta[] = sprintf(
11361147
'<a style="color:red" href="' . tsdk_utmify( Visualizer_Plugin::PRO_TEASER_URL, 'pluginrow' ) . '" target="_blank">%s</a>',
1137-
esc_html__( 'Pro Addon', 'visualizer' )
1148+
esc_html__( 'Get Visualizer Pro', 'visualizer' )
11381149
);
11391150
}
11401151

classes/Visualizer/Render/Library.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ private function _renderSidebar() {
450450
echo '<li><svg class="icon list-icon"><use xlink:href="#list-icon"></use></svg>' . __( '6 more chart types', 'visualizer' );
451451
} else {
452452
echo '<li><svg class="icon list-icon"><use xlink:href="#list-icon"></use></svg>' . __( '11 more chart types', 'visualizer' ) . '</li>';
453-
echo '<li><svg class="icon list-icon"><use xlink:href="#list-icon"></use></svg>' . __( 'Manual Data Editor', 'visualizer' ) . '</li>';
453+
echo '<li><svg class="icon list-icon"><use xlink:href="#list-icon"></use></svg>' . __( 'Synchronize Data Periodically', 'visualizer' ) . '</li>';
454454
echo '<li><svg class="icon list-icon"><use xlink:href="#list-icon"></use></svg>' . __( 'ChartJS Charts', 'visualizer' ) . '</li>';
455455
echo '<li><svg class="icon list-icon"><use xlink:href="#list-icon"></use></svg>' . __( 'Table Google chart', 'visualizer' ) . '</li>';
456456
echo '<li><svg class="icon list-icon"><use xlink:href="#list-icon"></use></svg>' . __( 'Frontend Actions(Print, Export, Copy, Download)', 'visualizer' ) . '</li>';
@@ -464,7 +464,7 @@ private function _renderSidebar() {
464464
echo '<li><svg class="icon list-icon"><use xlink:href="#list-icon"></use></svg>' . __( 'WPML support for translating charts', 'visualizer' ) . '</li>';
465465
echo '<li><svg class="icon list-icon"><use xlink:href="#list-icon"></use></svg>' . __( 'Integration with Woocommerce Data endpoints', 'visualizer' ) . '</li>';
466466
echo '<li><svg class="icon list-icon"><use xlink:href="#list-icon"></use></svg>' . __( 'Auto-sync with online files', 'visualizer' ) . '</li></ul>';
467-
echo '<p><a href="' . tsdk_utmify( Visualizer_Plugin::PRO_TEASER_URL, 'sidebarupsell' ) . '" target="_blank" class="button button-primary">' . __( 'View more features', 'visualizer' ) . '</a></p>';
467+
echo '<p class="vz-sidebar-box-action"><a href="' . tsdk_utmify( Visualizer_Plugin::PRO_TEASER_URL, 'sidebarMenuUpgrade', 'index' ) . '#pro-features" target="_blank" class="button button-secondary">' . __( 'View more features', 'visualizer' ) . '</a><a href="' . tsdk_utmify( Visualizer_Plugin::PRO_TEASER_URL, 'sidebarMenuUpgrade', 'index' ) . '#pricing" target="_blank" class="button button-primary">' . __( 'Upgrade Now', 'visualizer' ) . '</a></p>';
468468
echo '</div>';
469469
echo '</div>';
470470
echo '</div>';

classes/Visualizer/Render/Page/Types.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,12 @@ protected function _renderContent() {
6262
}
6363
echo '<div class="type-box type-box-', $type, $lib_classes, '">';
6464
if ( ! $array['enabled'] ) {
65-
echo "<a class='pro-upsell' href='" . tsdk_utmify( Visualizer_Plugin::PRO_TEASER_URL, 'charttypes' ) . "' target='_blank'>";
65+
$demo_url = isset( $array['demo_url'] ) ? $array['demo_url'] : '';
66+
echo '<div class="pro-upsell">';
6667
echo "<span class='visualizder-pro-label'>" . __( 'PREMIUM', 'visualizer' ) . '</span>';
68+
echo '<div class="pro-upsell-overlay">';
69+
echo '<div class="pro-upsell-action"><a href="' . esc_url( $demo_url ) . '" target="_blank" class="button button-secondary">' . __( 'View Demo', 'visualizer' ) . '</a><a href="' . tsdk_utmify( Visualizer_Plugin::PRO_TEASER_URL, 'procharts', 'Addnewcharts' ) . '" target="_blank" class="button button-primary">' . __( 'Upgrade Now', 'visualizer' ) . '</a></div>';
70+
echo '</div>';
6771
}
6872
echo '<label class="type-label', $type === $this->type ? ' type-label-selected' : '', '">';
6973
echo '<span>' . $array['name'] . '</span>';
@@ -72,7 +76,7 @@ protected function _renderContent() {
7276
}
7377
echo '</label>';
7478
if ( ! $array['enabled'] ) {
75-
echo '</a>';
79+
echo '</div>';
7680
}
7781
echo '</div>';
7882
}

css/frame.css

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ div.viz-group-content .viz-group-description {
535535
height: 17px;
536536
border: none;
537537
color: #fff;
538-
z-index: 1;
538+
z-index: 4;
539539
background: #c55555;
540540
}
541541

@@ -1633,3 +1633,50 @@ canvas.chartjs-render-monitor {
16331633
#vz-frontend-actions .only-pro-inner, #vz-data-controls .only-pro-inner {
16341634
text-align: center;
16351635
}
1636+
1637+
/******************************************************************************/
1638+
/******************************** chart type box upsell ***********************/
1639+
/******************************************************************************/
1640+
1641+
.pro-upsell .pro-upsell-overlay {
1642+
position: absolute;
1643+
width: 100%;
1644+
height: 100%;
1645+
left: 0;
1646+
top: 0;
1647+
display: grid;
1648+
place-items: center;
1649+
background-color: rgba(255, 255, 255, 0.7);
1650+
z-index: 1;
1651+
opacity: 0;
1652+
visibility: hidden;
1653+
transition: all .3s ease-in-out;
1654+
}
1655+
.pro-upsell:hover .pro-upsell-overlay{
1656+
opacity: 1;
1657+
visibility: visible;
1658+
}
1659+
1660+
.pro-upsell .pro-upsell-overlay .button {
1661+
width: 155px;
1662+
height: 39px;
1663+
background: #007CBA;
1664+
border-radius: 4px;
1665+
display: flex;
1666+
align-items: center;
1667+
text-align: center;
1668+
color: #FFFFFF;
1669+
justify-content: center;
1670+
}
1671+
.pro-upsell .pro-upsell-overlay .button.button-secondary{
1672+
background: #ffffff;
1673+
color: #007CBA;
1674+
}
1675+
.pro-upsell .pro-upsell-overlay .pro-upsell-action {
1676+
display: flex;
1677+
gap: 20px;
1678+
}
1679+
.pro-upsell .pro-upsell-overlay .pro-upsell-action .button{
1680+
width: 100%;
1681+
text-align: center;
1682+
}

css/library.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,10 @@
252252
color: #FFFFFF;
253253
justify-content: center;
254254
}
255+
.visualizer-sidebar-box .button.button-secondary{
256+
background: #ffffff;
257+
color: #007CBA;
258+
}
255259
.visualizer-sidebar-box .we-offer{
256260
background-color: transparent;
257261
color: #007CBA;
@@ -382,6 +386,15 @@ input:checked + .visualizer-slider:before {
382386
#visualizer-sidebar .visualizer-sidebar-box p {
383387
margin-bottom: 0;
384388
}
389+
#visualizer-sidebar .visualizer-sidebar-box p.vz-sidebar-box-action {
390+
display: flex;
391+
gap: 20px;
392+
margin-top: 25px;
393+
}
394+
#visualizer-sidebar .visualizer-sidebar-box p.vz-sidebar-box-action .button{
395+
width: 100%;
396+
text-align: center;
397+
}
385398
#visualizer-sidebar.one-columns {
386399
border-top: 5px solid #007CBA;
387400
}

index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ function() {
157157
'location' => 'visualizer',
158158
'has_upgrade_menu' => ! Visualizer_Module::is_pro(),
159159
'upgrade_text' => esc_html__( 'Get Visualizer Pro', 'feedzy-rss-feeds' ),
160-
'upgrade_link' => esc_url( tsdk_utmify( Visualizer_Plugin::PRO_TEASER_URL, 'sidebarMenuUpgrade' ) ),
160+
'upgrade_link' => esc_url( tsdk_utmify( Visualizer_Plugin::PRO_TEASER_URL, 'sidebarMenuUpgrade', 'index' ) ),
161161
);
162162
}
163163
);

phpcs.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<exclude-pattern>node_modules/*</exclude-pattern>
88
<exclude-pattern>vendor/*</exclude-pattern>
99
<exclude-pattern>lib/*</exclude-pattern>
10+
<exclude-pattern>tests/*</exclude-pattern>
1011
<rule ref="WordPress-Core">
1112
<exclude name="Squiz.Commenting.FileComment.SpacingAfterComment" />
1213
<exclude name="Generic.Files.LowercasedFilename" />

tests/test-ajax.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class Test_Visualizer_Ajax extends WP_Ajax_UnitTestCase {
3737
/**
3838
* Set up.
3939
*/
40-
public function setUp() {
40+
public function setUp(): void {
4141
parent::setUp();
4242
$this->admin_user_id = $this->factory->user->create(
4343
array(

0 commit comments

Comments
 (0)