Automatic Update Stopped Working.

Front page Forums CodeCanyon products WordPress YouTube video post plugin Automatic Update Stopped Working.

This topic contains 5 replies, has 2 voices, and was last updated by  ejordan 6 years, 5 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #477



    Automatic Updatesstopped working suddenly about 6 days ago. I’ve updated manually via ftp with the newest version (1.2), but the newests videos from the playlist still do not auto import.

    Im running the GrandNews theme.

    Thanks very much,



    Also, is there a way to have each automatic import fill in the “VIDEO” (Iframe) field and the “LINK” field automatically? Those fields are usually blank for each post, and the way I have my site setup I would like each post to be automatically formatted with the embed iframe code. Otherwise I need to manually go into the posts and add it for every one.

    Thank you…..



    PS: I was able to sort out the automatic update issue. My only outstanding question is about automatically filling in the embed code.




    If you updated to latest version, the plugin needs some time to parse all your playlists. This is happening because previous YouTube API used numbering for pagination and current API uses tokens so the plugin needs to start over.

    Regarding the automatic filling of embed code and video URL, here’s a piece of code that you can put in your theme functions.php file and will automatically fill the values into the custom fields that you need:

     * On bulk post import, set up all extra fields needed by the theme to flag post as video
     * @param int $post_id - ID of newly created post
     * @param array $video - array of video data returned by YouTube
     * @param false/array $theme_import - theme import configuration
    function my_post_fields( $post_id, $video, $theme_import ){
    	// video embed
    	$ps = cbc_get_player_settings();
    	$customize = implode('&', array(
    		'controls=' . $ps['controls'],
    		'autohide=' . $ps['autohide'],
    		'fs=' . $ps['fs'],
    		'theme=' . $ps['theme'],
    		'color=' . $ps['color'],
    		'iv_load_policy=' . $ps['iv_load_policy'],
    		'modestbranding=' . $ps['modestbranding'],
    		'rel=' . $ps['rel'],
    		'showinfo=' . $ps['showinfo'],
    		'autoplay=' . $ps['autoplay']
    	// video embed code	
    	$embed_code = '<iframe width="' . $ps['width'] . '" height="' . cbc_player_height( $ps['aspect_ratio'], $ps['width'] ) . '" src="' . $video['video_id'] . '?' . $customize . '" frameborder="0" allowfullscreen></iframe>';
    	// video URL
    	$url 		= ''.$video['video_id'];
    	// store embed code and URL in custom fields
    	// we assume that embed code is stored in custom field 'embed_code' and url in field 'url'
    	// uncomment the two lines below and enter the corrent meta field names instead of embed_code and url
    	//update_post_meta( $post_id, 'embed_code', $embed_code );
    	//update_post_meta( $post_id, 'url', $url );
    add_action('cbc_post_insert', 'my_post_fields', 10, 3);


    Thanks very much for providing the code for this. Really appreciate it…it was just what I needed.



    Hi Constantin,

    I tried adding the code you provided above to my functions.php file, however it does not seem to be filling in the iframe video code field, and the Link field. Do I need to edit the code at all?

    Also, I’ve like to automatically assign the video posts to be part of the “video” category I’ve created. Is there a way to set it up to automatically update this as well?

    Thanks so much….

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.