Hi there, I’m adding this snippet to a hook element, but this partly breaks the site
<?php
hmk_show_matching_percentage();
?>
This is the function, which is working, but I want to control the position of it with a hook. It does not matter which hook I select, same result.
/**
* Load the matching stuff only if BuddyPress is active.
*/
function mp_bp_match_init() {
require_once('src/class.settings-api.php');
require_once('mp-settings.php');
new WeDevs_Settings_API_Match();
add_action('wp_footer', array($this, 'hmk_script'), 100);
<blockquote>Function from this line:</blockquote>
add_action('bp_profile_header_meta', array($this, 'hmk_show_matching_percentage'), 10);
add_action('bp_directory_members_item', array($this, 'hmk_matching_percentage_button'), 10);
add_shortcode( 'mp_match_percentage', array($this, 'mp_match_percentage_function'));
add_action('wp_ajax_hmk_get_percentage', array($this, 'hmk_get_percentage_function'), 100);
add_action('wp_ajax_nopriv_hmk_get_percentage', array($this, 'hmk_get_percentage_function'), 100);
}
Any idea why this code snippet
<?php
hmk_show_matching_percentage();
?>
pasted in a hook element is breaking the site?
Thanks!