public function hookPublicHead($args) { $css = get_option('css_editor_css'); if ($css) { queue_css_string($css); } }
public function testQueueCssString() { $style = 'Inline stylesheet.'; queue_css_string($style, 'screen'); $matcher = array('tag' => 'style', 'attributes' => array('type' => 'text/css', 'media' => 'screen')); $output = $this->_getCssOutput(); $dom = new Zend_Dom_Query('<fake>' . $output . '</fake>'); $result = $dom->queryXpath("//style[@type='text/css' and @media='screen']"); $this->assertCount(1, $result, "Style tag for inline stylesheet not found."); $this->assertContains($style, $output); }
<!DOCTYPE html> <html> <head> <?php queue_css_file('style'); $css = "\ndiv.content {margin-right: 10px; max-width:310px;}\ndiv.thumbnail {float:right;}\nh1 {margin: 0;}\n\n\n"; queue_css_string($css); echo head_css(); ?> </head> <body> <div class="thumbnail"><?php echo file_image('thumbnail', array(), $files[0]); ?> </div> </body> </html>
* @license http://www.gnu.org/licenses/gpl-3.0.txt * @copyright Center for History and New Media, 2010 * @package Contribution */ queue_js_file('contribution-public-form'); $contributionPath = get_option('contribution_page_path'); if (!$contributionPath) { $contributionPath = 'contribution'; } queue_css_file('form'); //load user profiles js and css if needed if (get_option('contribution_user_profile_type') && plugin_is_active('UserProfiles')) { queue_js_file('admin-globals'); queue_js_file('tiny_mce', 'javascripts/vendor/tiny_mce'); queue_js_file('elements'); queue_css_string("input.add-element {display: block}"); } $head = array('title' => 'Contribute', 'bodyclass' => 'contribution'); echo head($head); ?> <script type="text/javascript"> // <![CDATA[ enableContributionAjaxForm(<?php echo js_escape(url($contributionPath . '/type-form')); ?> ); // ]]> </script> <div id="content"><!--EB: add HTML--> <article class="page show"><!--EB: add HTML-->
public function hookPublicHead($args) { $this->_head(); if (!get_option('openseadragon_css_override_public')) { queue_css_string($this->_osd_css(get_option('openseadragon_width_public'), get_option('openseadragon_height_public'))); } }
public function hookPublicHead($args) { queue_js_file('bigscreen.min', 'openseadragon'); if (!get_option('openseadragon2_css_override_public')) { queue_css_string($this->_osd_css(get_option('openseadragon2_width_public'), get_option('openseadragon2_height_public'))); } }
/** * Queue the javascript and css files to help the form work. * * This function runs before the admin section of the sit loads. * It queues the javascript and css files which help the form work, * so that they are loaded before any html output. * * @return void */ public function hookAdminHead() { queue_js_file('SimpleVocabPlus'); queue_css_string('.ui-tabs-active.ui-state-active {background: none repeat scroll 0 0 #f9f9f9;}'); }