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 | |
/// | |
// Functions Called From Init | |
/// | |
public function CheckForTermOrderColumn() | |
{ | |
global $wpdb; |
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
add_action( 'plugins_loaded', 'jetpack_sharedaddy' ); | |
function jetpack_sharedaddy() { | |
if ( class_exists( 'Jetpack' ) && | |
method_exists( 'Jetpack', 'get_active_modules' ) && | |
in_array( 'sharedaddy', Jetpack::get_active_modules() ) ) { | |
/* | |
* we need to control where sharedaddy modules show up | |
*/ |
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
/** | |
* For developers: WordPress debugging mode. | |
* | |
* Change this to true to enable the display of notices during development. | |
* It is strongly recommended that plugin and theme developers use WP_DEBUG | |
* in their development environments. | |
*/ | |
define('WP_DEBUG', false); |
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
add_filter( 'wp_get_nav_menu_items', 'hide_non_published_menu_items', 10, 3 ); | |
function hide_non_published_menu_items( $items, $menu, $args ) { | |
if ( $items ) { | |
foreach( $items as $k => $item ) { | |
// use $item->post_type if you want to apply this to custom post types | |
switch( $item->object ) { | |
case 'page': | |
case 'post': |
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 | |
// $buffer contains the HTML generated | |
$extracted = array(); | |
$pattern = "#<iframe[^>]+>.*?</iframe>#is"; | |
preg_match_all($pattern, $buffer, $matches); | |
if ( $matches ) { |
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
-- Error Message: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. | |
-- | |
-- our table name that has this issue is XYZ | |
-- | |
SET GLOBAL innodb_file_format=Barracuda; | |
SET GLOBAL innodb_file_per_table=ON; | |
ALTER TABLE XYZ ROW_FORMAT=COMPRESSED; |
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
{ | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": "s3:*", | |
"Resource": ["arn:aws:s3:::{YOUR-BUCKET-NAME-WITHOUT-BRACES}/*"] | |
}, | |
{ | |
"Effect": "Allow", | |
"Action": [ "s3:ListAllMyBuckets", "s3:PutObject" ], |
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
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
log_format main '[$time_local] $remote_addr - $remote_user - $server_name to: $upstream_addr: $request upstream_response_time $upstream_response_time msec $msec request_time $request_time status $status bytes $body_bytes_sent'; | |
#Uncomment to debug rewrite rules |
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
### Keybase proof | |
I hereby claim: | |
* I am tonykwon on github. | |
* I am tonykwon (https://keybase.io/tonykwon) on keybase. | |
* I have a public key whose fingerprint is 3201 DB4F 8210 4CF0 B74E 5712 B1D3 5CAB 31F1 4372 | |
To claim this, I am signing this object: |
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
# global | |
global $wpseo_admin; | |
# this removes when editing 'YOUR PROFILE' | |
remove_action( 'show_user_profile', array( $wpseo_admin, 'user_profile' ) ); | |
# this removes when editing 'EDIT PROFILE' | |
remove_action( 'edit_user_profile', array( $wpseo_admin, 'user_profile' ) ); |
OlderNewer