Пример #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";
        }
    }
}
Пример #2
0
	</div>
	<div>
		<?php 
$styleParms = pdf24Plugin_getStyleParams('pdf24Plugin_cpStyle', 'styles/cp');
?>
		<script language="javascript"><?php 
echo $styleParms['js'];
?>
</script>
		<h3>Article Plugin</h3>
		<div class="descr">This plugin displays a small box underneath each article to convert the above article to pdf.</div>
		<table>
		<tr>
			<td class="tr1">Use this plugin</td>
			<td><input type="checkbox" name="cpInUse" <?php 
echo pdf24Plugin_isCpInUse() ? 'checked' : '';
?>
 /></td>
		</tr>
		<tr>
			<td class="tr1">Disable on pages</td>
			<td><input type="checkbox" name="cpDisableOnPages" <?php 
echo pdf24Plugin_isCpDisabledOnPages() ? 'checked' : '';
?>
 /></td>
		</tr>
		<tr>
			<td class="tr1">Display mode</td>
			<td><select name="cpDisplayMode">
				<option value="bottom" <?php 
echo get_option('pdf24Plugin_cpDisplayMode') == 'bottom' ? 'selected' : '';
Пример #3
0
function pdf24Plugin_getThePost()
{
    global $pdf24Plugin;
    //pdf24 filter deaktivieren
    remove_filter("the_content", "pdf24Plugin_content", $pdf24Plugin['contentFilterPriority']);
    $params = array("postTitle" => get_the_title(), "postLink" => get_permalink(), "postAuthor" => get_the_author(), "postDateTime" => get_the_time("Y-m-d H:m:s"), "postContent" => get_the_content());
    if (pdf24Plugin_isCpInUse()) {
        add_filter('the_content', 'pdf24Plugin_content', $pdf24Plugin['contentFilterPriority']);
    }
    return $params;
}