Beispiel #1
0
function wp_cache_edit_accepted()
{
    global $cache_acceptable_files, $cache_rejected_uri, $wp_cache_config_file, $valid_nonce;
    if (isset($_REQUEST['wp_accepted_files']) && $valid_nonce) {
        $text = wp_cache_sanitize_value($_REQUEST['wp_accepted_files'], $cache_acceptable_files);
        wp_cache_replace_line('^ *\\$cache_acceptable_files', "\$cache_acceptable_files = {$text};", $wp_cache_config_file);
    }
    echo '<br clear="all" /><form name="wp_edit_accepted" action="' . $_SERVER["REQUEST_URI"] . '" method="post">';
    echo '<h4>Accepted files</h4>';
    echo "<p>Add here those filenames that can be cached, even if they match one of the rejected substring specified above.</p>\n";
    echo '<textarea name="wp_accepted_files" cols="40" rows="8" style="width: 50%; font-size: 12px;" class="code">';
    foreach ($cache_acceptable_files as $file) {
        echo wp_specialchars($file) . "\n";
    }
    echo '</textarea> ';
    echo '<div><input type="submit" ' . SUBMITDISABLED . 'value="Save files &raquo;" /></div>';
    wp_nonce_field('wp-cache');
    echo "</form>\n";
}
Beispiel #2
0
function wp_cache_edit_accepted()
{
    global $cache_acceptable_files, $cache_rejected_uri, $wp_cache_config_file, $valid_nonce;
    if (isset($_REQUEST['wp_accepted_files']) && $valid_nonce) {
        $text = wp_cache_sanitize_value($_REQUEST['wp_accepted_files'], $cache_acceptable_files);
        wp_cache_replace_line('^ *\\$cache_acceptable_files', "\$cache_acceptable_files = {$text};", $wp_cache_config_file);
    }
    echo '<a name="cancache"></a>';
    echo '<div style="clear:both"></div><form name="wp_edit_accepted" action="#cancache" method="post">';
    echo "<p>" . __('Add here those filenames that can be cached, even if they match one of the rejected substring specified above.', 'wp-super-cache') . "</p>\n";
    echo '<textarea name="wp_accepted_files" cols="40" rows="8" style="width: 50%; font-size: 12px;" class="code">';
    foreach ($cache_acceptable_files as $file) {
        echo esc_html($file) . "\n";
    }
    echo '</textarea> ';
    echo '<div class="submit"><input type="submit" ' . SUBMITDISABLED . 'value="' . __('Save Files', 'wp-super-cache') . ' &raquo;" /></div>';
    wp_nonce_field('wp-cache');
    echo "</form>\n";
}