Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function presentation($post_id){
- if($post_id){
- $presentation = new Presentation($post_id); // to populate
- }else{
- $presentation = current_presentation(); // switch to create
- }
- function current_presentation(){
- if( xxx_type_is_xxx_page() ){
- return new Presentation();
- }elseif( yyy_type_is_yyy_page() ){
- return new Presentation();
- }elseif(){
- //and so on...
- }else{
- return false; // do not create if not on the above post type creation page
- }
- }
Add Comment
Please, Sign In to add comment