Skip to content

Commit

Permalink
release: fixes
Browse files Browse the repository at this point in the history
- Added About Us page integration
- Updated dependencies
  • Loading branch information
vytisbulkevicius authored Jun 5, 2023
2 parents 7133b29 + 68907f1 commit f45ede4
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 57 deletions.
44 changes: 17 additions & 27 deletions classes/Visualizer/Module/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -689,53 +689,43 @@ public function registerAdminMenu() {
array( $this, 'renderSupportPage' )
);

if ( ! Visualizer_Module::is_pro() ) {
add_submenu_page(
Visualizer_Plugin::NAME,
__( 'Get Visualizer Pro', 'visualizer' ),
__( 'Get Visualizer Pro', 'visualizer' ),
'edit_posts',
'viz-get-pro',
'__return_null'
);
add_action( 'admin_footer', array( $this, 'handleGetProSubMenu' ) );
}
remove_submenu_page( Visualizer_Plugin::NAME, Visualizer_Plugin::NAME );

add_action( "load-{$this->_libraryPage}", array( $this, 'addScreenOptions' ) );
add_action( 'admin_footer', array( $this, 'handleGetProSubMenu' ) );
}

/**
* Handle get pro plugin submenu.
*/
public function handleGetProSubMenu() {
?>
if ( ! Visualizer_Module::is_pro() ) {
?>
<style type="text/css">
#toplevel_page_visualizer ul.wp-submenu li.wp-first-item + li + li + li {
#toplevel_page_visualizer ul.wp-submenu li:last-child {
background: #FF7E65;
font-size: 14px;
font-weight: 600;
color: #fff;
}
#toplevel_page_visualizer ul.wp-submenu li.wp-first-item + li + li + li > a {
#toplevel_page_visualizer ul.wp-submenu li:last-child > a {
color: #fff !important;
}
#toplevel_page_visualizer ul.wp-submenu li.wp-first-item + li + li + li > a:hover {
#toplevel_page_visualizer ul.wp-submenu li:last-child > a:hover {
box-shadow: inherit;
}
#toplevel_page_visualizer ul.wp-submenu li.wp-first-item + li + li + li + li {
display: none;
}
</style>
<script type="text/javascript">
jQuery( document ).ready( function() {
jQuery( '#toplevel_page_visualizer' ).on( 'click', 'li:not(.wp-submenu-head, .wp-first-item):eq(2)', function( e ) {
e.preventDefault();
window.open( '<?php echo tsdk_utmify( 'https://themeisle.com/plugins/visualizer-charts-and-graphs/upgrade/', 'toplevel' ); ?>', '_blank' );
} );
} );
</script>
<?php
<?php
if ( get_option( 'visualizer_fresh_install', false ) ) {
?>
<style type="text/css">
#toplevel_page_visualizer ul.wp-submenu li.wp-first-item + li + li + li {
display: none;
}
</style>
<?php
}
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"source": "https://github.com/Codeinwp/visualizer"
},
"require": {
"codeinwp/themeisle-sdk": "^3.2",
"codeinwp/themeisle-sdk": "^3.3",
"phpoffice/phpspreadsheet": "1.8.2",
"neitanod/forceutf8": "~2.0"
},
Expand Down
35 changes: 7 additions & 28 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Author: Themeisle
Author URI: http://themeisle.com
Requires at least: 3.5
Tested up to: 5.6
Tested up to: 5.6
License: GPL v2.0 or later
WordPress Available: yes
Requires License: no
Expand Down Expand Up @@ -147,6 +147,18 @@ function visualizer_launch() {
return $compatibilities;
}
);
add_filter(
'visualizer_about_us_metadata',
function() {
return array(
'logo' => esc_url( VISUALIZER_ABSURL . 'images/visualizer-logo.svg' ),
'location' => 'visualizer',
'has_upgrade_menu' => ! Visualizer_Module::is_pro(),
'upgrade_text' => esc_html__( 'Get Visualizer Pro', 'feedzy-rss-feeds' ),
'upgrade_link' => esc_url( tsdk_utmify( Visualizer_Plugin::PRO_TEASER_URL, 'aboutUsPage' ) ),
);
}
);
}

/**
Expand Down

0 comments on commit f45ede4

Please sign in to comment.