Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@grappler
grappler / rtl-tester.php
Created July 11, 2014 12:07
Fix for https://github.com/yoavf/RTL-Tester/issues/2 Added ``` else { $wp_styles->text_direction = $direction; }``` to line 88
<?php
/**
* RTL-Tester plugin.
*
* Adds a button to the admin bar that allow super admins to switch the text direction of the site.
*
* @package RTL_Tester
* @author Automattic
* @author Yoav Farhi
* @version 1.0.4
<?php
/**
* Add minified and RTL Stlysheets with automatic theme version
* Load styles for specific stylesheets
*/
function theme_name_css() {
$template_directory_uri = get_template_directory_uri();
$rtl = ( is_rtl() ) ? '-rtl' : '';
$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
Sub HightlightAkkusativ()
'
' Hightlight Akkusativ
'
'
Dim range As range
Dim i As Long
Dim TargetList
TargetList = Array("Akkusativ", "bis", "durch", "entlang", "für", "gegen", "ohne", "um", "wider", "herum") ' put list of terms to find here
@grappler
grappler / functions.php
Created July 16, 2014 20:34
Disable parent css for Responsive
<?php
function responsive_css() {
wp_dequeue_style( 'responsive-style' );
}
add_action( 'wp_enqueue_scripts', 'responsive_css' );
<?php
/**
* Plugin Name.
*
* @package Plugin_Name
* @author Your Name <email@example.com>
* @license GPL-2.0+
* @link http://example.com
* @copyright 2014 Your Name or Company Name
*/
@grappler
grappler / functions.php
Created August 9, 2014 20:03
Change the number of widgets when the `fit` class is added to Responsive footer widgets https://github.com/cyberchimps/responsivecore/commit/f924c3a9e90233af55c606d6ca222ff70a680d76
<?php
add_filter('responsive_number_footer_widgets', 'responsive_child_number_footer_widgets');
function responsive_child_number_footer_widgets() {
$divider = '5';
return $divider;
}
<?php
the_content(
sprintf(
__( 'Continue reading%s', 'textdomain' ),
'<span class="screen-reader-text"> ' . get_the_title() . '</span>'
)
);
?>
<nav role="navigation" aria-label="<?php _e( 'Primary Navigation', 'textdomain' ); ?>">
@grappler
grappler / theme-review.text
Last active August 29, 2015 14:06
Theme Review texts
== THEME REVIEW RESULTS ==
== '''Required''' ==
== '''Recommended''' ==
== '''Notes''' ==
== Review Summary ==
== '''Required''' ==
- Remove menu parameter from calls to wp_nav_menu(). Use only the theme_location parameter
- Please escape all settings on output.
- Function calls must be placed inside callbacks and hooked into appropriate actions or filters (such as after_setup_theme for Theme setup functions, or widgets_init for Widgets/dynamic sidebar functions)
<?php
/*
* Load parent theme translations
*/
add_action( 'after_setup_theme', 'woo_load_textdomain', 10 );
function woo_load_textdomain(){
$locale = get_locale();
$domain = 'woothemes';
<?php
add_action( 'wp_enqueue_scripts', 'grappler_scripts' );
function grappler_scripts() {
wp_enqueue_style( 'grappler-style', get_template_directory_uri() . '/output/style.css' );
if ( is_child_theme() ) {
wp_enqueue_style( 'grappler-child-style', get_stylesheet_uri() );
}