No that’s impossible. When WordPress calls a method it has to be public. You could write a public method that is called on the hook which calls a private method inside.
Not sure if that makes sense though …
Related Posts:
- Using a private method as an action callback from within a class
- display public excerpt for private post
- Allowing users to view private posts (pending approval)
- Remove Actions/Filters added via Anonymous Functions
- Is it possible to rename a post format?
- How to paginate the get_users function?
- opening links in new tab using – add_filter( ‘the_content’, ‘make_clickable’);
- How to add classes to images based on their categories?
- Child theme – overriding add_image_size by a child theme [duplicate]
- How can I add an extra WooCommerce hook
- how to make wordpress not to look for themes
- Wrap gutenberg block ‘div’ in other elements/extra HTML
- Authors details such as social media links, emails etc → Is this Meta or something else?
- automatically adding submenu items
- Dequeue script in template isn’t working
- How do I call wp_mail from HTML?
- wp_link_pages: display current page number only if has multiple page breaks?
- changing function wp_register
- What is user_trailingslashit() for?
- Adjust which tempalte a page uses with a function?
- WordPress Content Security Policy and Subresource Integrity
- How to include all files within a folder to functions.php?
- Why is my Gutenberg block returning an error after initial save?
- Display trackbacks separately from comments in twentyeleven
- Pass parameters to function through an action
- Load .txt file for login_message in wp-login.php
- How to automatically remove links from WordPress Biographical Info?
- Php function 301 redirect
- Selective Product Category for Carousel
- How to change login labels
- Get the link for RSS item to display in feed
- Commenter should see only his comments in wordpress
- Function only on a specific page
- How can i disable auto save & revisions with `function.php` in wordpress?
- Add Custom Background Properties to Customizer
- What is the correct way of updating wordpress options
- Insert image in WordPress with HTML5 tag and caption function
- How to construct function for applying filter?
- WordPress functions.php – Execute plugin specific user online
- Skeleton Child Theme Add Icon Bar to Header Flex Grid
- Function that outputs second theme url
- error in getting post id
- Trying to register script in footer
- register_sidebar_widget is deprecated since version 2.8! Use wp_register_sidebar_widget() instead
- Require file in functions from theme directory using PHP
- Remove Custuomize Sections
- (Woocommerce) Order by price when entering specific category
- Exclude category from shortcode
- Adding an option to a shortcode
- Custom HTML markup
- Get urls of images in a gallery?
- Undefined variable error in new function
- How can I show immediate and/or parents in a title?
- Add Login/Logout Menu Item to Primary Nav “My Account” Submenu [Woocommerce] [closed]
- Best way to disable sidebars on posts (only)?
- Passing Jquery value to WordPress function
- How to pass variables from one function to another or combine functions
- How to create a shortcode out of a php function
- How to override this theme function in child theme
- Unable to add extra elements to the main navi (wp_nav_menu_items)
- Internet Explorer opens links to .msi files as text in a new tab
- call wp_insert_user in custom class doesnt work
- Have custom post type Visibility be private by default, and have radio button also set to “Private”
- Overwriting TwentyTwelve template file with child theme template, but lower in the hierarchy
- I would like single.php to act just like index.php
- Does WordPress has an automatic link parse function?
- A better way to get stats
- Get URLs for AJAX Filter Checkboxes WordPress
- How to Not Show posts on Category page?
- Is it possible to load recaptcha script only in url with fragment identifier (#)?
- page shows short code not output
- Scheduled post delete – can’t pass the cron arguments
- Prevent function from triggering on current page
- Assign IDs to headings in ACF using functions.php
- Multiple Notifications SetInterval
- Child Theme not loading multiple stylesheets
- Show number of sold products but be first for less than 2
- How to retrieve image IDs from shortcode content?
- Class::$template_dir_path=get_template_directory();
- admin-ajax.php & my wp-admin folder url showing in header
- Post date on Custom field
- Fatal error: Call to undefined function add_action() – an untouched problem
- Author info does not show up when author has no posts
- How to wp_enqueue_script with html?
- Is it possible to change parameters of Parent theme function in the Child theme?
- Error function main() is a non-object to construct my Ajax.php
- Unregistering custom tinymce plugin?
- Combining wp_current_user() and a variable
- Init hook for header send
- java script error Uncaught SyntaxError: Unexpected token ILLEGAL
- Gravity Forms After Submission – GFFormsModel::update_lead_field_value?
- site_url is not honoring scheme
- Should I use `get_stylesheet_uri()` or `get_template_directory_uri()` when calling my CSS Stylesheet?
- new to javascript – using in instead of functions.php, not loading correctly
- Remove Disqus JavaScript from homepage
- Missing argument 2
- How to resize image from import image url?
- How to overwrite image if it already exists – WordPress, Gravity form
- Change TinyMCE undeline outpout
- Loading newest dependency javascript module file in functions.php