This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd C:\laragon\usr\bin && curl -L -O https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && echo @ECHO OFF > wp.bat && echo php "%~dp0wp-cli.phar" %* >> wp.bat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "test-plugin-wpcs", | |
"description": "Plugin with WPCS", | |
"authors": [ | |
{ | |
"name": "Author", | |
"email": "[email protected]" | |
} | |
], | |
"require": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'init', function() { | |
// Add field: | |
add_action( 'add_meta_boxes', function() { | |
add_meta_box( | |
'my_meta_box', | |
'My Meta Box', | |
function( $post ) { | |
wp_nonce_field( __FILE__, '_my_data_nonce' ); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set /p domain="Enter Domain: " | |
set OPENSSL_CONF=../conf/openssl.cnf | |
if not exist .\%domain% mkdir .\%domain% | |
..\bin\openssl req -config cert.conf -new -sha256 -newkey rsa:2048 -nodes -keyout %domain%\server.key -x509 -days 3650 -out %domain%\server.crt | |
echo. | |
echo ----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ req ] | |
default_bits = 2048 | |
default_keyfile = server-key.pem | |
distinguished_name = subject | |
req_extensions = req_ext | |
x509_extensions = x509_ext | |
string_mask = utf8only | |
[ subject ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'wp_footer', function() { | |
?> | |
<script> | |
jQuery( document ).ready( function($) { | |
// Add custom locate me button. | |
$( '.search_location' ).append( '<i class="locate-me-too"></i>' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return array( | |
'post_type' => 'job_listing', | |
'orderby' => array( 'menu_order' => 'ASC', 'date' => 'DESC' ), | |
'order' => 'asc', | |
'post_status' => 'publish' | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Change The Location Fields to "Address" | |
* | |
* @link https://gist.github.com/turtlepod/e05053729577fdbf2daa604bb32271b7 | |
*/ | |
add_action( 'init', function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Filter registered facets. | |
add_filter( 'facetwp_facets', function( $facets ) { | |
/** | |
* Loop each facets. | |
* Listify facets are "keyword", "location", and "category" | |
*/ | |
foreach ( $facets as $index => $facet ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add Category List To Listing Data. | |
* | |
* @link https://gist.github.com/turtlepod/0642d19439de6b96da06342619ed705a | |
*/ | |
add_filter( 'listify_get_listing_to_array', function( $data, $listing ) { |
NewerOlder