メモ。サーバにログインして特定の文字を検索する時に使った。
毎度使っている様子は見てたけど、今日初めて使った。
find 場所 -type f -print | xargs grep ‘検索文字列’
find ./ -type f -print | xargs grep ‘WP_HTTP_Response'[/code]
今回は↑↑ で検索。
[code]
./wp-includes/embed-functions.php: * @param WP_HTTP_ResponseInterface $result Result to send to the client. Usually a WP_REST_Response.
./wp-includes/rest-api/class-wp-rest-server.php: * @param WP_HTTP_Response $result Result to send to the client. Usually a WP_REST_Response.
./wp-includes/rest-api/class-wp-rest-server.php: * @param WP_HTTP_Response $result Result to send to the client. Usually a WP_REST_Response.
./wp-includes/rest-api/class-wp-rest-response.php: * @see WP_HTTP_Response
./wp-includes/rest-api/class-wp-rest-response.php:class WP_REST_Response extends WP_HTTP_Response {
./wp-includes/rest-api/rest-functions.php: * This implements WP_HTTP_Response, allowing usage of `set_status`/`header`/etc
./wp-includes/rest-api/rest-functions.php: * @param WP_Error|WP_HTTP_Response|mixed $response Response to check.
./wp-includes/rest-api/rest-functions.php: * @return mixed WP_Error if response generated an error, WP_HTTP_Response if response
./wp-includes/rest-api/rest-functions.php: if ( $response instanceof WP_HTTP_Response ) {
./wp-includes/class-wp-http-response.php: * HTTP API: WP_HTTP_Response class
./wp-includes/class-wp-http-response.php:class WP_HTTP_Response {
./wp-includes/http.php:/** WP_HTTP_Response class */
./wp-content/plugins/rest-api/core/rest-api.php:/** WP_HTTP_Response class */
./wp-content/plugins/rest-api/core/wp-includes/rest-api/class-wp-rest-server.php: * @param WP_HTTP_Response $result Result to send to the client. Usually a WP_REST_Response.
./wp-content/plugins/rest-api/core/wp-includes/rest-api/class-wp-rest-server.php: * @param WP_HTTP_Response $result Result to send to the client. Usually a WP_REST_Response.
./wp-content/plugins/rest-api/core/wp-includes/rest-api/class-wp-rest-response.php: * @see WP_HTTP_Response
./wp-content/plugins/rest-api/core/wp-includes/rest-api/class-wp-rest-response.php:class WP_REST_Response extends WP_HTTP_Response {
./wp-content/plugins/rest-api/core/wp-includes/rest-api/rest-functions.php: * This implements WP_HTTP_Response, allowing usage of `set_status`/`header`/etc
./wp-content/plugins/rest-api/core/wp-includes/rest-api/rest-functions.php: * @param WP_Error|WP_HTTP_Response|mixed $response Response to check.
./wp-content/plugins/rest-api/core/wp-includes/rest-api/rest-functions.php: * @return mixed WP_Error if response generated an error, WP_HTTP_Response if response
./wp-content/plugins/rest-api/core/wp-includes/rest-api/rest-functions.phpif ( $response instanceof WP_HTTP_Response ) {
./wp-content/plugins/rest-api/core/wp-includes/rest-api/class-wp-http-response.php: * REST API: WP_HTTP_Response class
./wp-content/plugins/rest-api/core/wp-includes/rest-api/class-wp-http-response.php:class WP_HTTP_Response {
[/code]
目次
エラー
[code]PHP Fatal error: Cannot redeclare class WP_Http in /var/www/vhosts/private.hibou-web.com/wp-includes/class-http.php on line 21
Fatal error: Cannot redeclare class WP_Http in /var/www/vhosts/private.hibou-web.com/wp-includes/class-http.php on line 21[/code]
↑↑ 上記のエラーが出てたので、やってみた次第。
rest-apiの模様。WordPress Beta Testerプラグインを無効化して一先ず治まった。
WordPress Beta Testerはローカルでやろう。
参考サイト
コメントいただきました!!
こちらの方が楽かもです。ですけど、 find/xargs のコンビネーションはよく使います!
grep -r ‘WP_HTTP_Response’ ./政倉さん、ありがとうございます 😀
(なぜかFacebookの投稿埋め込みできなかった。。)
https://www.facebook.com/marushu/posts/10208178567046919