xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.var_display_max_depth = -1
xdebug.var_display_max_children = -1
xdebug.var_display_max_data = -1
xdebug.idekey = "PHPSTORM"
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
... | |
client_max_body_size 256M; | |
#gzip on; | |
server { | |
listen 80; | |
server_name localhost; | |
root html; |
I have ACF fields on my post/page screens which add advance content fields, so it updates the post_content
field with correct html formatting.
If you remove the first $post_type === ...
conditional check, it would cause Algolia to not update it's task content which is obvious that this hook will run for every post type
functions.php
<?php
rsync -azP -e 'ssh -i /path/to/id_rsa_private_key' /files/source destination_host_user@111.111.111.111:/destination/path
Be sure to add ssh-add /path/to/id_rsa_private_key
-a
It stands for "archive" and syncs recursively and preserves symbolic links, special and device files, modification times, group, owner, and permissions.
Create a file /etc/nginx/global/wordpress.conf
and paste the following content:
# WordPress single site rules.
# Designed to be included in any server {} block.
# This order might seem weird - this is attempted to match last if rules below fail.
# http://wiki.nginx.org/HttpCoreModule
location / {
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
*~ | |
.DS_Store | |
.svn | |
.cvs | |
*.bak | |
*.swp | |
Thumbs.db | |
.idea/ | |
# wordpress specific |
calc () {
bc -l <<< "$@"
}
Example usage:
$ calc 65320/670
97.49253731343283582089
$ calc 65320*670
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 | |
/* | |
Plugin Name: Easy Digital Downloads - Sort archive by number of sales | |
*/ | |
function jp_sort_downloads_archive( $query ) { | |
if ( is_post_type_archive( 'download' ) && $query->is_main_query() ) { | |
$query->set( 'meta_key', '_edd_download_sales' ); | |
$query->set( 'orderby', 'meta_value_num' ); | |
$query->set( 'order', 'DESC' ); | |
} |