primary_label = esc_html__( 'Paystack', 'charitable' ); add_action( 'charitable_campaign_builder_payment_sidebar', array( $this, 'sidebar_tab' ) ); add_action( 'charitable_campaign_builder_payment_panels', array( $this, 'panel_content' ) ); } /** * Generate sidebar html. * * @since 1.8.0 * @version 1.8.1.12 Added logic to show popup message if user is on lite version. */ public function sidebar_tab() { $not_available = ! charitable_is_pro() && $this->not_available_for_lite ? 'charitable-not-available' : ''; $css_class = ( '' === $not_available && true === apply_filters( 'charitable_campaign_builder_marketing_sidebar_active', $this->active, esc_attr( $this->slug ) ) ) ? 'active' : $not_available; $data_name = esc_html__( 'ability to use', 'charitable' ) . ' ' . $this->primary_label; echo '' . '' . esc_html( $this->primary_label ) . ' '; } /** * Generate panel content. * * @since 1.8.0 * @since 1.8.1.4 - Added logic to check if the plugin/addon is activated and display the appropriate content. * * @return void */ public function panel_content() { $active = ( true === apply_filters( 'charitable_campaign_builder_settings_sidebar_active', $this->active, esc_attr( $this->slug ) ) ) ? 'active' : false; $style = ( true === apply_filters( 'charitable_campaign_builder_settings_sidebar_active', $this->active, esc_attr( $this->slug ) ) ) ? 'display: block;' : false; $panel = new Charitable_Builder_Panel_Payment(); $button_url = admin_url( 'admin.php?page=charitable-settings&tab=gateways' ); $button_label = esc_html__( 'View Gateway Settings', 'charitable' ); // Set the default URL and label for the button. $button_info = $panel->get_gateway_button_info( $this->provider_slug, $button_url, $button_label ); $button_url = $button_info['button_url']; $button_label = $button_info['button_label']; $slug = esc_attr( $this->slug ); $status = $panel->check_plugin_status( $this->needed_addon_url ); ob_start(); ?>
primary_label ); ?>
plugin_activated_text( $this->primary_label, esc_attr( $this->slug ), $this->needed_addon_name, $button_label, $button_url, $this->needed_addon_url ); } elseif ( charitable_is_pro() && 'installed' === $status ) { // plugin is installed but not activated so proceed with displaying... $panel->plugin_installed_text( $this->primary_label, esc_attr( $this->slug ), $this->needed_addon_name, $button_label, $button_url, $this->needed_addon_url ); } else { // somehow if the user gets here, present the educational content. $panel->plugin_installed_text( $this->primary_label, esc_attr( $this->slug ), $this->needed_addon_name, $button_label, $button_url, $this->needed_addon_url ); } ?>