ln -s /absolute/path/to/github/My-Plugin-Name/my-plugin-name/trunk my-plugin-name
mklink /j C:\absolute\path\to\github\My-Plugin-Name my-plugin-name
if (!function_exists('write_log')) { | |
function write_log ( $log ) { | |
if ( true === WP_DEBUG ) { | |
if ( is_array( $log ) || is_object( $log ) ) { | |
error_log( print_r( $log, true ) ); | |
} else { | |
error_log( $log ); | |
} | |
} | |
} |
const { mix } = require('laravel-mix') | |
const path = require('path') | |
/* | |
|-------------------------------------------------------------------------- | |
| Asset Management | |
|-------------------------------------------------------------------------- | |
| | |
| This file defines the building steps of the application. Here's where the | |
| client-side technologies are configured according to the needs. Steps such |
dpm(); // | |
kpr() | |
dpq($query) // show query |
$block = ctools_content_render('widget_name', 'widget_name', []); | |
print $block->content; | |
//ctools_content_render($type, $subtype, $conf, $keywords = array(), $args = array(), $context = array(), $incoming_content = '') |
#! /usr/bin/env bash | |
# Install any build dependencies needed for curl | |
sudo apt-get build-dep curl | |
# Get latest (as of Feb 25, 2016) libcurl | |
mkdir ~/curl | |
cd ~/curl | |
wget http://curl.haxx.se/download/curl-7.50.2.tar.bz2 | |
tar -xvjf curl-7.50.2.tar.bz2 |
vendor\bin\drupal site:status | |
database:dump (dbdu) Dump structure and contents of a database | |
database:drop (dbd) Drop all tables in a given database. | |
module | |
module:dependency:install (modi) Install dependencies module in the application | |
module:download (mod) Download module or modules in application | |
module:install (moi) Install module or modules in the application | |
module:path (mop) Returns the relative path to the module (or absolute path) | |
module:uninstall (mou) Uninstall module or modules in the application | |
module:update (moup) Update core, module or modules in the application |
if (arg(0) == 'taxonomy' && arg(1) == 'term' && is_numeric(arg(2))) { | |
// Remove collection_taxonomy_term view title. | |
$term = taxonomy_term_load(arg(2)); | |
if($term->vocabulary_machine_name == 'tags') { | |
$vars['title'] = ''; | |
} | |
} |
# Install a specific version of Drush, e.g. Drush 7.1.0 | |
`<composer global require drush/drush:7.1.0>` | |
# Install master branch as a git clone. Great for contributing back to Drush project. | |
`<composer global require drush/drush:dev-master --prefer-source>` | |
Uninstall with : composer global remove drush/drush | |
Install latest stable Drush: composer global require drush/drush. | |
Verify that Drush works: drush status |