Hook inside a hook

OK, so the new_to_publish hook is probably not the right hook to use here. The status_to_status hooks run during a posts transition from the first status to the second. By this stage, the editor is no longer in play. If my understanding of the_editor_content is correct, this filters the default content displayed in the editor … Read more

$new_pass always returns null – password_reset hook

Note that: add_action( ‘password_reset’, ‘remote_password_update’ ); is like calling: add_action( ‘password_reset’, ‘remote_password_update’, 10, 1 ); where 10 is the default priority and 1 is the number of arguments. You need: add_action( ‘password_reset’, ‘remote_password_update’, 10, 2 ); with 2 as the number of arguments. Now you should be able to access the $new_pass input variable.

Need data from two different actions

Try $globalres=””; add_action(‘quiz_completed’, ‘mi_ld_quiz_ert’, 10, 2); function mi_ld_quiz_ert( $quizdata, $current_user ) { global $globalres; if($globalres== 0){ do_action(‘ld_update_group_access’, $current_user, 2, $remove = false )); } else{ do_action(‘ld_update_group_access’, $current_user, 14, $remove = false )); } } add_action(‘learndash_ques_single_answer_correct’, ‘my_ld_quiz_resp’,5,5); function my_ld_quiz_resp( $answerIndex, $correctAnswer, $userResponse) { global $globalres; $globalres = $answerIndex; }

Submit to itself don’t work

$formtxt .= ‘<form style=”width: 800px;” name=”time_booking” action=”#” onsubmit=”return validateCalendarForm();” method = “POST”>’; action is set to #. maybe that is the cause. try removing that. action=”” additionally a js function validateCalendarForm() is calling on form submit. so check console for errors too. and lastly refresh permalink structure

Can add_image_size be added earlier

You can set the priority to 999 to make sure if you are going that way: add_action( ‘after_setup_theme’, ‘_my_action_add_image_sizes’, 999 ); but if you really want to make sure of that order, try making a custom action, here a small example: /** * Execute the action with do_action. */ function read_theme_options() { //all the logic … Read more