function tct_locale_stylesheet() { $stylesheet = get_locale_stylesheet_uri(); if (empty($stylesheet)) { return; } echo ' <link rel="stylesheet" href="' . $stylesheet . '" type="text/css" media="screen">' . "\n"; }
/** * Callback function for adding editor styles. Use along with the add_editor_style() function. * * @since 1.0.0 * @access public * @return array */ function saga_get_editor_styles() { /* Set up an array for the styles. */ $editor_styles = array(); /* Add the theme's editor styles. */ $editor_styles[] = trailingslashit(get_template_directory_uri()) . 'css/editor-style.css'; /* If a child theme, add its editor styles. Note: WP checks whether the file exists before using it. */ if (is_child_theme() && file_exists(trailingslashit(get_stylesheet_directory()) . 'css/editor-style.css')) { $editor_styles[] = trailingslashit(get_stylesheet_directory_uri()) . 'css/editor-style.css'; } /* Add the locale stylesheet. */ $editor_styles[] = get_locale_stylesheet_uri(); /* Uses Ajax to display custom theme styles added via the Theme Mods API. */ $editor_styles[] = add_query_arg('action', 'saga_editor_styles', admin_url('admin-ajax.php')); /* Return the styles. */ return $editor_styles; }
/** * Callback function for adding editor styles. Use along with the add_editor_style() function. * * @author Justin Tadlock, justintadlock.com * @link http://themehybrid.com/themes/stargazer * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * @since 1.0.0 * @return array */ function toivo_lite_get_editor_styles() { /* Set up an array for the styles. */ $editor_styles = array(); /* Add the theme's editor styles. This also checks child theme's css/editor-style.css file. */ $editor_styles[] = 'css/editor-style.css'; /* Add genericons styles. */ $editor_styles[] = trailingslashit(get_template_directory_uri()) . 'fonts/genericons/genericons/genericons.css'; /* Add theme fonts. */ $editor_styles[] = toivo_lite_fonts_url(); /* Add the locale stylesheet. */ $editor_styles[] = get_locale_stylesheet_uri(); /* Return the styles. */ return $editor_styles; }
jQuery('#example_showhidden').click(function() { jQuery('#section-example_text_hidden').fadeToggle(400); }); if (jQuery('#example_showhidden:checked').val() !== undefined) { jQuery('#section-example_text_hidden').show(); } }); </script> <?php } // editor style add_editor_style(get_locale_stylesheet_uri() . '/css/editor-style.css'); // 后台Ctrl+Enter提交评论回复 add_action('admin_footer', '_admin_comment_ctrlenter'); function _admin_comment_ctrlenter() { echo '<script type="text/javascript"> jQuery(document).ready(function($){ $("textarea").keypress(function(e){ if(e.ctrlKey&&e.which==13||e.which==10){ $("#replybtn").click(); } }); }); </script>'; } function _add_editor_buttons($buttons)
function locale_stylesheet() { $stylesheet = get_locale_stylesheet_uri(); if ( empty($stylesheet) ) return; echo '<link rel="stylesheet" href="' . $stylesheet . '" type="text/css" media="screen" />'; }
/** * Callback function for adding editor styles. Use along with the add_editor_style() function. * * @since 1.0.0 * @access public * @return array */ function ravel_get_editor_styles() { /* Set up an array for the styles. */ $editor_styles = array(); /* Add the theme's editor styles. */ $editor_styles[] = trailingslashit(get_template_directory_uri()) . 'css/editor-style.css'; /* If a child theme, add its editor styles. Note: WP checks whether the file exists before using it. */ if (is_child_theme() && file_exists(trailingslashit(get_stylesheet_directory()) . 'css/editor-style.css')) { $editor_styles[] = trailingslashit(get_stylesheet_directory_uri()) . 'css/editor-style.css'; } /* Add the locale stylesheet. */ $editor_styles[] = get_locale_stylesheet_uri(); /* Return the styles. */ return $editor_styles; }
/** * Callback function for adding editor styles. Use along with the add_editor_style() function. * * @since 1.0.0 * @access public * @return array */ function stargazer_get_editor_styles() { // Set up an array for the styles. $editor_styles = array(); // Add the theme's editor styles. $editor_styles[] = stargazer_get_parent_editor_stylesheet_uri(); // If a child theme, add its editor styles. if (is_child_theme() && ($style = stargazer_get_editor_stylesheet_uri())) { $editor_styles[] = stargazer_get_editor_stylesheet_uri(); } // Add the locale stylesheet. $editor_styles[] = get_locale_stylesheet_uri(); // Uses Ajax to display custom theme styles added via the Theme Mods API. $editor_styles[] = add_query_arg('action', 'stargazer_editor_styles', admin_url('admin-ajax.php')); // Return the styles. return $editor_styles; }
/** * Get the localized stylesheet URI. * * @return string * @since 1.1 */ function momtaz_get_locale_stylesheet_uri() { $stylesheet_uri = get_locale_stylesheet_uri(); if (momtaz_is_style_debug()) { $stylesheet_uri = momtaz_get_dev_stylesheet_uri($stylesheet_uri); } $stylesheet_uri = apply_filters('momtaz_get_locale_stylesheet_uri', $stylesheet_uri); return $stylesheet_uri; }