PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 28.2
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v28.2
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
wordpress-seo / inc / class-wpseo-shortlinker.php

class-wpseo-shortlinker.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 28.2, at inc/class-wpseo-shortlinker.php

55 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * WPSEO plugin file.
4 *
5 * @package WPSEO
6 */
7
8 /**
9 * Helps with creating shortlinks in the plugin.
10 */
11 class WPSEO_Shortlinker {
12
13 /**
14 * Builds a URL to use in the plugin as shortlink.
15 *
16 * @param string $url The URL to build upon.
17 *
18 * @return string The final URL.
19 */
20 public function build_shortlink( $url ) {
21 return YoastSEO()->helpers->short_link->build( $url );
22 }
23
24 /**
25 * Returns a version of the URL with a utm_content with the current version.
26 *
27 * @param string $url The URL to build upon.
28 *
29 * @return string The final URL.
30 */
31 public static function get( $url ) {
32 return YoastSEO()->helpers->short_link->get( $url );
33 }
34
35 /**
36 * Echoes a version of the URL with a utm_content with the current version.
37 *
38 * @param string $url The URL to build upon.
39 *
40 * @return void
41 */
42 public static function show( $url ) {
43 YoastSEO()->helpers->short_link->show( $url );
44 }
45
46 /**
47 * Gets the shortlink's query params.
48 *
49 * @return array The shortlink's query params.
50 */
51 public static function get_query_params() {
52 return YoastSEO()->helpers->short_link->get_query_params();
53 }
54 }
55