[WordPress] 外掛分享: EASY-JS-WPAPI Client HANDLE for the WordPress REST-API

首頁外掛目錄 › EASY-JS-WPAPI Client HANDLE for the WordPress REST-API
WordPress 外掛 EASY-JS-WPAPI Client HANDLE for the WordPress REST-API 的封面圖片
10+
安裝啟用
★★★★★
5/5 分(1 則評價)
3099 天前
最後更新
問題解決
WordPress 4.8+ v2.0 上架:2017-08-21

內容簡介

此外掛透過整合 node-wpapi JavaScript 客戶端,讓開發者能輕鬆存取 WordPress REST API,自動處理身份驗證問題,解決以 JavaScript 建構佈景主題時常見的 REST 錯誤,確保所有使用者與訪客都能一致地瀏覽網站資料。

【主要功能】
• 全域提供已驗證的 WPAPI JavaScript 物件(wp)
• 自動處理三種驗證情境:管理員、一般用戶、訪客
• 支援以 jQuery、React、OpenUI5 等框架開發佈景主題
• 內建 node-wpapi 同構 JavaScript 客戶端
• 提供範例 JavaScript 佈景主題供下載測試

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「EASY-JS-WPAPI Client HANDLE for the WordPress REST-API」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Short Description

Easily talk with the WordPress REST-API to access and display your WordPress (model) data without
rest-authentication errors when creating Javascript Themes for consistent views by all users/clients accessing
your WordPress site.

Description and Features

We chose the bundled node-wpapi isomorphic Javascript client, because it is the simplest way to get up and running
quickly to display live website data in your installed WordPress website, using a Javascript-controlled Theme or Plugin

The WEB Landscape is changing. Today, we can use Javascript to build WordPress Themes. WordPress becomes our Model,
which we can theme with Javascript using the WordPress REST-API.

This plugin was developed to make life easy for web developers who which to create full-fledged
Javascript WordPress Themes OR Javascript-PHP WordPress Themes using a Javascript Framework/Library like:
jQuery, React, OpenUI5, et.c. for use in a WordPress installation with the wpapi.js rest-client.

It relies on the node-wpapi isomorphic javascript client to access the WP REST-API. The problem with accessing
the REST-API using javascript-clients is the headache of authentication issues and private data access, which can
hamper fluid display of the web-page, leading to rest-errors when using Javascript to display the data.
This plugin works under the hood and makes the javascript-client object, ‘wp’ that interfaces with the WP REST-API
globally accessible for direct and easy use in a javascript(.js) file under the scope of a WordPress installation.

It handles three authentication use cases: admin user, non-admin user and for a client from inside a WP installation.
Say your WordPress website url is e.g: http://talker-test.com or http://localhost:8080
WordPress switches to Cookie WP Authentication for switched to when an administrator is currently logged in to
the WordPress installation. Basic WP-Authentication is switched to when a Client accesses your WordPress website
When an authenticated non-admin user, like an Author or Subscriber is currently logged in to your website,
it displays data using Basic WP-Authentication.

We then make the WPAPI global as a globally scoped javascript object, wp,
for use in a WordPress Installation to talk with the WP REST-API on the go.

So, with added ease, you can start building your next Javascript Themes for WordPress, or accessing the WP REST-API
So start coding and talking with the WordPress REST-API and display consistent, unhindered data,
as you permit to all your clients, and users.

See Demo WP Installation that shows how this plugin is used to display live website data from the WordPress REST-API
In it we created a sample JS-controlled WordPress theme using jQuery and the ‘wp’ object provided by our bundled
javascript client, which our plugin has made globally scoped and authenticated.

For more info. and examples, you can check out the documentation
of the node-wpapi javascript client at wp-api.org/node-wpapi

Testing

Go to https://somefunagba.github.io/easyjs-wpapi-rest-client-handle/
Click on the Demo link: Download a sample zipped Javascript Theme and a .xml import file.
Copy the theme to your Local WordPress Themes directory and Activate it.
If your WP installation has no posts or a single post. Import the downloaded .xml posts
Go to your site-url homepage e.g: http://localhost:8080/
You should see a demo Blog/News themed website.[Demo Website Image]
Inside the Theme folder, You can play with this theme’s index.js and footer.js files.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon