This file contains hidden or 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
| function prefix_conditional_body_class($classes) { | |
| if ( get_page_template_slug(get_the_ID()) === 'mytemplate.php' ) { | |
| $classes[] = 'bg-dark'; | |
| } | |
| return $classes; | |
| } | |
| add_filter( 'body_class', 'prefix_conditional_body_class' ); |
This file contains hidden or 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
| add_filter( 'body_class', 'yourtheme_preview_color' ); | |
| function yourtheme_preview_color($classes) { | |
| if ( isset($_GET['color']) && !empty($_GET['color']) ) { | |
| $current_theme = wp_get_theme(); | |
| $queried_theme = $current_theme->stylesheet; | |
| array_push( $classes, $queried_theme . '-' . $_GET['color'] ); |
This file contains hidden or 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 | |
| /** | |
| * Your Name Global Plugin | |
| * | |
| * Core settings for Your Name sites. | |
| * | |
| * @package core_yourplugin | |
| * @author Your Name <[email protected]> | |
| * @link http://example.com | |
| * @copyright 2014 Your Name |
This file contains hidden or 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: Infographic Embedder | |
| Plugin URI: http://pardot.com | |
| Description: Takes the infographic URL and adds content to the end of posts. | |
| Version: 1.0 | |
| Author: Cliff Seal (Pardot) | |
| Author URI: http://pardot.com | |
| Author Email: [email protected] | |
| License: |
This file contains hidden or 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
| function infographic_embedder_add_post_meta_boxes() { | |
| add_meta_box( | |
| 'infographic_embedder-post-class', | |
| __( 'Infographic Embed', 'example' ), | |
| 'infographic_embedder_post_class_meta_box', | |
| 'post', | |
| 'side', | |
| 'default' | |
| ); | |
| add_meta_box( |
This file contains hidden or 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
| /* Add TypeKit Fonts */ | |
| function logos_add_typekit() { | |
| echo '<script type="text/javascript" src="//use.typekit.net/yourtypekitcode.js"></script> | |
| <script type="text/javascript">try{Typekit.load();}catch(e){}</script>'; | |
| } | |
| add_filter( 'wp_head', 'logos_add_typekit' ); |
This file contains hidden or 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
| javascript:elms=document.getElementsByName("checkableitems[]");for (i=0;i<elms.length;i++){if (elms[i].type="checkbox" )elms[i].click()}; |
NewerOlder