Plugin Directory

Changeset 2936625


Ignore:
Timestamp:
07/10/2023 03:42:33 PM (3 years ago)
Author:
rmstm
Message:

tagging version 1.3

Location:
admin-ide-dark-mode
Files:
11 edited
6 copied

Legend:

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

    r2925260 r2936625  
    77Author URI: https://thomas-chary.dev
    88Text Domain: aidm-admin
    9 Version: 1.2
     9Version: 1.3
    1010License: GNU GPL
    1111*/
     
    1818define( 'AIDM_WP_ADMIN_VERSION', '1.0.0' );
    1919define( 'AIDM_WP_ADMIN_DIR', 'admin-ide-dark-mode' );
     20
     21if ( ! is_admin() ) {
     22    return;
     23}
    2024
    2125/**
  • admin-ide-dark-mode/tags/1.3/includes/class-aidm-admin-form.php

    r2879634 r2936625  
    6161                'jquery',
    6262                'aidm_theme_preference',
    63                 $user_theme_preference
     63                array( 'theme_name' => $user_theme_preference )
    6464            );
    6565
     
    7171        // load codeMirror editor with type == php
    7272        $cm_settings[ 'codeEditor' ] = wp_enqueue_code_editor( array( 'type' => 'text/x-php' ) );
    73         wp_localize_script( 'jquery', 'cm_settings', $cm_settings );
     73        wp_localize_script( 'jquery', 'cm_settings', array( $cm_settings ) );
    7474
    7575        // enqueue all codeMirror css themes
  • admin-ide-dark-mode/tags/1.3/js/aidmAdmin.js

    r2893419 r2936625  
    33
    44    if ( ! codeMirrorInstance ) {
    5         return false;
     5        return;
    66    }
    77
    8     codeMirrorInstance.CodeMirror.setOption( 'theme', aidm_theme_preference );
     8    const themeName = aidm_theme_preference['theme_name'];
    99
    10     return;
     10    codeMirrorInstance.CodeMirror.setOption( 'theme', themeName );
    1111}
    1212
     
    2525        let additionalCSSTab = $( 'li#accordion-section-custom_css > h3' );
    2626        let codeMirrorElement = $( '.CodeMirror' );
    27        
     27
    2828        if ( codeMirrorElement.length > 0 ) {
    2929            // Do something if the element is found
     
    4444    // Start observing the target node for configured mutations
    4545    observer.observe(targetNode, config);
    46 
    47     return;
    4846});
  • admin-ide-dark-mode/tags/1.3/js/aidmHome.js

    r2879634 r2936625  
    22
    33jQuery( document ).ready( ( $ ) => {
     4   
    45    // install codeMirror in admin section
    56    var editor = wp.codeEditor.initialize( $( '#code-mirror-editor' ), cm_settings );
     
    3637    $( 'input#submit' ).on( 'click', ( event ) => {
    3738        // if already clicked -> abort
     39       
    3840        if ( document.querySelector( 'li.error-selection' ) ) {
    3941            return false;
  • admin-ide-dark-mode/tags/1.3/readme.txt

    r2925260 r2936625  
    2323 
    2424== Changelog ==
     25= 1.3 =
     26* Plugin loading optimized
     27
    2528= 1.2 =
    2629* Plugin update fix
  • admin-ide-dark-mode/tags/1.3/trunk/admin-ide-dark-mode.php

    r2925260 r2936625  
    77Author URI: https://thomas-chary.dev
    88Text Domain: aidm-admin
    9 Version: 1.2
     9Version: 1.3
    1010License: GNU GPL
    1111*/
     
    1818define( 'AIDM_WP_ADMIN_VERSION', '1.0.0' );
    1919define( 'AIDM_WP_ADMIN_DIR', 'admin-ide-dark-mode' );
     20
     21if ( ! is_admin() ) {
     22    return;
     23}
    2024
    2125/**
  • admin-ide-dark-mode/tags/1.3/trunk/includes/class-aidm-admin-form.php

    r2879634 r2936625  
    6161                'jquery',
    6262                'aidm_theme_preference',
    63                 $user_theme_preference
     63                array( 'theme_name' => $user_theme_preference )
    6464            );
    6565
     
    7171        // load codeMirror editor with type == php
    7272        $cm_settings[ 'codeEditor' ] = wp_enqueue_code_editor( array( 'type' => 'text/x-php' ) );
    73         wp_localize_script( 'jquery', 'cm_settings', $cm_settings );
     73        wp_localize_script( 'jquery', 'cm_settings', array( $cm_settings ) );
    7474
    7575        // enqueue all codeMirror css themes
  • admin-ide-dark-mode/tags/1.3/trunk/js/aidmAdmin.js

    r2893419 r2936625  
    33
    44    if ( ! codeMirrorInstance ) {
    5         return false;
     5        return;
    66    }
    77
    8     codeMirrorInstance.CodeMirror.setOption( 'theme', aidm_theme_preference );
     8    const themeName = aidm_theme_preference['theme_name'];
    99
    10     return;
     10    codeMirrorInstance.CodeMirror.setOption( 'theme', themeName );
    1111}
    1212
     
    2525        let additionalCSSTab = $( 'li#accordion-section-custom_css > h3' );
    2626        let codeMirrorElement = $( '.CodeMirror' );
    27        
     27
    2828        if ( codeMirrorElement.length > 0 ) {
    2929            // Do something if the element is found
     
    4444    // Start observing the target node for configured mutations
    4545    observer.observe(targetNode, config);
    46 
    47     return;
    4846});
  • admin-ide-dark-mode/tags/1.3/trunk/js/aidmHome.js

    r2879634 r2936625  
    22
    33jQuery( document ).ready( ( $ ) => {
     4   
    45    // install codeMirror in admin section
    56    var editor = wp.codeEditor.initialize( $( '#code-mirror-editor' ), cm_settings );
     
    3637    $( 'input#submit' ).on( 'click', ( event ) => {
    3738        // if already clicked -> abort
     39       
    3840        if ( document.querySelector( 'li.error-selection' ) ) {
    3941            return false;
  • admin-ide-dark-mode/tags/1.3/trunk/readme.txt

    r2925260 r2936625  
    66Requires at least: 5.0
    77Tested up to: 6.1
    8 Stable tag: 1.2
     8Stable tag: 1.3
    99Requires PHP: 7.4
    1010License: GPLv2 or later
     
    2323 
    2424== Changelog ==
     25= 1.3 =
     26* Plugin loading optimized
     27
    2528= 1.2 =
    2629* Plugin update fix
  • admin-ide-dark-mode/trunk/admin-ide-dark-mode.php

    r2925260 r2936625  
    77Author URI: https://thomas-chary.dev
    88Text Domain: aidm-admin
    9 Version: 1.2
     9Version: 1.3
    1010License: GNU GPL
    1111*/
     
    1818define( 'AIDM_WP_ADMIN_VERSION', '1.0.0' );
    1919define( 'AIDM_WP_ADMIN_DIR', 'admin-ide-dark-mode' );
     20
     21if ( ! is_admin() ) {
     22    return;
     23}
    2024
    2125/**
  • admin-ide-dark-mode/trunk/includes/class-aidm-admin-form.php

    r2879634 r2936625  
    6161                'jquery',
    6262                'aidm_theme_preference',
    63                 $user_theme_preference
     63                array( 'theme_name' => $user_theme_preference )
    6464            );
    6565
     
    7171        // load codeMirror editor with type == php
    7272        $cm_settings[ 'codeEditor' ] = wp_enqueue_code_editor( array( 'type' => 'text/x-php' ) );
    73         wp_localize_script( 'jquery', 'cm_settings', $cm_settings );
     73        wp_localize_script( 'jquery', 'cm_settings', array( $cm_settings ) );
    7474
    7575        // enqueue all codeMirror css themes
  • admin-ide-dark-mode/trunk/js/aidmAdmin.js

    r2893419 r2936625  
    33
    44    if ( ! codeMirrorInstance ) {
    5         return false;
     5        return;
    66    }
    77
    8     codeMirrorInstance.CodeMirror.setOption( 'theme', aidm_theme_preference );
     8    const themeName = aidm_theme_preference['theme_name'];
    99
    10     return;
     10    codeMirrorInstance.CodeMirror.setOption( 'theme', themeName );
    1111}
    1212
     
    2525        let additionalCSSTab = $( 'li#accordion-section-custom_css > h3' );
    2626        let codeMirrorElement = $( '.CodeMirror' );
    27        
     27
    2828        if ( codeMirrorElement.length > 0 ) {
    2929            // Do something if the element is found
     
    4444    // Start observing the target node for configured mutations
    4545    observer.observe(targetNode, config);
    46 
    47     return;
    4846});
  • admin-ide-dark-mode/trunk/js/aidmHome.js

    r2879634 r2936625  
    22
    33jQuery( document ).ready( ( $ ) => {
     4   
    45    // install codeMirror in admin section
    56    var editor = wp.codeEditor.initialize( $( '#code-mirror-editor' ), cm_settings );
     
    3637    $( 'input#submit' ).on( 'click', ( event ) => {
    3738        // if already clicked -> abort
     39       
    3840        if ( document.querySelector( 'li.error-selection' ) ) {
    3941            return false;
  • admin-ide-dark-mode/trunk/readme.txt

    r2925260 r2936625  
    66Requires at least: 5.0
    77Tested up to: 6.1
    8 Stable tag: 1.2
     8Stable tag: 1.3
    99Requires PHP: 7.4
    1010License: GPLv2 or later
     
    2323 
    2424== Changelog ==
     25= 1.3 =
     26* Plugin loading optimized
     27
    2528= 1.2 =
    2629* Plugin update fix
Note: See TracChangeset for help on using the changeset viewer.