Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible wp_enqueue_script() comment improvment #592

Open
diniciacci opened this issue Apr 9, 2024 · 1 comment
Open

Possible wp_enqueue_script() comment improvment #592

diniciacci opened this issue Apr 9, 2024 · 1 comment

Comments

@diniciacci
Copy link

Hello,

I found this comment:

* This function is provided for demonstration purposes only.

a bit misleading.

My point is that the comment uses "should", where it can be made more clear that an instance of that class is indeed passed. I.e. the inexperienced reader does not have to do it, it's already done even if the function is for "demostration purposes only".
Moreover it's not the run() function creating or passing the instance.

A very cheap proposal is (need english rework):

        /**
         * This function is provided for demonstration purposes only. 
         * It will add_filter() the default plugin script or sytle.
         *
         * With the current plugin structure, an instance of this class
         * is created by Plugin_Name and then passed to add_action()
         * defined in Plugin_Name_Loader.
         * 
         * Then, the run() function defined in Plugin_Name_Loader will
         * connect all the hooks you have registered with add_action()
         * in the plugin with wordpress hooks by calling add_filter()
         * on each.
         * 
         */
@guri-dev
Copy link

@diniciacci I've created a PR regarding the comment that you have mentioned-above
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants