| @@ -1,115 +1,114 @@ | ||
| 1 | -<?php | |
| 2 | -if (!defined('ABSPATH')) exit; // Exit if accessed directly | |
| 3 | -define('openaiaddon_LICENSING_PLUGIN_SLUG', 'chatbot-openai-addon/qcld-bot-openai.php'); | |
| 4 | -define('openaiaddon_LICENSING_PLUGIN_NAME', 'chatbot-openai-addon'); | |
| 5 | -define('openaiaddon_LICENSING_DIR', plugin_dir_path(__DIR__)); | |
| 6 | -define('openaiaddon_LICENSING_URL', plugin_dir_url( __FILE__ )); | |
| 7 | -define('openaiaddon_LICENSING_REMOTE_PATH', 'https://www.ultrawebmedia.com/li/plugins/chatbot-openai-addon/update.php'); | |
| 8 | -define('openaiaddon_LICENSING_PRODUCT_DEV_URL', 'https://quantumcloud.com/products/'); | |
| 9 | - | |
| 10 | -//start new-update-for-codecanyon | |
| 11 | -define('openaiaddon_ENVATO_PLUGIN_ID', -1); | |
| 12 | -//end new-update-for-codecanyon | |
| 13 | - | |
| 14 | -function get_openaiaddon_licensing_plugin_data(){ | |
| 15 | - include_once(ABSPATH.'wp-admin/includes/plugin.php'); | |
| 16 | - return get_plugin_data(openaiaddon_LICENSING_DIR.'/qcld-bot-openai.php', false); | |
| 17 | -} | |
| 18 | - | |
| 19 | -//License Options | |
| 20 | -function get_openaiaddon_licensing_key(){ | |
| 21 | - return get_option('qcld_openaiaddon_enter_license_key'); | |
| 22 | -} | |
| 23 | - | |
| 24 | -function get_openaiaddon_envato_key(){ | |
| 25 | - return get_option('qcld_openaiaddon_enter_envato_key'); | |
| 26 | -} | |
| 27 | - | |
| 28 | -function get_openaiaddon_licensing_buy_from(){ | |
| 29 | - return get_option('qcld_openaiaddon_buy_from_where'); | |
| 30 | -} | |
| 31 | - | |
| 32 | - | |
| 33 | -//Update Transients | |
| 34 | -function get_openaiaddon_update_transient(){ | |
| 35 | - return get_transient('qcld_update_openaiaddon_'); | |
| 36 | -} | |
| 37 | - | |
| 38 | -function set_openaiaddon_update_transient($plugin_object){ | |
| 39 | - return set_transient( 'qcld_update_openaiaddon_', serialize($plugin_object), 1 * DAY_IN_SECONDS ); | |
| 40 | -} | |
| 41 | - | |
| 42 | -function delete_openaiaddon_update_transient(){ | |
| 43 | - return delete_transient( 'qcld_update_openaiaddon_' ); | |
| 44 | -} | |
| 45 | - | |
| 46 | - | |
| 47 | -//Renewal Transients | |
| 48 | -function get_openaiaddon_renew_transient(){ | |
| 49 | - return get_transient('qcld_renew_openaiaddon__subscription'); | |
| 50 | -} | |
| 51 | - | |
| 52 | -function set_openaiaddon_renew_transient($plugin_object){ | |
| 53 | - return set_transient( 'qcld_renew_openaiaddon__subscription', serialize($plugin_object), 1 * DAY_IN_SECONDS ); | |
| 54 | -} | |
| 55 | - | |
| 56 | -function delete_openaiaddon_renew_transient(){ | |
| 57 | - return delete_transient( 'qcld_renew_openaiaddon__subscription' ); | |
| 58 | -} | |
| 59 | - | |
| 60 | - | |
| 61 | -//Invalid License Options | |
| 62 | -function get_openaiaddon_invalid_license(){ | |
| 63 | - return get_option('openaiaddon_invalid_license'); | |
| 64 | -} | |
| 65 | - | |
| 66 | -function set_openaiaddon_invalid_license(){ | |
| 67 | - return update_option('openaiaddon_invalid_license', 1); | |
| 68 | -} | |
| 69 | - | |
| 70 | -function delete_openaiaddon_invalid_license(){ | |
| 71 | - return delete_option('openaiaddon_invalid_license'); | |
| 72 | -} | |
| 73 | -function openaiaddon__get_licensing_url(){ | |
| 74 | - return admin_url('admin.php?page=openai-panel_help'); | |
| 75 | -} | |
| 76 | - | |
| 77 | -//Valid License | |
| 78 | -function get_openaiaddon_valid_license(){ | |
| 79 | - return get_option('openaiaddon_valid_license'); | |
| 80 | -} | |
| 81 | -function set_openaiaddon_valid_license(){ | |
| 82 | - return update_option('openaiaddon_valid_license', 1); | |
| 83 | -} | |
| 84 | -function delete_openaiaddon_valid_license(){ | |
| 85 | - return delete_option('openaiaddon_valid_license'); | |
| 86 | -} | |
| 87 | - | |
| 88 | -//staging or live | |
| 89 | -function get_openaiaddon_site_type(){ | |
| 90 | - return get_option('qcld_openaiaddon_site_type'); | |
| 91 | -} | |
| 92 | - | |
| 93 | - | |
| 94 | - | |
| 95 | -//start new-update-for-codecanyon | |
| 96 | -function get_openaiaddon_license_purchase_code(){ | |
| 97 | - return get_option('qcld_openaiaddon_enter_license_or_purchase_key'); | |
| 98 | -} | |
| 99 | - | |
| 100 | -function qcld_get_openaiaddon_enter_license_notice_dismiss_transient(){ | |
| 101 | - return get_transient('qcld_get_openaiaddon_enter_license_notice_dismiss_transient'); | |
| 102 | -} | |
| 103 | - | |
| 104 | -function set_openaiaddon_enter_license_notice_dismiss_transient(){ | |
| 105 | - return set_transient('qcld_get_openaiaddon_enter_license_notice_dismiss_transient', 1, DAY_IN_SECONDS); | |
| 106 | -} | |
| 107 | - | |
| 108 | -function get_openaiaddon_invalid_license_notice_dismiss_transient(){ | |
| 109 | - return get_transient('get_openaiaddon_invalid_license_notice_dismiss_transient'); | |
| 110 | -} | |
| 111 | - | |
| 112 | -function set_openaiaddon_invalid_license_notice_dismiss_transient(){ | |
| 113 | - return set_transient('get_openaiaddon_invalid_license_notice_dismiss_transient', 1, DAY_IN_SECONDS); | |
| 114 | -} | |
| 1 | +<?php | |
| 2 | +define('openaiaddon_LICENSING_PLUGIN_SLUG', 'chatbot-openai-addon/qcld-bot-openai.php'); | |
| 3 | +define('openaiaddon_LICENSING_PLUGIN_NAME', 'chatbot-openai-addon'); | |
| 4 | +define('openaiaddon_LICENSING_DIR', plugin_dir_path(__DIR__)); | |
| 5 | +define('openaiaddon_LICENSING_URL', plugin_dir_url( __FILE__ )); | |
| 6 | +define('openaiaddon_LICENSING_REMOTE_PATH', 'https://www.ultrawebmedia.com/li/plugins/chatbot-openai-addon/update.php'); | |
| 7 | +define('openaiaddon_LICENSING_PRODUCT_DEV_URL', 'https://quantumcloud.com/products/'); | |
| 8 | + | |
| 9 | +//start new-update-for-codecanyon | |
| 10 | +define('openaiaddon_ENVATO_PLUGIN_ID', -1); | |
| 11 | +//end new-update-for-codecanyon | |
| 12 | + | |
| 13 | +function get_openaiaddon_licensing_plugin_data(){ | |
| 14 | + include_once(ABSPATH.'wp-admin/includes/plugin.php'); | |
| 15 | + return get_plugin_data(openaiaddon_LICENSING_DIR.'/qcld-bot-openai.php', false); | |
| 16 | +} | |
| 17 | + | |
| 18 | +//License Options | |
| 19 | +function get_openaiaddon_licensing_key(){ | |
| 20 | + return get_option('qcld_openaiaddon_enter_license_key'); | |
| 21 | +} | |
| 22 | + | |
| 23 | +function get_openaiaddon_envato_key(){ | |
| 24 | + return get_option('qcld_openaiaddon_enter_envato_key'); | |
| 25 | +} | |
| 26 | + | |
| 27 | +function get_openaiaddon_licensing_buy_from(){ | |
| 28 | + return get_option('qcld_openaiaddon_buy_from_where'); | |
| 29 | +} | |
| 30 | + | |
| 31 | + | |
| 32 | +//Update Transients | |
| 33 | +function get_openaiaddon_update_transient(){ | |
| 34 | + return get_transient('qcld_update_openaiaddon_'); | |
| 35 | +} | |
| 36 | + | |
| 37 | +function set_openaiaddon_update_transient($plugin_object){ | |
| 38 | + return set_transient( 'qcld_update_openaiaddon_', serialize($plugin_object), 1 * DAY_IN_SECONDS ); | |
| 39 | +} | |
| 40 | + | |
| 41 | +function delete_openaiaddon_update_transient(){ | |
| 42 | + return delete_transient( 'qcld_update_openaiaddon_' ); | |
| 43 | +} | |
| 44 | + | |
| 45 | + | |
| 46 | +//Renewal Transients | |
| 47 | +function get_openaiaddon_renew_transient(){ | |
| 48 | + return get_transient('qcld_renew_openaiaddon__subscription'); | |
| 49 | +} | |
| 50 | + | |
| 51 | +function set_openaiaddon_renew_transient($plugin_object){ | |
| 52 | + return set_transient( 'qcld_renew_openaiaddon__subscription', serialize($plugin_object), 1 * DAY_IN_SECONDS ); | |
| 53 | +} | |
| 54 | + | |
| 55 | +function delete_openaiaddon_renew_transient(){ | |
| 56 | + return delete_transient( 'qcld_renew_openaiaddon__subscription' ); | |
| 57 | +} | |
| 58 | + | |
| 59 | + | |
| 60 | +//Invalid License Options | |
| 61 | +function get_openaiaddon_invalid_license(){ | |
| 62 | + return get_option('openaiaddon_invalid_license'); | |
| 63 | +} | |
| 64 | + | |
| 65 | +function set_openaiaddon_invalid_license(){ | |
| 66 | + return update_option('openaiaddon_invalid_license', 1); | |
| 67 | +} | |
| 68 | + | |
| 69 | +function delete_openaiaddon_invalid_license(){ | |
| 70 | + return delete_option('openaiaddon_invalid_license'); | |
| 71 | +} | |
| 72 | +function openaiaddon__get_licensing_url(){ | |
| 73 | + return admin_url('admin.php?page=openai-panel_help'); | |
| 74 | +} | |
| 75 | + | |
| 76 | +//Valid License | |
| 77 | +function get_openaiaddon_valid_license(){ | |
| 78 | + return get_option('openaiaddon_valid_license'); | |
| 79 | +} | |
| 80 | +function set_openaiaddon_valid_license(){ | |
| 81 | + return update_option('openaiaddon_valid_license', 1); | |
| 82 | +} | |
| 83 | +function delete_openaiaddon_valid_license(){ | |
| 84 | + return delete_option('openaiaddon_valid_license'); | |
| 85 | +} | |
| 86 | + | |
| 87 | +//staging or live | |
| 88 | +function get_openaiaddon_site_type(){ | |
| 89 | + return get_option('qcld_openaiaddon_site_type'); | |
| 90 | +} | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | +//start new-update-for-codecanyon | |
| 95 | +function get_openaiaddon_license_purchase_code(){ | |
| 96 | + return get_option('qcld_openaiaddon_enter_license_or_purchase_key'); | |
| 97 | +} | |
| 98 | + | |
| 99 | +function get_openaiaddon_enter_license_notice_dismiss_transient(){ | |
| 100 | + return get_transient('get_openaiaddon_enter_license_notice_dismiss_transient'); | |
| 101 | +} | |
| 102 | + | |
| 103 | +function set_openaiaddon_enter_license_notice_dismiss_transient(){ | |
| 104 | + return set_transient('get_openaiaddon_enter_license_notice_dismiss_transient', 1, DAY_IN_SECONDS); | |
| 105 | +} | |
| 106 | + | |
| 107 | +function get_openaiaddon_invalid_license_notice_dismiss_transient(){ | |
| 108 | + return get_transient('get_openaiaddon_invalid_license_notice_dismiss_transient'); | |
| 109 | +} | |
| 110 | + | |
| 111 | +function set_openaiaddon_invalid_license_notice_dismiss_transient(){ | |
| 112 | + return set_transient('get_openaiaddon_invalid_license_notice_dismiss_transient', 1, DAY_IN_SECONDS); | |
| 113 | +} | |
| 115 | 114 | //end new-update-for-codecanyon |