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
name = Custom Beans | |
description = My Custom Beans | |
core = 7.x | |
files[] = "custom_bean.listing.inc" |
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 | |
/** | |
* This snippet adds extra classes to Drupal | |
* menu leafs (li tags) and menu itself (ul tags). | |
*/ | |
/** | |
* Since the standard preprocess function for menu tree, which is | |
* template_preprocess_menu_tree, located in includes/menu.inc, |
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
# Markdown Lists and Headers | |
## Single List Item | |
* ## List Item Header | |
## Two List Items | |
* ## List Item Header | |
* sub-item |
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
jQuery(".component-included.form-checkbox").removeAttr('checked'); |
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
.mymodule { | |
/* base style */ | |
@media (min-width: em(300)) { | |
/* small-screens */ | |
} | |
@media (min-width: em(700)) { | |
/* medium screens */ | |
} | |
@media (min-width: em(1000)) { |
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 THEME_preprocess_menu_link(&$variables) { | |
$element = &$variables['element']; | |
if (!empty($element['#original_link']['options']['attributes']['class'])) { | |
foreach($element['#original_link']['options']['attributes']['class'] as $class) { | |
$element['#attributes']['class'][] = $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
/** | |
* Implement Custom Admin Logo | |
*/ | |
function new_custom_login_logo() { | |
echo '<style type="text/css"> | |
h1 a { background-image:url('.get_template_directory_uri().'/images/THEME-LOGO.png) !important; width:321px !important; height: 243.56px !important; background-size: 321px 243.56px !important; } | |
</style>'; | |
} | |
add_action('login_head', 'new_custom_login_logo'); |
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
/* | |
* This goes in your theme’s functions.php file. | |
* This will remove EVERY option in the basic WYSIWYG bar in WP. Pull items out of the $remove array if you want to keep them. | |
*/ | |
function myplugin_tinymce_buttons($buttons) | |
{ | |
//Remove the format dropdown select and text color selector | |
$remove = array('bold','italic','blockquote','strikethrough','bullist','numlist','hr','alignleft','aligncenter','alignright','link','unlink','wp_more','spellchecker','wp_fullscreen','wp_adv'); | |
return array_diff($buttons,$remove); |
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 | |
/** | |
* @package modularcontent | |
*/ | |
?> | |
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> | |
<div class="entry-content"> | |
<?php | |
// check if the flexible content field has rows of data | |
if( have_rows('flexible_content') ): |
OlderNewer