Changeset 43361
- Timestamp:
- 06/16/2018 01:01:42 PM (6 years ago)
- Location:
- trunk/src/wp-admin/includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/misc.php
r43350 r43361 205 205 global $wp_rewrite; 206 206 207 // Ensure get_home_path is declared. 208 require_once( ABSPATH . 'wp-admin/includes/file.php' ); 209 207 210 $home_path = get_home_path(); 208 211 $htaccess_file = $home_path . '.htaccess'; … … 238 241 239 242 global $wp_rewrite; 243 244 // Ensure get_home_path is declared. 245 require_once( ABSPATH . 'wp-admin/includes/file.php' ); 240 246 241 247 $home_path = get_home_path(); -
trunk/src/wp-admin/includes/plugin.php
r43003 r43361 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 Plugin 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. … … 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( 2041 __FUNCTION__, 2042 sprintf( 2043 /* translators: %s: admin_init */ 2044 __( 'The suggested privacy policy content should be added only in wp-admin by using the %s (or later) action.' ), 2045 '<code>admin_init</code>' 2046 ), 2047 '4.9.7' 2048 ); 2049 return; 2050 } elseif ( ! doing_action( 'admin_init' ) && ! did_action( 'admin_init' ) ) { 2051 _doing_it_wrong( 2052 __FUNCTION__, 2053 sprintf( 2054 /* translators: %s: admin_init */ 2055 __( 'The suggested privacy policy content should be added by using the %s (or later) action. Please see the inline documentation.' ), 2056 '<code>admin_init</code>' 2057 ), 2058 '4.9.7' 2059 ); 2060 return; 2061 } 2062 2038 2063 if ( ! class_exists( 'WP_Privacy_Policy_Content' ) ) { 2039 2064 require_once( ABSPATH . 'wp-admin/includes/misc.php' );
Note: See TracChangeset
for help on using the changeset viewer.