芝麻web文件管理V1.00
编辑当前文件:/home/mybf1/www/class.bf1.my/wp-content/plugins/all-in-one-seo-pack/app/Common/Api/Network.php
get_param( 'siteId' ); $siteId = $isNetwork ? aioseo()->helpers->getNetworkId() : (int) $request->get_param( 'siteId' ); $body = $request->get_json_params(); $rules = ! empty( $body['rules'] ) ? array_map( 'sanitize_text_field', $body['rules'] ) : []; $enabled = isset( $body['enabled'] ) ? boolval( $body['enabled'] ) : null; aioseo()->helpers->switchToBlog( $siteId ); $options = $isNetwork ? aioseo()->networkOptions : aioseo()->options; $enabled = null === $enabled ? $options->tools->robots->enable : $enabled; $options->sanitizeAndSave( [ 'tools' => [ 'robots' => [ 'enable' => $enabled, 'rules' => $rules ] ] ] ); return new \WP_REST_Response( [ 'success' => true ], 200 ); } }