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 | |
$comment_user = get_user_by( 'email', get_comment_author_email() ); | |
if ( user_can( $comment_user->ID, 'staff' ) ) { | |
if ( get_the_author_meta( 'staff') ) { | |
$x = ( the_author_meta( 'staff', $comment_user->ID ) == '' ) ? "Staff" : the_author_meta( 'staff', $comment_user->ID ) ; | |
echo '<div class="staff-label">'; |
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
if ( ! function_exists('customer') ) { | |
// Register Custom Post Type | |
function customer() { | |
$labels = array( | |
'name' => 'Customers', | |
'singular_name' => 'Customers', | |
'menu_name' => 'Customers', | |
'name_admin_bar' => 'Customers', |
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( 'get_search_form', 'i21321_search_text_replacer', 999, 1 ) ; | |
function i21321_search_text_replacer ($form) { | |
return str_replace('Type & Hit Enter to Search', 'Search in the website', $form ) ; | |
} |
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 | |
if ( ! class_exists( 'WP_List_Table' ) ) { | |
require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' ); | |
} | |
if ( ! class_exists( 'Snapshot_View_Table_Archives' ) ) { | |
class Snapshot_View_Table_Archives extends WP_List_Table { | |
var $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
add_action( 'dp_duplicate_post', 'delete_sbe_meta_on_duplicate_post'); | |
function delete_sbe_meta_on_duplicate_post( $new_post_id ) { | |
delete_post_meta( $new_post_id, 'sbe_sent' ); | |
} |
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_action( 'wp_footer', function(){ | |
if( isset( $_COOKIE['affiliate_' . COOKIEHASH] ) ) { | |
$reference = isset($_GET['ref'])?$_GET['ref']:false; | |
@setcookie('affiliate_' . COOKIEHASH, 'aff' . md5(AUTH_SALT . $reference), | |
(time() + (60 * 60 * 24 * ((int) AFFILIATE_COOKIE_DAYS ))), | |
COOKIEPATH, | |
COOKIE_DOMAIN | |
); |
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('bp_member_avatar', 'bp_role_in_class'); | |
function bp_role_in_class( $args ) { | |
global $members_template ; | |
$user = new WP_User( $members_template->member->id ); | |
if ( !empty( $user->roles ) && is_array( $user->roles ) ) { | |
foreach ( $user->roles as $role ) | |
$args['class'] .= " " . $role; |
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
<div class="upfront-output-module-group upfront-module-group c10" id="module-group-1463730198987-1054" data-theme-styles="{"default":false,"desktop":false,"tablet":false,"mobile":false}"><div class="upfront-output-wrapper" id="wrapper-1463743376277-1654"><div class="upfront-output-module c10" id="module-1463728411672-1198"><div data-preset_map="{"desktop":"frontpagetekst"}" class="upfront-output-object frontpagetekst upfront-output-plain_text c24 upfront-plain_txt" id="text-object-1463728411672-1093" data-theme-styles="{"default":""}"><div class="plain-text-container"><p><strong data-redactor-tag="strong" data-verified="redactor"><font><font>Are you looking to ... -></font></font></strong></p></div></div></div></div><div class="upfront-output-wrapper" id="wrapper-1463743376286-1068"><div class="upfront-output-module c10" id="module-1463730102664-1667"><div data-preset_map="{"desktop":"frontpagetekst"," |
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 | |
add_action( 'dp_duplicate_post', 'delete_sbe_meta_on_duplicate_post'); | |
function delete_sbe_meta_on_duplicate_post( $new_post_id ) { | |
delete_post_meta( $new_post_id, 'sbe_sent' ); | |
} |
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_action( 'wp_ajax_post_confirmation', 'app_update_status' ); | |
add_action( 'wp_ajax_nopriv_post_confirmation', 'app_update_status' ); | |
add_action( 'wp_ajax_nopriv_app_paypal_ipn', 'app_update_status' , 999 ); | |
function app_update_status() { | |
if( $_POST['payment_status'] == 'Processed' || $_POST['payment_status'] == 'Completed' ) : | |
update_metadata( "app_appointment", $_POST['custom'] , "confirmed" ); | |
endif ; |