/** * Sets the post status of an idea * * @package WP Idea Stream * @subpackage ideas/functions * * @since 2.0.0 * * @param array $ideaarr the posted arguments * @uses wp_idea_stream_default_idea_status() to get default post status * @uses apply_filters() call 'wp_idea_stream_ideas_insert_status' to override the post status * @return string the post status of the idea */ function wp_idea_stream_ideas_insert_status($ideaarr = array()) { /** * Used internally to set the status to private in case the idea * is posted from a non public BuddyPress group * @see WP_Idea_Stream_Group->group_idea_status() * * @param string the default post status for an idea * @param array $ideaarr the arguments of the idea to save */ return apply_filters('wp_idea_stream_ideas_insert_status', wp_idea_stream_default_idea_status(), $ideaarr); }
/** * Submit Status callback * * @package WP Idea Stream * @subpackage admin/settings * * @since 2.0.0 * * @uses wp_idea_stream_default_idea_status() to get the active status * @uses wp_idea_stream_setting_disabled_option() to disable the field if an option is set * @uses selected() to activate the active option * @return string HTML output */ function wp_idea_stream_submit_status_setting_callback() { $current_status = wp_idea_stream_default_idea_status(); ?> <select name="_ideastream_submit_status" id="_ideastream_submit_status" <?php wp_idea_stream_setting_disabled_option('_ideastream_groups_integration'); ?> > <option value="publish" <?php selected($current_status, 'publish'); ?> ><?php esc_html_e('Publish', 'wp-idea-stream'); ?> </option> <option value="pending" <?php selected($current_status, 'pending'); ?> ><?php esc_html_e('Pending', 'wp-idea-stream'); ?> </option> </select> <label for="_ideastream_submit_status"><?php esc_html_e('is the default status for all ideas', 'wp-idea-stream'); ?> </label> <p class="description"><?php esc_html_e('Depending on this setting, the moderation message one will be available', 'wp-idea-stream'); ?> </p> <?php }