- fixed error in plgntls debug logs

- fixed button partner modification page restrictions
This commit is contained in:
asus
2024-04-04 15:06:33 +02:00
parent 6cd25725e0
commit 4948298b8a
4 changed files with 75 additions and 15 deletions

View File

@@ -20,6 +20,10 @@ function is_partner_form_creation_page_CIPF() {
/*
* only for the partner form creation page
* first available hook is parse_query
* -> https://developer.wordpress.org/apis/hooks/action-reference/
* 584 : wordpress_docker/volumes/wp_volume/wp-includes/query.php
* 4427 : wordpress_docker/volumes/wp_volume/wp-includes/class-wp-query.php
*
*/
if (!is_page($slug_partner_create_page)) {
@@ -39,7 +43,10 @@ function is_partner_form_creation_page_CIPF() {
function partner_form_creation_page_init_CIPF() {
Plgntls::debug_infos(2);
redirects_home_if_not_partner();
if (!is_partner()) {
return;
}
Plgntls::debug_infos();
// https://developer.wordpress.org/reference/functions/get_query_var/#more-information
global $wp;
@@ -57,7 +64,9 @@ add_action('init','partner_form_creation_page_init_CIPF');
function partner_form_creation_page_CIPF() {
Plgntls::debug_infos(2);
redirects_home_if_not_partner();
if (!is_partner()) {
return;
}
if (!is_partner_form_creation_page_CIPF()) {
return;
}