{product} active for a few days now. How is everything going? If you can spare a few moments to rate it on WordPress.org it would help us a lot (and boost my motivation). Cheers!
~ {developer}, developer of {product}';
/**
* @var string $msg The text of the modal
*/
private $msg = '';
/**
* @var string $button_cancel The text of the cancel button
*/
private $button_cancel = 'No, thanks.';
/**
* @var array Developers who work for each type of product for review purpose.
*/
private $developers = array(
'plugin' => array( 'Marius', 'Bogdan' ),
'theme' => array( 'Rodica', 'Andrei', 'Bogdan', 'Cristi' ),
);
/**
* @var string $button_already The text of the already did it button
*/
private $button_do = 'Ok, I will gladly help.';
/**
* ThemeIsle_SDK_Feedback_Deactivate constructor.
*
* @param ThemeIsle_SDK_Product $product_object The product object.
*/
public function __construct( $product_object ) {
parent::__construct( $product_object );
}
/**
* Registers the hooks
*/
public function setup_hooks_child() {
add_action( 'wp_ajax_' . $this->product->get_key() . __CLASS__, array( $this, 'dismiss' ) );
}
/**
* Either we can notify or not.
*
* @return bool Notification available or not.
*/
public function can_notify() {
if ( ! $this->product->is_wordpress_available() ) {
$this->disable();
return false;
}
$show = get_option( $this->product->get_key() . '_review_flag', 'yes' );
if ( 'no' === $show ) {
return false;
}
$finally_show = apply_filters( $this->product->get_key() . '_feedback_review_trigger', true );
if ( false !== $finally_show ) {
if ( is_array( $finally_show ) && ! empty( $finally_show ) ) {
$this->heading = $finally_show['heading'];
$this->msg = $finally_show['msg'];
}
} else {
return false;
}
return true;
}
/**
* Shows the notification
*/
function show_notification() {
add_action( 'admin_notices', array( $this, 'admin_notices' ) );
}
/**
* Shows the admin notice
*/
function admin_notices() {
$id = $this->product->get_key() . '_review';
$this->add_css( $this->product->get_key() );
$this->add_js( $this->product->get_key() );
echo '
' . $heading . '
' . ( $msg ? '' . $msg . '
' : '' ) . '