Changeset 1176 for trunk/wp-admin/templates.php
- Timestamp:
- 04/25/2004 11:57:43 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/templates.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/templates.php
r1126 r1176 1 1 <?php 2 $title = "Template & file editing"; 2 require_once('../wp-includes/wp-l10n.php'); 3 4 $title = __("Template & file editing"); 3 5 4 6 function add_magic_quotes($array) { … … 15 17 function validate_file($file) { 16 18 if ('..' == substr($file,0,2)) 17 die ( 'Sorry, can’t edit files with ".." in the name. If you are trying to edit a file in your WordPress home directory, you can just type the name of the file in.');19 die (__('Sorry, can’t edit files with ".." in the name. If you are trying to edit a file in your WordPress home directory, you can just type the name of the file in.')); 18 20 19 21 if (':' == substr($file,1,1)) 20 die ( 'Sorry, can’t call files with their real path.');22 die (__('Sorry, can’t call files with their real path.')); 21 23 22 24 if ('/' == substr($file,0,1)) … … 59 61 60 62 if ($user_level < 5) { 61 die( '<p>You have do not have sufficient permissions to edit templates for this blog.</p>');63 die(__('<p>You have do not have sufficient permissions to edit templates for this blog.</p>')); 62 64 } 63 65 … … 84 86 85 87 if ($user_level <= 5) { 86 die( '<p>You have do not have sufficient permissions to edit templates for this blog.</p>');88 die(__('<p>You have do not have sufficient permissions to edit templates for this blog.</p>')); 87 89 } 88 90 … … 102 104 103 105 if ((substr($file,0,2) == 'wp') and (substr($file,-4,4) == '.php') and ($file != 'wp.php')) 104 $warning = ' — this is a WordPress file, be careful when editing it!';106 $warning = __(' — this is a WordPress file, be careful when editing it!'); 105 107 106 108 if (!$error) { … … 113 115 ?> 114 116 <?php if ('te' == $_GET['a']) : ?> 115 <div class="updated"><p>File edited successfully.</p></div>117 <div class="updated"><p><?php _e('File edited successfully.') ?></p></div> 116 118 <?php endif; ?> 117 119 <div class="wrap"> 118 120 <?php 119 echo "<p> Editing <strong>$file</strong>$warning</p>";121 echo "<p>" . sprintf(__('Editing <strong>%s</strong>'), $file) . " $warning</p>"; 120 122 121 123 if (!$error) { … … 130 132 echo "<input type='submit' name='submit' value='Update File »' tabindex='2' />"; 131 133 } else { 132 echo "<input type='button' name='oops' value=' (You cannot update that file/template: must make it writable, e.g. CHMOD 666)' tabindex='2' />";134 echo "<input type='button' name='oops' value='" . __('(You cannot update that file/template: must make it writable, e.g. CHMOD 666)') ."' tabindex='2' />"; 133 135 } 134 136 ?> … … 137 139 <?php 138 140 } else { 139 echo '<div class="error"><p> Oops, no such file exists! Double check the name and try again, merci.</p></div>';141 echo '<div class="error"><p>' . __('Oops, no such file exists! Double check the name and try again, merci.') . '</p></div>'; 140 142 } 141 143 ?> 142 144 </div> 143 145 <div class="wrap"> 144 <p> To edit a file, type its name here. You can edit any file <a href="http://wiki.wordpress.org/index.php/MakeWritable" title="Read more about making files writable">writable by the server</a>, e.g. CHMOD 666.</p>146 <p><?php _e('To edit a file, type its name here. You can edit any file <a href="http://wiki.wordpress.org/index.php/MakeWritable" title="Read more about making files writable">writable by the server</a>, e.g. CHMOD 666.') ?></p> 145 147 <form name="file" action="templates.php" method="get"> 146 148 <input type="text" name="file" /> 147 <input type="submit" name="submit" value=" Edit file »" />149 <input type="submit" name="submit" value="<?php _e('Edit file »') ?>" /> 148 150 </form> 149 <p> Common files: (click to edit)</p>151 <p><?php _e('Common files: (click to edit)') ?></p> 150 152 <ul> 151 <li><a href="templates.php?file=index.php"> Main Index</a></li>153 <li><a href="templates.php?file=index.php"><?php _e('Main Index') ?> </a></li> 152 154 <li><a href="templates.php?file=wp-comments.php">Comments</a></li> 153 <li><a href="templates.php?file=wp-comments-popup.php"> Popup comments</a></li>154 <li><a href="templates.php?file=.htaccess"> .htaccess (for rewrite rules)</a></li>155 <li><a href="templates.php?file=my-hacks.php"> my-hacks.php</a></li>155 <li><a href="templates.php?file=wp-comments-popup.php"><?php _e('Popup comments') ?> </a></li> 156 <li><a href="templates.php?file=.htaccess"><?php _e('.htaccess (for rewrite rules)') ?></a></li> 157 <li><a href="templates.php?file=my-hacks.php"><?php _e('my-hacks.php (legacy hacks support)') ?></a></li> 156 158 </ul> 157 159 <?php … … 172 174 </ul> 173 175 <?php endif; ?> 174 <p> Note: of course, you can also edit the files/templates in your text editor of choice and upload them. This online editor is only meant to be used when you don’t have access to a text editor or FTP client.</p>176 <p><?php _e('Note: of course, you can also edit the files/templates in your text editor of choice and upload them. This online editor is only meant to be used when you don’t have access to a text editor or FTP client.') ?></p> 175 177 </div> 176 178 <?php
Note: See TracChangeset
for help on using the changeset viewer.