Como a Rarst respondeu, você pode fazer isso sem editar os arquivos principais ou remover os atributos de página do metabox e criar o seu usando o mesmo código com um pouco de modificação. o código abaixo é o código para o /admin/include/meta-boxes.php e eu adicionei o comentário para mostrar onde suas opções extras de modelo de página seriam:
function page_attributes_meta_box($post) {
$post_type_object = get_post_type_object($post->post_type);
if ( $post_type_object->hierarchical ) {
$pages = wp_dropdown_pages(array('post_type' => $post->post_type, 'exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('(no parent)'), 'sort_column'=> 'menu_order, post_title', 'echo' => 0));
if ( ! empty($pages) ) {
?>
<p><strong><?php _e('Parent') ?></strong></p>
<label class="screen-reader-text" for="parent_id"><?php _e('Parent') ?></label>
<?php echo $pages; ?>
<?php
} // end empty pages check
} // end hierarchical check.
if ( 'page' == $post->post_type && 0 != count( get_page_templates() ) ) {
$template = !empty($post->page_template) ? $post->page_template : false;
?>
<p><strong><?php _e('Template') ?></strong></p>
<label class="screen-reader-text" for="page_template"><?php _e('Page Template') ?></label><select name="page_template" id="page_template">
<option value='default'><?php _e('Default Template'); ?></option>
<?php page_template_dropdown($template); ?>
// add your page templates as options
</select>
<?php
} ?>
<p><strong><?php _e('Order') ?></strong></p>
<p><label class="screen-reader-text" for="menu_order"><?php _e('Order') ?></label><input name="menu_order" type="text" size="4" id="menu_order" value="<?php echo esc_attr($post->menu_order) ?>" /></p>
<p><?php if ( 'page' == $post->post_type ) _e( 'Need help? Use the Help tab in the upper right of your screen.' ); ?></p>
<?php
}
Não sei se isso é uma correção no seu caso, mas eu tinha um caso smiler quando eu precisava exibir o tipo de postagem em um tema interno de plug-in e para isso eu usei add_filter('the_content', 'my-function');
e minha função criou a saída para exibir.
Outra opção seria fazer o seu plugin criar o arquivo de modelo no diretório atual do tema, algo assim:
function create_plugins_theme_file(){
$file_name = TEMPLATEPATH . '/' . $tamplate_name . '.php';
$handle = fopen($file_name, 'w') or wp_die('Cannot open file for editing');
$file_contents = <<<OUT
<?php
/*
Template Name: $tamplate_name
*/
?>
//you theme file here
OUT;
fwrite($handle, $file_contents);
fclose($handle);
}
e você pode executar isso depois de verificar se o arquivo existe
if(!file_exists( $file_name)){create_plugins_theme_file();}
Espero que uma delas ajude.