Forum Replies Created
Viewing 4 posts - 1 through 4 (of 4 total)
-
AuthorPosts
-
abmcrMemberYes: i confirm
In the new 0.9.9.6 the code you post and my also are not working
The filter don’t exist
abmcrMemberIn the last 0.9.9.6 the
piklist_get_file_data filter don’t exist?
I have try to use the codeadd_filter('piklist_get_file_data', 'my_custom_comment_block', 10, 2); function my_custom_comment_block($data, $type) { // If not a Meta-box section than bail if($type != 'meta-boxes') { return $data; } // Allow Piklist to read our custom comment block attribute: "Hide for Template", and set it to hide_for_template $data['hide_for_template'] = 'Hide for Template'; return $data; } add_filter('piklist_add_part', 'my_hide_for_template', 10, 2); function my_hide_for_template($data, $type) { global $post; // If not a meta box than bail if($type != 'meta-boxes') { return $data; } // Check if any page template is set in the comment block if (!empty($data['hide_for_template'])) { // Get the active page template $active_template = pathinfo(get_page_template_slug($post->ID), PATHINFO_FILENAME); //valuta se pagina è front page if($post->ID !== get_option( 'show_on_front' ) ){ // Change meta-box access to user role: no-role $data['role'] = 'no-role'; } } return $data; }And it not work; i have serached the filter and i have not found it
abmcrMemberI also need a required condition into a validation.
May be as future feature in new version
Thank you
abmcrMemberOK, thank you… very simple…
-
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)