Example #1
0
function pdf24Plugin_head()
{
    global $pdf24Plugin;
    $isPage = is_page();
    $stylesArr = array();
    if (pdf24Plugin_isCpInUse()) {
        if (!($isPage && pdf24Plugin_isCpDisabledOnPages())) {
            pdf24Plugin_appendStyle('pdf24Plugin_cpStyle', 'styles/cp', $stylesArr);
        }
    }
    if (pdf24Plugin_isTbpInUse()) {
        if (!($isPage && pdf24Plugin_isTbpDisabledOnPages())) {
            pdf24Plugin_appendStyle('pdf24Plugin_tbpStyle', 'styles/tbp', $stylesArr);
        }
    }
    if (pdf24Plugin_isSbpInUse() && is_active_widget('pdf24Plugin_widget')) {
        if (!($isPage && pdf24Plugin_isSbpDisabledOnPages())) {
            pdf24Plugin_appendStyle('pdf24Plugin_sbpStyle', 'styles/sbp', $stylesArr);
        }
    }
    if (pdf24Plugin_isLpInUse()) {
        if (!($isPage && pdf24Plugin_isLpDisabledOnPages())) {
            pdf24Plugin_appendStyle('pdf24Plugin_lpStyle', 'styles/lp', $stylesArr);
        }
    }
    if (count($stylesArr) > 0) {
        $outText = '';
        $outFiles = '';
        foreach ($stylesArr as $val) {
            if ($val[0] == 'text') {
                $outText .= $val[1];
            } else {
                $outFiles .= '<link rel="stylesheet" type="text/css" href="' . ($pdf24Plugin['url'] . '/' . $val[1]) . '" />' . "\n";
            }
        }
        echo $outFiles;
        if ($outText != '') {
            echo "<style type=\"text/css\">\n" . $outText . "\n</style>\n";
        }
    }
}
Example #2
0
?>
</script>
		<h3>Sidebar Widget Plugin</h3>	
		<div class="descr">This plugin adds a widget to your Wordpress blog. Look at the widget section in your wordpress admin area to put the widget into the sidebar.</div>			
		<table>
		<tr>
			<td class="tr1">Use this plugin</td>
			<td><input type="checkbox" name="sbpInUse" <?php 
echo pdf24Plugin_isSbpInUse() ? 'checked' : '';
?>
 /></td>
		</tr>
		<tr>
			<td class="tr1">Disable on pages</td>
			<td><input type="checkbox" name="sbpDisableOnPages" <?php 
echo pdf24Plugin_isSbpDisabledOnPages() ? 'checked' : '';
?>
 /></td>
		</tr>
		<tr>
			<td class="tr1">Style</td>
			<td><select name="sbpStyle" onchange="document.forms.pdf24Form.sbpCustomStyle.value = pdf24Plugin_sbpStyle_custom[this.selectedIndex];">
					<?php 
echo $styleParms['options'];
?>
				</select>
				&nbsp;&nbsp; <input type="checkbox" name="sbpCustomize" onclick="pdf24_showHideCheck('sbpCustomStyle', this);" <?php 
echo $styleParms['customized'] ? 'checked' : '';
?>
 />
				Customize this style
Example #3
0
function pdf24Plugin_widget($args)
{
    if (pdf24Plugin_isSbpInUse() && pdf24Plugin_isAvailable()) {
        if (!(is_page() && pdf24Plugin_isSbpDisabledOnPages())) {
            extract($args);
            echo $before_widget . $before_title . pdf24Plugin_getWidgetTitle() . $after_title;
            echo pdf24Plugin_getSidebarForm(pdf24Plugin_getAllPosts());
        }
    }
}