Plugin Directory

Changeset 2945626


Ignore:
Timestamp:
07/31/2023 05:35:21 PM (3 years ago)
Author:
rmstm
Message:

new version 2.01

Location:
admin-ide-dark-mode
Files:
4 edited
3 copied

Legend:

Unmodified
Added
Removed
  • admin-ide-dark-mode/tags/2.01/admin-ide-dark-mode.php

    r2941844 r2945626  
    66Author: Thomas Chary
    77Author URI: https://thomas-chary.dev
    8 Text Domain: aidm-admin
    9 Version: 2.0
     8Text Domain: aidm
     9Version: 2.01
    1010License: GNU GPL
    1111*/
     
    1616}
    1717
    18 define( 'AIDM_WP_ADMIN_VERSION', '1.0.0' );
    19 define( 'AIDM_WP_ADMIN_DIR', 'admin-ide-dark-mode' );
    20 
     18// don't load plugin if on frontend
    2119if ( ! is_admin() ) {
    2220    return;
     
    2422
    2523/**
     24 * const
     25 */
     26
     27define( 'AIDM_PLUGIN_ID', 'admin-ide-dark-mode' );
     28define ( 'AIDM_PLUGIN_FILE_PATH', plugin_basename(__FILE__) );
     29define( 'AIDM_FORM_ID', 'aidm-admin-form' );
     30define( 'AIDM_POST_ID', 'aidm_save_changes' );
     31define( 'AIDM_AJAX_ID', 'aidm_load_help_panel' );
     32define( 'AIDM_PLUGIN_URL', WP_PLUGIN_URL.'/admin-ide-dark-mode' );
     33define( 'AIDM_PLUGIN_DIR', WP_PLUGIN_DIR.'/admin-ide-dark-mode' );
     34define( 'AIDM_CM_DIR', AIDM_PLUGIN_DIR.'/code-mirror-css-themes/' );
     35define( 'AIDM_CM_URL', AIDM_PLUGIN_URL.'/code-mirror-css-themes/' );
     36define( 'AIDM_VIEWS_DIR', AIDM_PLUGIN_DIR.'/views/' );
     37define( 'AIDM_INCLUDE_DIR', AIDM_PLUGIN_DIR.'/includes/' );
     38define( 'AIDM_CLASSES_DIR', AIDM_INCLUDE_DIR.'/classes/' );
     39define( 'AIDM_JS_URL', AIDM_PLUGIN_URL.'/assets/js/' );
     40define( 'AIDM_CSS_URL', AIDM_PLUGIN_URL.'/assets/css/' );
     41define( 'AIDM_IMG_URL', AIDM_PLUGIN_URL.'/assets/img/' );
     42define( 'AIDM_LANG_DIR', AIDM_PLUGIN_DIR.'/languages/' );
     43
     44/**
    2645 * supp. functions
    2746 */
    28 require_once plugin_dir_path( __FILE__ ) . 'includes/helpers.php';
     47require_once AIDM_INCLUDE_DIR.'aidm-functions.php';
    2948
    30 /**
    31  * core plugin class
    32  */
    33 require_once plugin_dir_path( __FILE__ ) . 'includes/class-aidm-admin-form.php';
     49// add aidm in admin menu
     50add_action(
     51    'admin_menu',
     52    'aidm_add_menu'
     53);
    3454
    35 function run_aidm_form() {
    36     $plugin = new Aidm_Admin_Form();
    37     $plugin -> init();
     55// load translations
     56add_action(
     57    'plugins_loaded',
     58    'aidm_load_textdomain'
     59);
     60
     61if (
     62    aidm_is_home_page()
     63) {
     64    /**
     65     * load form to set IDE colors preferences
     66     */
     67    require_once AIDM_CLASSES_DIR.'class-aidm-form.php';
     68
     69    new Aidm_Form();
     70
     71} else {
     72    if ( aidm_is_plugins_page() ) {
     73        /**
     74         * load script that display help panel
     75         */
     76        require_once AIDM_CLASSES_DIR.'class-aidm-help-panel.php';
     77
     78        new Aidm_Help_Panel();
     79
     80    } else {
     81        /**
     82         * load script that changes IDE colors all over admin section
     83         */
     84        require_once AIDM_CLASSES_DIR.'class-aidm.php';
     85
     86        new Aidm();
     87    }
    3888}
    39 
    40 run_aidm_form();
  • admin-ide-dark-mode/tags/2.01/readme.txt

    r2941844 r2945626  
    66Requires at least: 5.0
    77Tested up to: 6.1
    8 Stable tag: 2.0
     8Stable tag: 2.01
    99Requires PHP: 7.4
    1010License: GPLv2 or later
     
    2323 
    2424== Changelog ==
     25= 2.01 =
     26* Plugin notice fix + moving the plugin home inside settings admin panel + add information panel
     27
    2528= 1.9 =
    2629* Plugin notice fix
  • admin-ide-dark-mode/tags/2.01/uninstall.php

    r2879634 r2945626  
    11<?php
    2 // if uninstall.php is not called by WordPress, die
     2
    33if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
    44    die;
    55}
     6
     7/**
     8 * Remove database AIDM data
     9 */
    610
    711$meta_key = 'aidm-theme-preference';
  • admin-ide-dark-mode/trunk/admin-ide-dark-mode.php

    r2941844 r2945626  
    66Author: Thomas Chary
    77Author URI: https://thomas-chary.dev
    8 Text Domain: aidm-admin
    9 Version: 2.0
     8Text Domain: aidm
     9Version: 2.01
    1010License: GNU GPL
    1111*/
     
    1616}
    1717
    18 define( 'AIDM_WP_ADMIN_VERSION', '1.0.0' );
    19 define( 'AIDM_WP_ADMIN_DIR', 'admin-ide-dark-mode' );
    20 
     18// don't load plugin if on frontend
    2119if ( ! is_admin() ) {
    2220    return;
     
    2422
    2523/**
     24 * const
     25 */
     26
     27define( 'AIDM_PLUGIN_ID', 'admin-ide-dark-mode' );
     28define ( 'AIDM_PLUGIN_FILE_PATH', plugin_basename(__FILE__) );
     29define( 'AIDM_FORM_ID', 'aidm-admin-form' );
     30define( 'AIDM_POST_ID', 'aidm_save_changes' );
     31define( 'AIDM_AJAX_ID', 'aidm_load_help_panel' );
     32define( 'AIDM_PLUGIN_URL', WP_PLUGIN_URL.'/admin-ide-dark-mode' );
     33define( 'AIDM_PLUGIN_DIR', WP_PLUGIN_DIR.'/admin-ide-dark-mode' );
     34define( 'AIDM_CM_DIR', AIDM_PLUGIN_DIR.'/code-mirror-css-themes/' );
     35define( 'AIDM_CM_URL', AIDM_PLUGIN_URL.'/code-mirror-css-themes/' );
     36define( 'AIDM_VIEWS_DIR', AIDM_PLUGIN_DIR.'/views/' );
     37define( 'AIDM_INCLUDE_DIR', AIDM_PLUGIN_DIR.'/includes/' );
     38define( 'AIDM_CLASSES_DIR', AIDM_INCLUDE_DIR.'/classes/' );
     39define( 'AIDM_JS_URL', AIDM_PLUGIN_URL.'/assets/js/' );
     40define( 'AIDM_CSS_URL', AIDM_PLUGIN_URL.'/assets/css/' );
     41define( 'AIDM_IMG_URL', AIDM_PLUGIN_URL.'/assets/img/' );
     42define( 'AIDM_LANG_DIR', AIDM_PLUGIN_DIR.'/languages/' );
     43
     44/**
    2645 * supp. functions
    2746 */
    28 require_once plugin_dir_path( __FILE__ ) . 'includes/helpers.php';
     47require_once AIDM_INCLUDE_DIR.'aidm-functions.php';
    2948
    30 /**
    31  * core plugin class
    32  */
    33 require_once plugin_dir_path( __FILE__ ) . 'includes/class-aidm-admin-form.php';
     49// add aidm in admin menu
     50add_action(
     51    'admin_menu',
     52    'aidm_add_menu'
     53);
    3454
    35 function run_aidm_form() {
    36     $plugin = new Aidm_Admin_Form();
    37     $plugin -> init();
     55// load translations
     56add_action(
     57    'plugins_loaded',
     58    'aidm_load_textdomain'
     59);
     60
     61if (
     62    aidm_is_home_page()
     63) {
     64    /**
     65     * load form to set IDE colors preferences
     66     */
     67    require_once AIDM_CLASSES_DIR.'class-aidm-form.php';
     68
     69    new Aidm_Form();
     70
     71} else {
     72    if ( aidm_is_plugins_page() ) {
     73        /**
     74         * load script that display help panel
     75         */
     76        require_once AIDM_CLASSES_DIR.'class-aidm-help-panel.php';
     77
     78        new Aidm_Help_Panel();
     79
     80    } else {
     81        /**
     82         * load script that changes IDE colors all over admin section
     83         */
     84        require_once AIDM_CLASSES_DIR.'class-aidm.php';
     85
     86        new Aidm();
     87    }
    3888}
    39 
    40 run_aidm_form();
  • admin-ide-dark-mode/trunk/readme.txt

    r2941844 r2945626  
    66Requires at least: 5.0
    77Tested up to: 6.1
    8 Stable tag: 2.0
     8Stable tag: 2.01
    99Requires PHP: 7.4
    1010License: GPLv2 or later
     
    2323 
    2424== Changelog ==
     25= 2.01 =
     26* Plugin notice fix + moving the plugin home inside settings admin panel + add information panel
     27
    2528= 1.9 =
    2629* Plugin notice fix
  • admin-ide-dark-mode/trunk/uninstall.php

    r2879634 r2945626  
    11<?php
    2 // if uninstall.php is not called by WordPress, die
     2
    33if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
    44    die;
    55}
     6
     7/**
     8 * Remove database AIDM data
     9 */
    610
    711$meta_key = 'aidm-theme-preference';
Note: See TracChangeset for help on using the changeset viewer.