~clint-fewbar/charms/oneiric/omgubuntu-wp/trunk

« back to all changes in this revision

Viewing changes to files/wordpress/wp-content/plugins/w3-total-cache/inc/options/minify/csstidy2.php

  • Committer: Marco Ceppi
  • Date: 2012-03-19 14:27:51 UTC
  • Revision ID: marco@ceppi.net-20120319142751-xvn4zfl0rq99r00p
First revision of OMG charm

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
if (!defined('W3TC')) {
 
4
    die();
 
5
}
 
6
 
 
7
$csstidy_templates = array(
 
8
    'highest_compression' => 'Highest (no readability, smallest size)',
 
9
    'high_compression' => 'High (moderate readability, smaller size)',
 
10
    'default' => 'Standard (balance between readability and size)',
 
11
    'low_compression' => 'Low (higher readability)',
 
12
);
 
13
 
 
14
$optimise_shorthands_values = array(
 
15
    0 => 'Don\'t optimise',
 
16
    1 => 'Safe optimisations',
 
17
    2 => 'All optimisations'
 
18
);
 
19
 
 
20
$case_properties_values = array(
 
21
    0 => 'None',
 
22
    1 => 'Lowercase',
 
23
    2 => 'Uppercase'
 
24
);
 
25
 
 
26
$merge_selectors_values = array(
 
27
    0 => 'Do not change anything',
 
28
    1 => 'Only seperate selectors (split at ,)',
 
29
    2 => 'Merge selectors with the same properties (fast)'
 
30
);
 
31
 
 
32
$csstidy_template = $this->_config->get_string('minify.csstidy.options.template');
 
33
$optimise_shorthands = $this->_config->get_integer('minify.csstidy.options.optimise_shorthands');
 
34
$case_properties = $this->_config->get_integer('minify.csstidy.options.case_properties');
 
35
$merge_selectors = $this->_config->get_integer('minify.csstidy.options.merge_selectors');
 
36
?>
 
37
<tr>
 
38
    <th><label for="minify_csstidy_options_template">Compression:</label></th>
 
39
    <td>
 
40
        <select id="minify_csstidy_options_template" class="css_enabled" name="minify.csstidy.options.template">
 
41
            <?php foreach ($csstidy_templates as $csstidy_template_key => $csstidy_template_name): ?>
 
42
            <option value="<?php echo $csstidy_template_key; ?>"<?php selected($csstidy_template, $csstidy_template_key); ?>><?php echo $csstidy_template_name; ?></option>
 
43
            <?php endforeach; ?>
 
44
        </select>
 
45
    </td>
 
46
</tr>
 
47
<tr>
 
48
    <th><label for="minify_csstidy_options_optimise_shorthands">Optimise shorthands:</label></th>
 
49
    <td>
 
50
        <select id="minify_csstidy_options_optimise_shorthands" class="css_enabled" name="minify.csstidy.options.optimise_shorthands">
 
51
            <?php foreach ($optimise_shorthands_values as $optimise_shorthands_key => $optimise_shorthands_name): ?>
 
52
            <option value="<?php echo $optimise_shorthands_key; ?>"<?php selected($optimise_shorthands, $optimise_shorthands_key); ?>><?php echo $optimise_shorthands_name; ?></option>
 
53
            <?php endforeach; ?>
 
54
        </select>
 
55
    </td>
 
56
</tr>
 
57
<tr>
 
58
    <th><label for="minify_csstidy_options_case_properties">Case for properties:</label></th>
 
59
    <td>
 
60
        <select id="minify_csstidy_options_case_properties" class="css_enabled" name="minify.csstidy.options.case_properties">
 
61
            <?php foreach ($case_properties_values as $case_properties_key => $case_properties_name): ?>
 
62
            <option value="<?php echo $case_properties_key; ?>"<?php selected($case_properties, $case_properties_key); ?>><?php echo $case_properties_name; ?></option>
 
63
            <?php endforeach; ?>
 
64
        </select>
 
65
    </td>
 
66
</tr>
 
67
<tr>
 
68
    <th><label for="minify_csstidy_options_merge_selectors">Regroup selectors:</label></th>
 
69
    <td>
 
70
        <select id="minify_csstidy_options_merge_selectors" class="css_enabled" name="minify.csstidy.options.merge_selectors">
 
71
            <?php foreach ($merge_selectors_values as $merge_selectors_key => $merge_selectors_name): ?>
 
72
            <option value="<?php echo $merge_selectors_key; ?>"<?php selected($merge_selectors, $merge_selectors_key); ?>><?php echo $merge_selectors_name; ?></option>
 
73
            <?php endforeach; ?>
 
74
        </select>
 
75
    </td>
 
76
</tr>