Beispiel #1
0
 /**
  * Deletes all the files in the temp directory under 
  * wp-content/uploads/magic-action-box/
  */
 public static function clearCacheDir($ext = '*')
 {
     mab_make_stylesheet_path_writable();
     $dir = mab_get_stylesheet_location('path');
     foreach (glob($dir . "*.{$ext}") as $file) {
         unlink($file);
     }
 }
Beispiel #2
0
/**
 * Creates individual beautified settings stylesheet
 * so they are in sync, and attempts to create custom stylesheet if it doesn't
 * exist.
 *
 * @author Ryann Micua
 * @since 0.9.7
 * @version 1.0
 */
function mab_create_stylesheet($key = '', $section = 'all')
{
    mab_make_stylesheet_path_writable();
    //global $MabDesign, $MabBase, $post;
    //$style = $MabDesign->getSettings( $key );
    mab_create_settings_stylesheet($key, $section);
}
Beispiel #3
0
					</tr>
					<?php 
    $css_dir = mab_get_stylesheet_location('path');
    ?>
					<tr>
						<th><strong><?php 
    _e('CSS directory', 'mab');
    ?>
</strong></th>
						<td>
							<pre><?php 
    print_r($css_dir);
    ?>
</pre>
							<?php 
    if (!mab_make_stylesheet_path_writable()) {
        if (!is_dir($css_dir)) {
            $dir_text = '<p class="error-text">' . __('CSS directory does not exist. ', 'mab') . '</p>';
        } elseif (!is_writable(mab_get_stylesheet_location('path'))) {
            $dir_text = '<p class="error-text">' . __('Directory exists but is not writable.', 'mab') . '</p>';
        }
    } else {
        $dir_text = '<p class="success-text">' . __('Directory exists.', 'mab') . '</p>';
    }
    ?>
							<?php 
    echo $dir_text;
    ?>
						</td>
					</tr>