Skip to content

Himanshu9430/wordpress-plugin-construction

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WordPress plugin construction

Tools for developing and running a awesome WordPress website. Please select a folder in the list above to see the plugin's development.

Two programmers

https://en.wikipedia.org/wiki/Pair_programming

An article about code quality

http://engineering.quora.com/Moving-Fast-With-High-Code-Quality

Plugin headers

readme.txt https://developer.wordpress.org/plugins/wordpress-org/how-your-readme-txt-works/

=== Plugin Name ===
Contributors: (comma, separated, list of wordpress.org userid's)
Donate link: https://example.com/
Tags: comments, spam
Requires at least: 4.9
Tested up to: 5.2.2
Requires PHP: 7.0
Stable tag: 1.0.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Here is a short description of the plugin. This should be no more than 150 characters. No markup here.

https://developer.wordpress.org/plugins/plugin-basics/header-requirements/ @wordpress-plugin

/**
 * Plugin Name
 *
 * @package     PluginPackage
 * @author      Your Name
 * @copyright   2019 Your Name or Company Name
 * @license     GPL-2.0-or-later
 *
 * @wordpress-plugin
 * Plugin Name: Plugin Name
 * Plugin URI:  https://example.com/plugin-name
 * Description: Description of the plugin.
 * Version:     1.0.0
 * Author:      Your Name
 * Author URI:  https://example.com
 * Text Domain: plugin-slug
 * License:     GPL v2 or later
 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
 */

How to add images to a WordPress plugin?

One-class file comment

<?php
/**
 * Administration API: WP_Internal_Pointers class
 *
 * @package WordPress
 * @since 4.4.0
 */

/**
 * Core class used to implement an internal admin pointers API.
 *
 * @since 3.3.0
 */
final class WP_Internal_Pointers {

Recommended plugins

Data structure plugin categories

  • CPT (Custom port type)
  • Custom taxonomy
  • Custom post meta
  • Custom taxonomy meta
  • Custom user meta
  • Plugin option page
  • Theme options page
  • Shortcodes
  • Widgets
  • Widget display conditions widget-context
  • Search custom contents

Content plugin categories

  1. Content Forcing
    • force-featured-image
    • mu-deny-giant-image-uploads/
  2. Content Fixes
    • mu-shortcode-unautop/
    • custom-post-type-permalinks
  3. UI tuning / Bulk edit aid
    add_filter( 'unified_post_types', function ( $post_types ) {
        $post_types[] = 'portfolio';
        $post_types[] = 'news';
        return $post_types;
    });
    • simple-page-ordering
    • post-types-order
    • Media URL column, see: content-extras/media-url-column.php
    • codepress-admin-columns
    • featured-image-column
    • advanced-excerpt
    • Advanced Image Styles advanced-image-styles
    • unattach
  4. Content representation
  5. Imaging
    • Cloudinary
    • my-eyes-are-up-here
  6. Tracking
    • google-universal-analytics/
    • .
  7. CDN

Manage WordPress installation with git

  1. Core as submodule at /company/ with URL https://github.com/WordPress/WordPress.git
  2. Theme as submodule with URL file:///home/user/website/theme.git
  3. WP.org plugins are gitignore-d.
  4. Non-WP.org plugins as submodules with URL file:///home/user/website/plugin.git

Manage WordPress plugins with composer

http://wpackagist.org/

WordPress .gitignore

See https://github.com/szepeviktor/debian-server-tools/blob/master/webserver/wordpress.gitignore

About

Tools 🧰 for developing and running WordPress websites

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 93.1%
  • Shell 2.5%
  • CSS 1.9%
  • XSLT 1.4%
  • Other 1.1%