author | Anthony Ly <anthonyly.com@gmail.com> |
Wed, 12 Dec 2012 18:57:40 -0800 | |
changeset 199 | 9ff3c84d7b27 |
parent 194 | 32102edaa81b |
child 204 | 09a1c134465b |
permissions | -rw-r--r-- |
136 | 1 |
<?php |
2 |
/** |
|
3 |
* Edit plugin editor administration panel. |
|
4 |
* |
|
5 |
* @package WordPress |
|
6 |
* @subpackage Administration |
|
7 |
*/ |
|
8 |
||
9 |
/** WordPress Administration Bootstrap */ |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
10 |
require_once('./admin.php'); |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
11 |
|
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
12 |
if ( is_multisite() && ! is_network_admin() ) { |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
13 |
wp_redirect( network_admin_url( 'plugin-editor.php' ) ); |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
14 |
exit(); |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
15 |
} |
136 | 16 |
|
17 |
if ( !current_user_can('edit_plugins') ) |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
18 |
wp_die( __('You do not have sufficient permissions to edit plugins for this site.') ); |
136 | 19 |
|
20 |
$title = __("Edit Plugins"); |
|
21 |
$parent_file = 'plugins.php'; |
|
22 |
||
23 |
wp_reset_vars(array('action', 'redirect', 'profile', 'error', 'warning', 'a', 'file', 'plugin')); |
|
24 |
||
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
25 |
$plugins = get_plugins(); |
136 | 26 |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
27 |
if ( empty($plugins) ) |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
28 |
wp_die( __('There are no plugins installed on this site.') ); |
136 | 29 |
|
30 |
if ( isset($_REQUEST['file']) ) |
|
31 |
$plugin = stripslashes($_REQUEST['file']); |
|
32 |
||
33 |
if ( empty($plugin) ) { |
|
34 |
$plugin = array_keys($plugins); |
|
35 |
$plugin = $plugin[0]; |
|
36 |
} |
|
37 |
||
38 |
$plugin_files = get_plugin_files($plugin); |
|
39 |
||
40 |
if ( empty($file) ) |
|
41 |
$file = $plugin_files[0]; |
|
42 |
else |
|
43 |
$file = stripslashes($file); |
|
44 |
||
45 |
$file = validate_file_to_edit($file, $plugin_files); |
|
46 |
$real_file = WP_PLUGIN_DIR . '/' . $file; |
|
47 |
$scrollto = isset($_REQUEST['scrollto']) ? (int) $_REQUEST['scrollto'] : 0; |
|
48 |
||
49 |
switch ( $action ) { |
|
50 |
||
51 |
case 'update': |
|
52 |
||
53 |
check_admin_referer('edit-plugin_' . $file); |
|
54 |
||
55 |
$newcontent = stripslashes($_POST['newcontent']); |
|
56 |
if ( is_writeable($real_file) ) { |
|
57 |
$f = fopen($real_file, 'w+'); |
|
58 |
fwrite($f, $newcontent); |
|
59 |
fclose($f); |
|
60 |
||
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
61 |
$network_wide = is_plugin_active_for_network( $file ); |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
62 |
|
136 | 63 |
// Deactivate so we can test it. |
64 |
if ( is_plugin_active($file) || isset($_POST['phperror']) ) { |
|
65 |
if ( is_plugin_active($file) ) |
|
66 |
deactivate_plugins($file, true); |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
67 |
|
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
68 |
if ( ! is_network_admin() ) |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
69 |
update_option( 'recently_activated', array( $file => time() ) + (array) get_option( 'recently_activated' ) ); |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
70 |
|
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
71 |
wp_redirect(add_query_arg('_wpnonce', wp_create_nonce('edit-plugin-test_' . $file), "plugin-editor.php?file=$file&liveupdate=1&scrollto=$scrollto&networkwide=" . $network_wide)); |
136 | 72 |
exit; |
73 |
} |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
74 |
wp_redirect( self_admin_url("plugin-editor.php?file=$file&a=te&scrollto=$scrollto") ); |
136 | 75 |
} else { |
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
76 |
wp_redirect( self_admin_url("plugin-editor.php?file=$file&scrollto=$scrollto") ); |
136 | 77 |
} |
78 |
exit; |
|
79 |
||
80 |
break; |
|
81 |
||
82 |
default: |
|
83 |
||
84 |
if ( isset($_GET['liveupdate']) ) { |
|
85 |
check_admin_referer('edit-plugin-test_' . $file); |
|
86 |
||
87 |
$error = validate_plugin($file); |
|
88 |
if ( is_wp_error($error) ) |
|
89 |
wp_die( $error ); |
|
90 |
||
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
91 |
if ( ( ! empty( $_GET['networkwide'] ) && ! is_plugin_active_for_network($file) ) || ! is_plugin_active($file) ) |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
92 |
activate_plugin($file, "plugin-editor.php?file=$file&phperror=1", ! empty( $_GET['networkwide'] ) ); // we'll override this later if the plugin can be included without fatal error |
136 | 93 |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
94 |
wp_redirect( self_admin_url("plugin-editor.php?file=$file&a=te&scrollto=$scrollto") ); |
136 | 95 |
exit; |
96 |
} |
|
97 |
||
98 |
// List of allowable extensions |
|
99 |
$editable_extensions = array('php', 'txt', 'text', 'js', 'css', 'html', 'htm', 'xml', 'inc', 'include'); |
|
100 |
$editable_extensions = (array) apply_filters('editable_extensions', $editable_extensions); |
|
101 |
||
102 |
if ( ! is_file($real_file) ) { |
|
103 |
wp_die(sprintf('<p>%s</p>', __('No such file exists! Double check the name and try again.'))); |
|
104 |
} else { |
|
105 |
// Get the extension of the file |
|
106 |
if ( preg_match('/\.([^.]+)$/', $real_file, $matches) ) { |
|
107 |
$ext = strtolower($matches[1]); |
|
108 |
// If extension is not in the acceptable list, skip it |
|
109 |
if ( !in_array( $ext, $editable_extensions) ) |
|
110 |
wp_die(sprintf('<p>%s</p>', __('Files of this type are not editable.'))); |
|
111 |
} |
|
112 |
} |
|
113 |
||
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
114 |
get_current_screen()->add_help_tab( array( |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
115 |
'id' => 'overview', |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
116 |
'title' => __('Overview'), |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
117 |
'content' => |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
118 |
'<p>' . __('You can use the editor to make changes to any of your plugins’ individual PHP files. Be aware that if you make changes, plugins updates will overwrite your customizations.') . '</p>' . |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
119 |
'<p>' . __('Choose a plugin to edit from the menu in the upper right and click the Select button. Click once on any file name to load it in the editor, and make your changes. Don’t forget to save your changes (Update File) when you’re finished.') . '</p>' . |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
120 |
'<p>' . __('The Documentation menu below the editor lists the PHP functions recognized in the plugin file. Clicking Lookup takes you to a web page about that particular function.') . '</p>' . |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
121 |
'<p>' . __('If you want to make changes but don’t want them to be overwritten when the plugin is updated, you may be ready to think about writing your own plugin. For information on how to edit plugins, write your own from scratch, or just better understand their anatomy, check out the links below.') . '</p>' . |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
122 |
( is_network_admin() ? '<p>' . __('Any edits to files from this screen will be reflected on all sites in the network.') . '</p>' : '' ) |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
123 |
) ); |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
124 |
|
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
125 |
get_current_screen()->set_help_sidebar( |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
126 |
'<p><strong>' . __('For more information:') . '</strong></p>' . |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
127 |
'<p>' . __('<a href="http://codex.wordpress.org/Plugins_Editor_Screen" target="_blank">Documentation on Editing Plugins</a>') . '</p>' . |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
128 |
'<p>' . __('<a href="http://codex.wordpress.org/Writing_a_Plugin" target="_blank">Documentation on Writing Plugins</a>') . '</p>' . |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
129 |
'<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
130 |
); |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
131 |
|
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
132 |
require_once(ABSPATH . 'wp-admin/admin-header.php'); |
136 | 133 |
|
134 |
update_recently_edited(WP_PLUGIN_DIR . '/' . $file); |
|
135 |
||
136 |
$content = file_get_contents( $real_file ); |
|
137 |
||
138 |
if ( '.php' == substr( $real_file, strrpos( $real_file, '.' ) ) ) { |
|
139 |
$functions = wp_doc_link_parse( $content ); |
|
140 |
||
141 |
if ( !empty($functions) ) { |
|
142 |
$docs_select = '<select name="docs-list" id="docs-list">'; |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
143 |
$docs_select .= '<option value="">' . __( 'Function Name…' ) . '</option>'; |
136 | 144 |
foreach ( $functions as $function) { |
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
145 |
$docs_select .= '<option value="' . esc_attr( $function ) . '">' . esc_html( $function ) . '()</option>'; |
136 | 146 |
} |
147 |
$docs_select .= '</select>'; |
|
148 |
} |
|
149 |
} |
|
150 |
||
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
151 |
$content = esc_textarea( $content ); |
136 | 152 |
?> |
153 |
<?php if (isset($_GET['a'])) : ?> |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
154 |
<div id="message" class="updated"><p><?php _e('File edited successfully.') ?></p></div> |
136 | 155 |
<?php elseif (isset($_GET['phperror'])) : ?> |
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
156 |
<div id="message" class="updated"><p><?php _e('This plugin has been deactivated because your changes resulted in a <strong>fatal error</strong>.') ?></p> |
136 | 157 |
<?php |
158 |
if ( wp_verify_nonce($_GET['_error_nonce'], 'plugin-activation-error_' . $file) ) { ?> |
|
159 |
<iframe style="border:0" width="100%" height="70px" src="<?php bloginfo('wpurl'); ?>/wp-admin/plugins.php?action=error_scrape&plugin=<?php echo esc_attr($file); ?>&_wpnonce=<?php echo esc_attr($_GET['_error_nonce']); ?>"></iframe> |
|
160 |
<?php } ?> |
|
161 |
</div> |
|
162 |
<?php endif; ?> |
|
163 |
<div class="wrap"> |
|
164 |
<?php screen_icon(); ?> |
|
165 |
<h2><?php echo esc_html( $title ); ?></h2> |
|
166 |
||
167 |
<div class="fileedit-sub"> |
|
168 |
<div class="alignleft"> |
|
169 |
<big><?php |
|
170 |
if ( is_plugin_active($plugin) ) { |
|
171 |
if ( is_writeable($real_file) ) |
|
172 |
echo sprintf(__('Editing <strong>%s</strong> (active)'), $file); |
|
173 |
else |
|
174 |
echo sprintf(__('Browsing <strong>%s</strong> (active)'), $file); |
|
175 |
} else { |
|
176 |
if ( is_writeable($real_file) ) |
|
177 |
echo sprintf(__('Editing <strong>%s</strong> (inactive)'), $file); |
|
178 |
else |
|
179 |
echo sprintf(__('Browsing <strong>%s</strong> (inactive)'), $file); |
|
180 |
} |
|
181 |
?></big> |
|
182 |
</div> |
|
183 |
<div class="alignright"> |
|
184 |
<form action="plugin-editor.php" method="post"> |
|
185 |
<strong><label for="plugin"><?php _e('Select plugin to edit:'); ?> </label></strong> |
|
186 |
<select name="plugin" id="plugin"> |
|
187 |
<?php |
|
188 |
foreach ( $plugins as $plugin_key => $a_plugin ) { |
|
189 |
$plugin_name = $a_plugin['Name']; |
|
190 |
if ( $plugin_key == $plugin ) |
|
191 |
$selected = " selected='selected'"; |
|
192 |
else |
|
193 |
$selected = ''; |
|
194 |
$plugin_name = esc_attr($plugin_name); |
|
195 |
$plugin_key = esc_attr($plugin_key); |
|
196 |
echo "\n\t<option value=\"$plugin_key\" $selected>$plugin_name</option>"; |
|
197 |
} |
|
198 |
?> |
|
199 |
</select> |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
200 |
<?php submit_button( __( 'Select' ), 'button', 'Submit', false ); ?> |
136 | 201 |
</form> |
202 |
</div> |
|
203 |
<br class="clear" /> |
|
204 |
</div> |
|
205 |
||
206 |
<div id="templateside"> |
|
207 |
<h3><?php _e('Plugin Files'); ?></h3> |
|
208 |
||
209 |
<ul> |
|
210 |
<?php |
|
211 |
foreach ( $plugin_files as $plugin_file ) : |
|
212 |
// Get the extension of the file |
|
213 |
if ( preg_match('/\.([^.]+)$/', $plugin_file, $matches) ) { |
|
214 |
$ext = strtolower($matches[1]); |
|
215 |
// If extension is not in the acceptable list, skip it |
|
216 |
if ( !in_array( $ext, $editable_extensions ) ) |
|
217 |
continue; |
|
218 |
} else { |
|
219 |
// No extension found |
|
220 |
continue; |
|
221 |
} |
|
222 |
?> |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
223 |
<li<?php echo $file == $plugin_file ? ' class="highlight"' : ''; ?>><a href="plugin-editor.php?file=<?php echo urlencode( $plugin_file ) ?>&plugin=<?php echo urlencode( $plugin ) ?>"><?php echo $plugin_file ?></a></li> |
136 | 224 |
<?php endforeach; ?> |
225 |
</ul> |
|
226 |
</div> |
|
227 |
<form name="template" id="template" action="plugin-editor.php" method="post"> |
|
228 |
<?php wp_nonce_field('edit-plugin_' . $file) ?> |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
229 |
<div><textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1"><?php echo $content ?></textarea> |
136 | 230 |
<input type="hidden" name="action" value="update" /> |
231 |
<input type="hidden" name="file" value="<?php echo esc_attr($file) ?>" /> |
|
232 |
<input type="hidden" name="plugin" value="<?php echo esc_attr($plugin) ?>" /> |
|
233 |
<input type="hidden" name="scrollto" id="scrollto" value="<?php echo $scrollto; ?>" /> |
|
234 |
</div> |
|
235 |
<?php if ( !empty( $docs_select ) ) : ?> |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
236 |
<div id="documentation" class="hide-if-no-js"><label for="docs-list"><?php _e('Documentation:') ?></label> <?php echo $docs_select ?> <input type="button" class="button" value="<?php esc_attr_e( 'Lookup' ) ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'http://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&locale=<?php echo urlencode( get_locale() ) ?>&version=<?php echo urlencode( $wp_version ) ?>&redirect=true'); }" /></div> |
136 | 237 |
<?php endif; ?> |
238 |
<?php if ( is_writeable($real_file) ) : ?> |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
239 |
<?php if ( in_array( $file, (array) get_option( 'active_plugins', array() ) ) ) { ?> |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
240 |
<p><?php _e('<strong>Warning:</strong> Making changes to active plugins is not recommended. If your changes cause a fatal error, the plugin will be automatically deactivated.'); ?></p> |
136 | 241 |
<?php } ?> |
242 |
<p class="submit"> |
|
243 |
<?php |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
244 |
if ( isset($_GET['phperror']) ) { |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
245 |
echo "<input type='hidden' name='phperror' value='1' />"; |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
246 |
submit_button( __( 'Update File and Attempt to Reactivate' ), 'primary', 'submit', false, array( 'tabindex' => '2' ) ); |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
247 |
} else { |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
248 |
submit_button( __( 'Update File' ), 'primary', 'submit', false, array( 'tabindex' => '2' ) ); |
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
249 |
} |
136 | 250 |
?> |
251 |
</p> |
|
252 |
<?php else : ?> |
|
253 |
<p><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">the Codex</a> for more information.'); ?></em></p> |
|
254 |
<?php endif; ?> |
|
255 |
</form> |
|
256 |
<br class="clear" /> |
|
257 |
</div> |
|
258 |
<script type="text/javascript"> |
|
259 |
/* <![CDATA[ */ |
|
260 |
jQuery(document).ready(function($){ |
|
261 |
$('#template').submit(function(){ $('#scrollto').val( $('#newcontent').scrollTop() ); }); |
|
262 |
$('#newcontent').scrollTop( $('#scrollto').val() ); |
|
263 |
}); |
|
264 |
/* ]]> */ |
|
265 |
</script> |
|
266 |
<?php |
|
267 |
break; |
|
268 |
} |
|
194
32102edaa81b
MAJ wordpress et ajout de plugin
Anthony Ly <anthonyly.com@gmail.com>
parents:
136
diff
changeset
|
269 |
include(ABSPATH . "wp-admin/admin-footer.php"); |