private function _getStyleTag($oCaller, $sIDPrefix) { $_sStyle = $this->oUtil->addAndApplyFilters($oCaller, array("style_common_admin_page_framework", "style_common_{$this->oProp->sClassName}"), AdminPageFramework_CSS::getDefaultCSS()); $_sStyle = $this->oUtil->isDebugMode() ? trim($_sStyle) : $this->oUtil->minifyCSS($_sStyle); if ($_sStyle) { echo "<style type='text/css' id='" . esc_attr($sIDPrefix) . "'>" . $_sStyle . "</style>"; } }
/** * Prints the inline stylesheet of the meta-box common CSS rules with the style tag. * * @internal * @since 3.0.0 * @since 3.2.0 Moved to the base class from the meta box class. * @remark The meta box class may be instantiated multiple times so prevent echoing the same styles multiple times. * @parameter string $sIDPrefix The id selector embedded in the script tag. * @parameter string $sClassName The class name that identify the call group. This is important for the meta-box class because it can be instantiated multiple times in one particular page. */ protected function _printCommonStyles($sIDPrefix, $sClassName) { if (self::$_bCommonStyleLoaded) { return; } self::$_bCommonStyleLoaded = true; $_oCaller = $this->oProp->_getCallerObject(); $_sStyle = $this->oUtil->addAndApplyFilters($_oCaller, array("style_common_admin_page_framework", "style_common_{$this->oProp->sClassName}"), AdminPageFramework_CSS::getDefaultCSS()); $_sStyle = $this->oUtil->minifyCSS($_sStyle); if ($_sStyle) { echo "<style type='text/css' id='" . esc_attr($sIDPrefix) . "'>" . $_sStyle . "</style>"; } $_sStyleIE = $this->oUtil->addAndApplyFilters($_oCaller, array("style_ie_common_admin_page_framework", "style_ie_common_{$this->oProp->sClassName}"), AdminPageFramework_CSS::getDefaultCSSIE()); $_sStyleIE = $this->oUtil->minifyCSS($_sStyleIE); if ($_sStyleIE) { echo "<!--[if IE]><style type='text/css' id='" . esc_attr($sIDPrefix . "-ie") . "'>" . $_sStyleIE . "</style><![endif]-->"; } }