WordPress crob job performance

No, The action will trigger when someone visits your WordPress site, if the scheduled time has passed. So if there no visitors crob job will not be triggered. In your case, it is better if you can run server cron job. Performance issue depend on the function you need to run as a cron job.

Do something with thumbnail image on post publish

Actually WordPress offer a good hook , You can get data from Post Published , for more you can follow this example : https://codex.wordpress.org/Plugin_API/Action_Reference/publish_post Example of a simple update of custom field: /* Do something with the data entered */ add_action( ‘save_post’, ‘myplugin_save_postdata’ ); /* When the post is saved, saves our custom data */ … Read more

How to validate field when create post

You can check post data in $_POST array on save_post_{custom_post_type_name} action hook. And if data is not appropriate or according to server side validation and redirect page with custom error args using wp_redirect and , you can grab the errors and display admin notices using admin_notice.

can’t use span or icon tags on when editing visual composer element

Actually this is what i did on the js_composer/assets/js/backend/composer-view.js file, I changed this block: render: function () { var $shortcode_template_el = $( ‘#vc_shortcode-template-‘ + this.model.get( ‘shortcode’ ) ); if ( $shortcode_template_el.is( ‘script’ ) ) { this.html2element( _.template( $shortcode_template_el.html(), this.model.toJSON(), vc.templateOptions.default ) ); } To: render: function () { var $shortcode_template_el = $( ‘#vc_shortcode-template-‘ + this.model.get( … Read more

Overwrite user role

I don’t use this plugin for a while, don’t you need to customize the shortcode for each form, one should be role=”student” and the other one role=”employer”. You can also use the filter add_filter( ‘simplr_validate_form’, ‘my_simplr_validate_form’, 10, 3 ); A simple example, assuming the page for the registration is 1 for the student and 2 … Read more

Mobile Notification on a blog post

Basically you can PULL or PUSH. WP Rest API – PULL Use the REST API to query for posts. Look for the latest publish date and verify your last know post. If there is a difference, send a message or trigger a notification in the app. It’s possible you could set the last known on … Read more

Edit plugin filter

Just a hint… In your case, I’ll try to remove the filter remove_filter( ‘gform_validation’, array( ‘classname’, ‘validate’ ) ); Rename classname with the class name where the filter is. And add your filter and functions add_filter( ‘gform_validation’, ‘your_validate’ ) ); If you want to access to another class (and public function) : classname::validate(); Hope it … Read more

How to do rest APi with wordpress

First of all you should re-submit permalink to enable rest api in your wordpress. your rest api url is: http://your-site.com/wp-json/ And you can register new endpoind with bellow code: add_action( ‘rest_api_init’, function () { register_rest_route( ‘myplugin/v1’, ‘/author/(?P<id>\d+)’, array( ‘methods’ => ‘GET’, ‘callback’ => ‘my_awesome_func’, ) ); } );