{"action":"opened","issue":{"url":"https://api.github.com/repos/rilwis/meta-box/issues/815","repository_url":"https://api.github.com/repos/rilwis/meta-box","labels_url":"https://api.github.com/repos/rilwis/meta-box/issues/815/labels{/name}","comments_url":"https://api.github.com/repos/rilwis/meta-box/issues/815/comments","events_url":"https://api.github.com/repos/rilwis/meta-box/issues/815/events","html_url":"https://github.com/rilwis/meta-box/issues/815","id":142660658,"number":815,"title":"Metabox include exclude function check_custom() only checks regular functions not class methods","user":{"login":"rlaan","id":12990964,"avatar_url":"https://avatars.githubusercontent.com/u/12990964?v=3","gravatar_id":"","url":"https://api.github.com/users/rlaan","html_url":"https://github.com/rlaan","followers_url":"https://api.github.com/users/rlaan/followers","following_url":"https://api.github.com/users/rlaan/following{/other_user}","gists_url":"https://api.github.com/users/rlaan/gists{/gist_id}","starred_url":"https://api.github.com/users/rlaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlaan/subscriptions","organizations_url":"https://api.github.com/users/rlaan/orgs","repos_url":"https://api.github.com/users/rlaan/repos","events_url":"https://api.github.com/users/rlaan/events{/privacy}","received_events_url":"https://api.github.com/users/rlaan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-22T14:06:10Z","updated_at":"2016-03-22T14:06:10Z","closed_at":null,"body":"Dear metabox crew,\r\n\r\nI would like to suggest the following code for the include/exclude plugin check_custom() method:\r\n\r\n`public static function check_custom( $func, $meta_box )\r\n\t{\r\n\t\tif ( is_array( $func ) ) {\r\n\t\t\tif ( ! method_exists( $func[0], $func[1] ) ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif ( ! function_exists( $func ) ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn call_user_func( $func, $meta_box );\r\n\t}`\r\n\r\nIn this way a user can also use class methods as its custom method.\r\n\r\nThanks,\r\nRuud"}}