コード例 #1
0
ファイル: shortcodes.php プロジェクト: welearncodes/traktern
function et_shortcodes_css_and_js()
{
    $options = et_shortcodes_get_plugin_options();
    $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '.dev' : '';
    wp_enqueue_style('et-shortcodes-css', ET_SHORTCODES_PLUGIN_URI . '/css/shortcodes.css', false, ET_SHORTCODES_VERSION, 'all');
    if ('on' == $options['responsive_layout']) {
        wp_enqueue_style('et-shortcodes-responsive-css', ET_SHORTCODES_PLUGIN_URI . '/css/shortcodes_responsive.css', false, ET_SHORTCODES_VERSION, 'all');
    }
    wp_register_script('et-shortcodes-js', ET_SHORTCODES_PLUGIN_URI . "/js/et_shortcodes_frontend{$suffix}.js", array('jquery'), ET_SHORTCODES_VERSION, true);
    wp_localize_script('et-shortcodes-js', 'et_shortcodes_strings', array('previous' => __('Previous'), 'next' => __('Next')));
}
コード例 #2
0
function et_shortcodes_field_responsive_layout_html()
{
    $options = et_shortcodes_get_plugin_options();
    ?>
	<label for="responsive-layout">
		<input type="checkbox" name="et_shortcodes_plugin_settings[responsive_layout]" id="responsive-layout" <?php 
    checked('on', $options['responsive_layout']);
    ?>
 />
		<?php 
    _e('Allow shortcodes to adapt to various screen sizes');
    ?>
	</label>
	<?php 
}