Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am developing a user generated content sharing theme So i created a front end form And i need admin to decide whether the post should be published or should wait for admins approval

This is a bit of code i am using for front end submission

"post_status" =>'pending'

but whenever i replace this

with

"post_status" =>'get_option('mytheme_poststatus')"

i start getting internal server error at that page

i also tried other codes like

"post_status" =>'<?php echo get_option('mytheme_status'); ?>
 "post_status" =>'<?php get_option('mytheme_status'); ?>

but all of them resulted me in 500internal sever error

i am a newbie in php so i think that i am doing something wrong in it

share|improve this question
Syntax error. Use "post_status" => get_option('mytheme_poststatus'). – toscho Nov 22 '12 at 10:13
THanks toscho that helped me a lot – vaibhav Nov 22 '12 at 10:40
i just forgot that i am using a cache plugin still showing me errors – vaibhav Nov 22 '12 at 16:27
this is the code $new_post = array( 'ID' => '', 'post_author' => $user->ID, 'post_category' => array($post_category), 'post_content' => $post_content, 'tags_input' => array($tags), 'post_title' => $post_title, 'post_category' => array($_POST['cat']), // 'post_status' => 'get_option('9GAG_status')', 'post_type' => 'post', 'winerating' => $winerating ); – vaibhav Nov 22 '12 at 16:32

closed as too localized by toscho Nov 22 '12 at 10:13

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

Browse other questions tagged or ask your own question.