Removing an object

You can remove visual object from MotoPress Content Editor within the removeObject method.


function your_function_name_for_remove($motopressCELibrary) {
// remove any object you want
$motopressCELibrary->removeObject('mp_video');
}
// add your function to 'mp_library' action
add_action('mp_library', 'your_function_name_for_remove', 10, 1);

Note: mp_code & mp_text can be hidden only.

Remove all objects in one example:

$motopressCELibrary->getObject('mp_code')->setShow(false);
$motopressCELibrary->getObject('mp_text')->setShow(false);

$motopressCELibrary->removeObject('mp_heading');
$motopressCELibrary->removeObject('mp_image');
$motopressCELibrary->removeObject('mp_grid_gallery');
$motopressCELibrary->removeObject('mp_image_slider');
$motopressCELibrary->removeObject('mp_video');
$motopressCELibrary->removeObject('mp_space');
$motopressCELibrary->removeObject('mp_button');
$motopressCELibrary->removeObject('mp_gmap');
$motopressCELibrary->removeObject('mp_embed');
$motopressCELibrary->removeObject('mp_quote');
$motopressCELibrary->removeObject('mp_members_content');
$motopressCELibrary->removeObject('mp_social_buttons');
$motopressCELibrary->removeObject('mp_social_profile');
$motopressCELibrary->removeObject('mp_google_chart');
$motopressCELibrary->removeObject('mp_wp_audio');
$motopressCELibrary->removeObject('mp_tabs');
$motopressCELibrary->removeObject('mp_accordion');
$motopressCELibrary->removeObject('mp_table');
$motopressCELibrary->removeObject('mp_posts_grid');

$motopressCELibrary->removeObject('mp_wp_archives');
$motopressCELibrary->removeObject('mp_wp_calendar');
$motopressCELibrary->removeObject('mp_wp_categories');
$motopressCELibrary->removeObject('mp_wp_navmenu');
$motopressCELibrary->removeObject('mp_wp_meta');
$motopressCELibrary->removeObject('mp_wp_pages');
$motopressCELibrary->removeObject('mp_wp_posts');
$motopressCELibrary->removeObject('mp_wp_comments');
$motopressCELibrary->removeObject('mp_wp_rss');
$motopressCELibrary->removeObject('mp_wp_search');
$motopressCELibrary->removeObject('mp_wp_tagcloud');
$motopressCELibrary->removeObject('mp_wp_widgets_area');

Related Topics

Leave a Reply

Your email address will not be published. Required fields are marked *