Server IP : 192.158.238.246 / Your IP : 216.73.216.60 Web Server : LiteSpeed System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64 User : jenniferflocom ( 1321) PHP Version : 8.1.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/7779/root/proc/7779/cwd/plugins/give/src/Promotions/InPluginUpsells/ |
Upload File : |
<?php namespace Give\Promotions\InPluginUpsells; use Give\Helpers\EnqueueScript; use Give\Helpers\Utils; class LegacyFormEditor { /** * Load scripts * * @since 2.27.1 */ public function loadScripts() { $data = [ 'apiRoot' => esc_url_raw(rest_url('give-api/v2')), 'apiNonce' => wp_create_nonce('wp_rest'), ]; EnqueueScript::make( 'give-in-plugin-upsells-legacy-form-editor', 'assets/dist/js/donation-options.js' ) ->loadInFooter() ->registerTranslations() ->registerLocalizeData('GiveLegacyFormEditor', $data) ->enqueue(); } /** * * @since 2.27.1 * */ public function renderDonationOptionsRecurringRecommendation() { $isDismissed = get_option('givewp_form_editor_donation_options_recurring_recommendation', false); $recurringAddonIsActive = Utils::isPluginActive('give-recurring/give-recurring.php'); if ($recurringAddonIsActive | $isDismissed) { return; } require_once GIVE_PLUGIN_DIR . 'src/Promotions/InPluginUpsells/resources/views/donation-options-form-editor.php'; } /** * @since 3.2.1 replaced logic to be give_forms post_type specific * @since 2.27.1 */ public static function isShowing(): bool { global $post, $pagenow; return $post && in_array($pagenow, ['post-new.php', 'post.php'], true) && 'give_forms' === get_post_type($post); } }