ID, '_projects_portfolio_github_url', true );
echo '';
echo '';
}
/**
* Saves the GitHub repository URL meta box data for the Projects WP plugin.
*
* @param int $post_id The ID of the post currently being saved.
*
* @since 1.0.0
* @return void
*/
function projects_portfolio_save_meta_box( $post_id ) {
if ( ! isset( $_POST['projects_portfolio_meta_box_nonce'] ) || ! wp_verify_nonce( $_POST['projects_portfolio_meta_box_nonce'], 'projects_portfolio_save_meta_box' ) ) {
return;
}
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
return;
}
if ( isset( $_POST['projects_portfolio_github_url'] ) ) {
update_post_meta( $post_id, '_projects_portfolio_github_url', esc_url_raw( $_POST['projects_portfolio_github_url'] ) );
}
}
add_action( 'save_post', 'projects_portfolio_save_meta_box' );