adn_share == 1) { $checked = "checked=\"checked\""; } if ($do_share->posts_only == 1) { $pchecked = "checked=\"checked\""; } if (isset($_POST['submit_adnwp_settings'])) { if (isset($_POST['share'])) { $checked = "checked=\"checked\""; $val = 1; } else { $checked = ""; $val = 0; } if (isset($_POST['posts-only'])) { $pchecked = "checked=\"checked\""; $pval = 1; } else { $pchecked = ""; $pval = 0; } save_share($val, $pval); } include ('templates/admin/_adnwpSettings.php'); } function include_share_button($content) { $share_settings = share_settings(); $share_url = get_permalink(); if (is_singular() && is_main_query()) { if ($share_settings->adn_share == 1) { if ($share_settings->posts_only == 1) { if (!is_page()) { $content .= '
'; } } else { $content .= '
'; } } } return $content; } add_filter('the_content', 'include_share_button', 10); ?>