Title: Only REST API
Author: Braad
Published: <strong>2015년 9월 25일</strong>
Last modified: 2015년 12월 7일

---

플러그인 검색

이 플러그인은 **최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다**. 워드프레스의
좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 
있을 수 있습니다.

![](https://s.w.org/plugins/geopattern-icon/only-rest-api.svg)

# Only REST API

 작성자: [Braad](https://profiles.wordpress.org/braad/)

[다운로드](https://downloads.wordpress.org/plugin/only-rest-api.1.0.0.zip)

 * [세부사항](https://ko.wordpress.org/plugins/only-rest-api/#description)
 * [평가](https://ko.wordpress.org/plugins/only-rest-api/#reviews)
 *  [설치](https://ko.wordpress.org/plugins/only-rest-api/#installation)
 * [개발](https://ko.wordpress.org/plugins/only-rest-api/#developers)

 [지원](https://wordpress.org/support/plugin/only-rest-api/)

## 설명

Got a WordPress install that serves only as the data layer and/or admin UI of your
web application?

This plugin will effectively turn off all default front end output, redirect all
front end urls to the main site url, and optionally display a message of your choice.
The message can be a simple plain text message or you can use the included filters
to completely control the HTML output.

All activity in the wp-admin and all requests for assets like images, scripts, files,
etc. will be unaffected by this plugin. Only requests that go through the `template_redirect`
action will be affected.

#### Message Output

Rather than contaminate the data structures you might be using for your application(
like posts and pages) this plugin includes a settings page with a simple textarea
box where you can save any basic message you want to show. The message content is
stored in the options table, and the textarea supports all the same HTML that you
can use in post content.

You can use the `only_rest_api_page_content` filter to include any custom HTML output
you want inside the `<body>` tags, or you can use the `only_rest_api_page_html` 
filter to completely replace all HTML output of the message page, including the `
<html>` and `<head>` tags.

There is also an `only_rest_api_page_css` filter that allows you to override the
5 lines of CSS this plugin includes to center the message on the page.

If you want a hook added or have a feature request let me know. Pull requests are
welcome [on Github](https://github.com/BraadMartin/only-rest-api).

#### Filter Examples

Use custom HTML inside the `<body>` tags:

    ```
    add_filter( 'only_rest_api_page_content', 'xxx_page_content' );
    function xxx_page_content( $content ) {

        $content = '<div class="custom-output">Sorry, I Only Speak REST. Please try again at a proper endpoint.</div>';

        return $content;
    }
    ```

Add custom CSS to the default output:

    ```
    add_filter( 'only_rest_api_page_css', 'xxx_page_css' );
    function xxx_page_css( $css ) {

        $css .= '.page-content { color: red; font-size: 72px; }';

        return $css;
    }
    ```

Replace the entire HTML output for the page:

    ```
    add_filter( 'only_rest_api_page_html', 'xxx_page_html' );
    function xxx_page_html( $html ) {

        ob_start();

        ?>
        <!doctype html>
        <html lang="">
            <head>
                <meta charset="utf-8">
                <meta http-equiv="x-ua-compatible" content="ie=edge">
                <title>Call me back over the REST API yo!</title>
                <meta name="description" content="">
                <meta name="viewport" content="width=device-width, initial-scale=1">
                <link rel="stylesheet" type="text/css" href="your-awesome-stylesheet.css">
                <script type="text/javascript">
                    // Do neat stuff...
                </script>
            </head>
            <body>
                <div class="page-content">
                    Ain't nobody got time for non-REST API requests. Please try again at a proper endpoint. :)
                </div>
            </body>
        </html>
        <?php

        $html = ob_get_clean();

        return $html;
    }
    ```

## 스크린샷

[⌊Customizable message shown on the front end for non-REST API requests⌉⌊Customizable
message shown on the front end for non-REST API requests⌉[

Customizable message shown on the front end for non-REST API requests

## 설치

#### Manual Installation

 1. Upload the entire `/only-rest-api` directory to the `/wp-content/plugins/` directory.
 2. Activate Only REST API through the ‘Plugins’ menu in WordPress.

#### Better Installation

 1. Go to Plugins > Add New in your WordPress admin and search for Only REST API.
 2. Click Install.

## FAQ

  Will this plugin affect assets like images, stylesheets, files, etc?

No, this plugin hooks into the `template_redirect` action, which only fires when
a front end page of some kind is being served.

  Does the plugin work with both v1 and v2 of the WP REST API?

Yes! This plugin supports both versions of the WP REST API and will support the 
final version that gets merged into core.

## 후기

이 플러그인에 대한 평가가 없습니다.

## 기여자 & 개발자

“Only REST API”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 
기여하였습니다.

기여자

 *   [ Braad ](https://profiles.wordpress.org/braad/)

[자국어로 “Only REST API”(을)를 번역하세요.](https://translate.wordpress.org/projects/wp-plugins/only-rest-api)

### 개발에 관심이 있으십니까?

[코드 탐색하기](https://plugins.trac.wordpress.org/browser/only-rest-api/)는, [SVN 저장소](https://plugins.svn.wordpress.org/only-rest-api/)
를 확인하시거나, [개발 기록](https://plugins.trac.wordpress.org/log/only-rest-api/)
을 [RSS](https://plugins.trac.wordpress.org/log/only-rest-api/?limit=100&mode=stop_on_copy&format=rss)
로 구독하세요.

## 변경이력

#### 1.0.0

 * First Release

## 기초

 *  버전 **1.0.0**
 *  최근 업데이트: **11년 전**
 *  활성화된 설치 **20+**
 *  워드프레스 버전 ** 4.0 또는 그 이상 **
 *  다음까지 시험됨: **4.4.34**
 *  언어
 * [English (US)](https://wordpress.org/plugins/only-rest-api/)
 * 태그:
 * [api](https://ko.wordpress.org/plugins/tags/api/)[JSON](https://ko.wordpress.org/plugins/tags/json/)
   [only](https://ko.wordpress.org/plugins/tags/only/)[rest](https://ko.wordpress.org/plugins/tags/rest/)
 *  [고급 보기](https://ko.wordpress.org/plugins/only-rest-api/advanced/)

## 평점

아직 제출된 리뷰가 없습니다.

[Your review](https://wordpress.org/support/plugin/only-rest-api/reviews/#new-post)

[모든  리뷰 보기](https://wordpress.org/support/plugin/only-rest-api/reviews/)

## 기여자

 *   [ Braad ](https://profiles.wordpress.org/braad/)

## 지원

할 말 있으신가요? 도움이 필요하신가요?

 [지원 포럼 보기](https://wordpress.org/support/plugin/only-rest-api/)

## 기부

이 플러그인이 발전하도록 도우시겠습니까?

 [ 이 플러그인에 기부하기 ](http://braadmartin.com/)