This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Custom Text Strings for Foo Plugin | |
* Description: Modify default (not translated) language strings of a plugin. Beware: Might result in performance issues when applied to many strings. | |
* Version: 2014.10 | |
* Author: Caspar Hübinger | |
* Author URI: http://glueckpress.com/ | |
* License: GNU General Public License v2 or later | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Separate sticky posts from the main loop into their own query. | |
* | |
* Display a query of sticky posts anywhere in your templates | |
* using a simple echo glckprss_sticky_posts(). | |
* Query template output is stored in a transient for performance win, | |
* updated any time the 'sticky_posts' option get updated. | |
* | |
* Require in theme’s functions.php like: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Real Favicons | |
* Description: Adds favicons, touch icons and tiles for desktop browsers, iOS, Android and Windows. Generate HTML output via <a href="http://realfavicongenerator.net/">realfavicongenerator.net</a>. Store all generated images in sub-directory /img. | |
* Version: 2014.01 | |
* Author: Caspar Hübinger | |
* Author URI: http://glueckpress.com/ | |
* License: GNU General Public License v2 or later | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* child-theme/functions.php | |
* | |
* Loads first, before parent-theme/functions.php. | |
*/ | |
function child_after_setup_theme() { | |
load_child_theme_textdomain( 'child-textdomain', get_stylesheet_directory() . '/languages' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Regular content of content-product.php | |
* ... | |
* ... | |
*/ | |
/** | |
* Display product variation attributes on product category pages. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Conditional tag to check whether current page is wp-login.php or wp-register.php. | |
*/ | |
if( ! function_exists( 'wp_is_login' ) ) { | |
function wp_is_login() { | |
return in_array( $GLOBALS[ 'pagenow' ], array( 'wp-login.php' , 'wp-register.php' ) ); | |
} | |
} |