[ 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.

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

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

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

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

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.

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

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

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

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

param: string $file
since: 1.5.0

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

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

wp_print_theme_file_tree( $tree, $level = 2, $size = 1, $index = 1 )   X-Ref
Outputs the formatted file list for the theme file 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.
since: 4.9.0

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

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

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.

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

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

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

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

param: string|WP_Error $message
since: 2.1.0

wp_doc_link_parse( $content )   X-Ref

return: array
param: string $content
since: 2.8.0

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.

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

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

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

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

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

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

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

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

param: int $user_id User ID.
since: 3.0.0

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.

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

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

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

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

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

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

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

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

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

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

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

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

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

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.

param: string $old_value The old site admin email address.
param: string $value     The proposed new site admin email address.
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.

_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.

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

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

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



Generated: Thu Nov 21 01:00:03 2024 Cross-referenced by PHPXref 0.7.1