function shoestrap_makecss($method = 'php')
 {
     global $wp_filesystem;
     $file = shoestrap_css();
     // Initialize the Wordpress filesystem, no more using file_put_contents function
     if (empty($wp_filesystem)) {
         require_once ABSPATH . '/wp-admin/includes/file.php';
         WP_Filesystem();
     }
     $content = ac_compiler_get_top_message();
     $content .= shoestrap_compiler();
     if (is_writeable($file) || !file_exists($file) && is_writeable(dirname($file))) {
         if (!$wp_filesystem->put_contents($file, $content, FS_CHMOD_FILE)) {
             return apply_filters('shoestrap_css_output', $content);
         }
     }
     // Now create the Alleycat.css file
     $file = get_template_directory() . '/assets/css/alleycat.css';
     $content = ac_compiler_get_top_message();
     $content .= alleycat_compiler();
     if (is_writeable($file) || !file_exists($file) && is_writeable(dirname($file))) {
         if (!$wp_filesystem->put_contents($file, $content, FS_CHMOD_FILE)) {
             return apply_filters('shoestrap_css_output', $content);
         }
     }
 }
Ejemplo n.º 2
0
 function ac_enqueue_styles()
 {
     // Avoid dependencies as these can cause scripts to not load
     // Only depend on js_composer_front if registered
     $rs_deps = array();
     if (wp_style_is('js_composer_front', 'registered')) {
         $rs_deps[] = 'js_composer_front';
     }
     wp_enqueue_style('royalslider', AC_INCLUDES_URI . '/royalslider/royalslider.css', $rs_deps, NULL, 'screen');
     wp_enqueue_style('slick', AC_INCLUDES_URI . '/slick-slide/slick.css');
     wp_enqueue_style('ac-fontello', AC_INCLUDES_URI . '/fonts/css/fontello.css');
     wp_enqueue_style('ac-framework', AC_TEMPLATE_URI . '/ac-framework/ac-framework.css', array(), NULL, 'screen');
     wp_enqueue_style('ac-vc-plugins', AC_TEMPLATE_URI . '/ac-framework/vc-plugins/ac-vc-plugins.css', array(), NULL, 'screen');
     wp_enqueue_style('ac-theme-styles', AC_INCLUDES_URI . '/theme-scipts.css', array(), NULL, 'screen');
     // Load the SS stylesheet
     wp_enqueue_style('shoestrap_css', shoestrap_css('url'), array(), null);
     // Load the Alleycat stylesheet.  Ensure dependencies are AC scripts, and therefore always loaded
     wp_enqueue_style('ac-alleycat', alleycat_css(), array('shoestrap_css', 'ac-theme-styles', 'royalslider'), NULL, 'screen');
     // Load the Wordpress stylesheet last
     wp_enqueue_style('ac-theme', AC_TEMPLATE_URI . '/style.css', array('ac-alleycat'), NULL, 'screen');
 }