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 get_custom_field('_crm_proposal_first_name');?> |
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 get_user_id_by_display_name($display_name) { | |
global $wpdb; | |
if ( ! $user = $wpdb->get_row( $wpdb->prepare( | |
"SELECT `ID` FROM $wpdb->users WHERE `display_name` = %s", $display_name | |
) ) ) | |
return false; | |
return $user->ID; | |
} |
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 hide_publishing_actions(){ | |
$my_post_type = 'post'; | |
global $post; | |
if($post->post_type == $my_post_type){ | |
echo ' | |
<style type="text/css"> | |
.misc-pub-section.misc-pub-post-status, | |
.misc-pub-section.misc-pub-visibility, | |
#minor-publishing-actions, | |
#delete-action{ |
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 show_most_recent_comment($post_id) { | |
$args = array( | |
'number' => '1', | |
'post_id' => $post_id, | |
); | |
$comments = get_comments($args); | |
foreach($comments as $comment) : | |
echo($comment->comment_author . '<br>' . $comment->comment_content. '<br>' .$comment->comment_date); | |
endforeach; | |
} |
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 populate_custom_fields_in_post_list_view ($column_name, $id ) { | |
global $post; | |
$email = get_post_meta( $post->ID, 'automaton_client_email', true); | |
switch ($column_name) { | |
case 'notes': | |
echo show_most_recent_comment($post->ID); | |
break; | |
default: | |
break; |
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
'edit_columns' => array( | |
'title' => __('Client Name') | |
,'author' => __('Assigned to') | |
,'notes' => __('Notes') |
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 | |
add_filter('piklist_post_types', 'piklist_demo_post_types'); | |
function piklist_demo_post_types($post_types) | |
{ | |
$post_types['piklist_demo'] = array( | |
'labels' => piklist('post_type_labels', 'Piklist Demo') | |
,'title' => __('Enter Custom Title') | |
,'public' => true | |
,'rewrite' => array( | |
'slug' => 'piklist-demo' |
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 | |
/* | |
Single Client Template: Branding | |
Description: This is a printable sheet with brand assets for the client | |
*/ | |
//* Remove Before Header widget area | |
remove_action( 'genesis_before_header', 'automaton_before_header' ); |
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 | |
/* | |
Single Post Template: All Data Export | |
Description: This exports all client data | |
*/ | |
?> | |
<table id="data-export"> | |
<tr> | |
<th>Project Name</th> |