File Editor
Directories:
.. (Back)
exceptions
options
sitemaps
Files:
class-addon-manager.php
class-my-yoast-api-request.php
class-post-type.php
class-rewrite.php
class-upgrade-history.php
class-upgrade.php
class-wpseo-admin-bar-menu.php
class-wpseo-content-images.php
class-wpseo-custom-fields.php
class-wpseo-custom-taxonomies.php
class-wpseo-image-utils.php
class-wpseo-installation.php
class-wpseo-meta.php
class-wpseo-primary-term.php
class-wpseo-rank.php
class-wpseo-replace-vars.php
class-wpseo-replacement-variable.php
class-wpseo-shortlinker.php
class-wpseo-statistics.php
class-wpseo-utils.php
class-yoast-dynamic-rewrites.php
date-helper.php
index.php
interface-wpseo-wordpress-ajax-integration.php
interface-wpseo-wordpress-integration.php
language-utils.php
wpseo-functions-deprecated.php
wpseo-functions.php
wpseo-non-ajax-functions.php
Create New File
Create
Edit File: class-wpseo-shortlinker.php
<?php /** * WPSEO plugin file. * * @package WPSEO */ /** * Helps with creating shortlinks in the plugin. */ class WPSEO_Shortlinker { /** * Builds a URL to use in the plugin as shortlink. * * @param string $url The URL to build upon. * * @return string The final URL. */ public function build_shortlink( $url ) { return YoastSEO()->helpers->short_link->build( $url ); } /** * Returns a version of the URL with a utm_content with the current version. * * @param string $url The URL to build upon. * * @return string The final URL. */ public static function get( $url ) { return YoastSEO()->helpers->short_link->get( $url ); } /** * Echoes a version of the URL with a utm_content with the current version. * * @param string $url The URL to build upon. * * @return void */ public static function show( $url ) { YoastSEO()->helpers->short_link->show( $url ); } /** * Gets the shortlink's query params. * * @return array The shortlink's query params. */ public static function get_query_params() { return YoastSEO()->helpers->short_link->get_query_params(); } }
Save Changes
Rename File
Rename