Brad Williams - Professional WordPress Plugin Development

Здесь есть возможность читать онлайн «Brad Williams - Professional WordPress Plugin Development» — ознакомительный отрывок электронной книги совершенно бесплатно, а после прочтения отрывка купить полную версию. В некоторых случаях можно слушать аудио, скачать через торрент в формате fb2 и присутствует краткое содержание. Жанр: unrecognised, на английском языке. Описание произведения, (предисловие) а так же отзывы посетителей доступны на портале библиотеки ЛибКат.

Professional WordPress Plugin Development: краткое содержание, описание и аннотация

Предлагаем к чтению аннотацию, описание, краткое содержание или предисловие (зависит от того, что написал сам автор книги «Professional WordPress Plugin Development»). Если вы не нашли необходимую информацию о книге — напишите в комментариях, мы постараемся отыскать её.

Extend WordPress with plugins using this advanced WordPress development book, updated for the current version This significantly updated edition of
addresses modern plugin development for WordPress, the highly popular content management system (CMS). If you’re using WordPress to create and manage websites, WordPress plugins are the software that can extend or enhance CMS functionality. This book offers guidance on writing plugins for WordPress sites to share or sell to other users.
The second edition of
covers the building of advanced plugin development scenarios. It discusses the plugin framework and coding standards as well as dashboards, settings, menus, and related application programming interfaces (APIs). Additional topics include security, performance, data validation, and SQL statements.
• Learn about the power of hooks in WordPress
• Discover how JavaScript and Ajax will work in your site
• Understand key technologies: Block Editor/Gutenberg, JS/React, PHP, and the REST API
• Create and use custom post types and taxonomies.
• Creating custom dashboard menus and plugin settings
• Work with users and user data
• Schedule tasks and utilizing Cron
• Performance and security considerations
Written by experienced plugin developers,
also helps you internationalize and localize your WordPress website. Find out about debugging systems and optimizing your site for speed. As WordPress use continues to increase, you can elevate your professional knowledge of how to extend WordPress through plugins.

Professional WordPress Plugin Development — читать онлайн ознакомительный отрывок

Ниже представлен текст книги, разбитый по страницам. Система сохранения места последней прочитанной страницы, позволяет с удобством читать онлайн бесплатно книгу «Professional WordPress Plugin Development», без необходимости каждый раз заново искать на чём Вы остановились. Поставьте закладку, и сможете в любой момент перейти на страницу, на которой закончили чтение.

Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

2 Chapter 3 FIGURE 3-1: Custom registered menu FIGURE 3‐1 : Custom registered menu NOTE Menus are a common feature in WordPress plugins and are generally expected by users. It's a good idea to mention where your plugin settings can be found in the plugin description and documentation. FIGURE 3-2: Submenus FIGURE 3‐2 : Submenus NOTE Not all plugins will need submenus. For example, a plugin with a single settings page has no need for additional submenus. When creating your new plugin, it's important to determine if submenus will be needed for a good user experience. FIGURE 3-3: Submenu labeled PDEV Settings FIGURE 3‐3 : Submenu labeled PDEV Settings The following is a list of all available submenu functions in WordPress: add_dashboard_page: Adds a submenu to the Dashboard menu add_posts_page: Adds a submenu to the Posts menu add_media_page: Adds a submenu to the Media menu add_links_page: Adds a submenu to the Links menu add_pages_page: Adds a submenu to the Pages menu add_comments_page: Adds a submenu to the Comments menu add_theme_page: Adds a submenu to the Appearance menu add_plugins_page: Adds a submenu to the Plugins menu add_users_page: Adds a submenu to the Users menu add_management_page: Adds a submenu to the Tools menu add_options_page: Adds a submenu to the Settings menu To use any of these functions, simply swap out the function name in the code shown earlier. NOTE If your plugin requires only a single options page, it's best practice to add it as a submenu to an existing menu. If you require more than one, create a custom top‐level menu. FIGURE 3-4: Plugin management page FIGURE 3‐4 : Plugin management page Activate this plugin and head to Settings ➪ PDEV Settings. You'll see a similar interface to the one shown in Figure 3‐4 . FIGURE 3-5: Error message FIGURE 3‐5 : Error message FIGURE 3-6: Section appended FIGURE 3‐6 : Section appended You still need to whitelist this setting, with register_setting() . Omitting this step would make WordPress ignore the setting when submitting the form. FIGURE 3-7: Singular field FIGURE 3‐7 : Singular field FIGURE 3-8: Heading levels FIGURE 3‐8 : Heading levels FIGURE 3-9: Dashicons FIGURE 3‐9 : Dashicons It's important to note that dashicons are automatically loaded within the WordPress Dashboard, but not on the frontend of the website. If you'd like to use dashicons on the public side, you'll need to enqueue the dashicon script, as shown here: Now your plugin has a clean header and uses the Plug icon. For more information and a complete list of all Dashicons available, see the official resource at https://developer.wordpress.org/resource/dashicons . FIGURE 3-10: Dismissable notices FIGURE 3‐10 : Dismissable notices FIGURE 3-11: WordPress-styled button FIGURE 3‐11 : WordPress‐styled button Links can also take the form of a button by using the appropriate class. Search Search Primary Search Secondary This example shows how a standard link can be styled to look like a button, as shown in Figure 3‐12 . To normal users, they would never know these are regular text links because they look just like a button. FIGURE 3‐12 : Link styled to look like a button FIGURE 3-12: Link styled to look like a button FIGURE 3‐12 : Link styled to look like a button FIGURE 3-13: WordPress-like options FIGURE 3‐13 : WordPress‐like options FIGURE 3-14: Table style FIGURE 3‐14 : Table style FIGURE 3-15: Pagination style FIGURE 3‐15 : Pagination style Keeping your plugin design consistent with the WordPress user interface can reduce your plugins' learning curve because users will feel comfortable with the design and styles used. This can also make your plugins' design future‐proof. If the WordPress core styles change down the road, your plugins' design will also change to match the new user interface, and you won't need to edit a single line of code!

3 Chapter 4 FIGURE 4-1: Insufficient privileges FIGURE 4-2: Expired link message FIGURE 4-3: Rogue JavaScript running FIGURE 4-4: Related Posts list

4 Chapter 7FIGURE 7-1: Classic Editor, not covered in this chapterFIGURE 7-2: GutenbergFIGURE 7-3: Block Library menuFIGURE 7-4: Categories of blocksFIGURE 7-5: View optionsFIGURE 7-6: Sidebar's Document menuFIGURE 7-7: Sidebar's Block menu and formatting toolbarFIGURE 7-8: WooCommerce blocksFIGURE 7-9: Newest Products blockFIGURE 7-10: Event Calendar blocksFIGURE 7-11: Post Type Switcher pluginFIGURE 7-12: webpack finishing successfullyFIGURE 7-13: Our “Hello world!” block in the Block LibraryFIGURE 7-14: Selecting our new blockFIGURE 7-15: Editing a postFIGURE 7-16: WP-CLI scaffold generatedFIGURE 7-17: Build Step 1FIGURE 7-18: Build Step 2FIGURE 7-19: Build Step 3FIGURE 7-20: My Block in Block LibraryFIGURE 7-21: My Block in Content Area

5 Chapter 8FIGURE 8-1: Books admin menu and screenFIGURE 8-2: Tags submenu itemFIGURE 8-3: Genres submenu

6 Chapter 9FIGURE 9-1: New form on the user edit pageFIGURE 9-2: New roles

7 Chapter 10FIGURE 10-1: Scheduled Events pageFIGURE 10-2: Number output

8 Chapter 11FIGURE 11-1: Settings box

9 Chapter 12FIGURE 12-1: Unformatted JSONFIGURE 12-2: Formatted JSONFIGURE 12-3: Post resultsFIGURE 12-4: Error messageFIGURE 12-5: Authentication workedFIGURE 12-6: “My Time at Crystal Lake” post

10 Chapter 13FIGURE 13-1: Tools ➪ Network menu options

11 Chapter 14FIGURE 14-1: Simple post listFIGURE 14-2: Widgets admin screenFIGURE 14-3: Favorites listFIGURE 14-4: Custom dashboard widgetFIGURE 14-5: Custom dashboard widget

12 Chapter 15FIGURE 15-1: Admin Toolbar menu itemFIGURE 15-2: Query Monitor interfaceFIGURE 15-3: Database queries

13 Chapter 16FIGURE 16-1: Function with parametersFIGURE 16-2: Codex search optionsFIGURE 16-3: WordPress PHPXrefFIGURE 16-4: Function list

Guide

1 Cover

2 Table of Contents

3 Begin Reading FOREWORD This book will teach you how to develop for WordPress. WordPress has, over the past two decades, grown into the CMS that powers more than one‐third of all websites. If you're proficient at WordPress development, you'll never be out of a job again. Starting out as a simple blogging system, over the last few years WordPress has morphed into a fully featured and widely used content management system. It offers individuals and companies worldwide a free and open source alternative to closed source and often very expensive systems. When I say fully featured, that's really only true because of the ability to add any functionality needed in the form of a plugin. The core of WordPress is simple: you add in functionality with plugins as you need it. Developing plugins allows you to stand on the shoulders of a giant: you can showcase your specific area of expertise and help users benefit while not having to deal with parts of WordPress you don't care or know about. When I wrote the foreword of this book's first edition, nine years ago, I'd just started my own company. That company has since grown to consist of 100+ people, and our plugins are used on more than 10 million sites—all through the power of open source and plugins. I wished that when I started developing plugins for WordPress as a hobby, almost 15 years back, this book had been around. I used it as a reference countless times since, and I still regularly hand this book to new colleagues. The authors of this book have always been a source of good information and wonderful forces in the WordPress community. Each of them is an expert in his own right; together they are one of the best teams that could have been gathered to write this book, and I'm glad they're here for a second edition. WordPress makes it easy for people to have their say through words, sound, and visuals. For those who write code, WordPress allows you to express yourself in code. And it's simple. Anyone can write a WordPress plugin. With this guide in hand, you can write a plugin that is true to WordPress’ original vision: code is poetry. Happy coding! Joost de Valk Yoast.com

Читать дальше
Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

Похожие книги на «Professional WordPress Plugin Development»

Представляем Вашему вниманию похожие книги на «Professional WordPress Plugin Development» списком для выбора. Мы отобрали схожую по названию и смыслу литературу в надежде предоставить читателям больше вариантов отыскать новые, интересные, ещё непрочитанные произведения.


Отзывы о книге «Professional WordPress Plugin Development»

Обсуждение, отзывы о книге «Professional WordPress Plugin Development» и просто собственные мнения читателей. Оставьте ваши комментарии, напишите, что Вы думаете о произведении, его смысле или главных героях. Укажите что конкретно понравилось, а что нет, и почему Вы так считаете.

x