1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
<?php /** * Model for the SEO Meta table. * * @package Yoast\YoastSEO\Models */
namespace Yoast\WP\Free\Models;
use Yoast\WP\Free\Yoast_Model;
/** * Table definition for the SEO Meta table. * * @property int $object_id * @property int $internal_link_count * @property int $incoming_link_count */ class SEO_Meta extends Yoast_Model {
/** * Overwrites the default ID column name. * * @var string */ public static $id_column = 'object_id';
/** * Finds the SEO meta for given post. * * @param int $post_id The post ID. * * @return \Yoast\WP\Free\Models\SEO_Meta The SEO meta. */ public static function find_by_post_id( $post_id ) { return Yoast_Model::of_type( 'SEO_Meta' ) ->where( 'object_id', $post_id ) ->find_one(); } }
|