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 header_tag_analytics() { ?> | |
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXXX-XX"></script> | |
<script> | |
window.dataLayer = window.dataLayer || []; | |
function gtag(){dataLayer.push(arguments);} | |
gtag('js', new Date()); | |
gtag('config', 'UA-XXXXXXXX-XX'); | |
</script> | |
// Add your Tweeder scripts Adroll scripts Facebook scripts BounceX scripts Optimizely scripts or whatever needs to be in the head |
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 gg_gfonts_prefetch() { | |
echo '<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin>'; | |
echo '<link rel="preconnect" href="https://fonts.googleapis.com/" crossorigin>'; | |
} | |
add_action( 'wp_head', 'gg_gfonts_prefetch' ); |
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 product_desc_shortcode( $post_excerpt ) | |
{ | |
$price = do_shortcode( '[my_shortcode]' ); | |
return $price; | |
return $content; | |
} | |
add_filter('woocommerce_short_description', 'product_desc_shortcode', 10, 1); |
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 a custom tab to show user pages */ | |
add_filter('um_profile_tabs', 'pages_tab', 1000 ); | |
function pages_tab( $tabs ) { | |
$tabs['pages'] = array( | |
'name' => 'Pages', | |
'icon' => 'um-faicon-pencil', | |
'custom' => true | |
); | |
return $tabs; | |
} |
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
// Hook into user_has_cap filter. This assumes you have setup resumes to require the capability 'has_active_job_package' | |
add_filter( 'user_has_cap', 'has_active_job_package_capability_check', 10, 3 ); | |
/** | |
* has_active_job_package_capability_check() | |
* | |
* Filter on the current_user_can() function. | |
* | |
* @param array $allcaps All the capabilities of the user | |
* @param array $cap [0] Required capability |
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_action('load-users.php',function() { | |
if(isset($_GET['action']) && isset($_GET['bp_gid']) && isset($_GET['users'])) { | |
$group_id = $_GET['bp_gid']; | |
$users = $_GET['users']; | |
foreach ($users as $user_id) { | |
groups_join_group( $group_id, $user_id ); | |
} |