Plugin Directory

Changeset 2887080


Ignore:
Timestamp:
03/26/2023 12:02:22 PM (3 years ago)
Author:
jodacame
Message:

Tagging version 1.4.5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • auto-featured-image-auto-generated/trunk/index.php

    r2887079 r2887080  
    1212 */
    1313// Exit if accessed directly
    14 if (!defined('ABSPATH'))
    15 {
     14if ( !defined( 'ABSPATH' ) ) {
    1615    exit;
    1716}
     
    1918 * Define plugin constants
    2019 */
    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)');
     20define( 'ATFIT_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
     21define( 'ATFIT_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
     22define( 'ATFIT_PLUGIN_FILE', __FILE__ );
     23define( 'ATFIT_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
     24define( 'ATFIT_PLUGIN_VERSION', '1.4.5' );
     25define( 'ATFIT_PLUGIN_SLUG', 'auto-featured-image-auto-generated' );
     26define( 'ATFIT_PLUGIN_TEXT_DOMAIN', 'auto-featured-image-auto-generated' );
     27define( 'ATFIT_PLUGIN_NAME', 'Auto Featured Image (Auto Generated)' );
    2928// 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 });
     29add_action( 'plugins_loaded', function () {
     30    load_plugin_textdomain( 'auto-featured-image-auto-generated', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
     31} );
    3432require_once ATFIT_PLUGIN_DIR . 'freemius.php';
    3533require_once ATFIT_PLUGIN_DIR . 'admin/Admin.class.php';
    3634require_once ATFIT_PLUGIN_DIR . 'admin/Trigger.class.php';
    37 if (function_exists('ttfi_fs'))
    38 {
    39     ttfi_fs()->set_basename(false, __FILE__);
     35if ( function_exists( 'ttfi_fs' ) ) {
     36    ttfi_fs()->set_basename( false, __FILE__ );
    4037}
    4138ATFIT_Admin::instance();
    4239ATFIT_Trigger::instance();
    43 ttfi_fs()->add_action('after_uninstall', 'atfit_uninstall');
     40ttfi_fs()->add_action( 'after_uninstall', 'atfit_uninstall' );
    4441function atfit_uninstall()
    4542{
    46     $settings = get_option('atfit_settings');
     43    $settings = get_option( 'atfit_settings' );
    4744    $action = $settings['on_uninstall'];
    48     if ($action == 'delete')
    49     {
    50         delete_option('atfit_settings');
     45    if ( $action == 'delete' ) {
     46        delete_option( 'atfit_settings' );
    5147    }
    5248}
Note: See TracChangeset for help on using the changeset viewer.