コード例 #1
0
ファイル: hook.php プロジェクト: mysia84/mnassalska
 public function custom_css_output()
 {
     ob_start();
     require_once DHINC_DIR . '/custom-css/brand-primary.php';
     require_once DHINC_DIR . '/custom-css/brand-success.php';
     require_once DHINC_DIR . '/custom-css/brand-info.php';
     require_once DHINC_DIR . '/custom-css/brand-warning.php';
     require_once DHINC_DIR . '/custom-css/brand-danger.php';
     require_once DHINC_DIR . '/custom-css/style.php';
     $custom_css = ob_get_clean();
     $custom_css = dh_css_minify($custom_css);
     echo '<style id="' . basename(get_template_directory()) . '-custom-css" type="text/css">' . "\n" . $custom_css . "\n" . '</style>' . "\n";
     return;
 }
コード例 #2
0
ファイル: hook.php プロジェクト: jonasbelcina/platinumdxb
 public function custom_css_output($main_css_id)
 {
     ob_start();
     require_once DHINC_DIR . '/custom-css/brand-primary.php';
     require_once DHINC_DIR . '/custom-css/style.php';
     $custom_css = ob_get_clean();
     $custom_css = trim($custom_css);
     $custom_css = dh_css_minify($custom_css);
     if (!empty($custom_css)) {
         wp_add_inline_style($main_css_id . '-wp', dh_css_minify($custom_css));
     }
     if ($custom_css = dh_get_theme_option('custom-css')) {
         wp_add_inline_style($main_css_id . '-wp', dh_css_minify($custom_css));
     }
     return;
 }