Revisions
- July 16, 2012 @ 04:48:07 [Current Revision] by PeterLugg
- July 16, 2012 @ 04:47:01 by PeterLugg
- July 16, 2012 @ 03:55:40 by PeterLugg
- July 16, 2012 @ 03:55:07 by PeterLugg
Revision Differences
July 16, 2012 @ 03:55:40 | Current Revision | ||
---|---|---|---|
Content | |||
Deleted: Taken from here: <a href="http:// wordpress.stackexchange.com/ | Added: Taken from here: <a href="http:// wordpress.stackexchange.com/ a/58081/13712" target="_blank" >http://wordpress.stackexchange.com/ a/58081/13712</a> | ||
Added: [php] | |||
Deleted: [php]add_action( 'admin_head-edit.php','wpse_ 54054_remove_template'); | Added: <code>add_ action('admin_head', 'wpse_13671_script_enqueuer'); | ||
Deleted: function wpse_54054_remove_template() | Added: function wpse_13671_script_enqueuer() { | ||
Added: global $current_screen; | |||
Added: /** | |||
Added: * /wp-admin/edit.php?post_type=page | |||
Added: */ | |||
Added: if('edit-page' == $current_screen->id) | |||
Unchanged: { | Unchanged: { | ||
Deleted: global $wp_themes,$current_screen; | |||
Added: ?> | |||
Added: <script type="text/ javascript"> | |||
Added: jQuery(document).ready( function($) { | |||
Added: $("a.editinline" ).live(" click", function () { | |||
Added: var ilc_qe_id = inlineEditPost.getId(this); | |||
Added: setTimeout(function() { | |||
Added: $('#edit-'+ilc_qe_id+' select[name=" page_template"] option[value= "showcase.php" ]').remove(); | |||
Added: }, 100); | |||
Added: }); | |||
Added: $('#doaction, #doaction2').live( "click", function () { | |||
Added: setTimeout(function() { | |||
Added: $('#bulk-edit select[name=" page_template"] option[value= "showcase.php" ]').remove(); | |||
Added: }, 100); | |||
Added: }); | |||
Added: }); | |||
Added: </script> | |||
Added: <?php | |||
Added: } | |||
Added: /** | |||
Added: * /wp-admin/post.php?post= 21&action=edit | |||
Added: */ | |||
Deleted: | Added: if( 'page' == $current_screen->id ) | ||
Deleted: return; | |||
Deleted: get_themes(); | |||
Added: { | |||
Added: ?> | |||
Added: <script type="text/ javascript"> | |||
Added: jQuery(document).ready( function($) { | |||
Deleted: $templates = &$wp_themes['Twenty Twelve']['Template Files']; | Added: $('#page_template option[value= "showcase.php" ]').remove(); | ||
Deleted: $template1 = trailingslashit( TEMPLATEPATH ).'showcase.php'; | |||
Deleted: $template2 = trailingslashit( TEMPLATEPATH ).'sidebar-page.php'; | |||
Deleted: $key1 = array_search($template1, $templates); | |||
Deleted: $key2 = array_search($template2, $templates); | |||
Deleted: unset( $templates[$key1], $templates[$key2] ); | |||
Added: }); | |||
Added: </script> | |||
Added: <?php | |||
Added: } | |||
Added: }</code> | |||
Deleted: | Added: [/php] | ||
Deleted: Also see: <a href="http:// wordpress.stackexchange.com/ questions/13671/ how-to-remove- a-parent-theme- page-template- from-a-child-theme" target="_blank" >http://wordpress.stackexchange.com/ questions/13671/ how-to-remove- a-parent-theme- page-template- from-a-child-theme</a> |
Note: Spaces may be added to comparison text to allow better line wrapping.
No comments yet.