Bump a package version
# version 1.0.0
$ npm version major # 2.0.0
$ npm version premajor # 2.0.0-0
<?php | |
/** | |
* Clean up pagination | |
*/ | |
add_filter( 'wp_pagenavi', __NAMESPACE__ . '\\gc_pagination', 10, 2 ); | |
function gc_pagination($html) { | |
$out = ''; | |
$out = str_replace('<div','',$html); | |
$out = str_replace('class=\'wp-pagenavi\'>','',$out); |
/* add below code in your theme functions.php | |
https://wordpress.org/support/topic/how-to-set-the-recaptcha-language | |
*/ | |
function custom_recaptcha_enqueue_scripts() { | |
wp_deregister_script( 'google-recaptcha' ); | |
$url = 'https://www.google.com/recaptcha/api.js'; | |
$url = add_query_arg( array( |
<?php | |
// Here is a sample of the URLs this regex matches: (there can be more content after the given URL that will be ignored) | |
// http://youtu.be/dQw4w9WgXcQ | |
// http://www.youtube.com/embed/dQw4w9WgXcQ | |
// http://www.youtube.com/watch?v=dQw4w9WgXcQ | |
// http://www.youtube.com/?v=dQw4w9WgXcQ | |
// http://www.youtube.com/v/dQw4w9WgXcQ | |
// http://www.youtube.com/e/dQw4w9WgXcQ | |
// http://www.youtube.com/user/username#p/u/11/dQw4w9WgXcQ |
IMPORTANT | |
Please duplicate this radar for a Safari fix! | |
This will clean up a 50-line workaround. | |
rdar://22376037 (https://openradar.appspot.com/radar?id=4965070979203072) | |
////////////////////////////////////////////////////////////////////////////// | |
(Now available as a standalone repo.) |
#!/bin/bash | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# | |
WP_OWNER=www-data # <-- wordpress owner | |
WP_GROUP=www-data # <-- wordpress group | |
WP_ROOT=$1 # <-- wordpress root directory |