endCSSCompress() public static méthode

Display compressed output
public static endCSSCompress ( )
Exemple #1
0
    /**
     * Fires when styles are printed for a specific admin page based on $hook_suffix.
     *
     * @since WP 2.6.0
     * @access private
     */
    public function _admin_print_styles()
    {
        $logo = isset($this->control_options['wpdk_icon']) ? $this->control_options['wpdk_icon'] : '';
        $version = isset($this->control_options['wpdk_version']) ? $this->control_options['wpdk_version'] : '';
        // If no wpdk extends info set exit
        if (empty($logo) && empty($version)) {
            return;
        }
        WPDKHTML::startCompress();
        ?>
  <style id="wpdk-inline-styles-<?php 
        echo $this->id_base;
        ?>
" type="text/css">
    <?php 
        if (!empty($logo)) {
            ?>
    div[id*=<?php 
            echo $this->id_base;
            ?>
] .widget-title {position:relative;padding-left:28px}
    div[id*=<?php 
            echo $this->id_base;
            ?>
] .widget-title:before
    {
      content           : '';
      position          : absolute;
      display           : block;
      width             : 16px;
      height            : 16px;
      left              : 16px;
      top               : 14px;
      background-image  : url(<?php 
            echo $logo;
            ?>
) !important;
      background-repeat : no-repeat;
    }
    #available-widgets div[id*=<?php 
            echo $this->id_base;
            ?>
] .widget-title {padding:0}
    #available-widgets div[id*=<?php 
            echo $this->id_base;
            ?>
] .widget-title:before
    {
      content  : '' !important;
      position : absolute !important;
      display  : block;
    }
    #available-widgets div[id*=<?php 
            echo $this->id_base;
            ?>
] .widget-title h4 {padding-left:38px}
    div[id*=<?php 
            echo $this->id_base;
            ?>
] .widget-title h4 span.in-widget-title:before {content:' <?php 
            echo $version;
            ?>
'}
    <?php 
        }
        ?>

  </style>
    <?php 
        echo WPDKHTML::endCSSCompress();
    }
    /**
     * Fires in <head> for a specific admin page based on $hook_suffix.
     *
     * @brief Head
     */
    public function _admin_head()
    {
        if (!$this->is()) {
            return;
        }
        // Display right icon on the title
        if (!empty($this->url_images)) {
            WPDKHTML::startCompress();
            ?>
      <style type="text/css">
      body.wpdk-post-type-<?php 
            echo $this->id;
            ?>
 .wrap > h2
      {
        background-image  : url(<?php 
            echo $this->url_images;
            ?>
logo-64x64.png);
        background-repeat : no-repeat;
        height            : 64px;
        line-height       : 64px;
        padding           : 0 0 0 80px;
      }
    </style>
      <?php 
            echo WPDKHTML::endCSSCompress();
        }
        /**
         * Fires in <head> for all admin pages for this custom post type.
         *
         * @see "admin_head"
         */
        do_action('admin_head-' . $this->id);
    }