WordPress.org

Plugin Directory

Changeset 1645656


Ignore:
Timestamp:
04/26/17 09:46:37 (5 months ago)
Author:
mndpsingh287
Message:

fixed few issues

Location:
theme-editor/trunk
Files:
3 added
9 edited

Legend:

Unmodified
Added
Removed
  • theme-editor/trunk/app/controller/controller.php

    r1644634 r1645656  
    11<?php namespace te\app\cnt; 
    22use te\app\thm_cnt\theme_editor_theme_controller as run_theme_editor_theme_controller; 
     3use te\app\plg_cnt\theme_editor_plugin_controller as run_theme_editor_plugin_controller; 
    34class theme_editor_controller { 
    45    var $theme_controller; 
     6    var $plugin_controller; 
    57    public function __construct() { 
    68       $this->init(); 
     
    1012        add_action( 'admin_menu', array($this, 'theme_editor_menu_page')); 
    1113        // Add Plugin Editor Page 
    12         //add_action( 'admin_menu', array( $this, 'theme_editor_plugins_page' ) ); 
     14          if(isset($opt['e_d_p_e']) && $opt['e_d_p_e'] == 'yes') { 
     15           add_action( 'admin_menu', array( $this, 'theme_editor_plugins_page' ) ); 
     16          } 
    1317        // Add Theme Editor Page 
    1418        if(isset($opt['e_d_t_e']) && $opt['e_d_t_e'] == 'yes') {     
    1519          add_action( 'admin_menu', array( $this, 'theme_editor_themes_page' ) ); 
    16         } 
    17         if(isset($opt['e_w_d_t_e']) && $opt['e_w_d_t_e'] == 'yes') {     
    18          add_action('_admin_menu', array($this, 'remove_editor_menu'), 1); 
    19         }       
     20        }        
     21        add_action('_admin_menu', array($this, 'remove_editor_menu'), 1);               
    2022        add_action( 'admin_post_mk_theme_editor_export_te_files', array($this, 'export_te_files') );        
    2123        add_action( 'admin_post_mk_theme_editor_download_te_theme', array($this, 'download_te_theme') );       
    22  
     24        add_action( 'admin_post_mk_theme_editor_download_te_plugin', array($this, 'download_te_plugin') );   
     25        add_action( 'admin_init', array($this, 'load_custom_scripts_settings'));   
    2326        if(is_admin()) { 
    2427           include('theme_controller.php'); 
     28           include('plugin_controller.php'); 
    2529         } 
     30          
    2631       $this->theme_controller = new run_theme_editor_theme_controller; 
    27  
     32       $this->plugin_controller = new run_theme_editor_plugin_controller; 
    2833    } 
    2934     
     
    5560     
    5661    public function theme_editor_plugins_page() { 
    57         /*$page_title = __( 'Plugin Editor', 'te-editor' ); 
     62        $page_title = __( 'Plugin Editor', 'te-editor' ); 
    5863        $menu_title = __( 'Plugin Editor', 'te-editor' ); 
    5964        $capability = 'manage_options'; 
    6065        $menu_slug = 'theme_editor_plugin'; 
    6166           add_plugins_page( $page_title, $menu_title, $capability, $menu_slug, array( $this, 'add_plugin_page' ) ); 
    62 */   } 
     67     } 
    6368      
    6469    public function add_plugin_page() { 
    65        //include(MK_THEME_EDITOR_PATH.'app/view/plugin_editor.php');         
     70       include(MK_THEME_EDITOR_PATH.'app/view/plugin_editor.php');       
    6671    } 
    6772    public function remove_editor_menu() { 
    68          remove_action('admin_menu', '_add_themes_utility_last', 101); 
     73         $opt = get_option('mk_te_settings_options'); 
     74         if(isset($opt['e_w_d_t_e']) && $opt['e_w_d_t_e'] == 'yes') { 
     75           remove_action('admin_menu', '_add_themes_utility_last', 101); 
     76         } 
     77         if(isset($opt['e_w_d_p_e']) && $opt['e_w_d_p_e'] == 'yes') { 
     78           global $submenu; 
     79           unset( $submenu['plugins.php'][15] ); 
     80          } 
    6981    } 
    7082    public function export_te_files() { 
     
    8698            if(!empty($theme_name)) { 
    8799              $this->theme_controller->download_theme( $theme_name ); 
     100            } 
     101        } 
     102    }    
     103    public function download_te_plugin() { 
     104        $nonce = $_REQUEST['_wpnonce']; 
     105        if(wp_verify_nonce( $nonce, 'mk-fd-nonce')) { 
     106            $plugin_name = $_GET['plugin_name']; 
     107            if(!empty($plugin_name)) { 
     108              $this->plugin_controller->download_plugin( $plugin_name ); 
    88109            } 
    89110        } 
     
    109130        echo '</script>' ; 
    110131     } 
     132     public function load_custom_scripts_settings() { 
     133         $current_page = isset($_GET['page']) ? $_GET['page'] : ''; 
     134         if($current_page == 'theme_editor_settings') { 
     135              wp_enqueue_script('jquery-ui-core');// enqueue jQuery UI Core 
     136              wp_enqueue_script('jquery-ui-tabs');// enqueue jQuery UI Tabs 
     137              wp_enqueue_script( 'te-settings-tabs-js', MK_THEME_EDITOR_URL.'app/view/js/settings_tabs.js', array() ); 
     138              wp_enqueue_style( 'te-settings-tabs-css', MK_THEME_EDITOR_URL.'app/view/css/settings_tabs.css' ); 
     139         } 
     140     } 
    111141} 
  • theme-editor/trunk/app/controller/theme_controller.php

    r1644634 r1645656  
    183183                } 
    184184                else { 
    185                   $output[ $i ]['file'] = str_replace( realpath( WP_PLUGIN_DIR ) . $slash, '', $output[ $i ]['path'] ); 
    186                   $output[ $i ]['url'] = plugins_url() . $slash . $output[ $i ]['file']; 
     185                  //$output[ $i ]['file'] = str_replace( realpath( WP_PLUGIN_DIR ) . $slash, '', $output[ $i ]['path'] ); 
     186                   $oldFile = str_replace( realpath( WP_PLUGIN_DIR ) . $slash, '', $output[ $i ]['path'] ); 
     187                  $oldFile2 = str_replace(WP_PLUGIN_DIR,'', $oldFile); 
     188                  $mlu = str_replace('//','/', $oldFile2); 
     189                  $output[ $i ]['file'] = str_replace('/\\','\\', $oldFile2); 
     190                  $output[ $i ]['url'] = plugins_url() . $slash . $mlu; 
    187191                } 
    188192              } 
  • theme-editor/trunk/app/model/model.php

    r1644634 r1645656  
    1 <?php 
    2 namespace te\app\mdl; 
     1<?php namespace te\app\mdl; 
    32use te\app\thm_cnt\theme_editor_theme_controller as run_theme_editor_theme_controller; 
    43class theme_editor_model { 
     
    65    public function __construct() { 
    76        register_activation_hook(MK_THEME_EDITOR_FILE, array(&$this, 'mk_te_settings')); 
    8         add_action("wp_ajax_save_mk_theme_editor_theme_files", array($this, "mk_theme_editor_theme_files")); 
    9         add_action("wp_ajax_mk_theme_editor_folder_open", array($this, "mk_theme_editor_folder_open")); 
    10         add_action("wp_ajax_mk_theme_editor_file_open", array($this, "mk_theme_editor_file_open")); 
    11         add_action("wp_ajax_mk_theme_editor_file_download", array($this, "mk_theme_editor_file_download")); 
    12         add_action("wp_ajax_mk_theme_editor_folder_create", array($this, "mk_theme_editor_folder_create")); 
    13         add_action("wp_ajax_mk_theme_editor_file_create", array($this, "mk_theme_editor_file_create")); 
    14         add_action("wp_ajax_mk_theme_editor_folder_remove", array($this, "mk_theme_editor_folder_remove")); 
    15         add_action("wp_ajax_mk_theme_editor_file_remove", array($this, "mk_theme_editor_file_remove")); 
    16         add_action("wp_ajax_mk_theme_editor_file_upload", array($this, "mk_theme_editor_file_upload")); 
    17         add_action("wp_ajax_mk_te_close_te_help", array($this, "mk_te_close_te_help")); 
     7        $model_ajax_actions = array( 
     8                               'wp_ajax_save_mk_theme_editor_theme_files' => 'mk_theme_editor_theme_files', 
     9                               'wp_ajax_mk_theme_editor_folder_open' => 'mk_theme_editor_folder_open', 
     10                               'wp_ajax_mk_plugin_editor_folder_open' => 'mk_plugin_editor_folder_open', 
     11                               'wp_ajax_mk_theme_editor_file_open' => 'mk_theme_editor_file_open', 
     12                               'wp_ajax_mk_theme_editor_file_download' => 'mk_theme_editor_file_download', 
     13                               'wp_ajax_mk_theme_editor_folder_create' => 'mk_theme_editor_folder_create', 
     14                               'wp_ajax_mk_theme_editor_file_create' => 'mk_theme_editor_file_create', 
     15                               'wp_ajax_mk_theme_editor_folder_remove' => 'mk_theme_editor_folder_remove', 
     16                               'wp_ajax_mk_theme_editor_file_remove' => 'mk_theme_editor_file_remove', 
     17                               'wp_ajax_mk_theme_editor_file_upload' => 'mk_theme_editor_file_upload', 
     18                               'wp_ajax_mk_te_close_te_help' => 'mk_te_close_te_help', 
     19                              ); 
     20        foreach($model_ajax_actions as $accepter => $callbacker) {                     
     21           add_action($accepter, array($this, $callbacker)); 
     22        } 
    1823        $this->theme_controller = new run_theme_editor_theme_controller; 
    1924    } 
     
    2227                                             'e_d_t_e' => 'yes', 
    2328                                             'code_editor_theme' => 'cobalt', 
    24                                              'e_w_d_t_e' => 'yes' 
     29                                             'e_w_d_t_e' => 'yes', 
     30                                             'e_d_p_e' => 'yes', 
     31                                             'e_w_d_p_e' => 'yes', 
    2532                                             ); 
    2633                    $opt = get_option('mk_te_settings_options'); 
    27                     if(!$opt['duplicate_post_status']) { 
     34                    if(!$opt['e_w_d_p_e']) { 
    2835                        update_option('mk_te_settings_options', $defaultsettings); 
    2936                    }     
     
    5461    public function mk_theme_editor_folder_open() { 
    5562        $folder_path = str_replace('\\\\','\\',$_POST['path']); 
    56          $child_files = $this->theme_controller->get_files_and_folders( $folder_path, '0', 'theme' ); 
     63        $child_files = $this->theme_controller->get_files_and_folders( $folder_path, '0', 'theme' ); 
     64        $return = ''; 
     65        if(!empty($child_files[-1])) { 
     66          $return .= $child_files[-1];   
     67        } else { 
     68        $return .= '<ul class="subfolders">';    
     69        foreach($child_files as $child_file) { 
     70                  $logoImagePath = MK_THEME_EDITOR_PATH.'app/view/images/'.$child_file['extension'].'.png'; 
     71                  $logoImage = MK_THEME_EDITOR_URL.'app/view/images/'.$child_file['extension'].'.png'; 
     72                  if(!file_exists($logoImagePath)) { 
     73                    $logoImage = MK_THEME_EDITOR_URL.'app/view/images/def.png';   
     74                  } 
     75             //folder      
     76             if($child_file['filetype'] == 'folder') { 
     77                $return .= '<li class="'.$child_file['extension'].'">'; 
     78                $return .= '<a href="javascript:void(0)" class="open_folder" data-path="'.$child_file['path'].'" data-name="'.$child_file['extension'].$child_file['name'].'"><img src="'.MK_THEME_EDITOR_URL.'app/view/images/'.$child_file['extension'].'.png">'; 
     79                $return .= $child_file['name']; 
     80                $return .= '</a> <span class="'.$child_file['extension'].$child_file['name'].'"></span>';  
     81                $return .= '</li>'; 
     82              }  
     83              //img 
     84              else if(in_array($child_file['extension'], $this->theme_controller->image_type_posibilities)) { 
     85                $return .= '<li class="'.$child_file['extension'].' small_icons">'; 
     86                $return .= '<a href="'.$child_file['url'].'" class="open_image thickbox" target="_blank"><img src="'.$child_file['url'].'"> '; 
     87                $return .= $child_file['name']; 
     88                $return .= '</a>';  
     89                $return .= '</li>';     
     90              }  
     91              // dwn 
     92              else if(in_array($child_file['extension'], $this->theme_controller->download_type_possibilities))  { 
     93                $return .= '<li class="'.$child_file['extension'].' small_icons">'; 
     94                $return .= '<a href="'.$child_file['url'].'" class="dwn_file" target="_blank" download><img src="'.$logoImage.'"> '; 
     95                $return .= $child_file['name']; 
     96                $return .= '</a>';  
     97                $return .= '</li>';    
     98              } else { 
     99                $return .= '<li class="'.$child_file['extension'].' small_icons">'; 
     100                $return .= '<a href="javascript:void(0)" class="open_file" data-path="'.$child_file['path'].'" data-name="'.$child_file['extension'].$child_file['name'].'" data-file="'.$child_file['file'].'" data-downloadfile="'.$child_file['url'].'"><img src="'.$logoImage.'"> '; 
     101                $return .= $child_file['name']; 
     102                $return .= '</a>';  
     103                $return .= '</li>';  
     104             } 
     105        } 
     106        $return .= '</ul>'; 
     107        } 
     108        echo $return; 
     109        die; 
     110    } 
     111        public function mk_plugin_editor_folder_open() { 
     112        $folder_path = str_replace('\\\\','\\',$_POST['path']); 
     113        $child_files = $this->theme_controller->get_files_and_folders( $folder_path, '0', 'plugin' ); 
    57114        $return = ''; 
    58115        if(!empty($child_files[-1])) { 
     
    250307      $complete_directory = $current_theme_root . $directory; 
    251308      if ( !is_dir( $complete_directory ) ) { 
    252         mkdir( $complete_directory, 0755, true ); 
     309        mkdir( $complete_directory, 0777, true ); 
    253310      } 
    254311       
  • theme-editor/trunk/app/view/js/theme_editor.js

    r1644634 r1645656  
    5555} 
    5656}); 
     57jQuery('#plugin-folders').on('click', '.open_folder', function() { 
     58    var path = jQuery(this).data('path'); 
     59    var folder_name = jQuery(this).data('name'); 
     60    var content = jQuery('.'+folder_name).html(); 
     61    if(content) { 
     62        jQuery('.'+folder_name).html(''); 
     63    } else { 
     64         jQuery.ajax({ 
     65             type : "post", 
     66             url : ajaxurl, 
     67             data : {action: "mk_plugin_editor_folder_open", path : path, folder_name: folder_name}, 
     68             success: function(response) { 
     69                jQuery('.'+folder_name).html(response); 
     70             } 
     71     });     
     72} 
     73}); 
    5774/* 
    5875End Open Sub Folders 
     
    6279*/   
    6380jQuery('#theme-folders').on('click', '.open_file', function() { 
     81    jQuery('.open_file').removeClass('active_file'); 
     82    jQuery(this).addClass('active_file'); 
     83    var path = jQuery(this).data('path'); 
     84    var file_name = jQuery(this).data('name'); 
     85    var file_url = jQuery(this).data('downloadfile'); 
     86    var current_file = jQuery(this).data('file'); 
     87         jQuery.ajax({ 
     88             type : "post", 
     89             url : ajaxurl, 
     90             data : {action: "mk_theme_editor_file_open", path : path, file_name: file_name}, 
     91             success: function(response) { 
     92                 jQuery('.current_file').text(current_file); 
     93                 jQuery('#path').val(path); 
     94                 jQuery('#file_url').val(file_url); 
     95                 jQuery('#new-content').val(response); 
     96                 editor.setValue(response); 
     97             } 
     98     });     
     99}); 
     100 
     101/* 
     102Open File Content 
     103*/   
     104jQuery('#plugin-folders').on('click', '.open_file', function() { 
    64105    jQuery('.open_file').removeClass('active_file'); 
    65106    jQuery(this).addClass('active_file'); 
     
    94135    var theme_name = jQuery('#theme_name').val(); 
    95136    window.location.href="admin-post.php?action=mk_theme_editor_download_te_theme&theme_name="+theme_name+"&_wpnonce="+mk_nonce; 
     137}); 
     138/* Theme Download */  
     139jQuery('.download-plugin').click(function(e) { 
     140    var plugin_name = jQuery('#plugin_name').val(); 
     141    window.location.href="admin-post.php?action=mk_theme_editor_download_te_plugin&plugin_name="+plugin_name+"&_wpnonce="+mk_nonce; 
    96142}); 
    97143/* End File Download */ 
  • theme-editor/trunk/app/view/plugin_editor.php

    r1644634 r1645656  
     1<?php if ( ! defined( 'ABSPATH' ) ) exit; 
     2use te\app\thm_cnt\theme_editor_theme_controller;   
     3$this->theme_controller->load_css(); ?> 
     4<div class="wrap"> 
     5<?php $this->theme_controller->load_help_desk(); ?> 
     6<?php screen_icon(); 
     7add_thickbox();  ?> 
     8<h2><?php _e( 'Edit Plugins', 'tm-editor' ); ?></h2> 
     9<?php $data = $this->plugin_controller->te_get_plugin_data();  
     10$plugin_folder = explode('/', $data['plugin']); 
     11$parent_files = $this->theme_controller->get_files_and_folders( $data['current_plugin_root'], '0', 'plugin' ); 
     12if ( in_array( $data['file'], (array) get_option( 'active_plugins', array() ) ) ): ?> 
     13        <div class="updated"> 
     14            <p><?php _e( '<strong>This plugin is currently activated!<br />Warning:</strong> Making changes to active plugins is not recommended.   If your changes cause a fatal error, the plugin will be automatically deactivated.', 'te-editor' ); ?></p> 
     15        </div> 
     16<?php endif; ?> 
     17     
     18 <div class="fileedit-sub"> 
     19        <div class="alignleft"> 
     20            <h3> 
     21                <?php 
     22                    if ( is_plugin_active( $data['plugin'] ) ) { 
     23                        if ( is_writable( $data['real_file'] ) ) { 
     24                            echo __( 'Editing <span class="current_file">', 'te-editor' ) . $data['file'] . __( '</span> (active)', 'te-editor' ); 
     25                        } 
     26                        else { 
     27                            echo __( 'Browsing <span class="current_file">', 'te-editor' ) . $data['file'] . __( '</span> (active)', 'te-editor' ); 
     28                        } 
     29                    } else { 
     30                        if ( is_writable( $data['real_file'] ) ) { 
     31                            echo __( 'Editing <span class="current_file">', 'te-editor' ) . $data['file'] . __( '</span> (inactive)', 'te-editor' ); 
     32                        } 
     33                        else { 
     34                            echo __( 'Browsing <span class="current_file">', 'te-editor' ) . $data['file'] . __( '</span> (inactive)', 'te-editor' ); 
     35                        } 
     36                    } 
     37                ?> 
     38            </h3> 
     39        </div> 
     40      <div class="alignright"> 
     41            <form action="plugins.php?page=theme_editor_plugin" method="post"> 
     42                <strong><label for="plugin"><?php _e( 'Select plugin to edit:', 'te-editor' ); ?></label></strong> 
     43                <select name="plugin" id="plugin"> 
     44                    <?php 
     45                        foreach( $data['plugins'] as $plugin_key => $a_plugin ) { 
     46                            $plugin_name = $a_plugin['Name']; 
     47                            if ( $plugin_key == $data['plugin'] ) { 
     48                                $selected = ' selected="selected"'; 
     49                            } 
     50                            else { 
     51                                $selected = ''; 
     52                            } 
     53                            $plugin_name = esc_attr( $plugin_name ); 
     54                            $plugin_key = esc_attr( $plugin_key ); ?> 
     55                            <option value="<?php echo $plugin_key; ?>" <?php echo $selected; ?>><?php echo $plugin_name; ?></option> 
     56                        <?php 
     57                        } 
     58                    ?> 
     59                </select> 
     60                <input type='submit' name='submit' class="button-secondary" value="<?php _e( 'Select', 'te-editor' ); ?>" /> 
     61            </form> 
     62        </div> 
     63        <br class="clear" /> 
     64    </div>    
     65   <div id="templateside">       
     66        <h3><?php _e( 'Plugin Files', 'te-editor' ); ?></h3> 
     67        <div class="theme_action_section"><a href="#TB_inline?width=600&height=550&inlineId=theme_upload" class="thickbox" title="Upload Files and Folders"><?php _e( 'Upload', 'tm-editor' ); ?></a> | <a href="#TB_inline?width=600&height=550&inlineId=create_folder" class="thickbox" title="Create Folder and File"><?php _e( 'Create', 'tm-editor' ); ?></a> | <a href="#TB_inline?width=600&height=550&inlineId=remove_folder" class="thickbox" title="Remove Folder and File"><?php _e( 'Remove ', 'tm-editor' ); ?></a></div> 
     68        <div id="theme-editor-files"> 
     69            <ul id="plugin-folders" class="plugin-folders"> 
     70            <?php /* code start */  
     71            if(!empty($parent_files)) { 
     72                foreach($parent_files as $parent_file) {  
     73                  $logoImagePath = MK_THEME_EDITOR_PATH.'app/view/images/'.$parent_file['extension'].'.png'; 
     74                  $logoImage = MK_THEME_EDITOR_URL.'app/view/images/'.$parent_file['extension'].'.png'; 
     75                  if(!file_exists($logoImagePath)) { 
     76                       $logoImage = MK_THEME_EDITOR_URL.'app/view/images/def.png';   
     77                     } 
     78                 //folder    
     79                 if($parent_file['filetype'] == 'folder') { ?> 
     80                    <li class="<?php echo $parent_file['extension'];?> small_icons"><a href="javascript:void(0)" class="open_folder" data-path="<?php echo $parent_file['path']?>" data-name="<?php echo $parent_file['extension'].$parent_file['name']?>"><img src="<?php echo MK_THEME_EDITOR_URL.'app/view/images/'.$parent_file['extension']?>.png" /> <?php echo $parent_file['name']?></a> 
     81                      <span class="<?php echo $parent_file['extension'].$parent_file['name'];?>"></span>                
     82                    </li>  
     83                   <?php  } 
     84                   //img     
     85                    else if(in_array($parent_file['extension'], $this->theme_controller->image_type_posibilities)) { ?> 
     86                    <li class="<?php echo $parent_file['extension'];?> small_icons"> 
     87 <a href="<?php echo $parent_file['url']?>" class="open_image thickbox" target="_blank"><img src="<?php echo $parent_file['url']?>" /> <?php echo $parent_file['name']?> </a> 
     88                    </li>    
     89                    <?php } 
     90                     //dwn 
     91                    else if(in_array($parent_file['extension'], $this->theme_controller->download_type_possibilities)) { ?> 
     92                    <li class="<?php echo $parent_file['extension'];?> small_icons"> 
     93<a href="<?php echo $parent_file['url']?>" class="dwn_file" target="_blank" download><img src="<?php echo $logoImage; ?>" /> <?php echo $parent_file['name']?></a> 
     94                    </li>    
     95                    <?php } else { ?> 
     96                    <li class="<?php echo $parent_file['extension'];?> small_icons"> 
     97                    <a href="javascript:void(0)" class="open_file" data-path="<?php echo $parent_file['path']?>" data-name="<?php echo $parent_file['extension'].$parent_file['name']?>" data-file="<?php echo $parent_file['file'];?>" data-downloadfile="<?php echo $parent_file['url'];?>"><img src="<?php echo $logoImage;?>" /> <?php echo $parent_file['name']?></a> 
     98                    </li>    
     99                <?php }                  
     100                } // end parent foreach 
     101            } 
     102            /* end code */ 
     103            ?> 
     104            </ul> 
     105        </div> 
     106    </div>  
     107    <form name="template" id="template_form" action="" method="post" class="ajax-editor-update" style="float:left width:auto;overflow:hidden;"> 
     108<div class="te_popup" style="display:none;"> 
     109<div class="te_popup_message"></div> 
     110<div class="clear"></div> 
     111</div> 
     112        <?php wp_nonce_field( 'edit-theme_' . $data['real_file'] ); ?> 
     113            <div> 
     114            <textarea cols="70" rows="25" name="new-content" id="new-content" tabindex="1"><?php echo $data['content'];?></textarea> 
     115            <input type="hidden" id="path" name="path" value="<?php echo esc_attr( $data['real_file'] ); ?>" /> 
     116            <input type="hidden" id="file_url" name="file_url" value="<?php echo esc_attr( $data['file'] ); ?>" /> 
     117             <input type="hidden" id="plugin_name" name="plugin_name" value="<?php echo $plugin_folder[0]; ?>" /> 
     118            <?php 
     119                $pathinfo = pathinfo( $data['file'] ); 
     120            ?> 
     121        </div> 
     122        <p class="submit"> 
     123            <input type="submit" name='submit' class="button-primary update_file" value="<?php _e( 'Update File', 'tm-editor' ); ?>" />          
     124            <input type="button" class="button-secondary download-file" value="<?php _e( 'Download File', 'tm-editor' ); ?>"/> 
     125            <input type="button" class="button-secondary download-plugin" value="<?php _e( 'Download Plugin', 'tm-editor' ); ?>" /> 
     126        </p> 
     127        <?php if (!is_writable( $data['real_file'] ) ): ?> 
     128            <div class="error writable-error"> 
     129                <p> 
     130                    <em><?php _e( 'You need to make this file writable before you can save your changes. See <a href="http://codex.wordpress.org/Changing_File_Permissions" target="_blank">the Codex</a> for more information.' ); ?></em> 
     131                </p> 
     132            </div> 
     133        <?php endif; ?> 
     134    </form>   
     135<?php $nonce = wp_create_nonce( 'mk-fd-nonce' );  
     136$current_theme = str_replace('\\','/',$data['current_plugin_root']).'/';  
     137?> 
     138   <script> 
     139       var mk_nonce = "<?php echo $nonce; ?>"; 
     140       var mk_current_theme = "<?php echo $current_theme; ?>"; 
     141       var current_cm_theme = "<?php echo $this->theme_controller->defcmt;?>"; 
     142   </script> 
     143 <?php $this->theme_controller->load_js();  ?>   
     144     
     145<?php /* Upload Process Start */ ?>     
     146<div id="theme_upload" style="display:none;"> 
     147<div class="te_upload_folder_file"> 
     148<h4><?php _e( 'Upload ', 'te-editor' ); ?></h4> 
     149<span class="up_response"></span> 
     150    <form enctype="multipart/form-data" id="theme_upload_form" method="POST"> 
     151                            <p class="description"> 
     152                                <?php _e( 'To', 'te-editor' ); ?>: <?php echo basename( dirname( $data['current_plugin_root'] ) ) . '/' . basename( $data['current_plugin_root'] ) . '/'; ?> 
     153                            </p> 
     154                            <input type="hidden" name="current_theme_root" value="<?php echo $data['current_plugin_root'].'/'; ?>" id="current_theme_root" /> 
     155                            <input type="text" name="directory" id="file_directory" style="width:190px" placeholder="<?php _e( 'Optional: Sub-Directory', 'te-editor' ); ?>" /> 
     156                            <input name="file" type="file" id="upload_file" style="width:180px" /> 
     157                            <input id="submit" class="button button-primary" name="submit" value="Upload File" type="submit"> 
     158                    </form>    
     159</div> 
     160</div> 
     161<?php /* end upload Process */?>  
     162<?php /* Create Folder Process Start */ ?>     
     163<div id="create_folder" style="display:none;"> 
     164<span class="te_response"></span> 
     165 
     166<div class="te_create_folder"> 
     167<h4><?php _e( 'Create a New Folder: ', 'te-editor' ); ?></h4> 
     168<p> 
     169<label for="new-folder-path"><?php _e( 'New folder will be created in: ', 'te-editor' ); ?></label> <br> 
     170<img alt="" src="<?php echo MK_THEME_EDITOR_URL.'app/view/images/';?>homeb.gif" height="15" width="15"> <code><?php echo $current_theme;?></code> 
     171</p> 
     172<p><label for="newdir"><?php _e( 'New Folder Name: ', 'te-editor' ); ?></label><input type="text" id="nfafn" name="nfafn" value="" /></p> 
     173 <p><input name="submit" class="button-primary" value="Create New Folder" type="button" id="cfaf"></p> 
     174 </div> 
     175<hr />  
     176<div class="te_create_file"> 
     177<h4><?php _e( 'Create a New File: ', 'te-editor' ); ?></h4> 
     178<p> 
     179<label for="new-folder-path"><?php _e( 'New File will be created in: ', 'te-editor' ); ?></label> <br> 
     180<img alt="" src="<?php echo MK_THEME_EDITOR_URL.'app/view/images/';?>homeb.gif" height="15" width="15"> <code><?php echo $current_theme;?></code> 
     181</p> 
     182<p><label for="newdir"><?php _e( 'New File Name: ', 'te-editor' ); ?></label><input type="text" id="nfanf" name="nfanf" value="" /></p> 
     183 <p><input name="submit" class="button-primary" value="Create New File" type="button" id="cffa"></p> 
     184 </div> 
     185</div> 
     186<?php /* end Create Folder Process */ ?>  
     187 
     188<?php /* Remove File and folder Start */ ?> 
     189<div id="remove_folder" style="display:none;"> 
     190<div class="te_create_folder"> 
     191<p class="te_error"><?php _e( 'Warning: Please be careful before remove any folder or file.', 'te-editor' ); ?></p> 
     192<span class="ter_response"></span>   
     193<p> 
     194<label for="new-folder-path"><?php _e( 'Current Theme Path: ', 'te-editor' ); ?></label> <br> 
     195<img alt="" src="<?php echo MK_THEME_EDITOR_URL.'app/view/images/';?>homeb.gif" height="15" width="15"> <code><?php echo $current_theme;?></code> 
     196</p> 
     197<h4><?php _e( 'Remove Folder: ', 'te-editor' ); ?></h4> 
     198<p><label for="newdir"><?php _e( 'Folder Path which you want to remove: ', 'te-editor' ); ?></label><input type="text" id="rfafn" name="nfafn" value="" /></p> 
     199 <p><input name="submit" class="button-primary" value="Remove Folder" type="button" id="rfaf"></p> 
     200 </div> 
     201<hr />  
     202 <div class="te_create_folder"> 
     203<h4><?php _e( 'Remove File: ', 'te-editor' ); ?></h4> 
     204<p><label for="newdir"><?php _e( 'File Path which you want to remove: ', 'te-editor' ); ?></label><input type="text" id="rfanf" name="nfanf" value="" /></p> 
     205 <p><input name="submit" class="button-primary" value="Remove File" type="button" id="rffa"></p> 
     206 </div>  
     207</div> 
     208<?php /* Remove File and folder end */ ?>    
     209</div> 
  • theme-editor/trunk/app/view/settings.php

    r1644634 r1645656  
    33$msg = isset($_GET['msg']) ? $_GET['msg'] : ''; 
    44if(isset($_POST['submit_mk_te_settings']) && wp_verify_nonce( $_POST['mk_te_nonce_field'], 'mk_te_action' )): 
    5 $this->sava_mk_settings($_POST); 
     5 $this->sava_mk_settings($_POST); 
    66endif; ?> 
    77<div class="wrap te-settings"> 
    8 <h1><?php _e('Settings', 'te-editor');?></h1> 
     8<h1><span class="dashicons dashicons-admin-settings"></span> <?php _e('Settings', 'te-editor');?></h1> 
    99<?php if(!empty($msg) && $msg == 1): 
    1010 $this->success('Success: Settings Saved!'); 
     
    1515<form action="" method="post"> 
    1616<?php  wp_nonce_field( 'mk_te_action', 'mk_te_nonce_field' ); ?> 
    17 <table class="form-table"> 
    18 <tbody> 
    19 <tr> 
    20 <th scope="row"><label for="e_d_t_e"><?php _e('Enable code editor for theme', 'te-editor');?></label></th> 
    21 <td><input type="radio" value="yes" name="e_d_t_e" <?php if(isset($opt['e_d_t_e']) && $opt['e_d_t_e'] == 'yes') { ?>checked="checked"<?php } ?> /><?php _e('Yes', 'te-editor');?> <input type="radio" value="no" name="e_d_t_e" <?php if(isset($opt['e_d_t_e']) && $opt['e_d_t_e'] == 'no') { ?>checked="checked"<?php } ?> /><?php _e('No', 'te-editor');?> 
    22 <p class="description" id="tagline-e_d_t_e"><?php _e('This will Enable/Disable the theme editor.<br/><strong>Default: </strong>Yes', 'te-editor');?></p></td> 
    23 </tr> 
    24 <tr> 
    25 <th scope="row"><label for="code_editor_theme"><?php _e('Code Editor Theme', 'te-editor');?></label></th> 
    26 <td> 
    27 <select name="code_editor_theme" id="code_editor_theme"> 
    28   <?php foreach($cm_themes as $key => $cm_theme): 
    29   if(isset($opt['code_editor_theme']) && $opt['code_editor_theme'] == $cm_theme) {  ?> 
    30   <option value="<?php echo $cm_theme; ?>" selected="selected"><?php echo ucwords(str_replace('-',' ',$cm_theme)); ?></option> 
    31   <?php } else { ?> 
    32   <option value="<?php echo $cm_theme; ?>"><?php echo ucwords(str_replace('-',' ',$cm_theme)); ?></option> 
    33   <?php } ?> 
    34   <?php endforeach;?> 
    35 </select> 
    36 <p class="description" id="tagline-code_editor_theme"><?php _e('Allows you to select theme for theme editor.<br/><strong>Default: </strong>Cobalt', 'te-editor');?></p></td> 
    37 </td> 
    38 </tr> 
    39 <tr> 
    40 <th scope="row"><label for="e_w_d_t_e"><?php _e('Disable Default Theme Editor?', 'te-editor');?></label></th> 
    41 <td><input type="radio" value="yes" name="e_w_d_t_e" <?php if(isset($opt['e_w_d_t_e']) && $opt['e_w_d_t_e'] == 'yes') { ?>checked="checked"<?php } ?> /><?php _e('Yes', 'te-editor');?> <input type="radio" value="no" name="e_w_d_t_e" <?php if(isset($opt['e_w_d_t_e']) && $opt['e_w_d_t_e'] == 'no') { ?>checked="checked"<?php } ?> /><?php _e('No', 'te-editor');?> 
    42 <p class="description" id="tagline-e_w_d_t_e"><?php _e('This will Enable/Disable the Default theme editor.<br/><strong>Default: </strong>Yes', 'te-editor');?></p></td> 
    43 </tr> 
    44 </tbody> 
    45 </table> 
    46 <p class="submit"><input name="submit_mk_te_settings" id="submit" class="button button-primary" value="Save Changes" type="submit"></p> 
     17<div id="tabs" class="te_settings_tabs"> 
     18    <ul> 
     19        <li><a href="#theme-settings"><span><?php _e('Theme Editor', 'te-editor');?></span></a></li> 
     20        <li><a href="#plugin-settings"><span><?php _e('Plugin Editor', 'te-editor');?></span></a></li> 
     21        <li><a href="#editor-settings"><span><?php _e('Code Editor', 'te-editor');?></span></a></li> 
     22    </ul> 
     23    <div id="theme-settings" class="te_settings_tabs_sec"> 
     24     <?php /* Theme Settings */ ?> 
     25        <table class="form-table"> 
     26        <tbody> 
     27        <tr> 
     28        <th scope="row"><label for="e_d_t_e"><?php _e('Enable code editor for theme', 'te-editor');?></label></th> 
     29        <td><input type="radio" value="yes" name="e_d_t_e" <?php if(isset($opt['e_d_t_e']) && $opt['e_d_t_e'] == 'yes') { ?>checked="checked"<?php } ?> /><?php _e('Yes', 'te-editor');?> <input type="radio" value="no" name="e_d_t_e" <?php if(isset($opt['e_d_t_e']) && $opt['e_d_t_e'] == 'no') { ?>checked="checked"<?php } ?> /><?php _e('No', 'te-editor');?> 
     30        <p class="description" id="tagline-e_d_t_e"><?php _e('This will Enable/Disable the theme editor.<br/><strong>Default: </strong>Yes', 'te-editor');?></p></td> 
     31        </tr> 
     32        <tr> 
     33        <th scope="row"><label for="e_w_d_t_e"><?php _e('Disable Default Theme Editor?', 'te-editor');?></label></th> 
     34        <td><input type="radio" value="yes" name="e_w_d_t_e" <?php if(isset($opt['e_w_d_t_e']) && $opt['e_w_d_t_e'] == 'yes') { ?>checked="checked"<?php } ?> /><?php _e('Yes', 'te-editor');?> <input type="radio" value="no" name="e_w_d_t_e" <?php if(isset($opt['e_w_d_t_e']) && $opt['e_w_d_t_e'] == 'no') { ?>checked="checked"<?php } ?> /><?php _e('No', 'te-editor');?> 
     35        <p class="description" id="tagline-e_w_d_t_e"><?php _e('This will Enable/Disable the Default theme editor.<br/><strong>Default: </strong>Yes', 'te-editor');?></p></td> 
     36        </tr> 
     37        </tbody> 
     38        </table>  
     39    </div> 
     40    <div id="plugin-settings" class="te_settings_tabs_sec"> 
     41       <?php /* Plugin Settings */ ?> 
     42        <table class="form-table"> 
     43        <tbody> 
     44        <tr> 
     45        <th scope="row"><label for="e_d_p_e"><?php _e('Enable code editor for plugin', 'te-editor');?></label></th> 
     46        <td><input type="radio" value="yes" name="e_d_p_e" <?php if(isset($opt['e_d_p_e']) && $opt['e_d_p_e'] == 'yes') { ?>checked="checked"<?php } ?> /><?php _e('Yes', 'te-editor');?> <input type="radio" value="no" name="e_d_p_e" <?php if(isset($opt['e_d_p_e']) && $opt['e_d_p_e'] == 'no') { ?>checked="checked"<?php } ?> /><?php _e('No', 'te-editor');?> 
     47        <p class="description" id="tagline-e_d_p_e"><?php _e('This will Enable/Disable the plugin editor.<br/><strong>Default: </strong>Yes', 'te-editor');?></p></td> 
     48        </tr> 
     49        <tr> 
     50        <th scope="row"><label for="e_w_d_p_e"><?php _e('Disable Default Plugin Editor?', 'te-editor');?></label></th> 
     51        <td><input type="radio" value="yes" name="e_w_d_p_e" <?php if(isset($opt['e_w_d_p_e']) && $opt['e_w_d_p_e'] == 'yes') { ?>checked="checked"<?php } ?> /><?php _e('Yes', 'te-editor');?> <input type="radio" value="no" name="e_w_d_p_e" <?php if(isset($opt['e_w_d_p_e']) && $opt['e_w_d_p_e'] == 'no') { ?>checked="checked"<?php } ?> /><?php _e('No', 'te-editor');?> 
     52        <p class="description" id="tagline-e_w_d_p_e"><?php _e('This will Enable/Disable the Default plugin editor.<br/><strong>Default: </strong>Yes', 'te-editor');?></p></td> 
     53        </tr> 
     54        </tbody> 
     55        </table> 
     56    </div> 
     57    <div id="editor-settings" class="te_settings_tabs_sec"> 
     58    <?php /* Code Editor */?> 
     59    <table class="form-table"> 
     60    <tbody> 
     61    <tr> 
     62    <th scope="row"><label for="code_editor_theme"><?php _e('Code Editor Theme', 'te-editor');?></label></th> 
     63    <td> 
     64    <select name="code_editor_theme" id="code_editor_theme"> 
     65      <?php foreach($cm_themes as $key => $cm_theme): 
     66      if(isset($opt['code_editor_theme']) && $opt['code_editor_theme'] == $cm_theme) {  ?> 
     67      <option value="<?php echo $cm_theme; ?>" selected="selected"><?php echo ucwords(str_replace('-',' ',$cm_theme)); ?></option> 
     68      <?php } else { ?> 
     69      <option value="<?php echo $cm_theme; ?>"><?php echo ucwords(str_replace('-',' ',$cm_theme)); ?></option> 
     70      <?php } ?> 
     71      <?php endforeach;?> 
     72    </select> 
     73    <p class="description" id="tagline-code_editor_theme"><?php _e('Allows you to select theme for theme editor.<br/><strong>Default: </strong>Cobalt', 'te-editor');?></p></td> 
     74    </td> 
     75    </tr> 
     76    </tbody> 
     77    </table> 
     78    </div> 
     79</div> 
     80 
     81<p class="submit te_submit_button"><input name="submit_mk_te_settings" id="submit" class="button button-primary" value="Save Changes" type="submit"></p> 
    4782</form> 
    4883</div> 
  • theme-editor/trunk/app/view/theme_editor.php

    r1644634 r1645656  
    55<?php screen_icon(); 
    66add_thickbox();  ?> 
    7 <h2><?php _e( 'Edit Themes', 'tm-editor' ); ?></h2> 
     7<h2><?php _e( 'Edit Themes', 'te-editor' ); ?></h2> 
    88<?php  
    99$theme = wp_get_theme();     
     
    1313if ( is_object( $data['wp_theme'] ) && $data['wp_theme']->name == $theme->name ): ?> 
    1414        <div class="updated"> 
    15             <p><?php _e( '<strong>This theme is currently activated!<br />Warning:</strong> Making changes to active themes is not recommended.', 'tm-editor' ); ?></p> 
     15            <p><?php _e( '<strong>This theme is currently activated!<br />Warning:</strong> Making changes to active themes is not recommended.', 'te-editor' ); ?></p> 
    1616        </div> 
    1717    <?php endif; ?>    
     
    2626                <?php 
    2727                    if ( is_writable( $data['real_file'] ) ) { 
    28                         echo '<span class="writable_status">' . __( 'Editing', 'tm-editor' ) . '</span> <span class="current_file">' . $data['file'] . '</span>'; 
     28                        echo '<span class="writable_status">' . __( 'Editing', 'te-editor' ) . '</span> <span class="current_file">' . $data['file'] . '</span>'; 
    2929                    } 
    3030                    else { 
    31                         echo '<span class="writable_status">' . __( 'Browsing', 'tm-editor' ) . '</span> <span class="current_file">' . $data['file'] . '</span>'; 
     31                        echo '<span class="writable_status">' . __( 'Browsing', 'te-editor' ) . '</span> <span class="current_file">' . $data['file'] . '</span>'; 
    3232                    } 
    3333                ?> 
     
    3636        <div class="alignright"> 
    3737            <form action="themes.php?page=theme_editor_theme" method="post"> 
    38                 <strong><label for="plugin"><?php _e( 'Select theme to edit:', 'tm-editor' ); ?></label></strong> 
     38                <strong><label for="plugin"><?php _e( 'Select theme to edit:', 'te-editor' ); ?></label></strong> 
    3939                <select name="theme" id="theme"> 
    4040                    <?php if ( WP_34 ): ?> 
     
    6565                    <?php endif; ?> 
    6666                </select> 
    67                 <input type='submit' name='submit' class="button-secondary" value="<?php _e( 'Select', 'tm-editor' ); ?>" /> 
     67                <input type='submit' name='submit' class="button-secondary" value="<?php _e( 'Select', 'te-editor' ); ?>" /> 
    6868            </form> 
    6969        </div> 
     
    7171    </div> 
    7272 <div id="templateside">         
    73         <h3><?php _e( 'Theme Files', 'tm-editor' ); ?></h3> 
    74         <div class="theme_action_section"><a href="#TB_inline?width=600&height=550&inlineId=theme_upload" class="thickbox" title="Upload Files and Folders"><?php _e( 'Upload', 'tm-editor' ); ?></a> | <a href="#TB_inline?width=600&height=550&inlineId=create_folder" class="thickbox" title="Create Folder and File"><?php _e( 'Create', 'tm-editor' ); ?></a> | <a href="#TB_inline?width=600&height=550&inlineId=remove_folder" class="thickbox" title="Remove Folder and File"><?php _e( 'Remove ', 'tm-editor' ); ?></a></div> 
     73        <h3><?php _e( 'Theme Files', 'te-editor' ); ?></h3> 
     74        <div class="theme_action_section"><a href="#TB_inline?width=600&height=550&inlineId=theme_upload" class="thickbox" title="Upload Files and Folders"><?php _e( 'Upload', 'te-editor' ); ?></a> | <a href="#TB_inline?width=600&height=550&inlineId=create_folder" class="thickbox" title="Create Folder and File"><?php _e( 'Create', 'te-editor' ); ?></a> | <a href="#TB_inline?width=600&height=550&inlineId=remove_folder" class="thickbox" title="Remove Folder and File"><?php _e( 'Remove ', 'te-editor' ); ?></a></div> 
    7575        <div id="theme-editor-files"> 
    7676            <ul id="theme-folders" class="theme-folders"> 
     
    132132            <?php if ( isset( $_GET['phperror'] ) ): ?> 
    133133                <input type="hidden" name="phperror" value="1" /> 
    134                 <input type="submit" name="submit" class="button-primary" value="<?php _e( 'Update File and Attempt to Reactivate', 'tm-editor' ); ?>" /> 
     134                <input type="submit" name="submit" class="button-primary" value="<?php _e( 'Update File and Attempt to Reactivate', 'te-editor' ); ?>" /> 
    135135            <?php else: ?> 
    136                 <input type="submit" name='submit' class="button-primary update_file" value="<?php _e( 'Update File', 'tm-editor' ); ?>" /> 
     136                <input type="submit" name='submit' class="button-primary update_file" value="<?php _e( 'Update File', 'te-editor' ); ?>" /> 
    137137            <?php endif; ?> 
    138138             
    139             <input type="button" class="button-secondary download-file" value="<?php _e( 'Download File', 'tm-editor' ); ?>"/> 
    140             <input type="button" class="button-secondary download-theme" value="<?php _e( 'Download Theme', 'tm-editor' ); ?>" /> 
     139            <input type="button" class="button-secondary download-file" value="<?php _e( 'Download File', 'te-editor' ); ?>"/> 
     140            <input type="button" class="button-secondary download-theme" value="<?php _e( 'Download Theme', 'te-editor' ); ?>" /> 
    141141        </p> 
    142142        <?php if (!is_writable( $data['real_file'] ) ): ?> 
     
    160160<div id="theme_upload" style="display:none;"> 
    161161<div class="te_upload_folder_file"> 
    162 <h4><?php _e( 'Upload ', 'tm-editor' ); ?></h4> 
     162<h4><?php _e( 'Upload ', 'te-editor' ); ?></h4> 
    163163<span class="up_response"></span> 
    164164    <form enctype="multipart/form-data" id="theme_upload_form" method="POST"> 
     
    180180 
    181181<div class="te_create_folder"> 
    182 <h4><?php _e( 'Create a New Folder: ', 'tm-editor' ); ?></h4> 
     182<h4><?php _e( 'Create a New Folder: ', 'te-editor' ); ?></h4> 
    183183<p> 
    184 <label for="new-folder-path"><?php _e( 'New folder will be created in: ', 'tm-editor' ); ?></label> <br> 
     184<label for="new-folder-path"><?php _e( 'New folder will be created in: ', 'te-editor' ); ?></label> <br> 
    185185<img alt="" src="<?php echo MK_THEME_EDITOR_URL.'app/view/images/';?>homeb.gif" height="15" width="15"> <code><?php echo $current_theme;?></code> 
    186186</p> 
    187 <p><label for="newdir"><?php _e( 'New Folder Name: ', 'tm-editor' ); ?></label><input type="text" id="nfafn" name="nfafn" value="" /></p> 
     187<p><label for="newdir"><?php _e( 'New Folder Name: ', 'te-editor' ); ?></label><input type="text" id="nfafn" name="nfafn" value="" /></p> 
    188188 <p><input name="submit" class="button-primary" value="Create New Folder" type="button" id="cfaf"></p> 
    189189 </div> 
    190190<hr />  
    191191<div class="te_create_file"> 
    192 <h4><?php _e( 'Create a New File: ', 'tm-editor' ); ?></h4> 
     192<h4><?php _e( 'Create a New File: ', 'te-editor' ); ?></h4> 
    193193<p> 
    194 <label for="new-folder-path"><?php _e( 'New File will be created in: ', 'tm-editor' ); ?></label> <br> 
     194<label for="new-folder-path"><?php _e( 'New File will be created in: ', 'te-editor' ); ?></label> <br> 
    195195<img alt="" src="<?php echo MK_THEME_EDITOR_URL.'app/view/images/';?>homeb.gif" height="15" width="15"> <code><?php echo $current_theme;?></code> 
    196196</p> 
    197 <p><label for="newdir"><?php _e( 'New File Name: ', 'tm-editor' ); ?></label><input type="text" id="nfanf" name="nfanf" value="" /></p> 
     197<p><label for="newdir"><?php _e( 'New File Name: ', 'te-editor' ); ?></label><input type="text" id="nfanf" name="nfanf" value="" /></p> 
    198198 <p><input name="submit" class="button-primary" value="Create New File" type="button" id="cffa"></p> 
    199199 </div> 
     
    204204<div id="remove_folder" style="display:none;"> 
    205205<div class="te_create_folder"> 
    206 <p class="te_error"><?php _e( 'Warning: Please be careful before remove any folder or file.', 'tm-editor' ); ?></p> 
     206<p class="te_error"><?php _e( 'Warning: Please be careful before remove any folder or file.', 'te-editor' ); ?></p> 
    207207<span class="ter_response"></span>   
    208208<p> 
    209 <label for="new-folder-path"><?php _e( 'Current Theme Path: ', 'tm-editor' ); ?></label> <br> 
     209<label for="new-folder-path"><?php _e( 'Current Theme Path: ', 'te-editor' ); ?></label> <br> 
    210210<img alt="" src="<?php echo MK_THEME_EDITOR_URL.'app/view/images/';?>homeb.gif" height="15" width="15"> <code><?php echo $current_theme;?></code> 
    211211</p> 
    212 <h4><?php _e( 'Remove Folder: ', 'tm-editor' ); ?></h4> 
    213 <p><label for="newdir"><?php _e( 'Folder Path which you want to remove: ', 'tm-editor' ); ?></label><input type="text" id="rfafn" name="nfafn" value="" /></p> 
     212<h4><?php _e( 'Remove Folder: ', 'te-editor' ); ?></h4> 
     213<p><label for="newdir"><?php _e( 'Folder Path which you want to remove: ', 'te-editor' ); ?></label><input type="text" id="rfafn" name="nfafn" value="" /></p> 
    214214 <p><input name="submit" class="button-primary" value="Remove Folder" type="button" id="rfaf"></p> 
    215215 </div> 
    216216<hr />  
    217217 <div class="te_create_folder"> 
    218 <h4><?php _e( 'Remove File: ', 'tm-editor' ); ?></h4> 
    219 <p><label for="newdir"><?php _e( 'File Path which you want to remove: ', 'tm-editor' ); ?></label><input type="text" id="rfanf" name="nfanf" value="" /></p> 
     218<h4><?php _e( 'Remove File: ', 'te-editor' ); ?></h4> 
     219<p><label for="newdir"><?php _e( 'File Path which you want to remove: ', 'te-editor' ); ?></label><input type="text" id="rfanf" name="nfanf" value="" /></p> 
    220220 <p><input name="submit" class="button-primary" value="Remove File" type="button" id="rffa"></p> 
    221221 </div>  
  • theme-editor/trunk/readme.txt

    r1644634 r1645656  
    44Requires at least: 3.4 
    55Tested up to: 4.7.3 
    6 Stable tag: 1.0 
     6Stable tag: 1.1 
    77License: GPLv2 or later 
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html 
  • theme-editor/trunk/theme_editor.php

    r1644634 r1645656  
    55Description: create, edit, upload, download, delete Theme Files and folders 
    66Author: mndpsingh287 
    7 Version: 1.0 
     7Version: 1.1 
    88Author URI: https://profiles.wordpress.org/mndpsingh287 
    99Text Domain: theme-editor 
Note: See TracChangeset for help on using the changeset viewer.