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

Readme should note that the extending class should be initialized #9

Open
r-a-y opened this issue Mar 6, 2015 · 2 comments
Open

Readme should note that the extending class should be initialized #9

r-a-y opened this issue Mar 6, 2015 · 2 comments

Comments

@r-a-y
Copy link
Contributor

r-a-y commented Mar 6, 2015

In the Quick Start section of the README.md, there should be a note saying that the extended class should be initialized.

For example:

new JPB_Async_Task;

It's a small thing, but people can over look that 😄

Update:

I see that it's noted on this line:

Make sure that you instantiate your asynchronous task once. Do this no earlier than the 'plugins_loaded' action.

Maybe add a code example?

function jpb_async_task_init() {
    new JPB_Async_Task;
}
add_action( 'plugins_loaded', 'jpb_async_task_init' );

I would normally write this as an anonymous function, but WP supports a minimum of PHP 5.2.4.

@willvedd
Copy link

willvedd commented Dec 7, 2015

@r-a-y I agree. Thanks for pointing that out.

@austinpray
Copy link

Added a PR

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

Successfully merging a pull request may close this issue.

3 participants