Giter Club home page Giter Club logo

for-now's Introduction

WordPress minimum theme template

Structure

theme-root:
	- assets # design
		- css
		- js
		- images
	- prats # components
		- headers
			- components
		- footers
	- templates # page template
	- inc # for functions.php
		- shortcodes # shortcode
		- functions # function
		- management # admin 
		- custom-posts.php # custom post
		- enqueue-scripts-css.php # js, css
	- style.css
	- index.php
	- functions.php
	- screenshot.png
	- header.php
	- footer.php
	...

phpcs and phpcbf

  1. cd VSCode root
  2. composer global require "squizlabs/php_codesniffer=*"
  3. /Users/{user name}/.composer/vendor/bin/phpcs --version -> skippable
  4. echo 'export PATH=$HOME/.composer/vendor/bin:$PATH' >> ~/.bashrc
  5. source ~/.bashrc
  6. phpcs --version
  7. composer global require wp-coding-standards/wpcs
  8. phpcs --config-set default_standard WordPress
  9. phpcs -i
  10. The installed coding standards are PEAR, Zend, PSR2, MySource, Squiz, PSR1, PSR12, WordPress, ...
  11. Add VSCode extentions
  • ikappas.phpcs
  • persoderlind.vscode-phpcbf
  1. edit .vscode/settings.json
{
    "editor.detectIndentation": false,
    "editor.insertSpaces": false,
    "editor.tabSize": 4,
    "files.eol": "\n",
    "phpcs.executablePath": "/home/{user name}/.composer/vendor/bin/phpcs",
    "phpcbf.executablePath": "/home/{user name}/.composer/vendor/bin/phpcbf",
    "phpcs.standard": "WordPress",
    "phpcbf.standard": "WordPress",
    "phpcbf.onsave": true
}

for-now's People

Contributors

yuodagaki avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.