Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
$media = new \CB\Plugin\Gallery\Table\ItemTable()
$media->set( 'user_id', USER_ID_THIS_BELONGS_TO_HERE ); // e.g.42, 38, 91
$media->set( 'asset', 'ASSET_THIS_MEDIA_BELONGS_TO_HERE' ); // e.g. profile.42, cbgroupjive.group.4, article.3, etc..
$media->set( 'type', 'MEDIA_TYPE_HERE' ); // stricly one of the following: photos, videos, files, music
$media->set( 'value', 'URL_OF_MEDIA_HERE' ); // e.g. http://www.example.com/my_photo.jpg
$media->set( 'published', 1 );
$media->store(); // saves all of the above to the database
Please Log in to join the conversation.