class-admin.php
3 months ago
class-columns-modal.php
1 month ago
class-columns.php
2 weeks ago
class-counter.php
2 months ago
class-crawler-detect.php
7 months ago
class-cron.php
1 month ago
class-dashboard.php
1 month ago
class-emails-mailer.php
1 month ago
class-emails-period.php
1 month ago
class-emails-query.php
1 month ago
class-emails-scheduler.php
1 month ago
class-emails-template.php
1 month ago
class-emails.php
1 month ago
class-frontend.php
2 weeks ago
class-functions.php
1 year ago
class-import.php
2 months ago
class-integration-gutenberg.php
6 months ago
class-integrations.php
2 months ago
class-query.php
2 months ago
class-settings-api.php
1 month ago
class-settings-display.php
4 months ago
class-settings-emails.php
1 month ago
class-settings-general.php
1 month ago
class-settings-integrations.php
5 months ago
class-settings-other.php
1 month ago
class-settings-reports.php
1 month ago
class-settings.php
1 month ago
class-toolbar.php
3 months ago
class-traffic-signals.php
2 months ago
class-update.php
1 month ago
class-widgets.php
1 month ago
functions.php
1 month ago
class-settings-reports.php
67 lines
| 1 | <?php |
| 2 | // exit if accessed directly |
| 3 | if ( ! defined( 'ABSPATH' ) ) |
| 4 | exit; |
| 5 | |
| 6 | /** |
| 7 | * Post_Views_Counter_Settings_Reports class. |
| 8 | * |
| 9 | * @class Post_Views_Counter_Settings_Reports |
| 10 | */ |
| 11 | class Post_Views_Counter_Settings_Reports { |
| 12 | |
| 13 | private $pvc; |
| 14 | |
| 15 | /** |
| 16 | * Class constructor. |
| 17 | * |
| 18 | * @return void |
| 19 | */ |
| 20 | public function __construct() { |
| 21 | $this->pvc = Post_Views_Counter(); |
| 22 | } |
| 23 | |
| 24 | /** |
| 25 | * Get sections for reports tab. |
| 26 | * |
| 27 | * @return array |
| 28 | */ |
| 29 | public function get_sections() { |
| 30 | return [ |
| 31 | 'post_views_counter_reports_settings' => [ |
| 32 | 'tab' => 'reports', |
| 33 | 'callback' => [ $this, 'section_reports_placeholder' ] |
| 34 | ] |
| 35 | ]; |
| 36 | } |
| 37 | |
| 38 | /** |
| 39 | * Get fields for reports tab. |
| 40 | * |
| 41 | * @return array |
| 42 | */ |
| 43 | public function get_fields() { |
| 44 | return []; |
| 45 | } |
| 46 | |
| 47 | /** |
| 48 | * Reports page placeholder. |
| 49 | */ |
| 50 | public function section_reports_placeholder() { |
| 51 | echo ' |
| 52 | <form action="#"> |
| 53 | <div id="pvc-reports-placeholder"> |
| 54 | <img id="pvc-reports-bg" src="' . esc_url( POST_VIEWS_COUNTER_URL ) . '/css/page-reports.png" alt="Post Views Counter - Reports" /> |
| 55 | <div id="pvc-reports-upgrade"> |
| 56 | <div id="pvc-reports-modal"> |
| 57 | <h2>' . esc_html__( 'Display Reports and Export Views to CSV/XML', 'post-views-counter' ) . '</h2> |
| 58 | <p>' . esc_html__( 'View detailed stats about the popularity of your content.', 'post-views-counter' ) . '</p> |
| 59 | <p>' . esc_html__( 'Generate views reports in any date range you need.', 'post-views-counter' ) . '</p> |
| 60 | <p>' . esc_html__( 'Export, download and share your website views data.', 'post-views-counter' ) . '</p> |
| 61 | <p><a href="' . esc_url( $this->pvc->get_postviewscounter_url( '/upgrade/', 'button', 'upgrade-to-pro', 'reports-placeholder-upgrade-button', 'free' ) ) . '" class="button button-secondary button-hero pvc-button" target="_blank">' . esc_html__( 'Upgrade to Pro', 'post-views-counter' ) . '</a></p> |
| 62 | </div> |
| 63 | </div> |
| 64 | </div> |
| 65 | </form>'; |
| 66 | } |
| 67 | } |