Well, it is not possible, I guess. If you define function in global scope, then it is visible for all code.
The only way to make it private for plugin is to use OOP (and it’s recommended way of writing plugins).
You can rename this function, but it won’t solve your problem in the long run (still there is a chance that there will be function with the same name).
Related Posts:
- Should all plugins be encapsulated in a Class?
- How do I extend one plugin I’m writing with another I’m writing using classes?
- Check if a class exists within a method
- Most efficient way to use classes to create admin pages using Settings API
- Basic Object Oriented plugin question
- Using plugin functions/methods within templates
- Why is my custom post type not being activated on plug-in activation?
- Built a second plugin but it overwrote the first one
- WordPress Custom Hook with Class method
- WordPress plugin blog creation
- Get post content inside plugin class method
- Autoloading a PHP class – working outside, but not inside WordPress plugin
- Strict Standards: Non-static method in sidebar generator
- Function not being called on form submit, only blank admin-post.php page
- Disable email notification after change of password
- __(): What if I have to pass in a variable?
- Run WP-CLI using PHP
- How to remove duplicate sub-menu name for top level menu items in a plugin?
- Plugin update error message
- How to build an API as a plugin
- PHP Deprecated: Non-static method should not be called statically
- Set a User as Author of all ‘New Posts’ posted
- How do I configure WordPress to talk to a Microsoft SQL Server database?
- Trying to get logged-in user data inside php class
- Calling function from within functions.php returns unwanted value
- Calling a plugin in theme development
- Unable to activate wordpress importer after installing it
- force customers to add only single item to card per purchase EDD [closed]
- How to get post URL in the_content filter?
- Write to / remove from default .htaccess file from plugin?
- Why isn’t admin_notices displaying my text? [Simple Plugin, Beginner]
- Programatically download a plugin
- Error shown for Trying to get property ‘roles’ of non-object in WordPress After Content for User Roles
- How to Use Parameters with a Do_Action Function Within PHP Tags
- CSS from textarea in options page to frontend what to do
- How do I pass a post ID to the page URL?
- wp_set_auth_cookie causes 403 error in the wooCommerce checkout
- add image crop function like in wp customizer
- Calculate price and display on woocommerce product single page under price (simple price, variable price) [closed]
- How to edit content before post update
- Bootstrap and Custom CSS in custom plugin are being overwritten by theme
- Customize permalink wordpress category id
- Take input from form and pass it to function using a wp-plugin
- Self-serve ad system like Reddit’s for WordPress? [closed]
- Create a plugin from within WordPress
- Class variables not correct on page
- Load Javascript from Plugin in One Page Only?
- Call plugin with php function
- Setting Up PHP Workflow in WordPress
- How can I exclude a dynamic URL to show a popup created using ‘WordPress Popup’ plugin
- How do I add $_SESSION[”] to my wordpress page?
- output html on post or page from custom plugin [closed]
- How can i add simple code in only in posts by function.php
- Hide DIV if empty – Plugin Gallery
- Profile / benchmark wordpress on apache?
- WordPress Object Oriented plugin development [closed]
- Way to send multiple values for column to MySQL?
- Retrieve Plugin Settings and insert into XML string
- WordPress Stats Plugin: Display Post Views [closed]
- Pagination not working
- exec-PHP shows output at bottom of page
- Creating New Dynamic Fields for a Certificate (Number Generation, Code Referencing, and more)
- need to find duplicated meta value in custom filed and view the posts that have the same value
- Can I disable xml-rpc by setting it to false?
- Getting current user data with MySQL statement
- how to validate input field in wordpress generated with wpform plugin
- Conditional delete metadata does not works
- Push Contact form 7 variable to front end after submission
- Add a parameter at the end of the url and prettify
- Share my WordPress plugin for updating how?
- How can I change page content for good once a button is pressed?
- Google Maps for Woocommerce Checkout
- working code, not working – Plugin Dev
- Add two row of code to the public static function init of a plugin
- Get and Update Most Meta Value as an array in HTML form
- Custom shortcode being shown in WPBakery backend rather than the block
- WordPress filter from custom table is not working properly
- user specific private content
- Configuring default woo commerce login with modal popup
- submit form data to wordpress existing database table using my plugin
- register_activation_hook doesn’t fire at all
- My ajax request don´t work and return 0
- How can I remove this sidebar from my Search Results page?
- How to allow customers to input a text as a product variation *and* charge per character?
- How to copy data from user profile page (profile.php) to theme customizer
- display user input using ajax in wordpress
- How do add_action and WP_Query
- Can’t insert files in other inputs
- How do I output user_registered time in my correct timezone?
- How to tweak a plugin without preventing it from updating
- Place max_execution_time in plugin [closed]
- Creating a press page for our project
- how to search through plugin in wordpress cimy-user-extra-fields?
- wordpress illegal string offset ‘parameter’ error
- Translate text for empty product
- Refresh server side rendered block in Gutenberg without changing attributes or its content
- I want create woocommerec match products columns
- WordPress Custom Page Blog Template Pagination Problem (Pagination Not Displaying)
- How to override plugin function in code snippets WordPress
- How to create a “Most Popular” & “Latest” TAB in WordPress