obj = $that; $request_uri = !empty($_SERVER['REQUEST_URI']) ? sanitize_text_field(wp_unslash($_SERVER['REQUEST_URI'])) : ''; if ( strpos($request_uri, "plugins.php") !== FALSE ) { $this->enqueue_scripts(); add_action('admin_footer', array( $this, 'content' )); } add_filter('plugin_action_links_' . $this->obj->main_file, array( $this, 'action_links' )); add_filter("plugin_row_meta", array($this, 'meta_links'), 10, 2); } public function content() { $reasons = [ 1 => __("It is hard to use", "regallery"), 2 => __("I didn't find the features I needed", "regallery"), 3 => __("It's a temporary deactivation", "regallery"), 4 => __("I'd like someone from the Re Gallery team to contact me", "regallery"), ]; $current_user = wp_get_current_user(); $email = $current_user->exists() ? $current_user->user_email : ""; ?>
obj->prefix . '_deactive', $this->obj->plugin_url . '/assets/css/deactivation.css', [], $this->obj->version); wp_enqueue_script($this->obj->prefix . '_deactive', $this->obj->plugin_url . '/assets/js/deactivation.js', ['jquery'], $this->obj->version, TRUE); wp_localize_script($this->obj->prefix . '_deactive', 'reacg_deactivation', array( 'core_rest_url_v2' => $this->obj->core_rest_url_v2, )); } /** * Add the plugin meta links. * * @param $meta_fields * @param $file * * @return mixed */ public function meta_links($meta_fields, $file) { if ( $this->obj->main_file === $file ) { $meta_fields[] = "" . esc_html__('Ask a question', 'regallery') . ""; $rating = ""; $rating .= str_repeat("", 5); $rating .= ""; $meta_fields[] = $rating; } return $meta_fields; } /** * Add action links to the plugin. * * @param $links * * @return array */ function action_links( $links ) { $additional_links = [ " 'plugins_list', 'utm_campaign' => 'faq'], REACG_WEBSITE_URL_UTM . '#faq')) . "' target='_blank'>" . esc_html__('FAQ', 'regallery') . "", "" . esc_html__('Help', 'regallery') . "", !REACG_PLAYGROUND ? " 'plugins_list', 'utm_campaign' => 'upgrade'], REACG_PRICING_URL_UTM)) . "' target='_blank' class='reacg-upgrade reacg-hidden'>" . REACG_BUY_NOW_TEXT . "" : "", ]; return array_merge( $links, $additional_links ); } }