PluginProbe
SpiceBox / 0.6
SpiceBox v0.6
trunk 0.2.2 0.2.3 0.2.4 0.2.5 0.2.6 0.2.7 0.2.8 0.2.9 0.3 0.3.1 0.3.2 0.3.3 0.3.4 0.3.5 0.3.6 0.3.7 0.3.8 0.3.9.1 0.3.9.2 0.4 0.5 0.6 0.7 1.0 All 76 releases
spicebox / inc / spicepress / default-pages / portfolio-page.php

portfolio-page.php in SpiceBox 0.6, at inc/spicepress/default-pages/portfolio-page.php

23 lines 847 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 $MediaId = get_option('portfolio_media_id');
3 // Create a Portfolio page
4 $post = array(
5 'comment_status' => 'closed',
6 'ping_status' => 'closed' ,
7 'post_author' => 1,
8 'post_date' => date('Y-m-d H:i:s'),
9 'post_name' => 'Portfolio',
10 'post_status' => 'publish' ,
11 'post_title' => 'Portfolio',
12 'post_type' => 'page',
13 'post_content' => '[gallery size="full" ids="'. $MediaId[0].','
14 .$MediaId[1].','.$MediaId[2].','.$MediaId[3].','.$MediaId[4].','.
15 $MediaId[5].','.$MediaId[6].','.$MediaId[7].','.$MediaId[8].','.
16 $MediaId[9].','.$MediaId[10].','.$MediaId[11].'"]'
17 );
18 //insert page and save the id
19 $newvalue = wp_insert_post( $post, false );
20 if ( $newvalue && ! is_wp_error( $newvalue ) ){
21 update_post_meta( $newvalue, '_wp_page_template', 'template/template-page-full-width.php' );
22 }
23 ?>