Example #1
0
 /**
  * Check is post type is valid for rendering VC backend editor.
  *
  * @return bool
  */
 public function isValidPostType($type = '')
 {
     return vc_check_post_type(!empty($type) ? $type : get_post_type());
 }
 /**
  * @param null $post_id
  *
  * @return bool
  */
 function showButton($post_id = null)
 {
     return self::inlineEnabled() && !in_array(get_post_status(), array('private', 'trash')) && vc_user_access()->wpAny(array('edit_post', $post_id))->get() && vc_check_post_type(get_post_type());
 }
 /**
  * @param null $post_id
  *
  * @return bool
  */
 function showButton($post_id = null)
 {
     return self::inlineEnabled() && vc_user_access()->wpAny(array('edit_post', $post_id))->get() && vc_check_post_type(get_post_type());
 }
 /**
  * Check is post type is valid for rendering VC backend editor.
  *
  * @return bool
  */
 public function isValidPostType($type = '')
 {
     if ('vc_grid_item' === $type) {
         return false;
     }
     return vc_check_post_type(!empty($type) ? $type : get_post_type());
 }
Example #5
0
 /**
  * Check is post type is valid for rendering VC backend editor.
  *
  * @return bool
  */
 public function isValidPostType()
 {
     return vc_check_post_type(get_post_type());
 }
 /**
  * @param null $post_id
  *
  * @return bool
  */
 function showButton($post_id = null)
 {
     $type = get_post_type();
     return self::inlineEnabled() && !in_array(get_post_status(), array('private', 'trash')) && !in_array($type, array('templatera', 'vc_grid_item')) && vc_user_access()->wpAny(array('edit_post', $post_id))->get() && vc_check_post_type($type);
 }