How to change the default video of the MotoPress Video object in Content Editor

Follow

You can change the source of the video by adding this code to your theme (functions.php file) or to your custom plugin

function my_custom_mp_library($motopressCELibrary) {
    $videoObj = &$motopressCELibrary->getObject('mp_video');
    if ($videoObj) {
        $videoObj->parameters['src']['default'] = 'https://www.youtube.com/watch?v=8UVNT4wvIGY';
    }
}
add_action('mp_library', 'my_custom_mp_library', 10, 1);

You can change any other property of the widget the same way.

Have more questions? Submit a request

Comments

Powered by Zendesk