plugin = $plugin; $this->hooks(); } /** * Initiate our hooks. * * @since 0.0.3 */ public function hooks() { } public function sanitize_string( $string ) { $string = wp_strip_all_tags($string); $string = str_replace("\n\n\n", "\n\n",$string); return $string; } public function get_add_link_from_appointment( $appointment, $template = 'customer' ) { $link = 'https://www.google.com/calendar/event'; $link = add_query_arg( array( 'action' => 'TEMPLATE', 'text' => urlencode( $appointment->get_title( 'customer' ) ), 'dates' => date( 'Ymd', $appointment->start_date_timestamp ) . 'T' . date( 'His', $appointment->start_date_timestamp ) . 'Z' . '/' . date( 'Ymd', $appointment->end_date_timestamp ) . 'T' . date( 'His', $appointment->end_date_timestamp ) . 'Z', 'details' => urlencode( $appointment->get_description( 'customer' ) ), 'location' => urlencode( $appointment->get_location( 'customer' ) ), 'trp' => false, 'sprop' => 'name:', ), $link ); return $link; } }