Pull Youtube Link from 2nd WP_Editor

Maybe you should just add a custom field to accept the url itself, in stead of the wp_editor textarea; then append the video embed after you work with the input.

Let me know if you need any help setting that up.

OR:

You could add a separete textarea to accept just comma separated or line-break separated urls (Because you stated below that you might need mulitple video embeds)

Here is some code to use while saving that will clean up the textarea input:

if ( isset( $_REQUEST['your_url_list'] ) ):


    $input = $_REQUEST['your_url_list'];

    $data = preg_split("/[\r\n,]+/", $input, -1, PREG_SPLIT_NO_EMPTY);
    $option_list = array();
    foreach( $data as $d )
        $option_list[] =  trim( $d );

    update_post_meta( $post_id, 'your_url_list', maybe_serialize( $option_list ) );

endif;

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)