HEX
Server: Apache
System: Linux host.fiblib.com 5.14.0-611.5.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 08:09:09 EST 2025 x86_64
User: agritoday (1002)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/agritoday/www/wp-content/plugins-x/wordpress-seo/src/repositories/seo-meta-repository.php
<?php
/**
 * Yoast extension of the Model class.
 *
 * @package Yoast\WP\SEO\Repositories
 */

namespace Yoast\WP\SEO\Repositories;

use Yoast\WP\Lib\ORM;
use Yoast\WP\Lib\Model;

/**
 * Class SEO_Meta_Repository
 */
class SEO_Meta_Repository {

	/**
	 * Starts a query for this repository.
	 *
	 * @return ORM
	 */
	public function query() {
		return Model::of_type( 'SEO_Meta' );
	}

	/**
	 * Finds the SEO meta for given post.
	 *
	 * @param int $post_id The post ID.
	 *
	 * @return bool|Model
	 */
	public function find_by_post_id( $post_id ) {
		return $this->query()
					->where( 'object_id', $post_id )
					->find_one();
	}
}