This file contains hidden or 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
{ | |
"exclude": [ | |
".git/**", | |
"node_modules/**", | |
"bower_components/**" | |
], | |
"sort-order": [[ | |
"align-content", | |
"align-items", | |
"align-self", |
This file contains hidden or 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('wpcf7_form_elements', function($content) { | |
$content = preg_replace('/<(span).*?class="\s*(?:.*\s)?wpcf7-form-control-wrap(?:\s[^"]+)?\s*"[^\>]*>(.*)<\/\1>/i', '\2', $content); | |
return $content; | |
}); |
This file contains hidden or 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_filter( 'manage_posts_columns', 'revealid_add_id_column', 5 ); | |
add_action( 'manage_posts_custom_column', 'revealid_id_column_content', 5, 2 ); | |
function revealid_add_id_column( $columns ) { | |
$columns['revealid_id'] = 'ID'; | |
return $columns; | |
} |
This file contains hidden or 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
function vl_default_image_size () { | |
return 'full'; | |
} | |
add_filter( 'pre_option_image_default_size', 'vl_default_image_size' ); | |
function vl_default_image_settings() { | |
update_option( 'image_default_align', 'center' ); | |
update_option( 'image_default_link_type', 'none' ); | |
update_option( 'image_default_size', 'full' ); | |
} |
This file contains hidden or 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
/** Popup **/ | |
body .mfp-s-ready .ig_popup.ig_container { | |
border:1px solid transparent; | |
max-width: 740px; | |
background-color:#fff; /*Popup background color*/ | |
} | |
body .mfp-s-ready .ig_popup.ig_container .ig_message { | |
padding: 0; | |
} |
This file contains hidden or 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 | |
if(get_query_var('page')) { | |
$paged = get_query_var('page'); | |
} | |
elseif(get_query_var('paged')) { | |
$paged = get_query_var('paged'); | |
} | |
else { | |
$paged = 1; | |
} |
This file contains hidden or 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
# ----------------------------------------------------------------- | |
# ver 1.1.0 | |
# | |
# Change Log: | |
# 20160721 - First version | |
# 20171018 - error_log added | |
# ----------------------------------------------------------------- | |
# ignore all files starting with . or ~ | |
.* |
This file contains hidden or 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
function home_query( $query ){ | |
if( $query->is_home() | |
&& $query->is_main_query() ){ | |
$query->set( 'posts_per_page', 5 ); | |
} | |
} | |
add_action( 'pre_get_posts', 'home_query', 25 ); |
This file contains hidden or 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
function json_ld_article() { | |
if(is_single()) { | |
global $post; | |
$user_name = get_bloginfo('name'); | |
$article_title = get_the_title(); | |
$excerpt = get_the_excerpt(); | |
$post_author_id = (int)get_post_field( 'post_author', $post->ID ); | |
if( get_the_author_meta('display_name', $post_author_id ) != "" ) { | |
$user_name = get_the_author_meta('display_name', $post_author_id ); |
This file contains hidden or 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
function autogen_featured_img() { | |
global $post; | |
if (!has_post_thumbnail($post->ID)) { | |
$attached_image = | |
get_children( "post_parent=$post->ID&post_type=attachment&post_mime_type=image&numberposts=1" ); | |
if ($attached_image) { | |
foreach ($attached_image as $attachment_id => $attachment) { | |
set_post_thumbnail($post->ID, $attachment_id); | |
} |