How to make a cronjob type plugin

Yes, you can make a plugin. Following is the way to add cron job functionality in WordPress plugin. http://codex.wordpress.org/Function_Reference/wp_schedule_event http://codex.wordpress.org/Function_Reference/wp_cron However, please note that this does not provide a real (system based) cron. It requires at least someone to visit your site, so that the functions keep on executing periodically.

Calling a class method instantiated by ajax call in wordpress [closed]

You class method need to be static to be access without initializing the class or public in order to access from the class itself without reference &. And the variable $this->itemsClass also need to be public. So the workaround is – class Plugin { public $itemsClass; function __construct() { add_action(‘wp_ajax_list_items’, array( $this, ‘list_items’ )); } … Read more

How to add img into a plugin?

<?php echo ‘<img src=”‘ . plugins_url( ‘img/image.png’, __FILE__ ) . ‘” > ‘; ?> here is the link how to add images or any other files from plugin folder http://codex.wordpress.org/Function_Reference/plugins_url

Unexpected T_FUNCTION

Check that the user has php >= 5.3 installed. The inline function syntax used on that line only works with that or higher. You can rewrite the line to create a separate function and then call it like this: usort($mz_classes, ‘myFunction’); For more info: http://php.net/manual/en/function.usort.php