Changeset 2887080
- Timestamp:
- 03/26/2023 12:02:22 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
auto-featured-image-auto-generated/trunk/index.php
r2887079 r2887080 12 12 */ 13 13 // Exit if accessed directly 14 if (!defined('ABSPATH')) 15 { 14 if ( !defined( 'ABSPATH' ) ) { 16 15 exit; 17 16 } … … 19 18 * Define plugin constants 20 19 */ 21 define( 'ATFIT_PLUGIN_DIR', plugin_dir_path(__FILE__));22 define( 'ATFIT_PLUGIN_URL', plugin_dir_url(__FILE__));23 define( 'ATFIT_PLUGIN_FILE', __FILE__);24 define( 'ATFIT_PLUGIN_BASENAME', plugin_basename(__FILE__));25 define( 'ATFIT_PLUGIN_VERSION', '1.4.5');26 define( 'ATFIT_PLUGIN_SLUG', 'auto-featured-image-auto-generated');27 define( 'ATFIT_PLUGIN_TEXT_DOMAIN', 'auto-featured-image-auto-generated');28 define( 'ATFIT_PLUGIN_NAME', 'Auto Featured Image (Auto Generated)');20 define( 'ATFIT_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 21 define( 'ATFIT_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); 22 define( 'ATFIT_PLUGIN_FILE', __FILE__ ); 23 define( 'ATFIT_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); 24 define( 'ATFIT_PLUGIN_VERSION', '1.4.5' ); 25 define( 'ATFIT_PLUGIN_SLUG', 'auto-featured-image-auto-generated' ); 26 define( 'ATFIT_PLUGIN_TEXT_DOMAIN', 'auto-featured-image-auto-generated' ); 27 define( 'ATFIT_PLUGIN_NAME', 'Auto Featured Image (Auto Generated)' ); 29 28 // Load text domain 30 add_action('plugins_loaded', function () 31 { 32 load_plugin_textdomain('auto-featured-image-auto-generated', false, dirname(plugin_basename(__FILE__)) . '/languages/'); 33 }); 29 add_action( 'plugins_loaded', function () { 30 load_plugin_textdomain( 'auto-featured-image-auto-generated', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); 31 } ); 34 32 require_once ATFIT_PLUGIN_DIR . 'freemius.php'; 35 33 require_once ATFIT_PLUGIN_DIR . 'admin/Admin.class.php'; 36 34 require_once ATFIT_PLUGIN_DIR . 'admin/Trigger.class.php'; 37 if (function_exists('ttfi_fs')) 38 { 39 ttfi_fs()->set_basename(false, __FILE__); 35 if ( function_exists( 'ttfi_fs' ) ) { 36 ttfi_fs()->set_basename( false, __FILE__ ); 40 37 } 41 38 ATFIT_Admin::instance(); 42 39 ATFIT_Trigger::instance(); 43 ttfi_fs()->add_action( 'after_uninstall', 'atfit_uninstall');40 ttfi_fs()->add_action( 'after_uninstall', 'atfit_uninstall' ); 44 41 function atfit_uninstall() 45 42 { 46 $settings = get_option( 'atfit_settings');43 $settings = get_option( 'atfit_settings' ); 47 44 $action = $settings['on_uninstall']; 48 if ($action == 'delete') 49 { 50 delete_option('atfit_settings'); 45 if ( $action == 'delete' ) { 46 delete_option( 'atfit_settings' ); 51 47 } 52 48 }
Note: See TracChangeset
for help on using the changeset viewer.