Plugin Directory

Changeset 3133620


Ignore:
Timestamp:
08/11/2024 04:40:18 AM (19 months ago)
Author:
modalweb
Message:

V 5.2.8

Location:
file-manager-advanced/trunk
Files:
66 added
7 edited

Legend:

Unmodified
Added
Removed
  • file-manager-advanced/trunk/application/class_fma_admin_menus.php

    r3126681 r3133620  
    140140           $save['enable_trash'] = isset($_POST['enable_trash']) ? sanitize_text_field($_POST['enable_trash']) : 0;
    141141           $save['enable_htaccess'] = isset($_POST['enable_htaccess']) ? sanitize_text_field($_POST['enable_htaccess']) : 0;
    142            $save['fma_upload_allow'] = isset($_POST['fma_upload_allow']) ? sanitize_text_field($_POST['fma_upload_allow']) : 'all';       
     142           $save['fma_upload_allow'] = isset($_POST['fma_upload_allow']) ? sanitize_text_field($_POST['fma_upload_allow']) : 'all';
     143           $save['fma_cm_theme'] = isset($_POST['fma_cm_theme']) ? sanitize_text_field($_POST['fma_cm_theme']) : 'default';   
    143144          $u = update_option('fmaoptions',$save);
    144145          if($u) {
  • file-manager-advanced/trunk/application/class_fma_main.php

    r3024717 r3133620  
    159159                wp_enqueue_script( 'javascript', plugins_url('library/codemirror/mode/javascript/javascript.js',  __FILE__ ));
    160160                wp_enqueue_script( 'clike', plugins_url('library/codemirror/mode/clike/clike.js',  __FILE__ ));
    161                 wp_enqueue_script( 'php', plugins_url('library/codemirror/mode/php/php.js',  __FILE__ ));   
     161                wp_enqueue_script( 'php', plugins_url('library/codemirror/mode/php/php.js',  __FILE__ ));
     162                /**
     163                 * Code Mirror Themes
     164                 */
     165                $cm_theme = isset($this->settings['fma_cm_theme']) ? $this->settings['fma_cm_theme'] : 'default';
     166                if($cm_theme != 'default'):
     167                   wp_enqueue_style( 'codemirror_theme', plugins_url('library/codemirror/theme/'.$cm_theme.'.css', __FILE__));
     168                endif;
     169
    162170                /**
    163171                 * Add Parameters
     
    174182                    'nonce' => $nonce,
    175183                    'locale' => $locale,
    176                     'ui' => $display_ui_options
     184                    'ui' => $display_ui_options,
     185                    'cm_theme' => $cm_theme
    177186                )
    178187    );
     
    181190       
    182191            }
     192        /**
     193         *  Fetch code mirror theme
     194         **/
     195        public static function cm_themes() {
     196            $cm_themes_dir = FMA_CM_THEMES_PATH;
     197            $cm_themes = [];
     198            $cm_themes['default'] = 'default';
     199            foreach(glob($cm_themes_dir.'/*.css') as $file) {
     200                $bn = basename($file, ".css");
     201                $cm_themes[$bn] = $bn;
     202            }
     203            return $cm_themes;
     204        }
    183205        /*
    184206         review
  • file-manager-advanced/trunk/application/library/js/elfinder_script.js

    r3058403 r3133620  
    22                 var fmakey = afm_object.nonce;
    33                 var fma_locale = afm_object.locale;
     4                 var fma_cm_theme = afm_object.cm_theme;
    45                 jQuery('#file_manager_advanced').elfinder(
    56                    // 1st Arg - options
     
    2930                                                        lineNumbers: true,
    3031                                                        lineWrapping: true,                                                       
    31                                                         lint: true
     32                                                        lint: true,
     33                                                        theme: fma_cm_theme
    3234                                                    });
    3335                                                    return editor;
  • file-manager-advanced/trunk/application/pages/controls.php

    r2964898 r3133620  
    77$message = ($type == '2') ? 'Unable to save settings.' : 'Settings updated successfully.';
    88$roles = $this->wpUserRoles();
     9$cm_themes = class_fma_main::cm_themes();
    910?>
    1011<?php echo class_fma_admin_menus::shortcodeUpdateNotice();?>
     
    170171</td>
    171172</tr>
     173<tr>
     174<th><?php _e('Code Editor Theme <sup style="color:red;">New</sup>','file-manager-advanced')?></th>
     175<td>
     176<select name="fma_cm_theme" id="fma_cm_theme">
     177    <?php foreach ($cm_themes as $key => $val) :
     178        $selected = "";
     179        if(isset($settings['fma_cm_theme'])) {
     180            if($key == $settings['fma_cm_theme']) {
     181              $selected = 'selected=selected';
     182            }
     183        }
     184        ?>
     185    <option value="<?php echo $key; ?>" <?php echo $selected;?>><?php _e($val,'file-manager-advanced')?></option>
     186    <?php endforeach;?>
     187</select>
     188<p class="description"><?php _e('Select code editor theme. Default: default','file-manager-advanced')?></p>
     189</td>
     190</tr>
    172191</tbody>
    173192</table>
  • file-manager-advanced/trunk/constants.php

    r3126681 r3133620  
    55 */
    66if ( !defined('FMA_VERSION') ) {
    7    define('FMA_VERSION', '5.2.7');
     7   define('FMA_VERSION', '5.2.8');
    88}
    99/**
     
    2020}
    2121/**
     22 * Code mirror themes path
     23 */
     24if(!defined('FMA_CM_THEMES_PATH')) {
     25   define('FMA_CM_THEMES_PATH', FMAFILEPATH.'application/library/codemirror/theme');
     26}
     27/**
    2228 * File Manager Operations
    2329 */
  • file-manager-advanced/trunk/file_manager_advanced.php

    r3126681 r3133620  
    55  Description: Cpanel for files management in wordpress
    66  Author: modalweb
    7   Version: 5.2.7
     7  Version: 5.2.8
    88  Author URI: https://advancedfilemanager.com
    99  License: GPLv2
  • file-manager-advanced/trunk/readme.txt

    r3126681 r3133620  
    55Tested up to: 6.6.1
    66Requires PHP: 7.0
    7 Stable tag: 5.2.7
     7Stable tag: 5.2.8
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    113113== Changelog ==
    114114
     115= 5.2.8 (11th Aug, 2024) =
     116* Minor fixes
     117
    115118= 5.2.7 (28th July, 2024) =
    116119* Compatible with 6.6.1
Note: See TracChangeset for help on using the changeset viewer.