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
/** | |
* See: http://www.wpallimport.com/documentation/advanced/action-reference/ | |
*/ | |
//Prevent auto indexing before first import | |
function drl_before_opleidingen_import($import_id) { | |
if( $import_id === 4) { | |
add_filter( 'searchwp_auto_reindex', '__return_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
"core/heading":{ | |
"typography":{ | |
"fontWeight":"700" | |
}, | |
"spacing":{ | |
"margin":{ | |
"top":"0", | |
"bottom":"1.25rem" | |
} | |
}, |
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
// Extra big for Twitter Bootstrap | |
@media screen and (min-width: 1400px) { | |
.container { | |
width: 1370px; | |
} | |
} | |
@media screen and (min-width: 1600px) { | |
.container { | |
width: 1570px; |
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 | |
/** | |
* Add span to menu items with icon class so we can hide the text and show icons instead | |
* | |
* @link http://codex.wordpress.org/Function_Reference/wp_get_nav_menu_items | |
*/ | |
add_filter( 'walker_nav_menu_start_el', 'hrt_span_to_nav_menu', 10, 4 ); | |
function hrt_span_to_nav_menu( $item_output, $item, $depth, $args ) { | |
if ( isset( $item->classes ) && !empty( $item->classes ) ) { |
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 | |
// Move Yoast Metabox to bottom of edit screen | |
function move_yoast_to_bottom() { | |
return 'low'; | |
} | |
add_filter( 'wpseo_metabox_prio', __NAMESPACE__ . '\move_yoast_to_bottom'); |
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 | |
/** | |
* Extract colors from a CSS or Sass file | |
* | |
* @param string $path the path to your CSS variables file | |
*/ | |
function get_colors( $path ) { | |
$dir = get_stylesheet_directory(); | |
if ( file_exists( $dir . $path ) ) { |
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 | |
/** | |
* Custom admin functions | |
*/ | |
namespace Projectname; | |
// Move Pages above Media | |
function change_menu_order( $menu_order ) { | |
return array( |
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 | |
// WP_User_Query arguments | |
$args = array( | |
'role' => 'subscriber', | |
'number' => '10', | |
'order' => 'ASC', | |
'orderby' => 'id', | |
); | |
// The User Query |
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 | |
/** | |
* Custom hooks & filters for GravityForms | |
*/ | |
namespace ProjectName; | |
/** | |
* Show zip-field before city field | |
* @link https://docs.gravityforms.com/gform_address_display_format/#examples |
NewerOlder