PhpStorm now bundles WordPress coding style natively, starting from version 8.
- Go to
Project Settings
>Code Style
>PHP
. - Select
Set From...
(top right of window) >Predefined Style
>WordPress
.
No longer need to muck with this import! :)
<?php | |
set_error_handler( 'backtrace_error_handler', error_reporting() ); | |
function backtrace_error_handler( $errno, $errstr, $errfile, $errline, $errcontext ) { | |
// handle @ | |
if( 0 === error_reporting() ) | |
return false; |
<?php | |
/** | |
* Very Simple method for Omer count. | |
* | |
* @return bool|int Omer count or false if out Omer range date. | |
* | |
* @author Yakir Sitbon (http://www.yakirs.net/) | |
*/ | |
function yakir_get_omer_count() { | |
// Get now jd date. |
#!/bin/bash | |
# Copyright © 2015 Bjørn Johansen | |
# This work is free. You can redistribute it and/or modify it under the | |
# terms of the Do What The Fuck You Want To Public License, Version 2, | |
# as published by Sam Hocevar. See http://www.wtfpl.net/ for more details. | |
WP_PATH="/path/to/wp" | |
# Check if WP-CLI is available | |
if ! hash wp 2>/dev/null; then |
<?xml version="1.0" encoding="UTF-8"?> | |
<templateSet group="WordPress"> | |
<template name="aa" value="add_action( '$hook$', '$callback$' ); $END$" description="add_action" toReformat="false" toShortenFQNames="true"> | |
<variable name="hook" expression="" defaultValue="" alwaysStopAt="true" /> | |
<variable name="callback" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="HTML_TEXT" value="false" /> | |
<option name="HTML" value="false" /> | |
<option name="XSL_TEXT" value="false" /> | |
<option name="XML" value="false" /> |