Edit File by line
/home/zeestwma/ceyloniy.../wp-admin/includes
File: misc.php
$content = apply_filters( 'new_admin_email_content', $email_text, $new_admin_email );
[1500] Fix | Delete
[1501] Fix | Delete
$current_user = wp_get_current_user();
[1502] Fix | Delete
$content = str_replace( '###USERNAME###', $current_user->user_login, $content );
[1503] Fix | Delete
$content = str_replace( '###ADMIN_URL###', esc_url( self_admin_url( 'options.php?adminhash=' . $hash ) ), $content );
[1504] Fix | Delete
$content = str_replace( '###EMAIL###', $value, $content );
[1505] Fix | Delete
$content = str_replace( '###SITENAME###', wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ), $content );
[1506] Fix | Delete
$content = str_replace( '###SITEURL###', home_url(), $content );
[1507] Fix | Delete
[1508] Fix | Delete
if ( '' !== get_option( 'blogname' ) ) {
[1509] Fix | Delete
$site_title = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
[1510] Fix | Delete
} else {
[1511] Fix | Delete
$site_title = parse_url( home_url(), PHP_URL_HOST );
[1512] Fix | Delete
}
[1513] Fix | Delete
[1514] Fix | Delete
$subject = sprintf(
[1515] Fix | Delete
/* translators: New admin email address notification email subject. %s: Site title. */
[1516] Fix | Delete
__( '[%s] New Admin Email Address' ),
[1517] Fix | Delete
$site_title
[1518] Fix | Delete
);
[1519] Fix | Delete
[1520] Fix | Delete
/**
[1521] Fix | Delete
* Filters the subject of the email sent when a change of site admin email address is attempted.
[1522] Fix | Delete
*
[1523] Fix | Delete
* @since 6.5.0
[1524] Fix | Delete
*
[1525] Fix | Delete
* @param string $subject Subject of the email.
[1526] Fix | Delete
*/
[1527] Fix | Delete
$subject = apply_filters( 'new_admin_email_subject', $subject );
[1528] Fix | Delete
[1529] Fix | Delete
wp_mail( $value, $subject, $content );
[1530] Fix | Delete
[1531] Fix | Delete
if ( $switched_locale ) {
[1532] Fix | Delete
restore_previous_locale();
[1533] Fix | Delete
}
[1534] Fix | Delete
}
[1535] Fix | Delete
[1536] Fix | Delete
/**
[1537] Fix | Delete
* Appends '(Draft)' to draft page titles in the privacy page dropdown
[1538] Fix | Delete
* so that unpublished content is obvious.
[1539] Fix | Delete
*
[1540] Fix | Delete
* @since 4.9.8
[1541] Fix | Delete
* @access private
[1542] Fix | Delete
*
[1543] Fix | Delete
* @param string $title Page title.
[1544] Fix | Delete
* @param WP_Post $page Page data object.
[1545] Fix | Delete
* @return string Page title.
[1546] Fix | Delete
*/
[1547] Fix | Delete
function _wp_privacy_settings_filter_draft_page_titles( $title, $page ) {
[1548] Fix | Delete
if ( 'draft' === $page->post_status && 'privacy' === get_current_screen()->id ) {
[1549] Fix | Delete
/* translators: %s: Page title. */
[1550] Fix | Delete
$title = sprintf( __( '%s (Draft)' ), $title );
[1551] Fix | Delete
}
[1552] Fix | Delete
[1553] Fix | Delete
return $title;
[1554] Fix | Delete
}
[1555] Fix | Delete
[1556] Fix | Delete
/**
[1557] Fix | Delete
* Checks if the user needs to update PHP.
[1558] Fix | Delete
*
[1559] Fix | Delete
* @since 5.1.0
[1560] Fix | Delete
* @since 5.1.1 Added the {@see 'wp_is_php_version_acceptable'} filter.
[1561] Fix | Delete
*
[1562] Fix | Delete
* @return array|false {
[1563] Fix | Delete
* Array of PHP version data. False on failure.
[1564] Fix | Delete
*
[1565] Fix | Delete
* @type string $recommended_version The PHP version recommended by WordPress.
[1566] Fix | Delete
* @type string $minimum_version The minimum required PHP version.
[1567] Fix | Delete
* @type bool $is_supported Whether the PHP version is actively supported.
[1568] Fix | Delete
* @type bool $is_secure Whether the PHP version receives security updates.
[1569] Fix | Delete
* @type bool $is_acceptable Whether the PHP version is still acceptable or warnings
[1570] Fix | Delete
* should be shown and an update recommended.
[1571] Fix | Delete
* }
[1572] Fix | Delete
*/
[1573] Fix | Delete
function wp_check_php_version() {
[1574] Fix | Delete
$version = PHP_VERSION;
[1575] Fix | Delete
$key = md5( $version );
[1576] Fix | Delete
[1577] Fix | Delete
$response = get_site_transient( 'php_check_' . $key );
[1578] Fix | Delete
[1579] Fix | Delete
if ( false === $response ) {
[1580] Fix | Delete
$url = 'http://api.wordpress.org/core/serve-happy/1.0/';
[1581] Fix | Delete
[1582] Fix | Delete
if ( wp_http_supports( array( 'ssl' ) ) ) {
[1583] Fix | Delete
$url = set_url_scheme( $url, 'https' );
[1584] Fix | Delete
}
[1585] Fix | Delete
[1586] Fix | Delete
$url = add_query_arg( 'php_version', $version, $url );
[1587] Fix | Delete
[1588] Fix | Delete
$response = wp_remote_get( $url );
[1589] Fix | Delete
[1590] Fix | Delete
if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) {
[1591] Fix | Delete
return false;
[1592] Fix | Delete
}
[1593] Fix | Delete
[1594] Fix | Delete
$response = json_decode( wp_remote_retrieve_body( $response ), true );
[1595] Fix | Delete
[1596] Fix | Delete
if ( ! is_array( $response ) ) {
[1597] Fix | Delete
return false;
[1598] Fix | Delete
}
[1599] Fix | Delete
[1600] Fix | Delete
set_site_transient( 'php_check_' . $key, $response, WEEK_IN_SECONDS );
[1601] Fix | Delete
}
[1602] Fix | Delete
[1603] Fix | Delete
if ( isset( $response['is_acceptable'] ) && $response['is_acceptable'] ) {
[1604] Fix | Delete
/**
[1605] Fix | Delete
* Filters whether the active PHP version is considered acceptable by WordPress.
[1606] Fix | Delete
*
[1607] Fix | Delete
* Returning false will trigger a PHP version warning to show up in the admin dashboard to administrators.
[1608] Fix | Delete
*
[1609] Fix | Delete
* This filter is only run if the wordpress.org Serve Happy API considers the PHP version acceptable, ensuring
[1610] Fix | Delete
* that this filter can only make this check stricter, but not loosen it.
[1611] Fix | Delete
*
[1612] Fix | Delete
* @since 5.1.1
[1613] Fix | Delete
*
[1614] Fix | Delete
* @param bool $is_acceptable Whether the PHP version is considered acceptable. Default true.
[1615] Fix | Delete
* @param string $version PHP version checked.
[1616] Fix | Delete
*/
[1617] Fix | Delete
$response['is_acceptable'] = (bool) apply_filters( 'wp_is_php_version_acceptable', true, $version );
[1618] Fix | Delete
}
[1619] Fix | Delete
[1620] Fix | Delete
$response['is_lower_than_future_minimum'] = false;
[1621] Fix | Delete
[1622] Fix | Delete
// The minimum supported PHP version will be updated to 7.4 in the future. Check if the current version is lower.
[1623] Fix | Delete
if ( version_compare( $version, '7.4', '<' ) ) {
[1624] Fix | Delete
$response['is_lower_than_future_minimum'] = true;
[1625] Fix | Delete
[1626] Fix | Delete
// Force showing of warnings.
[1627] Fix | Delete
$response['is_acceptable'] = false;
[1628] Fix | Delete
}
[1629] Fix | Delete
[1630] Fix | Delete
return $response;
[1631] Fix | Delete
}
[1632] Fix | Delete
[1633] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function