我正在修改install.php
(从中压顶upgrade.php
) 已注册用于加载使用新博客创建的默认页面的文件。
我正在尝试找出如何指定将分配给新页面的页面模板。
有类似的吗page_template =>?
我在抄本上搜索了一下,但似乎什么也没找到,或者我的语法想法不对。
默认情况下,当前页面代码为:
$first_page = sprintf( __( "This is an example page. As a new WordPress user, you should go to <a href=\\"%s\\">your dashboard</a> to delete this page and create new pages for your content. Have fun!" ), admin_url() );
if ( is_multisite() )
$first_page = get_site_option( \'first_page\', $first_page );
$first_post_guid = get_option(\'home\') . \'/?page_id=2\';
$wpdb->insert( $wpdb->posts, array(
\'post_author\' => $user_id,
\'post_date\' => $now,
\'post_date_gmt\' => $now_gmt,
\'post_content\' => $first_page,
\'post_excerpt\' => \'\',
\'post_title\' => __( \'Sample Page\' ),
/* translators: Default page slug */
\'post_name\' => __( \'sample-page\' ),
\'post_modified\' => $now,
\'post_modified_gmt\' => $now_gmt,
\'guid\' => $first_post_guid,
\'post_type\' => \'page\',
\'to_ping\' => \'\',
\'pinged\' => \'\',
\'post_content_filtered\' => \'\'
));
$wpdb->insert( $wpdb->postmeta, array( \'post_id\' => 2, \'meta_key\' => \'_wp_page_template\', \'meta_value\' => \'default\' ) );