function get_shr_like_buttonset($position) { $trace = debug_backtrace(); $deprecation = new ShareaholicDeprecation('get_shr_like_buttonset'); $deprecation->push($trace[0]['file'], $trace[0]['line']); $settings = ShareaholicUtilities::get_settings(); $page_type = ShareaholicUtilities::page_type(); switch ($position) { case 'Top': $id = isset($settings['location_name_ids']["{$page_type}_above_content"]) ? $settings['location_name_ids']["{$page_type}_above_content"] : NULL; break; case 'Bottom': $id = isset($settings['location_name_ids']["{$page_type}_below_content"]) ? $settings['location_name_ids']["{$page_type}_below_content"] : NULL; break; } echo ShareaholicPublic::canvas($id, 'share_buttons'); }
/** * The function called during the wp_head action. The * rest of the plugin doesn't need to know exactly what happens. */ public static function wp_head() { // this will only run on pages that would actually call // the deprecated functions. For some reason I could not // get this function to run using a hook, though that // should not discourage anyone in the future. -DG ShareaholicDeprecation::destroy_all(); self::script_tag(); self::shareaholic_tags(); self::draw_og_tags(); }
/** * Checks for any deprecations and then shows them * to the end user. */ private static function draw_deprecation_warnings() { $deprecations = ShareaholicDeprecation::all(); if (!empty($deprecations)) { ShareaholicUtilities::load_template('deprecation_warnings', array('deprecation_warnings' => $deprecations)); } }