Download the PHP package bojaghi/search-meta without Composer

On this page you can find all versions of the php package bojaghi/search-meta. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package search-meta

Search Meta

이 모듈은 워드프레스에서 검색의 범위를 커스텀 필드까지 확장시켜 줍니다.

포스트 검색시 기본적으로 제목, 본문, 발췌 (excerpt) 이 세 필드만을 대상으로 검색 쿼리를 작성합니다. 워드프레스의 WP_Query가 지원하는 일반적인 방법으로는 커스텀 필드까지 고려한 검색 쿼리를 작성할 수 가 없어, 별도로 SQL을 직접 짜야 합니다.

이 모듈은 WP_Query 클래스에서 생성하는 SQL 쿼리문을 수정하여 커스텀 필드가 검색에 반영되도록 처리합니다.

사용방법

WP_Query의 설정 배열에 'search_meta' 키를 추가하면 됩니다.

search_meta키의 값으로 순차 배열이며 각 요소는 검색을 진행할 커스텀 필드 이름, 즉 postmeta.meta_key 값을 입력하면 됩니다. 모듈이 동작 하면 이 키가 설정되어 있을 때 커스텀 필드도 검색되도록 쿼리를 수정합니다.

아래는 간단한 'search_meta'의 예입니다.

SearchMeta 객체는 init 액션의 콜백이에서, 또는 플러그인이나 테마 초기화 코드에서 적당히 인스턴스화 시키면 됩니다.

설정 방법

SearchMeta 클래스의 생성자 인자로 설정의 배열이나, 설정을 배열하는 파일의 경로를 입력합니다.

아래는 설정 파일의 예시입니다.

주의할 점

WP_Query에 's'로 검색어를 넣을 경우 공백을 기준으로 단어를 나눠 각 단어별로 LIKE 검색을 시도합니다. 공백까지 한 단어로 간주하려면 따옴표로 감쌉니다. 커스텀 필드를 검색할 때에도 이와 동일한 동작을 합니다.


All versions of search-meta with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
bojaghi/contract Version *
bojaghi/helper Version ^1.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bojaghi/search-meta contains the following files

Loading the files please wait ...