} if (!empty($font_color)) { $style .= grve_vc_get_css_color('color', $font_color); } if ($padding_top != '') { $style .= 'padding-top: ' . (preg_match('/(px|em|\\%|pt|cm)$/', $padding_top) ? $padding_top : $padding_top . 'px') . ';'; } if ($padding_bottom != '') { $style .= 'padding-bottom: ' . (preg_match('/(px|em|\\%|pt|cm)$/', $padding_bottom) ? $padding_bottom : $padding_bottom . 'px') . ';'; } if ($margin_bottom != '') { $style .= 'margin-bottom: ' . (preg_match('/(px|em|\\%|pt|cm)$/', $margin_bottom) ? $margin_bottom : $margin_bottom . 'px') . ';'; } return empty($style) ? $style : ' style="' . $style . '"'; } if (!grve_vc_grid_visibility()) { //Remove Builder Grid Menu function grve_remove_vc_menu_items() { remove_menu_page('edit.php?post_type=vc_grid_item'); remove_submenu_page('vc-general', 'edit.php?post_type=vc_grid_item'); } add_filter('admin_menu', 'grve_remove_vc_menu_items'); //Remove grid element shortcodes function grve_vc_remove_shortcodes_from_vc_grid_element($shortcodes) { unset($shortcodes['vc_icon']); unset($shortcodes['vc_button2']); unset($shortcodes['vc_btn']); unset($shortcodes['vc_custom_heading']); unset($shortcodes['vc_single_image']);
function grve_remove_vc_shortcodes() { if (!grve_vc_social_elements_visibility()) { //Social vc_remove_element("vc_facebook"); vc_remove_element("vc_flickr"); vc_remove_element("vc_googleplus"); vc_remove_element("vc_pinterest"); vc_remove_element("vc_tweetmeme"); } if (!grve_vc_wp_elements_visibility()) { //WordPress vc_remove_element('vc_wp_custommenu'); vc_remove_element('vc_wp_tagcloud'); vc_remove_element('vc_wp_archives'); vc_remove_element('vc_wp_calendar'); vc_remove_element('vc_wp_pages'); vc_remove_element('vc_wp_links'); vc_remove_element('vc_wp_posts'); vc_remove_element('vc_wp_categories'); vc_remove_element('vc_wp_rss'); vc_remove_element('vc_wp_text'); vc_remove_element('vc_wp_meta'); vc_remove_element('vc_wp_recentcomments'); } if (!grve_vc_grid_visibility()) { //Grid Item related vc_remove_element('vc_basic_grid'); vc_remove_element('vc_media_grid'); vc_remove_element('vc_masonry_grid'); vc_remove_element('vc_masonry_media_grid'); vc_remove_element('vc_icon'); vc_remove_element('vc_button2'); vc_remove_element('vc_custom_heading'); vc_remove_element('vc_single_image'); vc_remove_element('vc_empty_space'); vc_remove_element('vc_separator'); vc_remove_element("vc_text_separator"); vc_remove_element('vc_btn'); } if (!grve_vc_other_elements_visibility()) { //Other vc_remove_element("vc_toggle"); vc_remove_element("vc_message"); vc_remove_element("vc_pie"); vc_remove_element("vc_progress_bar"); vc_remove_element("vc_tour"); vc_remove_element('vc_teaser_grid'); vc_remove_element('vc_posts_grid'); vc_remove_element('vc_posts_slider'); vc_remove_element('vc_gallery'); vc_remove_element('vc_button'); vc_remove_element('vc_cta_button'); vc_remove_element('vc_cta_button2'); vc_remove_element('vc_carousel'); vc_remove_element('vc_images_carousel'); vc_remove_element('vc_video'); vc_remove_element('vc_gmaps'); vc_remove_element('vc_cta'); } }