Changeset 2887079
- Timestamp:
- 03/26/2023 11:59:48 AM (3 years ago)
- Location:
- auto-featured-image-auto-generated/trunk
- Files:
-
- 2 edited
-
index.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
auto-featured-image-auto-generated/trunk/index.php
r2887075 r2887079 12 12 */ 13 13 // Exit if accessed directly 14 if ( !defined( 'ABSPATH' ) ) { 14 if (!defined('ABSPATH')) 15 { 15 16 exit; 16 17 } … … 18 19 * Define plugin constants 19 20 */ 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.4');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)');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)'); 28 29 // Load text domain 29 add_action( 'plugins_loaded', function () { 30 load_plugin_textdomain( 'auto-featured-image-auto-generated', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); 31 } ); 30 add_action('plugins_loaded', function () 31 { 32 load_plugin_textdomain('auto-featured-image-auto-generated', false, dirname(plugin_basename(__FILE__)) . '/languages/'); 33 }); 32 34 require_once ATFIT_PLUGIN_DIR . 'freemius.php'; 33 35 require_once ATFIT_PLUGIN_DIR . 'admin/Admin.class.php'; 34 36 require_once ATFIT_PLUGIN_DIR . 'admin/Trigger.class.php'; 35 if ( function_exists( 'ttfi_fs' ) ) { 36 ttfi_fs()->set_basename( false, __FILE__ ); 37 if (function_exists('ttfi_fs')) 38 { 39 ttfi_fs()->set_basename(false, __FILE__); 37 40 } 38 41 ATFIT_Admin::instance(); 39 42 ATFIT_Trigger::instance(); 40 ttfi_fs()->add_action( 'after_uninstall', 'atfit_uninstall');43 ttfi_fs()->add_action('after_uninstall', 'atfit_uninstall'); 41 44 function atfit_uninstall() 42 45 { 43 $settings = get_option( 'atfit_settings');46 $settings = get_option('atfit_settings'); 44 47 $action = $settings['on_uninstall']; 45 if ( $action == 'delete' ) { 46 delete_option( 'atfit_settings' ); 48 if ($action == 'delete') 49 { 50 delete_option('atfit_settings'); 47 51 } 48 52 } -
auto-featured-image-auto-generated/trunk/readme.txt
r2887075 r2887079 6 6 Tested up to: 6.1.1 7 7 Requires PHP: 6.0 8 Stable tag: 1.4. 48 Stable tag: 1.4.5 9 9 License: GPLv2 or later 10 10
Note: See TracChangeset
for help on using the changeset viewer.