Skip to Content
使用 WordPress 构建网络应用程序,第 2 版
book

使用 WordPress 构建网络应用程序,第 2 版

by Brian Messenlehner, Jason Coleman
May 2025
Intermediate to advanced
546 pages
6h 39m
Chinese
O'Reilly Media, Inc.
Content preview from 使用 WordPress 构建网络应用程序,第 2 版

第 3 章 使用 WordPress 插件 使用 WordPress 插件

本作品已使用人工智能进行翻译。欢迎您提供反馈和意见:translation-feedback@oreilly.com

插件棒极了!如果你不知道,现在你知道了!插件可以帮助您在几乎不懂实际代码的情况下部署一个完整的网络应用程序。无论您使用的是免费插件、高级插件还是自己创建的插件,插件都可以扩展 WordPress,为您提供应用程序所需的功能。

正如我们前面提到的,开源软件的最大优势在于社区成员都致力于改进 WordPress,并经常通过构建插件来实现所需的功能。WordPress Codex 中提供的插件定义是:"用 PHP 脚本语言编写的一个程序,或一组一个或多个函数,可以为 WordPress 网络日志添加一组特定的功能或服务,可以使用 WordPress 插件应用程序接口(API)提供的接入点和方法与网络日志无缝集成。" 插件可以让您把网站变成您能想到的任何东西,从基本博客到电子商务网站到社交网络,再到移动 iOS 和 Android 应用程序。

任何新安装的 WordPress 都会标配几个插件:Hello Dolly 和 Akismet。如果你不知道,"Hello Dolly "插件会在每次页面加载时在仪表板顶部随机添加一首歌词 "Hello Dolly"(来自同名音乐剧)。 虽然没什么用,但这是了解如何构建自己的插件的好方法。Akismet 插件集成了 和Akismet.com,可以自动过滤博客中的垃圾评论。Hello Dolly 除了具有教育意义外毫无用处,而 Akismet 则是任何开启了评论功能的网站所必需的。如果您认为这些插件在您的网站上没有任何用处,您可以随时停用或完全删除它们。

您可以通过WordPress 官方插件库访问 55,000 多个插件。 由于并非所有插件都能在这里找到,因此请在互联网上搜索您需要的其他功能。许多插件制作者都可以通过个人或企业网站下载他们的作品,其中许多是收费的。也有付费使用的高级插件。与移动应用程序类似,高级插件可能有免费的缩小版,也有收费的更大版本。大多数高级插件还提供开发者许可证,允许建立多个网站的开发者以一个价格购买插件文件,然后将其安装到多个 WordPress 安装中。

备注

在 Google 上搜索高级插件时要小心。请务必确保您是从插件作者的真实网站或其官方软件库中获取插件的。很多网站(也称为 "GPL 俱乐部")都出现了免费或大幅降价提供 "无效"、"破解 "或 "warez "版本的高级插件。这些插件大多包含恶意软件或其他有害代码,显然是你不想要的。

通用公共许可证》第 2 版许可证

无论您以何种方式购买或获得 WordPress 插件,所有 WordPress 插件都必须使用通用公共许可证第 2 版(GPLv2)代码许可证。其中规定,如果源代码被分发(提供、在线销售等), ,只要任何衍生作品保留 GPLv2 许可证,您就可以对代码进行任何处理。 有些主题和插件可能使用分割许可,即 HTML、CSS、JavaScript 和图片的发布许可与 PHP 文件的发布许可不同。有些主题和插件没有提及 GPLv2 许可证,或者直接否认它的适用性。他们的说法有一定的法律依据,但 WordPress.org 社区的权威人士(即 Matt Mullenweg)指出,所有主题和插件都必须与 GPL 兼容。我们的立场是,如果你想在 WordPress 社区开展业务,就应该遵守他们的规则。

总的来说,插件是为网站添加增强功能的好方法,而无需更改任何 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

WordPress 2: Visual QuickStart Guide

WordPress 2: Visual QuickStart Guide

Maria Langer, Miraz Jordan
Web Marketing all-in-one for Dummies®

Web Marketing all-in-one for Dummies®

Ian Lurie, Elizabeth Marsten, Michael Becker, John Arnold, Marty Dickinson
How to Develop a Great Digital Strategy

How to Develop a Great Digital Strategy

Jeanne W. Ross, Cynthia M. Beath, Ina M. Sebastian

Publisher Resources

ISBN: 9798341659339