Title: We The People
Author: Buckeye Interactive
Published: <strong>2013년 6월 1일</strong>
Last modified: 2015년 1월 25일

---

플러그인 검색

![](https://ps.w.org/we-the-people/assets/banner-772x250.png?rev=721341)

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

![](https://s.w.org/plugins/geopattern-icon/we-the-people_0c6dad.svg)

# We The People

 작성자: [Buckeye Interactive](https://profiles.wordpress.org/buckeyeinteractive/)

[다운로드](https://downloads.wordpress.org/plugin/we-the-people.zip)

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

 [지원](https://wordpress.org/support/plugin/we-the-people/)

## 설명

In May 2013 the White House released an API for We The People, a petition application
designed to give citizens a direct line to the White House. The White House has 
committed to issue an official, public response to petitions that cross a particular
signature threshold.

This plugin allows WordPress site owners to search and embed petitions from We The
People into WordPress. Perhaps you’re writing an opinion piece on a petition and
want real-time statistics on signatures and any response from the White House. Maybe
you’re a supporter of a particular issue and want to feature it on your sidebar 
to help promote awareness. The ease of WordPress with the totally customizable templates
of the We The People plugin give you the power to share what’s important to you.

#### Special thanks

Special thanks goes out to the White House web team for building and opening the
We The People API for the general public and for inviting Buckeye Interactive to
the National Day of Civic Hacking to premiere this plugin.

### Usage

The plugin includes a number of different ways to embed petitions from We The People:

#### Shortcodes

The simplest way to get started is through WordPress shortcodes. The syntax is as
easy as: `[wtp-petition id="123"]`.

Petitions IDs aren’t especially easy to uncover from the We The People site so the
We The People plugin includes a TinyMCE button to help you. Clicking the button 
will open an overlay that will let you search the We The People petitions by title
to find your issue. You may also limit your search results to open petitions.

#### Widget

To add a We The People petition to a WordPress dynamic sidebar go to Appearance 
> Widgets and drag a “WTP Petition” widget into the desired sidebar. Like the TinyMCE
button the widget allows you to search for your desired petition by title and show
only open petitions.

#### $GLOBALS[‘we-the-people’] global variable (advanced)

If you’re a developer and need more complete access to the We The People API you
can use the `api()` method available through the `$GLOBALS['we-the-people']` global
variable. The `api()` method accepts two arguments: the API method to call (‘retrieve’
or ‘index’ in version 1.*) and an array of arguments to pass to the API.

**Note:** Before version 2.0, the plugin used a global `$we_the_people` variable.
If you did customizations to We The People templates you’ll want to be sure to update
this reference.

Full API documentation is available [on the We The People API page](https://petitions.whitehouse.gov/developers).
More developer-oriented documentation can be found in [this plugin’s GitHub repository](https://github.com/buckii/we-the-people-wordpress).

#### Styling the petition display

We The People has a built-in petition template but makes it easy to override in 
your theme. It may be easiest to copy templates/wtp-petition.php into your theme
to get started but a very basic custom template might look something like this:

    ```
    <div id="wtp-petition-<?php echo $petition->id; ?>" class="wtp-petition">
      <h2 class="petition-title"><?php echo $petition->title; ?></h2>
      <p>
        <strong><?php printf( __( '%d signatures.', 'my-theme' ), $petition->signaturesNeeded ); ?></strong>
        <a href="<?php echo $petition->url; ?>" title="<?php echo esc_attr( __( 'Sign this petition on We The People', 'we-the-people' ) ); ?>" class="sign-btn" rel="external"><?php _e( 'Sign this petition' ); ?></a>
      </p>
    </div><!-- #wtp-petition-<?php echo $petition->id; ?> -->
    ```

We The People uses the following order to determine which template to use when displaying
a petition:

**Shortcodes:**

 1. wtp-petition-{id}.php (child theme)
 2. wtp-petition.php (child theme)
 3. wtp-petition-{id}.php (parent theme)
 4. wtp-petition.php (parent theme)
 5. templates/wtp-petition.php (plugin)

**Widgets:**

 1. wtp-petition-widget-{id}.php (child theme)
 2. wtp-petition-widget.php (child theme)
 3. wtp-petition-widget-{id}.php (parent theme)
 4. wtp-petition-widget.php (parent theme)
 5. templates/wtp-petition-widget.php (plugin)

## 설치

 1. Upload the ‘/we-the-people/’ plugin directory to ‘/wp-content/plugins’ or install
    it through the WordPress plugin manager
 2. Activate the plugin
 3. That’s it!

#### API keys

Version 2.0 of the plugin introduced the ability to sign petitions via the We The
People Write API. In order to enable this feature within the plugin, it’s necessary
to [acquire an API key from We The People](http://www.whitehouse.gov/webform/apply-access-we-people-write-api),
then enter in the We The People WordPress settings page (Settings > We The People).
Alternatively, you may add the API key to your wp-config.php file by adding the 
following code above the “stop editing” comment:

    ```
    // We The People API
    define('WTP_API_KEY', 'your-api-key');
    ```

**Note:** If you go the wp-config.php route, the plugin settings page will disappear
as the API key is the only plugin option at this time.

## FAQ

  How do I prevent We The People from loading the bundled scripts and styles?

The We The People stylesheet and JavaScript file are enqueued in typical WordPress
fashion when the plugin is loaded on WordPress `init`. Dropping this function in
your WordPress theme should prevent the default We The People assets from loading:

    ```
    /**
     * Prevent We The People from loading scripts and styles.
     */
    function mytheme_disable_wtp_scripts_styles() {
      wp_dequeue_script( 'we-the-people' );
      wp_dequeue_style( 'we-the-people' );
    }
    add_action( 'init', 'mytheme_disable_wtp_scripts_styles' );
    ```

Since version 2.0, there are also two filters that can also be used to disable the
scripts/styles:

    ```
    add_filter( 'wethepeople_load_scripts', '__return_false' );
    add_filter( 'wethepeople_load_styles', '__return_false' );
    ```

  Can visitors sign a petition using the plugin?

Version 2.0 of the plugin uses the new Write API to enable you to collect signatures
on We The People petitions. In order to activate this functionality, you’ll need
to [apply for a We The People API key](https://ko.wordpress.org/plugins/we-the-people/?output_format=md#)
and add it to WordPress either through the plugin settings page (Settings > We The
People) or in your wp-config.php file (see [“API Keys”](https://ko.wordpress.org/plugins/we-the-people/?output_format=md#api-keys)
for more information).

  I just upgraded and am getting errors about a $we_the_people variable being undefined

Version 2.0 of the plugin replaced the global `$we_the_people` variable with the
cleaner `$GLOBALS['we-the-people']`. You can safely replace instances of the former
with the latter, though it’s unnecessary to have a `global $GLOBALS['we-the-people']`
declaration in your theme. If this change affects you, a simple (temporary) fix 
would be to add the following to your theme’s functions.php file:

    ```
    // Alias $we_the_people to $GLOBALS['we-the-people']
    global $we_the_people;
    $we_the_people = $GLOBALS['we-the-people']
    ```

## 후기

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

## 기여자 & 개발자

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

기여자

 *   [ Buckeye Interactive ](https://profiles.wordpress.org/buckeyeinteractive/)
 *   [ Steve Grunwell ](https://profiles.wordpress.org/stevegrunwell/)

[자국어로 “We The People”(을)를 번역하세요.](https://translate.wordpress.org/projects/wp-plugins/we-the-people)

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

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

## 변경이력

#### 2.0

 * Leverage the new write API, enabling sites with a valid API key to sign petitions
 * **Breaking change:** Removed references to global `$we_the_people` variable, 
   opting instead for `$GLOBALS['we-the-people']`
 * Better compatibility with WordPress 3.9+ and the TinyMCE changes it brought with
   it
 * Added ability to limit petition search results to open petitions
 * Added `wethepeople_load_scripts` and `wethepeople_load_styles` filters to easily
   stop We The People from loading assets in custom themes.
 * WTP will now load additional stylesheets to fix display issues with TwentyTwelve,
   TwentyThirteen, TwentyFourteen, and TwentyFifteen.

#### 1.1

 * Make sure the petitions won’t be totally broken in the event that We The People
   becomes unavailable

#### 1.0

 * First public version of the plugin

## 기초

 *  버전 **2.0**
 *  최근 업데이트: **12년 전**
 *  활성화된 설치 **10+**
 *  워드프레스 버전 ** 3.5.1 또는 그 이상 **
 *  다음까지 시험됨: **4.1.42**
 *  언어
 * [English (US)](https://wordpress.org/plugins/we-the-people/)
 * 태그:
 * [democracy](https://ko.wordpress.org/plugins/tags/democracy/)[petition](https://ko.wordpress.org/plugins/tags/petition/)
 *  [고급 보기](https://ko.wordpress.org/plugins/we-the-people/advanced/)

## 평점

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

[Your review](https://wordpress.org/support/plugin/we-the-people/reviews/#new-post)

[모든  리뷰 보기](https://wordpress.org/support/plugin/we-the-people/reviews/)

## 기여자

 *   [ Buckeye Interactive ](https://profiles.wordpress.org/buckeyeinteractive/)
 *   [ Steve Grunwell ](https://profiles.wordpress.org/stevegrunwell/)

## 지원

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

 [지원 포럼 보기](https://wordpress.org/support/plugin/we-the-people/)

## 기부

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

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