OwlCyberSecurity - MANAGER
Edit File: widget.php
<?php /** * Widget view. * * @var array $data settings. */ if ( ! defined( 'WPINC' ) ) { die; } if ( ! is_array( $data ) ) { $data = array(); } $advices = isset( $data['advices'] ) ? $data['advices'] : array(); $compatible = isset( $data['compatible'] ) ? $data['compatible'] : false; ?> <div class="cl-smart-advice" data-smart-advice-page="widget"> <div class="cl-smart-advice__offer"><?php echo esc_html( 'AccelerateWP helps to solve performance issues of your website. It includes Optimization Modules that can be activated for WP sites easily.' ); ?></div> <?php if ( false === $compatible ) : ?> <p> <?php echo esc_html( 'Advice management requires php function "stream_socket_client".' ); ?><br> </p> <?php elseif ( empty( $advices ) ) : ?> <p> <?php echo esc_html( 'Advices not found.' ); ?><br> </p> <?php else : ?> <p><a href="<?php echo esc_attr( admin_url( 'options-general.php?page=' . CL_SMART_ADVICE_SLUG ) ); ?>"><?php echo esc_html( 'Learn more' ); ?></a></p> <table class="cl-smart-advice__table cl-smart-advice__table_borderless"> <tr> <th><?php echo esc_html( 'Advice' ); ?></th> <th></th> </tr> <?php foreach ( $advices as $advice ) : ?> <tr data-smart-advice="<?php echo esc_attr( $advice->id ); ?>" data-status="<?php echo esc_attr( $advice->status ); ?>"> <td> <div class="cl-smart-advice__content"> <div class="cl-smart-advice__description"><?php echo esc_html( $advice->description ); ?></div> <div data-for-status="pending"> <div class="cl-smart-advice__progress"> <div class="cl-smart-advice__spinner" data-smart-advice="spinner" data-percent="<?php echo esc_attr( $advice->spinnerPercent() ); ?>"></div> <div class="cl-smart-advice__percent"> <span data-smart-advice="percent"><?php echo esc_attr( $advice->stagePercent() ); ?></span>% </div> </div> </div> <div data-for-status="review,applied"> <div class="cl-smart-advice__status" data-smart-advice="status"><?php echo esc_html( $advice->status ); ?></div> </div> </div> </td> <td> <div class="cl-smart-advice__action"> <a href="<?php echo esc_attr( admin_url( 'options-general.php?page=' . CL_SMART_ADVICE_SLUG ) ); ?>"><?php echo esc_html( 'See advice' ); ?></a> </div> </td> </tr> <?php endforeach; ?> </table> <?php endif; ?> </div>