admin
2 years ago
core
2 years ago
class-activator.php
3 years ago
class-assets.php
2 years ago
class-builder-page.php
3 years ago
class-deactivator.php
3 years ago
class-debug-info.php
2 years ago
class-feed-ajax.php
2 years ago
class-feed-block.php
2 years ago
class-feed-deserializer.php
2 years ago
class-feed-old.php
4 years ago
class-feed-page.php
3 years ago
class-feed-serializer.php
3 years ago
class-feed-shortcode.php
3 years ago
class-feed-widget.php
4 years ago
class-plugin-overview-ajax.php
3 years ago
class-plugin-overview.php
3 years ago
class-plugin-settings.php
2 years ago
class-plugin-support.php
3 years ago
class-plugin.php
2 years ago
class-post-types.php
3 years ago
class-reviews-cron.php
2 years ago
class-settings-save.php
3 years ago
class-view.php
2 years ago
index.php
4 years ago
page-setting-fig.php
3 years ago
page-setting-support.php
4 years ago
class-feed-page.php
29 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WP_Rplg_Google_Reviews\Includes; |
| 4 | |
| 5 | class Feed_Page { |
| 6 | |
| 7 | private $feed_deserializer; |
| 8 | |
| 9 | public function __construct(Feed_Deserializer $feed_deserializer) { |
| 10 | $this->feed_deserializer = $feed_deserializer; |
| 11 | } |
| 12 | |
| 13 | public function register() { |
| 14 | add_filter('views_edit-' . Post_Types::FEED_POST_TYPE, array($this, 'render'), 20); |
| 15 | } |
| 16 | |
| 17 | public function render() { |
| 18 | $feed_count = $this->feed_deserializer->get_feed_count(); |
| 19 | ?> |
| 20 | <div class="grw-admin-feeds"> |
| 21 | <a class="button button-primary" href="<?php echo admin_url('admin.php'); ?>?page=grw-builder">Create Widget</a> |
| 22 | <?php if ($feed_count < 1) { ?> |
| 23 | <h3 style="display:inline;vertical-align:middle;"> - First of all, create a widget to connect and show Google reviews through a shortcode or sidebar widget</h3> |
| 24 | <?php } ?> |
| 25 | </div> |
| 26 | <?php |
| 27 | } |
| 28 | } |
| 29 |