function A2A_SUBSCRIBE_options_page() { global $A2A_SUBSCRIBE_plugin_url_path; if (isset($_POST['Submit'])) { // Nonce verification check_admin_referer('add-to-any-subscribe-update-options'); update_option('A2A_SUBSCRIBE_hide_embeds', $_POST['A2A_SUBSCRIBE_hide_embeds'] == '1' ? '1' : '-1'); update_option('A2A_SUBSCRIBE_show_title', $_POST['A2A_SUBSCRIBE_show_title'] == '1' ? '1' : '-1'); update_option('A2A_SUBSCRIBE_onclick', $_POST['A2A_SUBSCRIBE_onclick'] == '1' ? '1' : '-1'); update_option('A2A_SUBSCRIBE_button_opens_new_window', $_POST['A2A_SUBSCRIBE_button_opens_new_window'] == '1' ? '1' : '-1'); update_option('A2A_SUBSCRIBE_button', $_POST['A2A_SUBSCRIBE_button']); update_option('A2A_SUBSCRIBE_button_custom', $_POST['A2A_SUBSCRIBE_button_custom']); update_option('A2A_SUBSCRIBE_additional_js_variables', trim($_POST['A2A_SUBSCRIBE_additional_js_variables'])); // Store desired text if 16 x 16px button or text-only is chosen: if (get_option('A2A_SUBSCRIBE_button') == 'subscribe_16_16.png|16|16') { update_option('A2A_SUBSCRIBE_button_text', $_POST['A2A_SUBSCRIBE_button_subscribe_16_16_text']); } else { update_option('A2A_SUBSCRIBE_button_text', trim($_POST['A2A_SUBSCRIBE_button_text']) != '' ? $_POST['A2A_SUBSCRIBE_button_text'] : "Subscribe"); } ?> <div class="updated fade"><p><strong><?php _e('Settings saved.'); ?> </strong></p></div> <?php } ?> <?php A2A_wp_footer_check(); ?> <div class="wrap"> <h2><?php _e('AddToAny Subscribe Settings', 'add-to-any-subscribe'); ?> </h2> <form method="post" action=""> <?php wp_nonce_field('add-to-any-subscribe-update-options'); ?> <table class="form-table"> <tr valign="top"> <th scope="row"><?php _e("Button", "add-to-any-subscribe"); ?> </th> <td><fieldset> <label> <input name="A2A_SUBSCRIBE_button" value="subscribe_16_16.png|16|16" type="radio"<?php if (get_option('A2A_SUBSCRIBE_button') == 'subscribe_16_16.png|16|16') { echo ' checked="checked"'; } ?> style="margin:9px 0;vertical-align:middle"> <img src="<?php echo $A2A_SUBSCRIBE_plugin_url_path . '/subscribe_16_16.png'; ?> " width="16" height="16" border="0" style="padding:9px;vertical-align:middle" alt="+ Subscribe" title="+ Subscribe" onclick="this.parentNode.firstChild.checked=true"/> </label> <input name="A2A_SUBSCRIBE_button_subscribe_16_16_text" class="code" type="text" size="50" onclick="e=document.getElementsByName('A2A_SUBSCRIBE_button');e[e.length-6].checked=true" style="vertical-align:middle;width:150px" value="<?php echo get_option('A2A_SUBSCRIBE_button_text') !== FALSE ? stripslashes(get_option('A2A_SUBSCRIBE_button_text')) : "Subscribe"; ?> " /><br> <label> <input name="A2A_SUBSCRIBE_button" value="subscribe_120_16.png|120|16" type="radio"<?php if (!get_option('A2A_SUBSCRIBE_button') || get_option('A2A_SUBSCRIBE_button') == 'subscribe_120_16.png|120|16') { echo ' checked="checked"'; } ?> style="margin:9px 0;vertical-align:middle"> <img src="<?php echo $A2A_SUBSCRIBE_plugin_url_path . '/subscribe_120_16.png'; ?> " width="120" height="16" border="0" style="padding:9px;vertical-align:middle" onclick="this.parentNode.firstChild.checked=true"/> </label><br> <label> <input name="A2A_SUBSCRIBE_button" value="subscribe_171_16.png|171|16" type="radio"<?php if (get_option('A2A_SUBSCRIBE_button') == 'subscribe_171_16.png|171|16') { echo ' checked="checked"'; } ?> style="margin:9px 0;vertical-align:middle"> <img src="<?php echo $A2A_SUBSCRIBE_plugin_url_path . '/subscribe_171_16.png'; ?> " width="171" height="16" border="0" style="padding:9px;vertical-align:middle" onclick="this.parentNode.firstChild.checked=true"/> </label><br> <label> <input name="A2A_SUBSCRIBE_button" value="subscribe_256_24.png|256|24" type="radio"<?php if (get_option('A2A_SUBSCRIBE_button') == 'subscribe_256_24.png|256|24') { echo ' checked="checked"'; } ?> style="margin:9px 0;vertical-align:middle"> <img src="<?php echo $A2A_SUBSCRIBE_plugin_url_path . '/subscribe_256_24.png'; ?> " width="256" height="24" border="0" style="padding:9px;vertical-align:middle" onclick="this.parentNode.firstChild.checked=true"/> </label><br> <label> <input name="A2A_SUBSCRIBE_button" value="CUSTOM" type="radio"<?php if (get_option('A2A_SUBSCRIBE_button') == 'CUSTOM') { echo ' checked="checked"'; } ?> style="margin:9px 0;vertical-align:middle"> <span style="margin:0 9px;vertical-align:middle"><?php _e("Image URL"); ?> :</span> </label> <input name="A2A_SUBSCRIBE_button_custom" type="text" class="code" size="50" onclick="e=document.getElementsByName('A2A_SUBSCRIBE_button');e[e.length-2].checked=true" style="vertical-align:middle" value="<?php echo get_option('A2A_SUBSCRIBE_button_custom'); ?> " /><br> <label> <input name="A2A_SUBSCRIBE_button" value="TEXT" type="radio"<?php if (get_option('A2A_SUBSCRIBE_button') == 'TEXT') { echo ' checked="checked"'; } ?> style="margin:9px 0;vertical-align:middle"> <span style="margin:0 9px;vertical-align:middle"><?php _e("Text only"); ?> :</span> </label> <input name="A2A_SUBSCRIBE_button_text" type="text" class="code" size="50" onclick="e=document.getElementsByName('A2A_SUBSCRIBE_button');e[e.length-1].checked=true" style="vertical-align:middle" value="<?php echo trim(get_option('A2A_SUBSCRIBE_button_text')) != '' ? stripslashes(get_option('A2A_SUBSCRIBE_button_text')) : "Subscribe"; ?> " /> </fieldset></td> </tr> <tr valign="top"> <th scope="row"><?php _e("Button Placement", "add-to-any-subscribe"); ?> </th> <td><fieldset> <p><?php _e("If you are using a widget-ready theme, you can use the <a href=\"widgets.php\">widgets page</a> to place the button where you want in your sidebar.", "add-to-any-subscribe"); ?> </p> <p><a href="widgets.php" class="button-secondary"><?php _e("Open Widgets Panel", "add-to-any-subscribe"); ?> </a></p> <p><?php _e("Alternatively, you can place the following code in <a href=\"theme-editor.php\">your template pages</a> (within <code>sidebar.php</code>, <code>index.php</code>, <code>single.php</code>, and/or <code>page.php</code>)", "add-to-any-subscribe"); ?> :<br/> <code><?php if ( class_exists( 'Add_to_Any_Subscribe_Widget' ) ) { Add_to_Any_Subscribe_Widget::display(); } ?></code></p> </fieldset></td> </tr> <tr valign="top"> <th scope="row"><?php _e("Menu Style", "add-to-any-subscribe"); ?> </th> <td><fieldset> <p><?php _e("Using AddToAny's Menu Styler, you can customize the colors of your Subscribe menu! When you're done, be sure to paste the generated code in the <a href=\"#\" onclick=\"document.getElementById('A2A_SUBSCRIBE_additional_js_variables').focus();return false\">Additional Options</a> box below.", "add-to-any-subscribe"); ?> </p> <p> <a href="http://www.addtoany.com/buttons/subscribe/menu_style/wordpress" class="button-secondary" title="<?php _e("Open the AddToAny Menu Styler in a new window", "add-to-any-subscribe"); ?> " target="_blank" onclick="document.getElementById('A2A_SUBSCRIBE_additional_js_variables').focus(); document.getElementById('A2A_SUBSCRIBE_menu_styler_note').style.display='';"><?php _e("Open Menu Styler", "add-to-any-subscribe"); ?> </a> </p> </fieldset></td> </tr> <tr valign="top"> <th scope="row"><?php _e("Menu Options", "add-to-any-subscribe"); ?> </th> <td><fieldset> <label> <input name="A2A_SUBSCRIBE_show_title" type="checkbox"<?php if (get_option('A2A_SUBSCRIBE_show_title') == '1') { echo ' checked="checked"'; } ?> value="1"/> <?php _e("Show the title of this site within the menu", "add-to-any-subscribe"); ?> </label><br /> <label> <input name="A2A_SUBSCRIBE_onclick" type="checkbox"<?php if (get_option('A2A_SUBSCRIBE_onclick') == '1') { echo ' checked="checked"'; } ?> value="1" onclick="e=getElementsByName('A2A_SUBSCRIBE_button_opens_new_window')[0];if (this.checked){e.checked=false;e.disabled=true}else{e.disabled=false}" onchange="e=getElementsByName('A2A_SUBSCRIBE_button_opens_new_window')[0];if (this.checked){e.checked=false;e.disabled=true}else{e.disabled=false}"/> <?php _e("Only show the menu when the user clicks the Subscribe button", "add-to-any-subscribe"); ?> </label><br /> <label> <input name="A2A_SUBSCRIBE_button_opens_new_window" type="checkbox"<?php if (get_option('A2A_SUBSCRIBE_button_opens_new_window') == '1') { echo ' checked="checked"'; } ?> value="1" <?php if (get_option('A2A_SUBSCRIBE_onclick') == '1') { echo ' disabled="disabled"'; } ?> /> <?php _e('Open the addtoany.com menu page in a new tab or window if the user clicks the Subscribe button', 'add-to-any-subscribe'); ?> </label> </fieldset></td> </tr> <tr valign="top"> <th scope="row"><?php _e("Additional Options", "add-to-any-subscribe"); ?> </th> <td><fieldset> <p id="A2A_SUBSCRIBE_menu_styler_note" style="display:none"> <label for="A2A_SUBSCRIBE_additional_js_variables" class="updated"> <strong><?php _e("Paste the code from AddToAny's Menu Styler in the box below!", "add-to-any-subscribe"); ?> </strong> </label> </p> <label for="A2A_SUBSCRIBE_additional_js_variables"> <p><?php _e("Below you can set special JavaScript variables to apply to your Subscribe menu.", "add-to-any-subscribe"); ?> <?php _e("Advanced users might want to explore AddToAny's <a href=\"http://www.addtoany.com/buttons/api/\" target=\"_blank\">JavaScript API</a>.", "add-to-any-subscribe"); ?> </p> </label> <p> <textarea name="A2A_SUBSCRIBE_additional_js_variables" id="A2A_SUBSCRIBE_additional_js_variables" class="code" style="width: 98%; font-size: 12px;" rows="5" cols="50"><?php echo stripslashes(get_option('A2A_SUBSCRIBE_additional_js_variables')); ?> </textarea> </p> <?php if (get_option('A2A_SUBSCRIBE_additional_js_variables') != '') { ?> <label for="A2A_SUBSCRIBE_additional_js_variables" class="setting-description"><?php _e("<strong>Note</strong>: If you're adding new code, be careful not to accidentally overwrite any previous code.", "add-to-any-subscribe"); ?> </label> <?php } ?> </fieldset></td> </tr> </table> <p class="submit"> <input class="button-primary" type="submit" name="Submit" value="<?php _e('Save Changes', 'add-to-any-subscribe'); ?> " /> </p> </form> </div> <?php }
function A2A_SHARE_SAVE_options_page() { global $A2A_SHARE_SAVE_plugin_url_path, $A2A_SHARE_SAVE_services; if ($_POST['A2A_SHARE_SAVE_submit_hidden'] == 'Y') { update_option('A2A_SHARE_SAVE_display_in_posts_on_front_page', $_POST['A2A_SHARE_SAVE_display_in_posts_on_front_page'] == '1' ? '1' : '-1'); update_option('A2A_SHARE_SAVE_display_in_posts', $_POST['A2A_SHARE_SAVE_display_in_posts'] == '1' ? '1' : '-1'); update_option('A2A_SHARE_SAVE_display_in_pages', $_POST['A2A_SHARE_SAVE_display_in_pages'] == '1' ? '1' : '-1'); update_option('A2A_SHARE_SAVE_display_in_feed', $_POST['A2A_SHARE_SAVE_display_in_feed'] == '1' ? '1' : '-1'); update_option('A2A_SHARE_SAVE_hide_embeds', $_POST['A2A_SHARE_SAVE_hide_embeds'] == '1' ? '1' : '-1'); update_option('A2A_SHARE_SAVE_show_title', $_POST['A2A_SHARE_SAVE_show_title'] == '1' ? '1' : '-1'); update_option('A2A_SHARE_SAVE_onclick', $_POST['A2A_SHARE_SAVE_onclick'] == '1' ? '1' : '-1'); update_option('A2A_SHARE_SAVE_button_opens_new_window', $_POST['A2A_SHARE_SAVE_button_opens_new_window'] == '1' ? '1' : '-1'); update_option('A2A_SHARE_SAVE_button', $_POST['A2A_SHARE_SAVE_button']); update_option('A2A_SHARE_SAVE_button_custom', $_POST['A2A_SHARE_SAVE_button_custom']); update_option('A2A_SHARE_SAVE_additional_js_variables', trim($_POST['A2A_SHARE_SAVE_additional_js_variables'])); // Store desired text if 16 x 16px buttons or text-only is chosen: if (get_option('A2A_SHARE_SAVE_button') == 'favicon.png|16|16') { update_option('A2A_SHARE_SAVE_button_text', $_POST['A2A_SHARE_SAVE_button_favicon_16_16_text']); } elseif (get_option('A2A_SHARE_SAVE_button') == 'share_16_16.png|16|16') { update_option('A2A_SHARE_SAVE_button_text', $_POST['A2A_SHARE_SAVE_button_share_16_16_text']); } else { update_option('A2A_SHARE_SAVE_button_text', trim($_POST['A2A_SHARE_SAVE_button_text']) != '' ? $_POST['A2A_SHARE_SAVE_button_text'] : "Share/Save"); } // Store chosen individual services to make active $active_services = array(); if (!$_POST['A2A_SHARE_SAVE_active_services']) { $_POST['A2A_SHARE_SAVE_active_services'] = array(); } foreach ($_POST['A2A_SHARE_SAVE_active_services'] as $dummy => $sitename) { $active_services[] = substr($sitename, 7); } update_option('A2A_SHARE_SAVE_active_services', $active_services); // Delete then re-add to ensure sorting works (re-sorting doesn't effect associated array equality in PHP so update doesn't hit the dB for identical arrays delete_option('A2A_SHARE_SAVE_active_services', $active_services); add_option('A2A_SHARE_SAVE_active_services', $active_services); ?> <div class="updated fade"><p><strong><?php _e('Settings saved.'); ?> </strong></p></div> <?php } ?> <?php A2A_wp_footer_check(); ?> <div class="wrap"> <h2><?php _e('Add to Any: Share/Save ', 'add-to-any') . _e('Settings'); ?> </h2> <form method="post" action=""> <?php wp_nonce_field('update-options'); ?> <input type="hidden" name="A2A_SHARE_SAVE_submit_hidden" value="Y"> <table class="form-table"> <tr valign="top"> <th scope="row"><?php _e("Standalone Services", "add-to-any"); ?> </th> <td><fieldset> <ul id="addtoany_services_sortable" class="addtoany_admin_list"> <li class="dummy"><img src="<?php echo $A2A_SHARE_SAVE_plugin_url_path; ?> /icons/transparent.gif" width="16" height="16" alt="" /></li> </ul> <p id="addtoany_services_info"><?php _e("Choose the services you want below. Click a chosen service again to remove. Reorder services by dragging and dropping as they appear above.", "add-to-any"); ?> </p> <ul id="addtoany_services_selectable" class="addtoany_admin_list"> <?php // Show all services $active_services = get_option('A2A_SHARE_SAVE_active_services'); if (!$active_services) { $active_services = array(); } foreach ($A2A_SHARE_SAVE_services as $service_safe_name => $site) { ?> <li id="a2a_wp_<?php echo $service_safe_name; ?> " title="<?php echo $site['name']; ?> "> <span><img src="<?php echo $A2A_SHARE_SAVE_plugin_url_path . '/icons/' . $site['icon']; ?> .png" width="16" height="16" alt="" /><?php echo $site['name']; ?> </span> </li> <?php } ?> </ul> </fieldset></td> </tr> <tr valign="top"> <th scope="row"><?php _e("Button", "add-to-any"); ?> </th> <td><fieldset> <label> <input name="A2A_SHARE_SAVE_button" value="favicon.png|16|16" type="radio"<?php if (get_option('A2A_SHARE_SAVE_button') == 'favicon.png|16|16') { echo ' checked="checked"'; } ?> style="margin:9px 0;vertical-align:middle"> <img src="<?php echo $A2A_SHARE_SAVE_plugin_url_path . '/favicon.png'; ?> " width="16" height="16" border="0" style="padding:9px;vertical-align:middle" alt="+ Share/Save" title="+ Share/Save" onclick="this.parentNode.firstChild.checked=true"/> </label> <input name="A2A_SHARE_SAVE_button_favicon_16_16_text" type="text" class="code" size="50" onclick="e=document.getElementsByName('A2A_SHARE_SAVE_button');e[e.length-7].checked=true" style="vertical-align:middle;width:150px" value="<?php echo get_option('A2A_SHARE_SAVE_button_text') !== FALSE ? stripslashes(get_option('A2A_SHARE_SAVE_button_text')) : "Share/Save"; ?> " /> <label style="padding-left:9px"> <input name="A2A_SHARE_SAVE_button" value="share_16_16.png|16|16" type="radio"<?php if (get_option('A2A_SHARE_SAVE_button') == 'share_16_16.png|16|16') { echo ' checked="checked"'; } ?> style="margin:9px 0;vertical-align:middle"> <img src="<?php echo $A2A_SHARE_SAVE_plugin_url_path . '/share_16_16.png'; ?> " width="16" height="16" border="0" style="padding:9px;vertical-align:middle" alt="+ Share/Save" title="+ Share/Save" onclick="this.parentNode.firstChild.checked=true"/> </label> <input name="A2A_SHARE_SAVE_button_share_16_16_text" type="text" class="code" size="50" onclick="e=document.getElementsByName('A2A_SHARE_SAVE_button');e[e.length-6].checked=true" style="vertical-align:middle;width:150px" value="<?php echo get_option('A2A_SHARE_SAVE_button_text') !== FALSE ? stripslashes(get_option('A2A_SHARE_SAVE_button_text')) : "Share/Save"; ?> " /><br> <label> <input name="A2A_SHARE_SAVE_button" value="share_save_120_16.png|120|16" type="radio"<?php if (get_option('A2A_SHARE_SAVE_button') == 'share_save_120_16.png|120|16') { echo ' checked="checked"'; } ?> style="margin:9px 0;vertical-align:middle"> <img src="<?php echo $A2A_SHARE_SAVE_plugin_url_path . '/share_save_120_16.png'; ?> " width="120" height="16" border="0" style="padding:9px;vertical-align:middle" onclick="this.parentNode.firstChild.checked=true"/> </label><br> <label> <input name="A2A_SHARE_SAVE_button" value="share_save_171_16.png|171|16" type="radio"<?php if (!get_option('A2A_SHARE_SAVE_button') || get_option('A2A_SHARE_SAVE_button') == 'share_save_171_16.png|171|16') { echo ' checked="checked"'; } ?> style="margin:9px 0;vertical-align:middle"> <img src="<?php echo $A2A_SHARE_SAVE_plugin_url_path . '/share_save_171_16.png'; ?> " width="171" height="16" border="0" style="padding:9px;vertical-align:middle" onclick="this.parentNode.firstChild.checked=true"/> </label><br> <label> <input name="A2A_SHARE_SAVE_button" value="share_save_256_24.png|256|24" type="radio"<?php if (get_option('A2A_SHARE_SAVE_button') == 'share_save_256_24.png|256|24') { echo ' checked="checked"'; } ?> style="margin:9px 0;vertical-align:middle"> <img src="<?php echo $A2A_SHARE_SAVE_plugin_url_path . '/share_save_256_24.png'; ?> " width="256" height="24" border="0" style="padding:9px;vertical-align:middle" onclick="this.parentNode.firstChild.checked=true"/> </label><br> <label> <input name="A2A_SHARE_SAVE_button" value="CUSTOM" type="radio"<?php if (get_option('A2A_SHARE_SAVE_button') == 'CUSTOM') { echo ' checked="checked"'; } ?> style="margin:9px 0;vertical-align:middle"> <span style="margin:0 9px;vertical-align:middle"><?php _e("Image URL"); ?> :</span> </label> <input name="A2A_SHARE_SAVE_button_custom" type="text" class="code" size="50" onclick="e=document.getElementsByName('A2A_SHARE_SAVE_button');e[e.length-2].checked=true" style="vertical-align:middle" value="<?php echo get_option('A2A_SHARE_SAVE_button_custom'); ?> " /><br> <label> <input name="A2A_SHARE_SAVE_button" value="TEXT" type="radio"<?php if (get_option('A2A_SHARE_SAVE_button') == 'TEXT') { echo ' checked="checked"'; } ?> style="margin:9px 0;vertical-align:middle"> <span style="margin:0 9px;vertical-align:middle"><?php _e("Text only"); ?> :</span> </label> <input name="A2A_SHARE_SAVE_button_text" type="text" class="code" size="50" onclick="e=document.getElementsByName('A2A_SHARE_SAVE_button');e[e.length-1].checked=true" style="vertical-align:middle;width:150px" value="<?php echo trim(get_option('A2A_SHARE_SAVE_button_text')) != '' ? stripslashes(get_option('A2A_SHARE_SAVE_button_text')) : "Share/Save"; ?> " /> </fieldset></td> </tr> <tr valign="top"> <th scope="row"><?php _e('Placement', 'add-to-any'); ?> </th> <td><fieldset> <label> <input name="A2A_SHARE_SAVE_display_in_posts" onclick="e=getElementsByName('A2A_SHARE_SAVE_display_in_posts_on_front_page')[0];f=getElementsByName('A2A_SHARE_SAVE_display_in_feed')[0]; if(!this.checked){e.checked=false;e.disabled=true; f.checked=false;f.disabled=true}else{e.checked=true;e.disabled=false; f.checked=true;f.disabled=false}" onchange="e=getElementsByName('A2A_SHARE_SAVE_display_in_posts_on_front_page')[0];f=getElementsByName('A2A_SHARE_SAVE_display_in_feed')[0]; if(!this.checked){e.checked=false;e.disabled=true; f.checked=false;f.disabled=true}else{e.checked=true;e.disabled=false; f.checked=true;f.disabled=false}" type="checkbox"<?php if (get_option('A2A_SHARE_SAVE_display_in_posts') != '-1') { echo ' checked="checked"'; } ?> value="1"/> <?php _e('Display Share/Save button at the bottom of posts', 'add-to-any'); ?> <strong>*</strong> </label><br/> <label> <input name="A2A_SHARE_SAVE_display_in_posts_on_front_page" type="checkbox"<?php if (get_option('A2A_SHARE_SAVE_display_in_posts_on_front_page') != '-1') { echo ' checked="checked"'; } if (get_option('A2A_SHARE_SAVE_display_in_posts') == '-1') { echo ' disabled="disabled"'; } ?> value="1"/> <?php _e('Display Share/Save button at the bottom of posts on the front page', 'add-to-any'); ?> </label><br/> <label> <input name="A2A_SHARE_SAVE_display_in_feed" type="checkbox"<?php if (get_option('A2A_SHARE_SAVE_display_in_feed') != '-1') { echo ' checked="checked"'; } if (get_option('A2A_SHARE_SAVE_display_in_posts') == '-1') { echo ' disabled="disabled"'; } ?> value="1"/> <?php _e('Display Share/Save button at the bottom of posts in the feed', 'add-to-any'); ?> </label><br/> <label> <input name="A2A_SHARE_SAVE_display_in_pages" type="checkbox"<?php if (get_option('A2A_SHARE_SAVE_display_in_pages') != '-1') { echo ' checked="checked"'; } ?> value="1"/> <?php _e('Display Share/Save button at the bottom of pages', 'add-to-any'); ?> </label> <br/><br/> <div class="setting-description"> <strong>*</strong> <?php _e("If unchecked, be sure to place the following code in <a href=\"theme-editor.php\">your template pages</a> (within <code>index.php</code>, <code>single.php</code>, and/or <code>page.php</code>)", "add-to-any"); ?> : <span id="addtoany_show_template_button_code" class="button-secondary">»</span> <div id="addtoany_template_button_code"> <code><?php echo '<ul class="addtoany_list">'; if( function_exists('ADDTOANY_SHARE_SAVE_ICONS') ) ADDTOANY_SHARE_SAVE_ICONS( array("html_wrap_open" => "<li>", "html_wrap_close" => "</li>") ); if( function_exists('ADDTOANY_SHARE_SAVE_BUTTON') ) ADDTOANY_SHARE_SAVE_BUTTON( array("html_wrap_open" => "<li>", "html_wrap_close" => "</li>") ); echo '</ul>'; ?></code> </div> <noscript<code><?php echo '<ul class="addtoany_list">'; if( function_exists('ADDTOANY_SHARE_SAVE_ICONS') ) ADDTOANY_SHARE_SAVE_ICONS( array("html_wrap_open" => "<li>", "html_wrap_close" => "</li>") ); if( function_exists('ADDTOANY_SHARE_SAVE_BUTTON') ) ADDTOANY_SHARE_SAVE_BUTTON( array("html_wrap_open" => "<li>", "html_wrap_close" => "</li>") ); echo '</ul>'; ?></code></noscript> </div> </fieldset></td> </tr> <tr valign="top"> <th scope="row"><?php _e('Menu Style', 'add-to-any'); ?> </th> <td><fieldset> <p><?php _e("Using Add to Any's Menu Styler, you can customize the colors of your Share/Save menu! When you're done, be sure to paste the generated code in the <a href=\"#\" onclick=\"document.getElementById('A2A_SHARE_SAVE_additional_js_variables').focus();return false\">Additional Options</a> box below.", "add-to-any"); ?> </p> <p> <a href="http://www.addtoany.com/buttons/share_save/menu_style/wordpress" class="button-secondary" title="<?php _e("Open the Add to Any Menu Styler in a new window", "add-to-any"); ?> " target="_blank" onclick="document.getElementById('A2A_SHARE_SAVE_additional_js_variables').focus(); document.getElementById('A2A_SHARE_SAVE_menu_styler_note').style.display='';"><?php _e("Open Menu Styler", "add-to-any"); ?> </a> </p> </fieldset></td> </tr> <tr valign="top"> <th scope="row"><?php _e('Menu Options', 'add-to-any'); ?> </th> <td><fieldset> <label> <input name="A2A_SHARE_SAVE_hide_embeds" type="checkbox"<?php if (get_option('A2A_SHARE_SAVE_hide_embeds') != '-1') { echo ' checked="checked"'; } ?> value="1"/> <?php _e('Hide embedded objects (Flash, video, etc.) that intersect with the menu when displayed', 'add-to-any'); ?> </label><br /> <label> <input name="A2A_SHARE_SAVE_show_title" type="checkbox"<?php if (get_option('A2A_SHARE_SAVE_show_title') == '1') { echo ' checked="checked"'; } ?> value="1"/> <?php _e('Show the title of the post (or page) within the menu', 'add-to-any'); ?> </label><br /> <label> <input name="A2A_SHARE_SAVE_onclick" type="checkbox"<?php if (get_option('A2A_SHARE_SAVE_onclick') == '1') { echo ' checked="checked"'; } ?> value="1" onclick="e=getElementsByName('A2A_SHARE_SAVE_button_opens_new_window')[0];if(this.checked){e.checked=false;e.disabled=true}else{e.disabled=false}" onchange="e=getElementsByName('A2A_SHARE_SAVE_button_opens_new_window')[0];if(this.checked){e.checked=false;e.disabled=true}else{e.disabled=false}"/> <?php _e('Only show the menu when the user clicks the Share/Save button', 'add-to-any'); ?> </label><br /> <label> <input name="A2A_SHARE_SAVE_button_opens_new_window" type="checkbox"<?php if (get_option('A2A_SHARE_SAVE_button_opens_new_window') == '1') { echo ' checked="checked"'; } ?> value="1" <?php if (get_option('A2A_SHARE_SAVE_onclick') == '1') { echo ' disabled="disabled"'; } ?> /> <?php _e('Open the addtoany.com menu page in a new tab or window if the user clicks the Share/Save button', 'add-to-any'); ?> </label> </fieldset></td> </tr> <tr valign="top"> <th scope="row"><?php _e('Additional Options', 'add-to-any'); ?> </th> <td><fieldset> <p id="A2A_SHARE_SAVE_menu_styler_note" style="display:none"> <label for="A2A_SHARE_SAVE_additional_js_variables" class="updated"> <strong><?php _e("Paste the code from Add to Any's Menu Styler in the box below!", 'add-to-any'); ?> </strong> </label> </p> <label for="A2A_SHARE_SAVE_additional_js_variables"> <p><?php _e('Below you can set special JavaScript variables to apply to each Share/Save menu.', 'add-to-any'); ?> <?php _e("Advanced users might want to explore Add to Any's <a href=\"http://www.addtoany.com/buttons/api/\" target=\"_blank\">JavaScript API</a>.", "add-to-any"); ?> </p> </label> <p> <textarea name="A2A_SHARE_SAVE_additional_js_variables" id="A2A_SHARE_SAVE_additional_js_variables" class="code" style="width: 98%; font-size: 12px;" rows="5" cols="50"><?php echo stripslashes(get_option('A2A_SHARE_SAVE_additional_js_variables')); ?> </textarea> </p> <?php if (get_option('A2A_SHARE_SAVE_additional_js_variables') != '') { ?> <label for="A2A_SHARE_SAVE_additional_js_variables" class="setting-description"><?php _e("<strong>Note</strong>: If you're adding new code, be careful not to accidentally overwrite any previous code.</label>", 'add-to-any'); ?> <?php } ?> </fieldset></td> </tr> </table> <p class="submit"> <input class="button-primary" type="submit" name="Submit" value="<?php _e('Save Changes', 'add-to-any'); ?> " /> </p> </form> <h2><?php _e('Like this plugin?', 'add-to-any'); ?> </h2> <p><?php _e('<a href="http://wordpress.org/extend/plugins/add-to-any/">Give it a good rating</a> on WordPress.org.', 'add-to-any'); ?> </p> <p><?php _e('<a href="http://www.addtoany.com/share_save?linkname=WordPress%20Share%20Plugin%20by%20AddToAny.com&linkurl=http%3A%2F%2Fwordpress.org%2Fextend%2Fplugins%2Fadd-to-any%2F">Share it</a> with your friends.', 'add-to-any'); ?> </p> <h2><?php _e('Need support?', 'add-to-any'); ?> </h2> <p><?php _e('See the <a href="http://wordpress.org/extend/plugins/add-to-any/faq/">FAQs</a>.', 'add-to-any'); ?> </p> <p><?php _e('Search the <a href="http://wordpress.org/tags/add-to-any">support forums</a>.', 'add-to-any'); ?> </p> </div> <?php }