/home/vianto5/distritosatelite.mx/wp-content/plugins/wordpress-seo/src/routes
NameSizeModeActions
endpoint/-0755rm
abstract-action-route.php6350644editdlrm
abstract-indexation-route.php9000644editdlrm
alert-dismissal-route.php23860644editdlrm
first-time-configuration-route.php82550644editdlrm
importing-route.php41710644editdlrm
indexables-head-route.php24500644editdlrm
indexing-route.php131510644editdlrm
integrations-route.php22420644editdlrm
meta-search-route.php20180644editdlrm
route-interface.php2670644editdlrm
semrush-route.php64080644editdlrm
supported-features-route.php13110644editdlrm
wincher-route.php89600644editdlrm
workouts-route.php31750644editdlrm
yoast-head-rest-field.php59340644editdlrm
Edit: /home/vianto5/distritosatelite.mx/wp-content/plugins/wordpress-seo/src/routes/meta-search-route.php (2018B)
'GET', 'callback' => [ $this, 'search_meta' ], 'permission_callback' => [ $this, 'permission_check' ], ], ]; \register_rest_route( Main::API_V1_NAMESPACE, self::META_SEARCH_ROUTE, $route ); } /** * Performs the permission check. * * @param WP_REST_Request $request The request. * * @return bool */ public function permission_check( $request ) { if ( ! isset( $request['post_id'] ) ) { return false; } $post_type = \get_post_type( $request['post_id'] ); $post_type_object = \get_post_type_object( $post_type ); return \current_user_can( $post_type_object->cap->edit_post, $request['post_id'] ); } /** * Searches meta fields of a given post. * * @param WP_REST_Request $request The REST request. * * @return WP_REST_Response */ public function search_meta( $request ) { $post_id = $request['post_id']; $query = $request['query']; $meta = \get_post_custom( $post_id ); $matches = []; foreach ( $meta as $key => $values ) { if ( \substr( $key, 0, \strlen( $query ) ) !== $query ) { continue; } if ( empty( $query ) && \substr( $key, 0, 1 ) === '_' ) { continue; } // Skip custom field values that are serialized. if ( \is_serialized( $values[0] ) ) { continue; } $matches[] = [ 'key' => $key, 'value' => $values[0], ]; if ( \count( $matches ) >= 25 ) { break; } } return \rest_ensure_response( [ 'meta' => $matches ] ); } }