PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.2.0
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.2.0
4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 3.10.4 All 148 releases
← All changes | classes/Visualizer/Module/Admin.php +8 -6 3.1.23.2.0 View file →
@@ -132,8 +132,9 @@
132 132 *
133 133 * @access public
134 134 */
135 135 public function init() {
136 + // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
136 137 if ( current_user_can( 'edit_posts' ) && current_user_can( 'edit_pages' ) && 'true' == get_user_option( 'rich_editing' ) ) {
137 138 $this->_addFilter( 'mce_external_languages', 'add_tinymce_lang', 10, 1 );
138 139 $this->_addFilter( 'mce_external_plugins', 'tinymce_plugin', 10, 1 );
139 140 $this->_addFilter( 'mce_buttons', 'register_mce_button', 10, 1 );
@@ -464,9 +465,9 @@
464 465 * @access public
465 466 */
466 467 public function renderTemplates() {
467 468 global $pagenow;
468 - if ( 'post.php' != $pagenow && 'post-new.php' != $pagenow ) {
469 + if ( 'post.php' !== $pagenow && 'post-new.php' !== $pagenow ) {
469 470 return;
470 471 }
471 472 $render = new Visualizer_Render_Templates();
472 473 $render->render();
@@ -484,9 +485,9 @@
484 485 *
485 486 * @param string $suffix The current page suffix.
486 487 */
487 488 public function enqueueLibraryScripts( $suffix ) {
488 - if ( $suffix == $this->_libraryPage ) {
489 + if ( $suffix === $this->_libraryPage ) {
489 490 wp_enqueue_style( 'visualizer-library', VISUALIZER_ABSURL . 'css/library.css', array(), Visualizer_Plugin::VERSION );
490 491 $this->_addFilter( 'media_upload_tabs', 'setupVisualizerTab' );
491 492 wp_enqueue_media();
492 493 wp_enqueue_script(
@@ -578,9 +579,9 @@
578 579 'paged' => $page,
579 580 );
580 581 // add chart type filter to the query arguments
581 582 $filter = filter_input( INPUT_GET, 'type' );
582 - if ( $filter && in_array( $filter, Visualizer_Plugin::getChartTypes() ) ) {
583 + if ( $filter && in_array( $filter, Visualizer_Plugin::getChartTypes(), true ) ) {
583 584 $query_args['meta_query'] = array(
584 585 array(
585 586 'key' => Visualizer_Plugin::CF_CHART_TYPE,
586 587 'value' => $filter,
@@ -630,9 +631,9 @@
630 631 )
631 632 );
632 633 // add chart type filter to the query arguments
633 634 $filter = filter_input( INPUT_GET, 'type' );
634 - if ( ! ( $filter && in_array( $filter, Visualizer_Plugin::getChartTypes() ) ) ) {
635 + if ( ! ( $filter && in_array( $filter, Visualizer_Plugin::getChartTypes(), true ) ) ) {
635 636 $filter = 'all';
636 637 }
637 638
638 639 $css = '';
@@ -704,8 +705,9 @@
704 705 $ajaxurl
705 706 ),
706 707 ),
707 708 'page_type' => 'library',
709 + 'is_front' => false,
708 710 )
709 711 );
710 712 // render library page
711 713 $render = new Visualizer_Render_Library();
@@ -737,9 +739,9 @@
737 739 *
738 740 * @return array Updated array of action links.
739 741 */
740 742 public function getPluginActionLinks( $links, $file ) {
741 - if ( $file == plugin_basename( VISUALIZER_BASEFILE ) ) {
743 + if ( $file === plugin_basename( VISUALIZER_BASEFILE ) ) {
742 744 array_unshift(
743 745 $links,
744 746 sprintf(
745 747 '<a href="%s">%s</a>',
@@ -764,9 +766,9 @@
764 766 *
765 767 * @return array Updated array of plugin meta links.
766 768 */
767 769 public function getPluginMetaLinks( $plugin_meta, $plugin_file ) {
768 - if ( $plugin_file == plugin_basename( VISUALIZER_BASEFILE ) ) {
770 + if ( $plugin_file === plugin_basename( VISUALIZER_BASEFILE ) ) {
769 771 // knowledge base link
770 772 $plugin_meta[] = sprintf(
771 773 '<a href="https://github.com/codeinwp/visualizer/wiki" target="_blank">%s</a>',
772 774 esc_html__( 'Knowledge Base', 'visualizer' )