[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

title

Body

[close]

/wp-admin/includes/ -> misc.php (summary)

Misc WordPress Administration API.

File Size: 1988 lines (70 kb)
Included or required: 4 times
Referenced: 0 times
Includes or requires: 1 file
 wp-admin/includes/file.php

Defines 43 functions

  got_mod_rewrite()
  got_url_rewrite()
  extract_from_markers()
  insert_with_markers()
  save_mod_rewrite_rules()
  iis7_save_url_rewrite_rules()
  update_recently_edited()
  wp_make_theme_file_tree()
  wp_print_theme_file_tree()
  wp_make_plugin_file_tree()
  wp_print_plugin_file_tree()
  update_home_siteurl()
  wp_reset_vars()
  show_message()
  wp_doc_link_parse()
  set_screen_options()
  iis7_rewrite_rule_exists()
  iis7_delete_rewrite_rule()
  iis7_add_rewrite_rule()
  saveDomDocument()
  admin_color_scheme_picker()
  wp_color_scheme_settings()
  _ipad_meta()
  wp_check_locked_posts()
  wp_refresh_post_lock()
  wp_refresh_post_nonces()
  wp_heartbeat_set_suspension()
  heartbeat_autosave()
  wp_admin_canonical_url()
  wp_admin_headers()
  wp_page_reload_on_back_button_js()
  update_option_new_admin_email()
  _wp_privacy_settings_filter_draft_page_titles()
  __construct()
  add()
  text_change_check()
  policy_text_changed_notice()
  _policy_page_updated()
  get_suggested_policy_text()
  notice()
  privacy_policy_guide()
  get_default_content()
  add_suggested_content()

Functions
Functions that are not part of a class:

got_mod_rewrite()   X-Ref
Returns whether the server is running Apache with the mod_rewrite module loaded.

return: bool

got_url_rewrite()   X-Ref
Returns whether the server supports URL rewriting.

Detects Apache's mod_rewrite, IIS 7.0+ permalink support, and nginx.

return: bool Whether the server supports URL rewriting.

extract_from_markers( $filename, $marker )   X-Ref
Extracts strings from between the BEGIN and END markers in the .htaccess file.

param: string $filename
param: string $marker
return: array An array of strings from a file (.htaccess ) from between BEGIN and END markers.

insert_with_markers( $filename, $marker, $insertion )   X-Ref
Inserts an array of strings into a file (.htaccess ), placing it between
BEGIN and END markers.

Replaces existing marked info. Retains surrounding
data. Creates file if none exists.

param: string       $filename  Filename to alter.
param: string       $marker    The marker to alter.
param: array|string $insertion The new content to insert.
return: bool True on write success, false on failure.

save_mod_rewrite_rules()   X-Ref
Updates the htaccess file with the current rules if it is writable.

Always writes to the file if it exists and is writable to ensure that we
blank out old rules.

return: bool|null True on write success, false on failure. Null in multisite.

iis7_save_url_rewrite_rules()   X-Ref
Updates the IIS web.config file with the current rules if it is writable.
If the permalinks do not require rewrite rules then the rules are deleted from the web.config file.

return: bool|null True on write success, false on failure. Null in multisite.

update_recently_edited( $file )   X-Ref
Update the "recently-edited" file for the plugin or theme editor.

param: string $file

wp_make_theme_file_tree( $allowed_files )   X-Ref
Makes a tree structure for the theme editor's file list.

param: array $allowed_files List of theme file paths.
return: array Tree structure for listing theme files.

wp_print_theme_file_tree( $tree, $level = 2, $size = 1, $index = 1 )   X-Ref
Outputs the formatted file list for the theme editor.

param: array|string $tree  List of file/folder paths, or filename.
param: int          $level The aria-level for the current iteration.
param: int          $size  The aria-setsize for the current iteration.
param: int          $index The aria-posinset for the current iteration.

wp_make_plugin_file_tree( $plugin_editable_files )   X-Ref
Makes a tree structure for the plugin editor's file list.

param: string $plugin_editable_files List of plugin file paths.
return: array Tree structure for listing plugin files.

wp_print_plugin_file_tree( $tree, $label = '', $level = 2, $size = 1, $index = 1 )   X-Ref
Outputs the formatted file list for the plugin editor.

param: array|string $tree  List of file/folder paths, or filename.
param: string       $label Name of file or folder to print.
param: int          $level The aria-level for the current iteration.
param: int          $size  The aria-setsize for the current iteration.
param: int          $index The aria-posinset for the current iteration.

update_home_siteurl( $old_value, $value )   X-Ref
Flushes rewrite rules if siteurl, home or page_on_front changed.

param: string $old_value
param: string $value

wp_reset_vars( $vars )   X-Ref
Resets global variables based on $_GET and $_POST

This function resets global variables based on the names passed
in the $vars array to the value of $_POST[$var] or $_GET[$var] or ''
if neither is defined.

param: array $vars An array of globals to reset.

show_message( $message )   X-Ref
Displays the given administration message.

param: string|WP_Error $message

wp_doc_link_parse( $content )   X-Ref

param: string $content
return: array

set_screen_options()   X-Ref
Saves option for number of rows when listing posts, pages, comments, etc.


iis7_rewrite_rule_exists( $filename )   X-Ref
Check if rewrite rule for WordPress already exists in the IIS 7+ configuration file

param: string $filename The file path to the configuration file
return: bool

iis7_delete_rewrite_rule( $filename )   X-Ref
Delete WordPress rewrite rule from web.config file if it exists there

param: string $filename Name of the configuration file
return: bool

iis7_add_rewrite_rule( $filename, $rewrite_rule )   X-Ref
Add WordPress rewrite rule to the IIS 7+ configuration file.

param: string $filename The file path to the configuration file
param: string $rewrite_rule The XML fragment with URL Rewrite rule
return: bool

saveDomDocument( $doc, $filename )   X-Ref
Saves the XML document into a file

param: DOMDocument $doc
param: string $filename

admin_color_scheme_picker( $user_id )   X-Ref
Display the default admin color scheme picker (Used in user-edit.php)

param: int $user_id User ID.

wp_color_scheme_settings()   X-Ref


_ipad_meta()   X-Ref


wp_check_locked_posts( $response, $data, $screen_id )   X-Ref
Check lock status for posts displayed on the Posts screen

param: array  $response  The Heartbeat response.
param: array  $data      The $_POST data sent.
param: string $screen_id The screen id.
return: array The Heartbeat response.

wp_refresh_post_lock( $response, $data, $screen_id )   X-Ref
Check lock status on the New/Edit Post screen and refresh the lock

param: array  $response  The Heartbeat response.
param: array  $data      The $_POST data sent.
param: string $screen_id The screen id.
return: array The Heartbeat response.

wp_refresh_post_nonces( $response, $data, $screen_id )   X-Ref
Check nonce expiration on the New/Edit Post screen and refresh if needed

param: array  $response  The Heartbeat response.
param: array  $data      The $_POST data sent.
param: string $screen_id The screen id.
return: array The Heartbeat response.

wp_heartbeat_set_suspension( $settings )   X-Ref
Disable suspension of Heartbeat on the Add/Edit Post screens.

param: array $settings An array of Heartbeat settings.
return: array Filtered Heartbeat settings.

heartbeat_autosave( $response, $data )   X-Ref
Autosave with heartbeat

param: array $response The Heartbeat response.
param: array $data     The $_POST data sent.
return: array The Heartbeat response.

wp_admin_canonical_url()   X-Ref
Remove single-use URL parameters and create canonical link based on new URL.

Remove specific query string parameters from a URL, create the canonical link,
put it in the admin header, and change the current URL to match.


wp_admin_headers()   X-Ref
Send a referrer policy header so referrers are not sent externally from administration screens.


wp_page_reload_on_back_button_js()   X-Ref
Outputs JS that reloads the page if the user navigated to it with the Back or Forward button.

Used on the Edit Post and Add New Post screens. Needed to ensure the page is not loaded from browser cache,
so the post title and editor content are the last saved versions. Ideally this script should run first in the head.


update_option_new_admin_email( $old_value, $value )   X-Ref
Send a confirmation request email when a change of site admin email address is attempted.

The new site admin address will not become active until confirmed.

param: string $old_value The old site admin email address.
param: string $value     The proposed new site admin email address.

_wp_privacy_settings_filter_draft_page_titles( $title, $page )   X-Ref
Appends '(Draft)' to draft page titles in the privacy page dropdown
so that unpublished content is obvious.

param: string  $title Page title.
param: WP_Post $page  Page data object.
return: string Page title.

__construct()   X-Ref
Constructor


add( $plugin_name, $policy_text )   X-Ref
Add content to the postbox shown when editing the privacy policy.

Plugins and themes should suggest text for inclusion in the site's privacy policy.
The suggested text should contain information about any functionality that affects user privacy,
and will be shown in the Suggested Privacy Policy Content postbox.

Intended for use from `wp_add_privacy_policy_content()`.

param: string $plugin_name The name of the plugin or theme that is suggesting content for the site's privacy policy.
param: string $policy_text The suggested content for inclusion in the policy.

text_change_check()   X-Ref
Quick check if any privacy info has changed.


policy_text_changed_notice()   X-Ref
Output a warning when some privacy info has changed.


_policy_page_updated( $post_id )   X-Ref
Update the cached policy info when the policy page is updated.


get_suggested_policy_text()   X-Ref
Check for updated, added or removed privacy policy information from plugins.

Caches the current info in post_meta of the policy page.

return: array The privacy policy text/informtion added by core and plugins.

notice( $post )   X-Ref
Add a notice with a link to the guide when editing the privacy policy page.

param: WP_Post $post The currently edited post.

privacy_policy_guide()   X-Ref
Output the privacy policy guide together with content from the theme and plugins.


get_default_content( $description = false, $blocks = true )   X-Ref
Return the default suggested privacy policy content.

param: bool $description Whether to include the descriptions under the section headings. Default false.
param: bool $blocks      Whether to format the content for the block editor. Default true.
return: string The default policy content.

add_suggested_content()   X-Ref
Add the suggested privacy policy text to the policy postbox.




Generated: Fri Dec 14 08:20:01 2018 Cross-referenced by PHPXref 0.7