Ticket #44142: 44142.4.diff
File 44142.4.diff, 2.8 KB (added by , 7 years ago) |
---|
-
src/wp-admin/includes/misc.php
202 202 return; 203 203 } 204 204 205 /** Ensure get_home_path is declared. */ 206 require_once( ABSPATH . 'wp-admin/includes/file.php' ); 207 205 208 global $wp_rewrite; 206 209 207 210 $home_path = get_home_path(); … … 236 239 return; 237 240 } 238 241 242 /** Ensure get_home_path is declared. */ 243 require_once( ABSPATH . 'wp-admin/includes/file.php' ); 244 239 245 global $wp_rewrite; 240 246 241 247 $home_path = get_home_path(); -
src/wp-admin/includes/plugin.php
2016 2016 } 2017 2017 2018 2018 /** 2019 * Helper function for adding content to the postbox shown when editing the privacy policy.2019 * Helper function for adding content to the Privacy Policy Guide. 2020 2020 * 2021 2021 * Plugins and themes should suggest text for inclusion in the site's privacy policy. 2022 2022 * The suggested text should contain information about any functionality that affects user privacy, 2023 * and will be shown in the Suggested Privacy Policy Content postbox.2023 * and will be shown on the Privacy Policy Guide screen. 2024 2024 * 2025 2025 * A plugin or theme can use this function multiple times as long as it will help to better present 2026 2026 * the suggested policy content. For example modular plugins such as WooCommerse or Jetpack 2027 2027 * can add or remove suggested content depending on the modules/extensions that are enabled. 2028 * For more information see the Plugins Handbook: 2029 * https://developer.wordpress.org/plugins/privacy/suggesting-text-for-the-site-privacy-policy/. 2028 2030 * 2029 2031 * Intended for use with the `'admin_init'` action. 2030 2032 * … … 2032 2034 * 2033 2035 * @param string $plugin_name The name of the plugin or theme that is suggesting content for the site's privacy policy. 2034 2036 * @param string $policy_text The suggested content for inclusion in the policy. 2035 * For more information see the Plugins Handbook https://developer.wordpress.org/plugins/.2036 2037 */ 2037 2038 function wp_add_privacy_policy_content( $plugin_name, $policy_text ) { 2039 if ( ! is_admin() ) { 2040 _doing_it_wrong( __FUNCTION__, __( 'The suggested privacy policy content should be added only in wp-admin by using the "admin_init" (or later) action.' ), '4.9.7' ); 2041 return; 2042 } elseif ( ! doing_action( 'admin_init' ) && ! did_action( 'admin_init' ) ) { 2043 _doing_it_wrong( __FUNCTION__, __( 'The suggested privacy policy content should be added by using the "admin_init" (or later) action. Please see the inline documentation.' ), '4.9.7' ); 2044 return; 2045 } 2046 2038 2047 if ( ! class_exists( 'WP_Privacy_Policy_Content' ) ) { 2039 2048 require_once( ABSPATH . 'wp-admin/includes/misc.php' ); 2040 2049 }