public function show_admin_sharing($post) { require_once NGFB_PLUGINDIR . 'lib/ext/compressor.php'; $css_data = SuextMinifyCssCompressor::process($this->p->options['buttons_css_admin_edit']); $post_type = get_post_type_object($post->post_type); // since 3.0 $post_type_name = ucfirst($post_type->name); echo '<style type="text/css">' . $css_data . '</style>', "\n"; echo '<table class="sucom-setting side"><tr><td>'; if (get_post_status($post->ID) == 'publish') { $content = ''; echo $this->get_js_loader(); echo $this->get_js('header'); echo $this->get_buttons($content, 'admin_edit'); echo $this->get_js('footer'); $this->p->debug->show_html(null, 'Debug Log'); } else { echo '<p class="centered">The ' . $post_type_name . ' must be published<br/>before it can be shared.</p>'; } echo '</td></tr></table>'; }
/** * Minify a CSS string * * @param string $css * * @param array $options (currently ignored) * * @return string */ public static function process($css, $options = array()) { $obj = new SuextMinifyCssCompressor($options); return $obj->_process($css); }