← All changes
|
includes/admin/settings/class-ph-settings-demo-data.php
+3
-1
2.2.5
→
2.3.1
View file →
| @@ -16,8 +16,9 @@ | ||
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | 18 | * PH_Settings_Demo_Data |
| 19 | 19 | */ |
| 20 | +// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound -- Legacy public global class PH_Settings_Demo_Data; preserving the existing PH_* class name is required for plugin and extension compatibility. | |
| 20 | 21 | class PH_Settings_Demo_Data extends PH_Settings_Page { |
| 21 | 22 | |
| 22 | 23 | /** |
| 23 | 24 | * Constructor. |
| @@ -40,8 +41,9 @@ | ||
| 40 | 41 | public function get_settings() |
| 41 | 42 | { |
| 42 | 43 | global $hide_save_button; |
| 43 | 44 | |
| 45 | + // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Shared admin settings-view state; this global is intentionally used to control the common settings template and is not an arbitrary application global. | |
| 44 | 46 | $hide_save_button = TRUE; |
| 45 | 47 | |
| 46 | 48 | return apply_filters( 'propertyhive_demo_data_settings', array( |
| 47 | 49 | |
| @@ -89,9 +91,9 @@ | ||
| 89 | 91 | <br> |
| 90 | 92 | <p> |
| 91 | 93 | <a href="<?php echo esc_url(admin_url('admin.php?page=ph-settings&tab=features&profilter=free')); ?>" class="button button-primary">Activate Demo Data Feature</a> |
| 92 | 94 | |
| 93 | - <a href="<?php echo esc_url(admin_url('admin.php?page=ph-settings&tab=demo_data&hidetab=1')); ?>">Hide This Page</a> | |
| 95 | + <a href="<?php echo esc_url( wp_nonce_url( admin_url('admin.php?page=ph-settings&tab=demo_data&hidetab=1'), 'propertyhive-hide-demo-data' ) ); ?>">Hide This Page</a> | |
| 94 | 96 | </p> |
| 95 | 97 | </td> |
| 96 | 98 | </tr> |
| 97 | 99 | </table> |