[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

Misc WordPress Administration API.

File Size: 1581 lines (44 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 36 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()
  wp_admin_viewport_meta()
  _customizer_mobile_viewport_meta()
  wp_check_locked_posts()
  wp_refresh_post_lock()
  wp_refresh_post_nonces()
  wp_refresh_heartbeat_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()
  wp_check_php_version()

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.

since: 2.0.0
return: bool Whether the server is running Apache with the mod_rewrite module loaded.

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

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

since: 3.7.0
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.

since: 1.5.0
return: string[] An array of strings from a file (.htaccess) from between BEGIN and END markers.
param: string $filename Filename to extract the strings from.
param: string $marker   The marker to extract the strings from.

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.

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

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.

since: 1.5.0
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.

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

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

since: 1.5.0
param: string $file

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

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

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

since: 4.9.0
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 file editor's file list.

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

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

since: 4.9.0
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.

since: 2.1.0
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.

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

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

since: 2.1.0
param: string|WP_Error $message

wp_doc_link_parse( $content )   X-Ref

since: 2.8.0
return: array
param: string $content

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

since: 2.8.0

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

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

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

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

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

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

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

since: 2.8.0
param: DOMDocument $doc
param: string      $filename

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

since: 3.0.0
param: int $user_id User ID.

wp_color_scheme_settings()   X-Ref


wp_admin_viewport_meta()   X-Ref
Displays the viewport meta in the admin.

since: 5.5.0

_customizer_mobile_viewport_meta( $viewport_meta )   X-Ref
Adds viewport meta for mobile in Customizer.

Hooked to the {@see 'admin_viewport_meta'} filter.

since: 5.5.0
return: string Filtered viewport meta.
param: string $viewport_meta The viewport meta.

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

since: 3.6.0
return: array The Heartbeat response.
param: array  $response  The Heartbeat response.
param: array  $data      The $_POST data sent.
param: string $screen_id The screen ID.

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

since: 3.6.0
return: array The Heartbeat response.
param: array  $response  The Heartbeat response.
param: array  $data      The $_POST data sent.
param: string $screen_id The screen ID.

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

since: 3.6.0
return: array The Heartbeat response.
param: array  $response  The Heartbeat response.
param: array  $data      The $_POST data sent.
param: string $screen_id The screen ID.

wp_refresh_heartbeat_nonces( $response )   X-Ref
Adds the latest Heartbeat and REST-API nonce to the Heartbeat response.

since: 5.0.0
return: array The Heartbeat response.
param: array $response The Heartbeat response.

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

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

heartbeat_autosave( $response, $data )   X-Ref
Performs autosave with heartbeat.

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

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

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

since: 4.2.0

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

since: 4.9.0

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.

since: 4.6.0

update_option_new_admin_email( $old_value, $value )   X-Ref
Sends 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.

since: 3.0.0
since: 4.9.0 This function was moved from wp-admin/includes/ms.php so it's no longer Multisite specific.
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.

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

wp_check_php_version()   X-Ref
Checks if the user needs to update PHP.

since: 5.1.0
since: 5.1.1 Added the {@see 'wp_is_php_version_acceptable'} filter.
return: array|false Array of PHP version data. False on failure.



Generated: Tue Mar 19 01:00:02 2024 Cross-referenced by PHPXref 0.7.1