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('login_redirect', function($r, $rq, $u) { | |
| if (in_array('editor', $u->roles)) { | |
| return admin_url('index.php?page=client-dashboard'); | |
| } | |
| return $r; | |
| }, 10, 3); |
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
| define('DISALLOW_FILE_EDIT', true); |
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 remove_default_dashboard_widgets() { | |
| remove_meta_box('dashboard_primary', 'dashboard', 'side'); | |
| remove_meta_box('dashboard_quick_press', 'dashboard', 'side'); | |
| remove_meta_box('dashboard_activity', 'dashboard', 'normal'); | |
| } | |
| add_action('wp_dashboard_setup', 'remove_default_dashboard_widgets'); |
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 my_login_logo() { | |
| echo '<style>.login h1 a { | |
| background-image: url(/path/to/logo.png); | |
| background-size: contain; | |
| width: 100%; | |
| }</style>'; | |
| } | |
| add_action('login_enqueue_scripts', 'my_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
| /** | |
| * Provides specific formatting for Australian phone landlines and mobile numbers | |
| * | |
| * AU Mobile Format: XXXX XXX XXX | |
| * Landline Mobile Format: XX XXXX XXXX | |
| * | |
| * @param $phone_formats | |
| * @return mixed | |
| */ | |
| function zpd_gf_phone_formats_au( $phone_formats ){ |
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 wb_login_head(){ | |
| ?> | |
| <style> | |
| #login{ | |
| width:50%; | |
| float:left; | |
| } | |
| #wbd-login-left{ | |
| width:50%; | |
| float: right; |
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
| /** | |
| * Send shipping or billing details to Stripe (required by some 3DSecure transactions/currencies) | |
| * | |
| * @param $post_data | |
| * @param $order | |
| * | |
| * @return mixed | |
| */ | |
| function zpd_add_shipping_to_stripe( $post_data, $order ) { |
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 gf_alexa_notification( $entry, $form ){ | |
| $notifyme_api_url = 'https://api.notifymyecho.com/v1/NotifyMe'; | |
| $notifyme_api_secret = '1234567890'; | |
| if( $form->ID === 12 ){ | |
| // Only for form ID=12 | |
| $firstname = rgar( $entry, '1.3' ); | |
| $lastname = rgar( $entry, '1.3' ); | |
| $phone = rgar( $entry, '2' ); | |
| $notification = $firstname . ' ' . $lastname . ' requested a callback on "' . $phone .'"'; |
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 zpd_wc_order_to_alexa( $payload, $resource, $resource_id, $id){ | |
| if( $id == 1) { // webhook ID is 1 | |
| // Get an instance of the WC_Order object (same as before) | |
| $order = wc_get_order( $resource_id ); | |
| $payload[ 'accessCode' ] = ZPD_NOTIFYME_SECRET_API_KEY; | |
| $payload[ 'notification'] = 'There is a new ' . $order->get_status() . ' order'; | |
| $payload[ 'notification'] .= ' on the ' . get_bloginfo( 'name' ) . ' website'; | |
| $payload[ 'notification'] .= ' from ' . $order->get_billing_first_name() . ' ' . $order->get_billing_last_name() . '.'; | |
| } |
NewerOlder