m string $url The url used to subscribe to a calendar in Outlook. * @param string $base_url The base url used to subscribe in Outlook. * @param array $params An array of parameters added to the base url. * @param Outlook_Methods $this An instance of the link abstract. */ $url = apply_filters( 'tec_events_ical_outlook_single_event_import_url', $url, $base_url, $params, $this ); return $url; } /** * Generate the subscribe URL. * * @since 5.16.0 * * @return string The subscribe url. */ public function generate_outlook_subscribe_url( View $view = null ) { $base_url = 'https://outlook.' . static::$calendar_slug . '.com/owa?path=/calendar/action/compose'; if ( null !== $view ) { $feed_url = $this->get_canonical_ics_feed_url( $view ); } // Remove ical query and add back after urlencoding the rest of the url. $feed_url = remove_query_arg( 'ical', $feed_url ); $feed_url = str_replace( [ 'http://', 'https://' ], 'webcal://', $feed_url ); $feed_url = urlencode( $feed_url ); $feed_url = $feed_url . '&ical=1'; $params = [ 'rru' => 'addsubscription', 'url' => urlencode( $feed_url ), 'name' => urlencode( get_bloginfo( 'name' ) . ' ' . $view->get_title() ), ]; $url = add_query_arg( $params, $base_url ); /** * Filter the Outlook subscribe url. * * @since 5.16.0 * * @param string $url The url used to subscribe to a calendar in Outlook. * @param string $base_url The base url used to subscribe in Outlook. * @param string $feed_url The subscribe url used on the site. * @param array $params An array of parameters added to the base url. * @param Outlook_Abstract_Export $this An instance of the link abstract. */ $url = apply_filters( 'tec_events_ical_outlook_subscribe_url', $url, $base_url, $feed_url, $params, $this ); return $url; } /** * Changing spaces to %20 and encoding. * urlencode() changes the spaces to +. That is also how Outlook will show it. * So we're replacing it temporarily and then changing them to %20 which will work. * * @since 5.16.0 * * @param string $string The URL string. * * @return string The encoded URL string. */ public function space_replace_and_encode( $string ) { $string = str_replace( ' ', static::$outlook_temp_space, $string ); $string = urlencode( $string ); $string = str_replace( static::$outlook_temp_space, static::$outlook_space, $string ); return $string; } /** * {@inheritDoc} */ public function get_uri( View $view = null ) { if ( is_single() ) { return $this->generate_outlook_full_url(); } if ( null === $view ) { return ''; } return $this->generate_outlook_subscribe_url( $view ); } } WordPress » Erreur

Il y a eu une erreur critique sur ce site.

En apprendre plus sur le débogage de WordPress.