| 1 |
<?php |
| 2 |
|
| 3 |
namespace MasterAddons\Inc\Classes\Notifications; |
| 4 |
|
| 5 |
defined('ABSPATH') || exit; |
| 6 |
|
| 7 |
use MasterAddons\Inc\Classes\Notifications\Model\Notice; |
| 8 |
|
| 9 |
if (!class_exists('Ask_For_Rating')) { |
| 10 |
/** |
| 11 |
* Ask For Rating Class |
| 12 |
* |
| 13 |
* Jewel Theme <[email protected]> |
| 14 |
*/ |
| 15 |
class Ask_For_Rating extends Notice |
| 16 |
{ |
| 17 |
|
| 18 |
/** |
| 19 |
* Notice Content |
| 20 |
* |
| 21 |
* @author Jewel Theme <[email protected]> |
| 22 |
*/ |
| 23 |
public function notice_content() |
| 24 |
{ |
| 25 |
printf( |
| 26 |
'<h2 style="margin:0">Enjoying %1$s?</h2><p>%2$s</p>', |
| 27 |
esc_html__('Master Addons', 'master-addons'), |
| 28 |
wp_kses( __('A positive rating will keep us motivated to continue supporting and improving this free plugin, and will help spread its popularity.<br> Your help is greatly appreciated!', 'master-addons'), array( 'br' => array() ) ) |
| 29 |
); |
| 30 |
} |
| 31 |
|
| 32 |
/** |
| 33 |
* Rate Plugin URL |
| 34 |
* |
| 35 |
* @author Jewel Theme <[email protected]> |
| 36 |
*/ |
| 37 |
public function plugin_rate_url() |
| 38 |
{ |
| 39 |
return 'https://wordpress.org/support/plugin/master-addons/reviews/'; |
| 40 |
} |
| 41 |
|
| 42 |
/** |
| 43 |
* Footer content |
| 44 |
* |
| 45 |
* @author Jewel Theme <[email protected]> |
| 46 |
*/ |
| 47 |
public function footer_content() |
| 48 |
{ |
| 49 |
?> |
| 50 |
<a class="button button-primary rate-plugin-button" href="<?php echo esc_url($this->plugin_rate_url()); ?>" rel="nofollow" target="_blank"> |
| 51 |
<?php echo esc_html__('Rate Now', 'master-addons'); ?> |
| 52 |
</a> |
| 53 |
<a class="button notice-review-btn review-later jltma-notice-dismiss" href="#" rel="nofollow"> |
| 54 |
<?php echo esc_html__('Later', 'master-addons'); ?> |
| 55 |
</a> |
| 56 |
<a class="button notice-review-btn review-done jltma-notice-disable" href="#" rel="nofollow"> |
| 57 |
<?php echo esc_html__('I already did', 'master-addons'); ?> |
| 58 |
</a> |
| 59 |
<?php |
| 60 |
} |
| 61 |
|
| 62 |
/** |
| 63 |
* Intervals |
| 64 |
* |
| 65 |
* @author Jewel Theme <[email protected]> |
| 66 |
*/ |
| 67 |
public function intervals() |
| 68 |
{ |
| 69 |
return array(7, 11, 15, 15, 10, 20, 25, 30); |
| 70 |
} |
| 71 |
} |
| 72 |
} |
| 73 |
|