Beispiel #1
0
function cwp_switch_theme()
{
    //update_option('cwp_last_theme', "theme switched reactivated");
    if (!cwp::theme_options('saveoptions') and cwp::theme_options('saveoptions') == 0) {
        delete_option('cwp_theme_options');
    }
}
Beispiel #2
0
    /**
     * FB html5 share
     * Include the JavaScript SDK on your page once, ideally right after the opening <body> tag.
     * @param type $app_id
     * @return html/js
     */
    public function fb_script()
    {
        $app_id = cwp::theme_options('fbappid');
        if ($app_id and !empty($app_id)) {
            ?>
                    <div id="fb-root"></div>
                    <script>(function(d, s, id) {
                        var js, fjs = d.getElementsByTagName(s)[0];
                        if (d.getElementById(id)) return;
                        js = d.createElement(s); js.id = id;
                        js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=<?php 
            echo $app_id;
            ?>
";
                        fjs.parentNode.insertBefore(js, fjs);
                    }(document, 'script', 'facebook-jssdk'));
                    </script>
            <?php 
        }
    }
Beispiel #3
0

    <?php 
/**
 * Twitter
 *
 */
?>
                <tr valign="top"><th scope="row"><?php 
_e('Twitter Profile Widget', 'corewp');
?>
</th>
                    <td>
                        <p>
                            <textarea id="cwp_theme_options[twitterwidget]" cols="100" rows="10" name="cwp_theme_options[twitterwidget]"> <?php 
echo esc_textarea(cwp::theme_options('twitterwidget'));
?>
</textarea>
                        </p>

                        <label class="description" for="cwp_theme_options[twitterwidget]"><?php 
_e('Paste your Twitter Profile Widget page code
                            <a href="https://twitter.com/about/resources/widgets/widget_profile" target="_blank">
                            https://twitter.com/about/resources/widgets/widget_profile</a>', 'corewp');
?>
</label>
                    </td>
                </tr>