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
// Adds Site Title to Display with Logo in Branding Section ------- // | |
add_action('pagelines_before_branding_icons', 'branding_site_title'); | |
function branding_site_title(){ | |
?> | |
<div class="title-container"> | |
<a class="home site-title" href="<?php echo get_option(‘home’); ?>/"> | |
<?php bloginfo(‘name’); ?></a></div> |
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
/** | |
* List child pages in content area | |
*/ | |
function base_list_children() { | |
global $post; | |
$page_ID = $post->ID; | |
$ancestors = get_post_ancestors($page_ID); | |
$children = wp_list_pages("child_of=$page_ID&echo=0"); | |
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
function __construct() { | |
add_action( 'admin_enqueue_scripts', array(&$this,'em_enqueue_color_picker' )); | |
add_action('admin_head', array(&$this,'add_colorpicker_script')); | |
} | |
function em_enqueue_color_picker( $hook_suffix ) { | |
// first check that $hook_suffix is appropriate for your admin page | |
wp_enqueue_style( 'wp-color-picker' ); | |
wp_enqueue_script( 'wp-color-picker' , false, true ); | |
} |
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
function adjustBrightness($hex, $steps) { | |
// Steps should be between -255 and 255. Negative = darker, positive = lighter | |
$steps = max(-255, min(255, $steps)); | |
// Format the hex color string | |
$hex = str_replace('#', '', $hex); | |
if (strlen($hex) == 3) { | |
$hex = str_repeat(substr($hex,0,1), 2).str_repeat(substr($hex,1,1), 2).str_repeat(substr($hex,2,1), 2); | |
} |
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
.hentry ul, .hentry ol { | |
font-size: @plFontSize; | |
line-height: @plFontSize * 1.55; | |
} |
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
#page .section-business-branding .bb-site-title { | |
font-family: @plHeaderFont; | |
} |
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
function acf_translate_fields( $field ){ | |
$field['label' ] = __( $field['label' ], 'plugin-slug' ); | |
$field['instructions' ] = __( $field['instructions' ], 'plugin-slug' ); | |
return $field; | |
} | |
add_filter('acf/load_field', array($this,'acf_translate_fields')); |
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
add_filter( 'template_include', array($this,'template_chooser')); | |
function template_chooser( $template ) { | |
// Post ID | |
$post_id = get_the_ID(); | |
// For all other CPT | |
if ( get_post_type( $post_id ) != 'projects' ) { | |
return $template; | |
} |
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 echo apply_filters('the_content', get_post_meta($post->ID, 'your_custom_field_here', true)); ?> |
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
global $acf; | |
if( !$acf ) | |
{ | |
define( 'ACF_LITE' , true ); | |
include_once('advanced-custom-fields/acf.php' ); | |
} |
OlderNewer