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
//* Goes to Dynamik Custom - Functions. Only if you want to use Kirki, else you won´t need it | |
//* Kirki Customizer configuration | |
add_filter( 'kirki/config', 'jr_kirki_config' ); | |
function jr_kirki_config() { | |
if ( class_exists('Kirki') && is_front_page() ) { | |
$args = array( 'stylesheet_id' => 'dynamik_minified_stylesheet', ); | |
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
/* Responsive iFrame */ | |
.responsive-iframe-container { | |
position: relative; | |
padding-bottom: 56.25%; | |
padding-top: 30px; | |
height: 0; | |
overflow: hidden; | |
} | |
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
//* Count the number of widgets in a widget-area | |
function dynamik_count_sidebar_widgets( $sidebar_id ) { | |
$the_widgets = wp_get_sidebars_widgets(); | |
if( isset( $the_widgets[$sidebar_id] ) ) { | |
return count( $the_widgets[$sidebar_id] ); | |
} | |
} |
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
//* Don´t allow any comments on media attachment pages | |
function filter_media_comment_status( $open, $post_id ) { | |
$post = get_post( $post_id ); | |
if( $post->post_type == 'attachment' ) { | |
return false; | |
} | |
return $open; | |
} | |
add_filter( 'comments_open', 'filter_media_comment_status', 10 , 2 ); |
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
/* Goes to Dynamik Custom - CSS */ | |
/* Entry Header */ | |
.entry-header.one-third, | |
.entry-content.two-thirds { | |
padding-bottom: 0; | |
} | |
p.entry-meta { | |
padding-top: 15px; |
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
//* Turn Custom Code buttons in Design area colored when code in use | |
add_action('admin_head', 'admin_css'); | |
function admin_css() { | |
echo '<style> .wp-core-ui .button.custom-hilight { background: #EDFFAF; box-shadow: none; } </style>'; | |
} |
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
function remove_comment_form_allowed_tags() { | |
add_filter('comment_form_defaults','wordpress_comment_form_defaults'); | |
} | |
add_action('after_setup_theme','remove_comment_form_allowed_tags'); | |
/** | |
* @author Brad Dalton - WP Sites | |
* @learn more http://wp.me/p1lTu0-9Yd | |
*/ | |
function wordpress_comment_form_defaults($default) { | |
unset($default['comment_notes_after']); |
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
//* Setup widget counts | |
function dynamik_count_widgets( $id ) { | |
global $sidebars_widgets; | |
if ( isset( $sidebars_widgets[ $id ] ) ) { | |
return count( $sidebars_widgets[ $id ] ); | |
} | |
} |
OlderNewer