در کلاس PHP
متغیر $where در تابع function posts_where($where) در هنگام اجرای افرونه چگونه مقدار لازم را دریافت می کند؟ و به چه مقداری نیاز دارد؟
<?php
/*
Plugin Name: Search by Post ID
Description: Enables the user to search by Post ID using the built-in search in all website. Works for all kinds of posts (posts, pages, custom post types and media).
Version: 1.0
Author: Marcos Rezende
Author URI: https://www.linkedin.com/in/rezehnde/
*/
new RezehndeSearchById();
class RezehndeSearchById
{
function __construct()
{
add_filter('posts_where', array($this, 'posts_where'));