wp_supercache_domain_mapping_admin() WPSCache 1.0
No Hooks.
Return
Null. Nothing.
Usage
wp_supercache_domain_mapping_admin();
Code of wp_supercache_domain_mapping_admin() wp supercache domain mapping admin WPSCache 1.7.1
function wp_supercache_domain_mapping_admin() {
global $cache_domain_mapping, $wp_cache_config_file, $valid_nonce;
$requested_state = isset( $_POST['cache_domain_mapping'] ) ? (int) $_POST['cache_domain_mapping'] : null;
$cache_domain_mapping = (int) $cache_domain_mapping;
$changed = false;
if ( null !== $requested_state && $valid_nonce ) {
$cache_domain_mapping = $requested_state;
wp_cache_replace_line( '^\s*\$cache_domain_mapping\s*=', '$cache_domain_mapping = ' . intval( $cache_domain_mapping ) . ';', $wp_cache_config_file );
$changed = true;
}
$id = 'domain_mapping-section';
?>
<fieldset id="<?php echo esc_attr( $id ); ?>" class="options">
<h4><?php esc_html_e( 'Domain Mapping', 'wp-super-cache' ); ?></h4>
<form name="wp_manager" action="" method="post">
<label><input type="radio" name="cache_domain_mapping" value="1" <?php checked( $cache_domain_mapping ); ?>/> <?php esc_html_e( 'Enabled', 'wp-super-cache' ); ?></label>
<label><input type="radio" name="cache_domain_mapping" value="0" <?php checked( ! $cache_domain_mapping ); ?>/> <?php esc_html_e( 'Disabled', 'wp-super-cache' ); ?></label>
<?php
echo '<p>' . __( 'Provides support for <a href="https://wordpress.org/plugins/wordpress-mu-domain-mapping/">Domain Mapping</a> plugin to map multiple domains to a blog.', 'wp-super-cache' ) . '</p>';
if ( $changed ) {
echo '<p><strong>' . sprintf(
esc_html__( 'Domain Mapping support is now %s', 'wp-super-cache' ),
esc_html( $cache_domain_mapping ? __( 'enabled', 'wp-super-cache' ) : __( 'disabled', 'wp-super-cache' ) )
) . '</strong></p>';
}
echo '<div class="submit"><input class="button-primary" ' . SUBMITDISABLED . ' type="submit" value="' . esc_html__( 'Update', 'wp-super-cache' ) . '" /></div>';
wp_nonce_field( 'wp-cache' );
?>
</form>
</fieldset>
<?php
}