コード例 #1
0
ファイル: plugin.php プロジェクト: elizabethcb/Daily-Globe
function newsletter_get_theme_html($theme)
{
    if ($theme == 'blank') {
        return '';
    }
    $file = newsletter_get_theme_dir($theme) . '/theme.php';
    // Execute the theme file and get the content generated
    ob_start();
    @(include $file);
    $html = ob_get_contents();
    ob_end_clean();
    return $html;
}
コード例 #2
0
    update_option('newsletter_email', $options);
    newsletter_send_scheduled(0, true);
}
if (isset($_POST['scheduled_send']) && check_admin_referer()) {
    $options = stripslashes_deep($_POST['options']);
    update_option('newsletter_email', $options);
    newsletter_send_scheduled(0, false);
}
if (isset($_POST['restore']) && check_admin_referer()) {
    $batch = newsletter_load_batch_file();
    update_option('newsletter_batch', $batch);
    newsletter_delete_batch_file();
}
// Theme style
$css_url = null;
$theme_dir = newsletter_get_theme_dir($options['theme']);
if (file_exists($theme_dir . '/style.css')) {
    $css_url = newsletter_get_theme_url($options['theme']) . '/style.css';
}
$nc = new NewsletterControls($options, 'composer');
if (!isset($options['novisual'])) {
    ?>
<script type="text/javascript" src="<?php 
    echo get_option('siteurl');
    ?>
/wp-content/plugins/newsletter/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
    tinyMCE.init({
        mode : "textareas",
        theme : "advanced",
        plugins: "table,fullscreen",