PageRenderTime 4ms CodeModel.GetById 2ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/wp-content/plugins/wordpress-seo/admin/links/class-link-internal-lookup.php

https://bitbucket.org/carloskikea/helpet
PHP | 25 lines | 6 code | 2 blank | 17 comment | 0 complexity | f5976f31e81513ec6a52c1a7d0cf4e29 MD5 | raw file
 1<?php
 2/**
 3 * WPSEO plugin file.
 4 *
 5 * @package WPSEO\Admin\Links
 6 */
 7
 8/**
 9 * Represents the internal link lookup. This class tries get the postid for a given internal link.
10 */
11class WPSEO_Link_Internal_Lookup {
12
13	/**
14	 * Gets a post id for the given link for the given type. If type is outbound it returns 0 as post id.
15	 *
16	 * @param string $link The link to populate.
17	 *
18	 * @return int The post id belongs to given link if link is internal.
19	 */
20	public function lookup( $link ) {
21		// @codingStandardsIgnoreStart
22		return url_to_postid( $link );
23		// @codingStandardsIgnoreEnd
24	}
25}