Function Reference: geodir_action_add_list_form
Summary
This function has not been documented yet.
Source File
geodir_action_add_list_form() is located in geodir_list_manager/geodir_list_manager.php [Line: 190]
Source Code
function geodir_action_add_list_form() { $user_id = get_current_user_id(); if ( ! $user_id ) { return; } $error = null; $pid = 0; if(isset($_GET['pid'])) { $pid = (int) sanitize_text_field(esc_sql($_GET['pid'])); if($pid) { if (!current_user_can('edit_post', $pid) || (get_post_type($pid) != 'gd_list')) { ?>$pid, 'post_title' => $title, 'post_content' => $desc, 'post_status' => 'publish', 'post_author' => $user_id, 'post_type' => 'gd_list' ); $post_id = wp_insert_post( $post ); $permalink = get_permalink( $post_id ); wp_redirect( $permalink ); exit; } } if($error) { echo '
'.$error.'
'; } $title = ''; $desc = ''; ?>