Note: You are viewing the documentation for Version 4View Version 3 Docs


Table of Contents

\SearchWP\Entry is responsible for modeling an individual \SearchWP\Source entry.


When instantiating a new \SearchWP\Entry the following arguments are considered:

source (string|\SearchWP\Source)
Either the \SearchWP\Source name or the \SearchWP\Source itself. (required)
id (string)
The database row ID of the \SearchWP\Source. (required)
get_data (boolean)
Whether the data should be retrieved at instantiation. (default: true)
all_attributes (boolean)
Whether to retrieve all of the registered \SearchWP\Attribute data, or only those that are used in an \SearchWP\Engine (default: false)


When working with \SearchWP\Entry there are a number of methods to consider.

Getter for ID.
Getter for \SearchWP\Source.
update_data( $all_attributes = false )
Updates data.
Getter for data.
Returns a version of this \SearchWP\Entry that the associated \SearchWP\Source was modeled around e.g. for Posts a proper WP_Post will be returned, populated appropriately.
Note: Not all \SearchWP\Attributes will be populated for core \SearchWP\Sources e.g. Custom Fields.


There are a number of hooks available to further modify the behavior of \SearchWP\Entry:

Fix keyword search on your site. No coding required!

Now you can utilize all of the content that's gone unrecognized by native WordPress keyword search instantly with SearchWP

Get SearchWP