Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter kytor

    (@kytor)

    Update, deleting the plugin and reinstalling it resolved the issue.

    Thread Starter kytor

    (@kytor)

    Changed the function at line 40 of class-visody-options-pages.php to the following, which fixed the error in the Appearance page. However, Viewer Control buttons in the gallery viewport still do not work.

        function body() {
            $option_group = $this->options[ 'id' ];
            ?><div class="wrap">
            <h1><?php echo esc_attr( $this->options['title'] ); ?></h1>
            <form method="POST" action="options.php">
                <?php
                    if ( isset( $this->options['tabs'] ) && is_array( $this->options['tabs'] ) && !empty( $this->options['tabs'] ) ) {
    
                        // print tabs
                        $tabs = wp_list_pluck( $this->options[ 'tabs' ], 'name' );
                        $current = isset( $_GET['tab'] ) && in_array( sanitize_key( $_GET['tab'] ), array_map( 'sanitize_key', $tabs ) )
                            ? sanitize_key( $_GET['tab'] )
                            : sanitize_key( $tabs[0] );
                        $option_group = $option_group . $current;
                        ?>
                        <nav class="nav-tab-wrapper">
                            <?php
                            foreach( $tabs as $name ){
                                $slug = sanitize_key( $name );
                                ?>
                                <a class="nav-tab<?php echo $slug === $current ? ' nav-tab-active' : '' ?>" href="<?php echo add_query_arg( array( 'page' => $this->options[ 'id' ], 'post_type' => $this->options[ 'post_type' ], 'tab' => $slug ), '' ) ?>"><?php echo $name ?></a>
                                <?php
                            }
                            ?>
                        </nav>
                        <?php
                    }
                    settings_fields( $option_group );
                    do_settings_sections( $option_group );
                    submit_button();
                ?>
            </form>
            <script>
                jQuery(document).ready(function($) {
                    $('.color-picker').each(function(){
                        $(this).wpColorPicker();
                    });
                });
            </script>
            </div>
            <?php
        }
Viewing 2 replies - 1 through 2 (of 2 total)