function likebtn_admin_settings() { //global $likebtn_plans; global $likebtn_sync_intervals; // reset sync interval if (!get_option('likebtn_account_email') || !get_option('likebtn_account_api_key') || !get_option('likebtn_site_id')) { update_option('likebtn_sync_inerval', ''); } // If account data has changed, refresh the plan $account_data_hash = md5(get_option('likebtn_account_email') . get_option('likebtn_account_api_key') . get_option('likebtn_site_id')); if (!get_option('likebtn_account_data_hash') || $account_data_hash != get_option('likebtn_account_data_hash')) { update_option('likebtn_account_data_hash', $account_data_hash); // run plan sunchronization require_once dirname(__FILE__) . '/../likebtn_like_button.class.php'; $likebtn = new LikeBtnLikeButton(); $likebtn->syncPlan(); // run synchronization $likebtn->syncVotes(); } likebtn_admin_header(); ?> <?php /*<script type="text/javascript"> jQuery(document).ready(function() { planChange(jQuery(":input[name='likebtn_plan']").val()); }); </script>*/ ?> <script type="text/javascript"> var likebtn_msg_error = '<?php _e("Error occured:", LIKEBTN_I18N_DOMAIN); ?> <br/>● <?php _e('Make sure that <a href="https://wordpress.org/support/topic/howto-disable-php-errors-using-htaccess-on-a-shared-hosting" target="_blank">displaying errors is disabled</a>', LIKEBTN_I18N_DOMAIN); ?> <br/>● <?php _e("Disable WP HTTP Compression plugin if you have it enabled", LIKEBTN_I18N_DOMAIN); ?> '; </script> <div class="likebtn_subpage"> <form method="post" action="options.php"> <?php settings_fields('likebtn_settings'); ?> <?php /* <table class="form-table"> <tr valign="top"> <th scope="row"><label><?php _e('Current plan', LIKEBTN_I18N_DOMAIN); ?></label></th> <td> <select name="likebtn_plan" onChange="planChange(this.value)"> <?php foreach ($likebtn_plans as $plan_id => $plan_name): ?> <option value="<?php echo $plan_id; ?>" <?php if (get_option('likebtn_plan') == $plan_id): ?>selected="selected"<?php endif ?> ><?php echo $plan_name; ?></option> <?php endforeach ?> </select> <p class="description"> <?php _e('Premium features are available only if your website is upgraded to the corresponding tariff plan (PLUS, PRO, VIP, ULTRA). Keep in mind that only websites upgraded to <a href="http://likebtn.com/en/#plans_pricing" target="_blank">PLUS</a> plan or higher are allowed to display more than 1 Like Button per page.', LIKEBTN_I18N_DOMAIN) ?><br/> <a href="javascript:toggleToUpgrade();void(0);"><?php _e('To upgrade your website...', LIKEBTN_I18N_DOMAIN) ?></a> <ol id="likebtn_to_upgrade" class="hidden"> <li><?php _e('Register on <a href="http://likebtn.com/en/customer.php/register/" target="_blank">LikeBtn.com</a>', LIKEBTN_I18N_DOMAIN) ?></li> <li><?php _e('Add your website to your account and activate it on <a href="http://likebtn.com/en/customer.php/websites" target="_blank">Websites page</a>', LIKEBTN_I18N_DOMAIN) ?></li> <li><?php _e('Upgrade your website to the desired plan.', LIKEBTN_I18N_DOMAIN) ?></li> </ol> </p> </td> </tr> </table> */ ?> <div class="postbox "> <h3><?php _e('Account Details', LIKEBTN_I18N_DOMAIN); ?> </h3> <div class="inside"> <p> <?php _e('To get your account data:', LIKEBTN_I18N_DOMAIN); ?> <ol> <li> <?php echo strtr(__('Register on <a href="%url_register%">LikeBtn.com</a>', LIKEBTN_I18N_DOMAIN), array('%url_register%' => "javascript:likebtnPopup('" . __('http://likebtn.com/en/customer.php/register/', LIKEBTN_I18N_DOMAIN) . "');void(0)")); ?> </li> <li> <?php echo strtr(__('Add your website to your account on <a href="%url_websites%">Websites</a> page.', LIKEBTN_I18N_DOMAIN), array('%url_websites%' => "javascript:likebtnPopup('" . __('http://likebtn.com/en/customer.php/websites', LIKEBTN_I18N_DOMAIN) . "');void(0)")); ?> </li> </ol> </p> <input class="button-primary likebtn_button_green" type="button" value="<?php _e('Get Account Data', LIKEBTN_I18N_DOMAIN); ?> " onclick="likebtnGetAccountData('<?php _e('http://likebtn.com/en/customer.php/register/', LIKEBTN_I18N_DOMAIN); ?> ')" /> <?php /* For add_domain */ ?> <?php if (get_option('likebtn_acc_data_correct') != '1') { ?> <div style="display:none"> <?php echo _likebtn_get_markup(LIKEBTN_ENTITY_POST, 'demo', array(), '', true, true, true); ?> </div> <?php } ?> <table class="form-table"> <tr valign="top"> <th scope="row"><label><?php _e('E-mail', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="text" name="likebtn_account_email" value="<?php echo get_option('likebtn_account_email'); ?> " onkeyup="accountChange(this)" class="likebtn_account likebtn_input" id="likebtn_account_email_input"/><br/> <p class="description"><?php _e('Your LikeBtn.com account email. Can be found on <a href="http://likebtn.com/en/customer.php/profile/edit" target="_blank">Profile</a> page', LIKEBTN_I18N_DOMAIN); ?> </p> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('API key', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="text" name="likebtn_account_api_key" value="<?php echo get_option('likebtn_account_api_key'); ?> " onkeyup="accountChange(this)" class="likebtn_account likebtn_input" id="likebtn_account_api_key_input" maxlength="32" /><br/> <p class="description"><?php _e('Your website API key on LikeBtn.com. Can be obtained on <a href="http://likebtn.com/en/customer.php/websites" target="_blank">Websites</a> page', LIKEBTN_I18N_DOMAIN); ?> </p> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Site ID', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="text" name="likebtn_site_id" value="<?php echo get_option('likebtn_site_id'); ?> " class="likebtn_input" id="likebtn_site_id_input" maxlength="24" /><br/> <?php /*<span class="description"><?php _e('Enter Site ID in following cases:', LIKEBTN_I18N_DOMAIN) ?><br/> ● <?php _e('Your site is local – located on a local server and is available from your local network only and NOT available from the Internet.', LIKEBTN_I18N_DOMAIN) ?><br/> ● <?php _e('Your site is path-based – one of sites located in different subdirectories of one domain and you want to have statistics separate from other sites.', LIKEBTN_I18N_DOMAIN) ?><br/><br/>*/ ?> <p class="description"> <?php _e('Your Site ID on LikeBtn.com. Can be obtained on <a href="http://likebtn.com/en/customer.php/websites" target="_blank">Websites</a> page.', LIKEBTN_I18N_DOMAIN); ?> <?php _e('If your website has multiple addresses or you are developing a website on a local server and planning to move it to a live domain, you can add domains to the website <a href="http://likebtn.com/en/customer.php/websites" target="_blank">here</a>.', LIKEBTN_I18N_DOMAIN); ?> </p> </td> </tr> <tr valign="top"> <th scope="row"> </th> <td> <input class="button-primary" type="button" value="<?php _e('Check Account Data', LIKEBTN_I18N_DOMAIN); ?> " onclick="checkAccount('<?php echo _likebtn_get_public_url(); ?> img/ajax_loader.gif')" /> <strong class="likebtn_check_account_container"><img src="<?php echo _likebtn_get_public_url(); ?> img/ajax_loader.gif" class="hidden"/></strong> </td> </tr> </table> </div> </div> <p> <input class="button-primary" type="submit" name="Save" value="<?php _e('Save Changes', LIKEBTN_I18N_DOMAIN); ?> " /> </p> <?php if (get_option('likebtn_plan') < LIKEBTN_PLAN_PRO) { ?> <strong class="likebtn_error"> <?php echo strtr(__('Website tariff plan does not allow to synchronize likes into your database – <a href="%url_upgrade%">upgrade</a> your website to PRO or higher plan.', LIKEBTN_I18N_DOMAIN), array('%url_upgrade%' => "javascript:likebtnPopup('" . __('https://likebtn.com/en/pricing', LIKEBTN_I18N_DOMAIN) . "');void(0)")); ?> </strong> <br/><br/> <?php } ?> <div class="postbox"> <div class="inside"> <table class="form-table"> <tr valign="top"> <th scope="row"><label><?php _e('Synchronization interval', LIKEBTN_I18N_DOMAIN); ?> </label> <i class="likebtn_help" title="<?php _e('Votes are stored in LikeBtn.com system.', LIKEBTN_I18N_DOMAIN); ?> <?php _e('Choose time interval of fetching votes from LikeBtn.com into your database.', LIKEBTN_I18N_DOMAIN); ?> "> </i> </th> <td> <select name="likebtn_sync_inerval" <?php disabled(!get_option('likebtn_account_email') || !get_option('likebtn_account_api_key')); ?> id="likebtn_sync_inerval_input"> <option value="" <?php selected('', get_option('likebtn_sync_inerval')); ?> ><?php _e('Synchronization of votes into local database is disabled', LIKEBTN_I18N_DOMAIN); ?> </option> <?php foreach ($likebtn_sync_intervals as $sync_interval) { ?> <option value="<?php echo $sync_interval; ?> " <?php selected($sync_interval, get_option('likebtn_sync_inerval')); ?> ><?php echo $sync_interval; ?> <?php _e('min', LIKEBTN_I18N_DOMAIN); ?> </option> <?php } ?> </select> <br/><br/> <input class="button-primary" type="button" value="<?php _e('Test Sync', LIKEBTN_I18N_DOMAIN); ?> " onclick="testSync('<?php echo _likebtn_get_public_url(); ?> img/ajax_loader.gif')" /> <strong class="likebtn_test_sync_container"><img src="<?php echo _likebtn_get_public_url(); ?> img/ajax_loader.gif" class="hidden"/></strong> <br/><br/> <div class="liketbtn_mansync_wr"> <input class="button-secondary likebtn_ttip" type="button" value="<?php _e('Run Full Sync Manually', LIKEBTN_I18N_DOMAIN); ?> " onclick="manualSync('<?php echo _likebtn_get_public_url(); ?> img/ajax_loader.gif')" title="<?php _e("ATTENTION: Use this feature carefully since full synchronization may affect your website performance. If you don't experience any problems with likes synchronization better to avoid using this feature.", LIKEBTN_I18N_DOMAIN); ?> " /> <strong class="likebtn_manual_sync_container"><img src="<?php echo _likebtn_get_public_url(); ?> img/ajax_loader.gif" class="hidden"/></strong> </div> <br/> <p class="description"> <?php _e('Enable synchronization of likes from LikeBtn.com system into your database to:', LIKEBTN_I18N_DOMAIN); ?> <br/> ● <?php _e('View statistics on Statistics tab.', LIKEBTN_I18N_DOMAIN); ?> <br/> ● <?php _e('Sort content by likes.', LIKEBTN_I18N_DOMAIN); ?> <br/> ● <?php _e('Use most liked content widget and shortcode.', LIKEBTN_I18N_DOMAIN); ?> <br/> </p> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('CloudFlare enabled', LIKEBTN_I18N_DOMAIN); ?> </label> </th> <td> <p class="description"> <input type="checkbox" name="likebtn_cf" value="1" <?php checked('1', get_option('likebtn_cf')); ?> /> <?php _e('Check if your website is powered by CloudFlare.com for proper visitors\' IP detection.', LIKEBTN_I18N_DOMAIN); ?> </p> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Custom CSS', LIKEBTN_I18N_DOMAIN); ?> </label> </th> <td> <textarea name="likebtn_css" class="likebtn_input" rows="5"><?php echo htmlspecialchars(get_option('likebtn_css')); ?> </textarea> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Custom JavaScript', LIKEBTN_I18N_DOMAIN); ?> </label> </th> <td> <textarea name="likebtn_js" class="likebtn_input" rows="5"><?php echo htmlspecialchars(get_option('likebtn_js')); ?> </textarea> </td> </tr> </table> </div> </div> <?php /*<div class="postbox likebtn_account"> <h3><?php _e('Local domain', LIKEBTN_I18N_DOMAIN); ?></h3> <div class="inside"> <table class="form-table"> <tr valign="top"> <th scope="row"> </th> <td> ?> <input type="hidden" name="likebtn_local_domain" value="<?php echo get_option('likebtn_local_domain') ?>" size="60" /> <?php <br/> <strong class="description"><?php _e('Example:', LIKEBTN_I18N_DOMAIN) ?> localdomain!50f358d30acf358d30ac000001</strong> <br/><br/> <span class="description"><?php _e('Specify it if your website is located on a local server and is available from your local network only and NOT available from the Internet. You can find the domain on your <a href="http://likebtn.com/en/customer.php/websites" target="_blank">Websites</a> page after adding your local website to the panel. See <a href="http://likebtn.com/en/faq#local_domain" target="_blank">FAQ</a> for more details.', LIKEBTN_I18N_DOMAIN) ?></span> </td> </tr> </table> </div> </div>*/ ?> <?php /*<div class="postbox likebtn_account"> <h3><?php _e('Website subdirectory', LIKEBTN_I18N_DOMAIN); ?></h3> <div class="inside"> <table class="form-table"> <tr valign="top"> <th scope="row"> </th> <td> ?> <input type="hidden" name="likebtn_subdirectory" value="<?php echo get_option('likebtn_subdirectory') ?>" size="60" /> <?php <br/> <strong class="description"><?php _e('Example:', LIKEBTN_I18N_DOMAIN) ?> /subdirectory/</strong> <br/><br/> <span class="description"><?php _e('If your website is one of websites located in different subdirectories of one domain and you want to have a separate from other websites on this domain statistics, enter subdirectory (for example /subdirectory/). Required for path-based <a href="http://codex.wordpress.org/Create_A_Network" target="_blank">multisite networks</a> in which on-demand sites use paths.', LIKEBTN_I18N_DOMAIN) ?></span> </td> </tr> </table> </div> </div>*/ ?> <input class="button-primary" type="submit" name="Save" value="<?php _e('Save Changes', LIKEBTN_I18N_DOMAIN); ?> " /> </form> </div> <?php _likebtn_admin_footer(); }
function likebtn_admin_votes() { global $likebtn_page_sizes; global $wpdb; wp_enqueue_script('jquery-ui-dialog'); wp_enqueue_style("wp-jquery-ui-dialog"); $query_parameters = array(); $likebtn_entities = _likebtn_get_entities(true); // Custom item $likebtn_entities[LIKEBTN_ENTITY_CUSTOM_ITEM] = __('Custom item'); // Multisite - available for super admin only $blogs = array(); $blog_list = array(); $votes_blog_id = ''; $prefix_prepared = $wpdb->prefix; if (is_multisite() && is_super_admin()) { global $blog_id; $blog_list = $wpdb->get_results("\n SELECT blog_id, domain\n FROM {$wpdb->blogs}\n WHERE site_id = '{$wpdb->siteid}'\n AND spam = '0'\n AND deleted = '0'\n AND archived = '0'\n ORDER BY blog_id\n "); // Place current blog on the first place foreach ($blog_list as $blog) { if ($blog->blog_id == $blog_id) { $blogs["{$blog->blog_id}"] = get_blog_option($blog->blog_id, 'blogname') . ' - ' . $blog->domain; break; } } foreach ($blog_list as $blog) { if ($blog->blog_id != $blog_id) { $blogs["{$blog->blog_id}"] = get_blog_option($blog->blog_id, 'blogname') . ' - ' . $blog->domain; } } // Add all $blogs['all'] = __('All Sites'); // Determine selected blog id if (isset($_GET['likebtn_blog_id'])) { if ($_GET['likebtn_blog_id'] == 'all') { $votes_blog_id = $_GET['likebtn_blog_id']; } else { // Check if blog with ID exists foreach ($blog_list as $blog) { if ($blog->blog_id == (int) $_GET['likebtn_blog_id']) { $votes_blog_id = (int) $_GET['likebtn_blog_id']; break; } } } } // Prepare prefix if this is not main blog if ($blog_id != 1) { $prefix_prepared = substr($wpdb->prefix, 0, strlen($wpdb->prefix) - strlen($blog_id) - 1); } } $entity_name = ''; if (!empty($_GET['likebtn_entity_name'])) { $entity_name = $_GET['likebtn_entity_name']; } $page_size = LIKEBTN_STATISTIC_PAGE_SIZE; if (isset($_GET['likebtn_page_size'])) { $page_size = LIKEBTN_STATISTIC_PAGE_SIZE; } $post_id = ''; if (isset($_GET['likebtn_post_id'])) { $post_id = trim(stripcslashes($_GET['likebtn_post_id'])); } $user_id = ''; if (isset($_GET['likebtn_user_id'])) { $user_id = trim(stripcslashes($_GET['likebtn_user_id'])); } $ip = ''; if (isset($_GET['likebtn_ip'])) { $ip = trim($_GET['likebtn_ip']); } $vote_type = ''; if (isset($_GET['likebtn_vote_type'])) { $vote_type = trim($_GET['likebtn_vote_type']); } // pagination require_once dirname(__FILE__) . '/likebtn_like_button_pagination.class.php'; $pagination_target = "admin.php?page=likebtn_votes"; foreach ($_GET as $get_parameter => $get_value) { $pagination_target .= '&' . $get_parameter . '=' . stripcslashes($get_value); } $p = new LikeBtnLikeButtonPagination(); $p->limit($page_size); // Limit entries per page $p->target($pagination_target); //$p->currentPage(); // Gets and validates the current page $p->prevLabel(__('Previous', LIKEBTN_I18N_DOMAIN)); $p->nextLabel(__('Next', LIKEBTN_I18N_DOMAIN)); if (!isset($_GET['paging'])) { $p->page = 1; } else { $p->page = $_GET['paging']; } $query_select = ''; $query_join = ''; // query for limit paging $query_limit = "LIMIT " . ($p->page - 1) * $p->limit . ", " . $p->limit; // query parameters $query_where = ''; // Post type and ID if ($entity_name && $post_id && $entity_name != LIKEBTN_ENTITY_CUSTOM_ITEM) { $query_where .= ' AND v.identifier = %s '; $query_parameters[] = $entity_name . '_' . $post_id; } elseif ($entity_name == LIKEBTN_ENTITY_CUSTOM_ITEM && $post_id) { $query_where .= ' AND i.ID is not NULL AND v.identifier = %s '; $query_parameters[] = $post_id; } elseif ($entity_name == LIKEBTN_ENTITY_CUSTOM_ITEM) { $query_where .= ' AND i.ID is not NULL '; } elseif ($entity_name) { $query_where .= ' AND v.identifier LIKE "' . esc_sql($entity_name) . '_%%" '; } elseif ($post_id) { $query_where .= ' AND v.identifier LIKE "%%_%d" '; $query_parameters[] = $post_id; } // Order by $query_orderby = ' ORDER BY created_at DESC '; // User ID if ($user_id) { $query_where .= ' AND v.user_id = %d '; $query_parameters[] = $user_id; } // IP if ($ip) { $query_where .= ' AND v.ip = %s '; $query_parameters[] = $ip; } // Vote type if ($vote_type) { $query_where .= ' AND v.type = %d '; $query_parameters[] = $vote_type; } // For Multisite $query = ''; if ($votes_blog_id && $votes_blog_id != 1 && $votes_blog_id != 'all') { $prefix = "{$prefix_prepared}{$votes_blog_id}_"; $query = _likebtn_get_votes_sql($prefix, $query_where, $query_orderby, $query_limit, 'SQL_CALC_FOUND_ROWS ' . $query_select, $query_join); $query_prepared = $wpdb->prepare($query, $query_parameters); } else { if ($votes_blog_id == 'all') { foreach ($blog_list as $blog) { if ($blog->blog_id == 1) { $prefix = $prefix_prepared; } else { $prefix = "{$prefix_prepared}{$blog->blog_id}_"; } $query_list[] = $wpdb->prepare(_likebtn_get_votes_sql($prefix, $query_where, '', '', $blog->blog_id . ' as blog_id, ' . $query_select, $query_join), $query_parameters); } $query_prepared = ' SELECT SQL_CALC_FOUND_ROWS * from (' . implode(' UNION ', $query_list) . ") query {$query_orderby} {$query_limit} "; } else { $query = _likebtn_get_votes_sql($prefix_prepared, $query_where, $query_orderby, $query_limit, 'SQL_CALC_FOUND_ROWS ' . $query_select, $query_join); if (count($query_parameters)) { $query_prepared = $wpdb->prepare($query, $query_parameters); } else { $query_prepared = $query; } } } // echo "<pre>"; // echo $query; // echo $query_prepared; // echo $wpdb->prepare($query, $query_parameters); // $wpdb->show_errors(); // exit(); $votes = $wpdb->get_results($query_prepared); $total_found = 0; if (isset($votes[0])) { $query_found_rows = "SELECT FOUND_ROWS() as found_rows"; $found_rows = $wpdb->get_results($query_found_rows); $total_found = (int) $found_rows[0]->found_rows; $p->items($total_found); $p->calculate(); // Calculates what to show $p->parameterName('paging'); $p->adjacents(1); // No. of page away from the current page } else { $votes = array(); } $loader = _likebtn_get_public_url() . 'img/ajax_loader_hor.gif'; likebtn_admin_header(); ?> <script type="text/javascript"> var likebtn_msg_ip_info = '<?php _e("IP Info", LIKEBTN_I18N_DOMAIN); ?> '; </script> <div> <a href="javascript:jQuery('#likebtn_no_vts').toggle();void(0);"><?php _e('Do not see votes?', LIKEBTN_I18N_DOMAIN); ?> </a> <div id="likebtn_no_vts"> <p class="description"> ● <?php _e('Votes for Custom items appear in the list after synchronization.', LIKEBTN_I18N_DOMAIN); ?> </p> </div> <br/><br/> <form action="" method="get" id="votes_form" autocomplete="off"> <input type="hidden" name="page" value="likebtn_votes" /> <div class="postbox statistics_filter_container"> <div class="inside"> <label><?php _e('Item Type', LIKEBTN_I18N_DOMAIN); ?> :</label> <select name="likebtn_entity_name" > <option value="">-- <?php _e('Any', LIKEBTN_I18N_DOMAIN); ?> --</option> <?php foreach ($likebtn_entities as $entity_name_value => $entity_title) { ?> <option value="<?php echo $entity_name_value; ?> " <?php selected($entity_name, $entity_name_value); ?> ><?php _e($entity_title, LIKEBTN_I18N_DOMAIN); ?> </option> <?php } ?> </select> <label><?php _e('Item ID', LIKEBTN_I18N_DOMAIN); ?> :</label> <input type="text" name="likebtn_post_id" value="<?php echo htmlspecialchars($post_id); ?> " size="10" /> <br/><br/> <label><?php _e('User ID', LIKEBTN_I18N_DOMAIN); ?> :</label> <input type="text" name="likebtn_user_id" value="<?php echo htmlspecialchars($user_id); ?> " size="10" /> <label><?php _e('IP'); ?> :</label> <input type="text" name="likebtn_ip" value="<?php echo htmlspecialchars($ip); ?> " size="20"/> <label><?php _e('Vote Type', LIKEBTN_I18N_DOMAIN); ?> :</label> <select name="likebtn_vote_type" > <option value="">-- <?php _e('Likes & Dislikes', LIKEBTN_I18N_DOMAIN); ?> --</option> <option value="1" <?php selected((int) $vote_type, 1); ?> ><?php _e('Likes', LIKEBTN_I18N_DOMAIN); ?> </option> <option value="-1" <?php selected((int) $vote_type, -1); ?> ><?php _e('Dislikes', LIKEBTN_I18N_DOMAIN); ?> </option> </select> <input class="button-secondary" type="button" name="reset" value="<?php _e('Reset filter', LIKEBTN_I18N_DOMAIN); ?> " onClick="jQuery('.statistics_filter_container :input[type!=button]').val(''); jQuery('#votes_form').submit();"/> </div> </div> <?php if ($blogs) { ?> <label><?php _e('Site', LIKEBTN_I18N_DOMAIN); ?> :</label> <select name="likebtn_blog_id" > <?php foreach ($blogs as $blog_id_value => $blog_title) { ?> <option value="<?php echo $blog_id_value; ?> " <?php selected($votes_blog_id, $blog_id_value); ?> ><?php echo $blog_title; ?> </option> <?php } ?> </select> <?php } ?> <label><?php _e('Page Size', LIKEBTN_I18N_DOMAIN); ?> :</label> <select name="likebtn_page_size" > <?php foreach ($likebtn_page_sizes as $page_size_value) { ?> <option value="<?php echo $page_size_value; ?> " <?php selected($page_size, $page_size_value); ?> ><?php echo $page_size_value; ?> </option> <?php } ?> </select><br/><br/> <input class="button-primary" type="submit" name="show" value="<?php _e('View', LIKEBTN_I18N_DOMAIN); ?> " /> <?php _e('Votes Found', LIKEBTN_I18N_DOMAIN); ?> : <strong><?php echo $total_found; ?> </strong> </form> <br/> <form method="post" action="" id="votes_actions_form"> <input type="hidden" name="bulk_action" value="" id="stats_bulk_action" /> <?php if (count($votes) && $p->lastpage > 1) { ?> <div class="tablenav"> <div class="tablenav-pages"> <?php echo $p->show(); ?> </div> </div> <?php } ?> <table class="widefat" id="votes_container"> <thead> <tr> <?php /*<th><input type="checkbox" onclick="statisticsItemsCheckbox(this)" value="all" style="margin:0"></th>*/ ?> <?php if ($blogs && $votes_blog_id == 'all') { ?> <th><?php _e('Site'); ?> </th> <?php } ?> <th colspan="2"><?php _e('User', LIKEBTN_I18N_DOMAIN); ?> </th> <th>IP</th> <th><?php _e('Date', LIKEBTN_I18N_DOMAIN); ?> </th> <th><?php _e('Type', LIKEBTN_I18N_DOMAIN); ?> </th> <th><?php _e('Item', LIKEBTN_I18N_DOMAIN); ?> </th> </tr> </thead> <tbody> <?php foreach ($votes as $votes_item) { ?> <?php $entity_info = _likebtn_parse_identifier($votes_item->identifier); $avatar_url = ''; if ($votes_item->user_id) { $avatar_url = _likebtn_get_avatar_url($votes_item->user_id); } $user_url = ''; if ($votes_item->user_id) { $user_url = _likebtn_get_entity_url(LIKEBTN_ENTITY_USER, $votes_item->user_id); } $item_title = ''; $item_url = ''; if ($votes_item->item_id) { $item_title = $votes_item->identifier; $item_url = $votes_item->url; $entity_type_name = __('Custom Item', LIKEBTN_I18N_DOMAIN); } else { if ($entity_info['entity_name'] && $entity_info['entity_id']) { $item_title = _likebtn_get_entity_title($entity_info['entity_name'], $entity_info['entity_id']); $item_title = _likebtn_prepare_title($entity_info['entity_name'], $item_title); $item_url = _likebtn_get_entity_url($entity_info['entity_name'], $entity_info['entity_id'], '', $votes_blog_id); } $entity_type_name = _likebtn_get_entity_name_title($entity_info['entity_name']); } if ((int) $votes_item->type == 1) { $entity_vote_type = 'like'; } else { $entity_vote_type = 'dislike'; } ?> <tr id="vote_<?php echo $votes_item->id; ?> "> <?php /*<td><input type="checkbox" class="item_checkbox" value="<?php echo $votes_item->post_id; ?>" name="item[]" <?php if ($blogs && $votes_item->blog_id != $blog_id): ?>disabled="disabled"<?php endif ?>></td>*/ ?> <?php if ($blogs && $votes_blog_id == 'all') { ?> <td><?php echo get_blog_option($votes_item->blog_id, 'blogname'); ?> </td> <?php } ?> <?php if ($avatar_url) { ?> <td width="32"> <a href="<?php echo $user_url; ?> " target="_blank"><img src="<?php echo $avatar_url; ?> " width="32" height="32" /></a> </td> <?php } ?> <td <?php if (!$avatar_url) { ?> colspan="2"<?php } ?> > <?php if ($votes_item->user_id) { ?> <a href="<?php echo $user_url; ?> " target="_blank"><?php echo _likebtn_get_entity_title(LIKEBTN_ENTITY_USER, $votes_item->user_id); ?> </a> <?php } else { ?> <?php echo __('Anonymous', LIKEBTN_I18N_DOMAIN); ?> <?php } ?> </td> <td><a href="javascript:likebtnIpInfo('<?php echo $votes_item->ip; ?> ');" class="likebtn_ttip" title="<?php _e('View IP info', LIKEBTN_I18N_DOMAIN); ?> "><?php echo $votes_item->ip; ?> </a></td> <td><?php echo date("Y.m.d H:i:s", strtotime($votes_item->created_at)); ?> </td> <td> <img src="<?php echo _likebtn_get_public_url(); ?> img/thumb/<?php echo $entity_vote_type; ?> .png" alt="<?php _e(ucfirst($entity_vote_type), LIKEBTN_I18N_DOMAIN); ?> " title="<?php _e(ucfirst($entity_vote_type), LIKEBTN_I18N_DOMAIN); ?> " class="likebtn_ttip" /> </td> <td><a href="<?php echo $item_url; ?> " target="_blank"><?php echo $item_title; ?> </a> <?php if ($entity_type_name) { ?> — <?php echo $entity_type_name; ?> <?php } ?> </td> </tr> <?php } ?> </tbody> </table> </form> <?php if (count($votes) && $p->lastpage > 1) { ?> <div class="tablenav"> <div class="tablenav-pages"> <?php echo $p->show(); ?> </div> </div> <?php } ?> </div> <div id="likebtn_ip_info" class="likebtn_ip_info hidden"> <div class="likebtn_ip_info_map"></div> <table class="widefat"> <tr> <th><strong>IP</strong></th> <td class="likebtn-ii-ip" width="50%"><img src="<?php echo $loader; ?> " /></td> </tr> <tr> <th><strong><?php _e('Country', LIKEBTN_I18N_DOMAIN); ?> </strong></th> <td class="likebtn-ii-country"><img src="<?php echo $loader; ?> " /></td> </tr> <tr> <th><strong><?php _e('City', LIKEBTN_I18N_DOMAIN); ?> </strong></th> <td class="likebtn-ii-city"><img src="<?php echo $loader; ?> " /></td> </tr> <tr> <th><strong><?php _e('Lat/Long', LIKEBTN_I18N_DOMAIN); ?> </strong></th> <td class="likebtn-ii-latlon"><img src="<?php echo $loader; ?> " /></td> </tr> <tr> <th><strong><?php _e('Postal Code', LIKEBTN_I18N_DOMAIN); ?> </strong></th> <td class="likebtn-ii-postal"><img src="<?php echo $loader; ?> " /></td> </tr> <tr> <th><strong><?php _e('Network', LIKEBTN_I18N_DOMAIN); ?> </strong></th> <td class="likebtn-ii-network"><img src="<?php echo $loader; ?> " /></td> </tr> <tr> <th><strong><?php _e('Hostname', LIKEBTN_I18N_DOMAIN); ?> </strong></th> <td class="likebtn-ii-hostname"><img src="<?php echo $loader; ?> " /></td> </tr> </table> <div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"> <div class="ui-dialog-buttonset"> <button type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only button-secondary likebtn-button-close" role="button"><span class="ui-button-text"><?php _e('Close', LIKEBTN_I18N_DOMAIN); ?> </span></button> </div> </div> </div> <script async defer src="https://maps.googleapis.com/maps/api/js?v=3.exp&callback=showMap"> </script> <?php _likebtn_admin_footer(); }
function likebtn_admin_help() { likebtn_admin_header(); ?> <div> <iframe width="560" height="315" src="https://www.youtube.com/embed/n4gye6Blmf8" frameborder="0" allowfullscreen></iframe> <ul> <li><?php echo __('<a href="http://likebtn.com/en/wordpress-like-button-plugin" target="_blank">WordPress LikeBtn Plugin FAQ</a>', LIKEBTN_I18N_DOMAIN); ?> </li> <li><?php echo __('<a href="http://likebtn.com/en/faq" target="_blank">LikeBtn FAQ</a>', LIKEBTN_I18N_DOMAIN); ?> </li> <li><?php echo __('<a href="http://forum.likebtn.com/forums/34-WordPress" target="_blank">Forum</a>', LIKEBTN_I18N_DOMAIN); ?> </li> </ul> </div> <?php _likebtn_admin_footer(); }
function likebtn_admin_widget() { $widget_url = _likebtn_get_public_url() . 'img/widget.jpg'; likebtn_admin_header(); ?> <div> <h1><?php _e('Most liked content widget', LIKEBTN_I18N_DOMAIN); ?> </h1> <div class="widget_demo"> <img alt="" src="<?php echo $widget_url; ?> " /><br/> <a href="<?php echo admin_url('widgets.php'); ?> " class="button-primary"><?php _e('Add Widget Now!', LIKEBTN_I18N_DOMAIN); ?> </a> </div> </div> <?php _likebtn_admin_footer(); }
function likebtn_admin_buttons() { global $likebtn_styles; global $likebtn_default_locales; global $likebtn_settings; global $likebtn_buttons_options; global $likebtn_entities_config; global $likebtn_addthis_service_codes; global $likebtn_icons; global $likebtn_fonts; global $likebtn_fstyles; global $user_logged_in_alert_default; // Enque scripts wp_register_script('select2', _likebtn_get_public_url() . 'js/jquery/select2/select2.js', array('jquery'), LIKEBTN_VERSION, true); wp_register_script('select2-sortable', _likebtn_get_public_url() . 'js/jquery/select2/select2.sortable.js', array('select2'), LIKEBTN_VERSION, true); wp_register_style('select2-css', _likebtn_get_public_url() . 'css/jquery/select2/select2.css', false, LIKEBTN_VERSION, 'all'); wp_register_script('likebtn-jquery-ui', _likebtn_get_public_url() . 'js/jquery/jquery-ui/jquery-ui.js', array('jquery'), LIKEBTN_VERSION, true); wp_register_style('likebtn-jquery-ui-css', _likebtn_get_public_url() . 'css/jquery/jquery-ui/jquery-ui.css', false, LIKEBTN_VERSION, 'all'); wp_register_style('likebtn-addthis', _likebtn_get_public_url() . 'css/addthis.css', false, LIKEBTN_VERSION, 'all'); wp_register_style('likebtn-icons', '//w.likebtn.com/css/w/icons.css', false, LIKEBTN_VERSION, 'all'); // Select2 locale $blog_locale = get_locale(); list($blog_locale_main) = explode("_", $blog_locale); $plugin_dir = plugin_dir_path(__FILE__); $select2_locale_script = ''; if (file_exists($plugin_dir . 'public/js/jquery/select2/locale/select2_locale_' . $blog_locale . '.js')) { $select2_locale_script = _likebtn_get_public_url() . 'js/jquery/select2/locale/select2_locale_' . $blog_locale . '.js'; } else { if (file_exists($plugin_dir . 'public/js/jquery/select2/locale/select2_locale_' . $blog_locale_main . '.js')) { $select2_locale_script = _likebtn_get_public_url() . 'js/jquery/select2/locale/select2_locale_' . $blog_locale_main . '.js'; } } if ($select2_locale_script) { wp_register_script('select2-locale', $select2_locale_script, LIKEBTN_VERSION, true); } wp_enqueue_media(); wp_enqueue_script('select2'); wp_enqueue_script('select2-sortable'); wp_enqueue_style('select2-css'); if ($select2_locale_script) { wp_enqueue_script('select2-locale'); } // wp_enqueue_script('likebtn-jquery-ui'); // wp_enqueue_style('likebtn-jquery-ui-css'); wp_enqueue_script('likebtn-jquery-ui'); wp_enqueue_style('likebtn-jquery-ui-css'); wp_enqueue_style('likebtn-addthis'); wp_enqueue_style('likebtn-icons'); wp_enqueue_script('wp-color-picker-alpha', _likebtn_get_public_url() . 'js/wp-color-picker-alpha.js', array('wp-color-picker'), LIKEBTN_VERSION); wp_enqueue_style('wp-color-picker'); wp_enqueue_script('likebtn-dateparse', _likebtn_get_public_url() . 'js/dateparse.js', array(), LIKEBTN_VERSION); wp_enqueue_script('likebtn-datetimepicker', _likebtn_get_public_url() . 'js/jquery/jquery.datetimepicker.js', array('jquery', 'likebtn-jquery-ui'), LIKEBTN_VERSION); wp_enqueue_style('likebtn-datetimepicker', _likebtn_get_public_url() . 'css/jquery/jquery.datetimepicker.css', array(), LIKEBTN_VERSION, 'all'); wp_enqueue_script('likebtn-durationpicker', _likebtn_get_public_url() . 'js/jquery/jquery.ui.durationPicker.js', array('jquery', 'likebtn-jquery-ui'), LIKEBTN_VERSION); wp_enqueue_style('likebtn-durationpicker', _likebtn_get_public_url() . 'css/jquery/jquery.ui.durationPicker.css', array(), LIKEBTN_VERSION, 'all'); $likebtn_entities = _likebtn_get_entities(false, false, false); // retrieve post formats $post_formats = _likebtn_get_post_formats(); // run sunchronization require_once dirname(__FILE__) . '/../likebtn_like_button.class.php'; $likebtn = new LikeBtnLikeButton(); /*$likebtn->runSyncLocales(); $likebtn->runSyncStyles();*/ // Languages //$locales = get_option('likebtn_locales'); $locales = $likebtn_default_locales; $languages = array(); $languages['auto'] = array('name' => __("Automatic", LIKEBTN_I18N_DOMAIN), 'en_name' => __("Automatic", LIKEBTN_I18N_DOMAIN)); /*if (!$locales) { $locales = $likebtn_default_locales; }*/ foreach ($locales as $locale_code => $locale_info) { $languages[$locale_code] = array('name' => $locale_info['name'], 'en_name' => $locale_info['en_name']); } // Get styles $styles = get_option('likebtn_styles'); $style_options = array(); if (!$styles) { // Styles have not been loaded using API yet, load default languages $styles = $likebtn_styles; } foreach ($styles as $style) { $style_options[] = $style; } // Select tab $subpage = _likebtn_get_subpage(); //$entity_title = $likebtn_entities[$entity_name]; // JS and Styles global $likebtn_website_locales; $likebtn_website_locale = substr(get_bloginfo('language'), 0, 2); if (!in_array($likebtn_website_locale, $likebtn_website_locales)) { $likebtn_website_locale = 'en'; } likebtn_admin_header(); ?> <script>(function(d, e, s) {a = d.createElement(e);m = d.getElementsByTagName(e)[0];a.async = 1;a.src = s;m.parentNode.insertBefore(a, m)})(document, 'script', '//<?php echo LIKEBTN_WEBSITE_DOMAIN; ?> /<?php echo $likebtn_website_locale; ?> /js/donate_generator.js'); </script> <?php /* <link rel="stylesheet" type="text/css" href="<?php echo _likebtn_get_public_url() ?>js/jquery/select2/select2.js?ver=<?php echo LIKEBTN_VERSION ?>" /> <link rel="stylesheet" type="text/css" href="<?php echo _likebtn_get_public_url() ?>js/jquery/jquery-ui/jquery-ui.js?ver=<?php echo LIKEBTN_VERSION ?>" /> <link rel="stylesheet" type="text/css" href="<?php echo _likebtn_get_public_url() ?>css/jquery/select2/select2.css?ver=<?php echo LIKEBTN_VERSION ?>" /> */ ?> <script type="text/javascript"> var reset_settings = []; <?php foreach ($likebtn_buttons_options as $option_name => $option_value) { ?> <?php if (is_array($option_value)) { ?> <?php $option_value = array_shift($option_value); ?> <?php } ?> reset_settings['<?php echo str_replace('likebtn_', '', $option_name); ?> '] = '<?php echo $option_value; ?> '; <?php } ?> <?php foreach ($likebtn_settings as $option_name => $option_info) { ?> reset_settings['settings_<?php echo $option_name; ?> '] = '<?php echo $option_info['default']; ?> '; <?php } ?> <?php /* var likebtn_entities = [ <?php $entity_index = 0; ?> <?php foreach ($likebtn_entities as $entity_name => $entity_title): ?> <?php $entity_index++; ?> '<?php echo $entity_name; ?>'<?php if ($entity_index != count($likebtn_entities)-1): ?>,<?php endif ?> <?php endforeach ?> ]; */ ?> var likebtn_msg_reset = '<?php _e('Are you sure you want to reset settings for this entity?', LIKEBTN_I18N_DOMAIN); ?> '; var likebtn_msg_set_img = '<?php _e('Select image', LIKEBTN_I18N_DOMAIN); ?> '; //var likebtn_msg_identifier = '<?php _e('likeButton1', LIKEBTN_I18N_DOMAIN); ?> '; var likebtn_path_settings_theme = '//<?php echo LIKEBTN_WEBSITE_DOMAIN; ?> /bundles/likebtnwebsite/i/theme/'; var likebtn_path_settings_counter_type = '//<?php echo LIKEBTN_WEBSITE_DOMAIN; ?> /bundles/likebtnwebsite/i/counter/'; var likebtn_default_settings = <?php echo json_encode(array('addthis_service_codes' => $likebtn_settings['addthis_service_codes'])); ?> ; var likebtn_prev_lang = ''; var likebtn_wp_media = null; var likebtn_datetime = "<?php echo date("Y/m/d H:i"); ?> "; likebtnScriptButtons('<?php echo $subpage; ?> ', '<?php echo get_option('likebtn_plan'); ?> '); </script> <div> <form method="post" action="options.php" onsubmit="return likebtnOnSaveButtons()" id="settings_form" autocomplete="off"> <?php settings_fields('likebtn_buttons'); ?> <input type="hidden" name="likebtn_subpage" value="<?php echo $subpage; ?> " id="likebtn_entity_name_field"> <h3 class="nav-tab-wrapper" style="padding: 0" id="likebtn_subpage_tab_wrapper"> <?php foreach ($likebtn_entities as $tab_entity_name => $tab_entity_title) { ?> <a class="nav-tab likebtn_tab_<?php echo $tab_entity_name; ?> <?php echo $subpage == $tab_entity_name ? 'nav-tab-active' : ''; ?> " href="<?php echo admin_url() . 'admin.php?page=likebtn_buttons&likebtn_subpage=' . $tab_entity_name; ?> "><img src="<?php echo _likebtn_get_public_url(); ?> img/check.png" class="likebtn_ttip likebtn_show_marker <?php if (get_option('likebtn_show_' . $tab_entity_name) != '1') { ?> hidden<?php } ?> " title="<?php _e('Like Button enabled', LIKEBTN_I18N_DOMAIN); ?> "><?php _e($tab_entity_title, LIKEBTN_I18N_DOMAIN); ?> </a> <?php } ?> </h3> <?php foreach ($likebtn_entities as $entity_name => $entity_title) { // Display one entity per page if ($subpage != $entity_name) { continue; } // Entity name without list suffix $entity_name_clean = str_replace(LIKEBTN_LIST_FLAG, '', $entity_name); $excluded_sections = get_option('likebtn_exclude_sections_' . $entity_name); if (!is_array($excluded_sections)) { $excluded_sections = array(); } $excluded_categories = get_option('likebtn_exclude_categories_' . $entity_name); if (!is_array($excluded_categories)) { $excluded_categories = array(); } if ($entity_name == LIKEBTN_ENTITY_BBP_POST) { $allow_forums = get_option('likebtn_allow_forums_' . $entity_name); if (!is_array($allow_forums)) { $allow_forums = array(); } } // just in case if (!is_array(get_option('likebtn_post_format_' . $entity_name))) { update_option('likebtn_post_format_' . $entity_name, array('all')); } // AddThis service codes $value_addthis_service_codes = get_option('likebtn_settings_addthis_service_codes_' . $entity_name); if (!$value_addthis_service_codes) { $lang = get_option('likebtn_settings_lang_' . $entity_name); if (!empty($likebtn_settings['addthis_service_codes']['default_values'][$lang])) { $value_addthis_service_codes = $likebtn_settings['addthis_service_codes']['default_values'][$lang]; } else { $value_addthis_service_codes = $likebtn_settings['addthis_service_codes']['default_values']['all']; } } // Login alert message $user_logged_in_alert = get_option('likebtn_user_logged_in_alert_' . $entity_name); if (!$user_logged_in_alert) { $user_logged_in_alert = '<p class="alert alert-info fade in" role="alert">' . __($user_logged_in_alert_default, LIKEBTN_I18N_DOMAIN) . '</p>'; } ?> <div id="likebtn_subpage_wrapper_<?php echo $entity_name; ?> " class="likebtn_subpage <?php if ($subpage !== $entity_name) { ?> hidden<?php } ?> " > <?php /*<h3><?php _e($entity_title, LIKEBTN_I18N_DOMAIN); ?></h3>*/ ?> <div class="inside entity_tab_container"> <table class="form-table"> <tr valign="top"> <th scope="row"><label><?php _e('Enable Like Button', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="checkbox" name="likebtn_show_<?php echo $entity_name; ?> " value="1" <?php checked('1', get_option('likebtn_show_' . $entity_name)); ?> onClick="entityShowChange(this, '<?php echo $entity_name; ?> ')" /> </td> </tr> </table> <div id="entity_container_<?php echo $entity_name; ?> " <?php if (!get_option('likebtn_show_' . $entity_name)) { ?> style="display:none"<?php } ?> > <table class="form-table" > <tr valign="top"> <th scope="row"><label><?php _e('Copy Settings From', LIKEBTN_I18N_DOMAIN); ?> </label> <i class="likebtn_help" title="<?php _e('Choose the entity from which you want to copy settings', LIKEBTN_I18N_DOMAIN); ?> "> </i> </th> <td> <select name="likebtn_use_settings_from_<?php echo $entity_name; ?> " onChange="userSettingsFromChange(this, '<?php echo $entity_name; ?> ')"> <option value="" <?php selected('', get_option('likebtn_use_settings_from_' . $entity_name)); ?> > </option> <?php foreach ($likebtn_entities as $use_entity_name => $use_entity_title) { ?> <?php if ($use_entity_name == $entity_name) { continue; } ?> <option value="<?php echo $use_entity_name; ?> " <?php selected($use_entity_name, get_option('likebtn_use_settings_from_' . $entity_name)); ?> ><?php _e($use_entity_title, LIKEBTN_I18N_DOMAIN); ?> </option> <?php } ?> </select> </td> </tr> </table> <?php if (get_option('likebtn_show_' . $entity_name) == '1') { ?> <br/> <div id="preview_fixer" class="likebtn_preview_static postbox" <?php if (get_option('likebtn_use_settings_from_' . $entity_name)) { ?> style="display:none"<?php } ?> > <h3> <?php _e('Preview', LIKEBTN_I18N_DOMAIN); ?> <label class="likebtn_pin"> <input type="checkbox" value="1" id="likebtn_pin" <?php if (!$_COOKIE || empty($_COOKIE['likebtn_pin'])) { ?> checked="checked"<?php } ?> /> <small><?php _e('Sticky preview', LIKEBTN_I18N_DOMAIN); ?> </small> </label> </h3> <div class="inside"> <div class="preview_container"> <?php echo _likebtn_get_markup($entity_name, 'demo', array(), get_option('likebtn_use_settings_from_' . $entity_name), true, true, true); ?> </div> <input class="button-primary" type="submit" name="Save" value="<?php _e('Save Changes', LIKEBTN_I18N_DOMAIN); ?> " id="likebtn_save_preview" <?php if (get_option('likebtn_use_settings_from_' . $entity_name)) { ?> style="display: none"<?php } ?> /> <span class="support_link"> ♥ <?php _e('Like it?', LIKEBTN_I18N_DOMAIN); ?> <a href="https://wordpress.org/support/view/plugin-reviews/likebtn-like-button?filter=5&rate=5#postform" target="_blank"> <?php _e('Support the plugin with ★ 5 Stars', LIKEBTN_I18N_DOMAIN); ?> </a> </span> </div> </div> <?php } ?> <div id="use_settings_from_container_<?php echo $entity_name; ?> " <?php if (get_option('likebtn_use_settings_from_' . $entity_name)) { ?> style="display:none"<?php } ?> > <div class="postbox" id="settings_container"> <?php /*<h3><?php _e('Settings', LIKEBTN_I18N_DOMAIN); ?></h3>*/ ?> <div class="inside"> <table class="form-table"> <tr valign="top"> <th scope="row"><label><?php _e('Theme', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="radio" name="likebtn_theme_type_<?php echo $entity_name; ?> " value="<?php echo LIKEBTN_THEME_TYPE_PREDEFINED; ?> " <?php if (LIKEBTN_THEME_TYPE_PREDEFINED == get_option('likebtn_theme_type_' . $entity_name) || !get_option('likebtn_theme_type_' . $entity_name)) { ?> checked="checked"<?php } ?> class="theme_type_radio" /> <select name="likebtn_settings_theme_<?php echo $entity_name; ?> " class="image_dropdown" id="settings_theme"> <?php foreach ($style_options as $style) { ?> <option value="<?php echo $style; ?> " <?php selected($style, get_option('likebtn_settings_theme_' . $entity_name)); ?> ><?php /*echo $style;*/ ?> </option> <?php } ?> </select> <br/><br/> <label> <input type="radio" name="likebtn_theme_type_<?php echo $entity_name; ?> " class="theme_type_radio" value="<?php echo LIKEBTN_THEME_TYPE_CUSTOM; ?> " <?php if (LIKEBTN_THEME_TYPE_CUSTOM == get_option('likebtn_theme_type_' . $entity_name)) { ?> checked="checked"<?php } ?> /> <?php _e('Custom theme', LIKEBTN_I18N_DOMAIN); ?> </label> <input type="hidden" name="likebtn_settings_theme_<?php echo $entity_name; ?> " id="settings_theme_custom" value="custom" <?php if (LIKEBTN_THEME_TYPE_CUSTOM != get_option('likebtn_theme_type_' . $entity_name)) { ?> class="disabled" disabled="disabled"<?php } ?> /> </td> </tr> <tr valign="top" class="likebtn_custom hidden"> <th scope="row"><label><?php _e('Button size', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="number" name="likebtn_settings_btn_size_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_btn_size_' . $entity_name) ? get_option('likebtn_settings_btn_size_' . $entity_name) : $likebtn_settings['btn_size']['default']; ?> " class="likebtn_input likebtn_i_sm" min="5" max="500" maxlength="3"/> </td> </tr> <tr valign="top" class="likebtn_custom hidden"> <th scope="row"><label><?php _e('Font size', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="number" name="likebtn_settings_f_size_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_f_size_' . $entity_name) ? get_option('likebtn_settings_f_size_' . $entity_name) : $likebtn_settings['f_size']['default']; ?> " class="likebtn_input likebtn_i_sm" min="5" max="500" maxlength="3"/> </td> </tr> <tr valign="top" class="likebtn_custom hidden"> <th scope="row"><label><?php _e('Like icon', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="radio" name="likebtn_icon_l_type_<?php echo $entity_name; ?> " value="<?php echo LIKEBTN_ICON_TYPE_ICON; ?> " <?php if (LIKEBTN_ICON_TYPE_ICON == get_option('likebtn_icon_l_type_' . $entity_name) || !get_option('likebtn_icon_l_type_' . $entity_name)) { ?> checked="checked"<?php } ?> class="icon_l_type_radio" /> <select name="likebtn_settings_icon_l_<?php echo $entity_name; ?> " id="settings_icon_l" class="icon_dropdown likebtn_i_sm <?php if (LIKEBTN_ICON_TYPE_ICON != get_option('likebtn_icon_l_type_' . $entity_name)) { ?> disabled<?php } ?> " <?php if (LIKEBTN_ICON_TYPE_ICON != get_option('likebtn_icon_l_type_' . $entity_name)) { ?> disabled="disabled"<?php } ?> > <?php foreach ($likebtn_icons as $icon) { ?> <option value="<?php echo $icon; ?> " <?php selected($icon, get_option('likebtn_settings_icon_l_' . $entity_name)); ?> ><?php echo $icon; ?> </option> <?php } ?> </select> <br/><br/> <ul class="likebtn-is"> <li class="likebtn-is-radio"> <input type="radio" name="likebtn_icon_l_type_<?php echo $entity_name; ?> " value="<?php echo LIKEBTN_ICON_TYPE_URL; ?> " <?php if (LIKEBTN_ICON_TYPE_URL == get_option('likebtn_icon_l_type_' . $entity_name)) { ?> checked="checked"<?php } ?> class="icon_l_type_radio" /> </li> <li class="likebtn-is-block likebtn-is-frst"> <?php _e('Image', LIKEBTN_I18N_DOMAIN); ?> <br/> <?php $likebtn_icon_url = get_option('likebtn_settings_icon_l_url_' . $entity_name); ?> <a title="<?php _e('Select Icon', LIKEBTN_I18N_DOMAIN); ?> " class="<?php if (!$likebtn_icon_url) { ?> button button-large <?php } ?> likebtn-i-pick" data-likebtn-wp-title="<?php _e('Like Icon', LIKEBTN_I18N_DOMAIN); ?> "> <span class="likebtn-is-cap<?php if ($likebtn_icon_url) { ?> hidden<?php } ?> "><?php _e('Select', LIKEBTN_I18N_DOMAIN); ?> </span> <img class="attachment-medium<?php if (!$likebtn_icon_url) { ?> hidden<?php } ?> " src="<?php echo $likebtn_icon_url; ?> " /> </a> <div class="likebtn-is-remove <?php if (!$likebtn_icon_url) { ?> hidden<?php } ?> "><a onclick="likebtnIconRemove(this);return false;" href="#"><?php _e('Remove', LIKEBTN_I18N_DOMAIN); ?> </a></div> <input type="hidden" name="likebtn_settings_icon_l_url_<?php echo $entity_name; ?> " id="settings_icon_l_url" value="<?php echo $likebtn_icon_url; ?> " class="likebtn-is-inp <?php if (LIKEBTN_ICON_TYPE_URL != get_option('likebtn_icon_l_type_' . $entity_name)) { ?> disabled<?php } ?> " <?php if (LIKEBTN_ICON_TYPE_URL != get_option('likebtn_icon_l_type_' . $entity_name)) { ?> disabled="disabled"<?php } ?> /> </li> <li class="likebtn-is-block"> <?php _e('Image after voting', LIKEBTN_I18N_DOMAIN); ?> <br/> <?php $likebtn_icon_url = get_option('likebtn_settings_icon_l_url_v_' . $entity_name); ?> <a title="<?php _e('Select Icon', LIKEBTN_I18N_DOMAIN); ?> " class="<?php if (!$likebtn_icon_url) { ?> button button-large <?php } ?> likebtn-i-pick" data-likebtn-wp-title="<?php _e('Image after voting', LIKEBTN_I18N_DOMAIN); ?> "> <span class="likebtn-is-cap<?php if ($likebtn_icon_url) { ?> hidden<?php } ?> "><?php _e('Select', LIKEBTN_I18N_DOMAIN); ?> </span> <img class="attachment-medium<?php if (!$likebtn_icon_url) { ?> hidden<?php } ?> " src="<?php echo $likebtn_icon_url; ?> " /> </a> <div class="likebtn-is-remove <?php if (!$likebtn_icon_url) { ?> hidden<?php } ?> "><a onclick="likebtnIconRemove(this);return false;" href="#"><?php _e('Remove', LIKEBTN_I18N_DOMAIN); ?> </a></div> <input type="hidden" name="likebtn_settings_icon_l_url_v_<?php echo $entity_name; ?> " id="settings_icon_l_url_v" value="<?php echo $likebtn_icon_url; ?> " class="likebtn-is-inp <?php if (LIKEBTN_ICON_TYPE_URL != get_option('likebtn_icon_l_type_' . $entity_name)) { ?> disabled<?php } ?> " <?php if (LIKEBTN_ICON_TYPE_URL != get_option('likebtn_icon_l_type_' . $entity_name)) { ?> disabled="disabled"<?php } ?> /> </li> </ul> </td> </tr> <tr valign="top" class="likebtn_custom hidden"> <th scope="row"><label><?php _e('Dislike icon', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="radio" name="likebtn_icon_d_type_<?php echo $entity_name; ?> " value="<?php echo LIKEBTN_ICON_TYPE_ICON; ?> " <?php if (LIKEBTN_ICON_TYPE_ICON == get_option('likebtn_icon_d_type_' . $entity_name) || !get_option('likebtn_icon_d_type_' . $entity_name)) { ?> checked="checked"<?php } ?> class="icon_d_type_radio" /> <select name="likebtn_settings_icon_d_<?php echo $entity_name; ?> " id="settings_icon_d" class="icon_dropdown likebtn_i_sm <?php if (LIKEBTN_ICON_TYPE_ICON != get_option('likebtn_icon_d_type_' . $entity_name)) { ?> disabled<?php } ?> " <?php if (LIKEBTN_ICON_TYPE_ICON != get_option('likebtn_icon_d_type_' . $entity_name)) { ?> disabled="disabled"<?php } ?> > <?php foreach ($likebtn_icons as $icon) { ?> <option value="<?php echo $icon; ?> " <?php selected($icon, get_option('likebtn_settings_icon_d_' . $entity_name)); ?> ><?php echo $icon; ?> </option> <?php } ?> </select> <br/><br/> <ul class="likebtn-is"> <li class="likebtn-is-radio"> <input type="radio" name="likebtn_icon_d_type_<?php echo $entity_name; ?> " value="<?php echo LIKEBTN_ICON_TYPE_URL; ?> " <?php if (LIKEBTN_ICON_TYPE_URL == get_option('likebtn_icon_d_type_' . $entity_name)) { ?> checked="checked"<?php } ?> class="icon_d_type_radio" /> </li> <li class="likebtn-is-block likebtn-is-frst"> <?php _e('Image', LIKEBTN_I18N_DOMAIN); ?> <br/> <?php $likebtn_icon_url = get_option('likebtn_settings_icon_d_url_' . $entity_name); ?> <a title="<?php _e('Select Icon', LIKEBTN_I18N_DOMAIN); ?> " class="<?php if (!$likebtn_icon_url) { ?> button button-large <?php } ?> likebtn-i-pick" data-likebtn-wp-title="<?php _e('Like Icon', LIKEBTN_I18N_DOMAIN); ?> "> <span class="likebtn-is-cap<?php if ($likebtn_icon_url) { ?> hidden<?php } ?> "><?php _e('Select', LIKEBTN_I18N_DOMAIN); ?> </span> <img class="attachment-medium<?php if (!$likebtn_icon_url) { ?> hidden<?php } ?> " src="<?php echo $likebtn_icon_url; ?> " /> </a> <div class="likebtn-is-remove <?php if (!$likebtn_icon_url) { ?> hidden<?php } ?> "><a onclick="likebtnIconRemove(this);return false;" href="#"><?php _e('Remove', LIKEBTN_I18N_DOMAIN); ?> </a></div> <input type="hidden" name="likebtn_settings_icon_d_url_<?php echo $entity_name; ?> " id="settings_icon_d_url" value="<?php echo $likebtn_icon_url; ?> " class="likebtn-is-inp <?php if (LIKEBTN_ICON_TYPE_URL != get_option('likebtn_icon_d_type_' . $entity_name)) { ?> disabled<?php } ?> " <?php if (LIKEBTN_ICON_TYPE_URL != get_option('likebtn_icon_d_type_' . $entity_name)) { ?> disabled="disabled"<?php } ?> /> </li> <li class="likebtn-is-block"> <?php _e('Image after voting', LIKEBTN_I18N_DOMAIN); ?> <br/> <?php $likebtn_icon_url = get_option('likebtn_settings_icon_d_url_v_' . $entity_name); ?> <a title="<?php _e('Select Icon', LIKEBTN_I18N_DOMAIN); ?> " class="<?php if (!$likebtn_icon_url) { ?> button button-large <?php } ?> likebtn-i-pick" data-likebtn-wp-title="<?php _e('Image after voting', LIKEBTN_I18N_DOMAIN); ?> "> <span class="likebtn-is-cap<?php if ($likebtn_icon_url) { ?> hidden<?php } ?> "><?php _e('Select', LIKEBTN_I18N_DOMAIN); ?> </span> <img class="attachment-medium<?php if (!$likebtn_icon_url) { ?> hidden<?php } ?> " src="<?php echo $likebtn_icon_url; ?> " /> </a> <div class="likebtn-is-remove <?php if (!$likebtn_icon_url) { ?> hidden<?php } ?> "><a onclick="likebtnIconRemove(this);return false;" href="#"><?php _e('Remove', LIKEBTN_I18N_DOMAIN); ?> </a></div> <input type="hidden" name="likebtn_settings_icon_d_url_v_<?php echo $entity_name; ?> " id="settings_icon_d_url_v" value="<?php echo $likebtn_icon_url; ?> " class="likebtn-is-inp <?php if (LIKEBTN_ICON_TYPE_URL != get_option('likebtn_icon_d_type_' . $entity_name)) { ?> disabled<?php } ?> " <?php if (LIKEBTN_ICON_TYPE_URL != get_option('likebtn_icon_d_type_' . $entity_name)) { ?> disabled="disabled"<?php } ?> /> </li> </ul> </td> </tr> <tr valign="top" class="likebtn_custom hidden param_icon"> <th scope="row"><label><?php _e('Icon size', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="number" name="likebtn_settings_icon_size_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_icon_size_' . $entity_name) ? get_option('likebtn_settings_icon_size_' . $entity_name) : $likebtn_settings['icon_size']['default']; ?> " class="likebtn_input likebtn_i_sm" min="5" max="500" maxlength="3"/> </td> </tr> <tr valign="top" class="likebtn_custom hidden param_icon_l"> <th scope="row"><label><?php _e('Like icon color', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="text" name="likebtn_settings_icon_l_c_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_icon_l_c_' . $entity_name) ? get_option('likebtn_settings_icon_l_c_' . $entity_name) : $likebtn_settings['icon_l_c']['default']; ?> " data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/> </td> </tr> <tr valign="top" class="likebtn_custom hidden param_icon_l"> <th scope="row"><label><?php _e('Color after voting', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="text" name="likebtn_settings_icon_l_c_v_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_icon_l_c_v_' . $entity_name) ? get_option('likebtn_settings_icon_l_c_v_' . $entity_name) : $likebtn_settings['icon_l_c_v']['default']; ?> " data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/> </td> </tr> <tr valign="top" class="likebtn_custom hidden param_icon_d"> <th scope="row"><label><?php _e('Dislike icon color', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="text" name="likebtn_settings_icon_d_c_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_icon_d_c_' . $entity_name) ? get_option('likebtn_settings_icon_d_c_' . $entity_name) : $likebtn_settings['icon_d_c']['default']; ?> " data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/> </td> </tr> <tr valign="top" class="likebtn_custom hidden param_icon_d"> <th scope="row"><label><?php _e('Color after voting', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="text" name="likebtn_settings_icon_d_c_v_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_icon_d_c_v_' . $entity_name) ? get_option('likebtn_settings_icon_d_c_v_' . $entity_name) : $likebtn_settings['icon_d_c_v']['default']; ?> " data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/> </td> </tr> <tr valign="top" class="likebtn_custom hidden"> <th scope="row"><label><?php _e('Label color', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="text" name="likebtn_settings_label_c_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_label_c_' . $entity_name) ? get_option('likebtn_settings_label_c_' . $entity_name) : $likebtn_settings['label_c']['default']; ?> " data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/> </td> </tr> <tr valign="top" class="likebtn_custom hidden"> <th scope="row"><label><?php _e('Color after voting', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="text" name="likebtn_settings_label_c_v_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_label_c_v_' . $entity_name) ? get_option('likebtn_settings_label_c_v_' . $entity_name) : $likebtn_settings['label_c_v']['default']; ?> " data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/> </td> </tr> <tr valign="top" class="likebtn_custom hidden"> <th scope="row"><label><?php _e('Likes counter color', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="text" name="likebtn_settings_counter_l_c_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_counter_l_c_' . $entity_name) ? get_option('likebtn_settings_counter_l_c_' . $entity_name) : $likebtn_settings['counter_l_c']['default']; ?> " data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/> </td> </tr> <tr valign="top" class="likebtn_custom hidden"> <th scope="row"><label><?php _e('Dislikes counter color', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="text" name="likebtn_settings_counter_d_c_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_counter_d_c_' . $entity_name) ? get_option('likebtn_settings_counter_d_c_' . $entity_name) : $likebtn_settings['counter_d_c']['default']; ?> " data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/> </td> </tr> <tr valign="top" class="likebtn_custom hidden"> <th scope="row"><label><?php _e('Background color', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="text" name="likebtn_settings_bg_c_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_bg_c_' . $entity_name) ? get_option('likebtn_settings_bg_c_' . $entity_name) : $likebtn_settings['bg_c']['default']; ?> " data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/> </td> </tr> <tr valign="top" class="likebtn_custom hidden"> <th scope="row"><label><?php _e('Border color', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="text" name="likebtn_settings_brdr_c_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_brdr_c_' . $entity_name) ? get_option('likebtn_settings_brdr_c_' . $entity_name) : $likebtn_settings['brdr_c']['default']; ?> " data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/> </td> </tr> <tr valign="top" class="likebtn_custom hidden"> <th scope="row"><label><?php _e('Font family', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <select name="likebtn_settings_f_family_<?php echo $entity_name; ?> " class="likebtn_i_sm"> <?php foreach ($likebtn_fonts as $font) { ?> <option value="<?php echo $font; ?> " <?php selected($font, get_option('likebtn_settings_f_family_' . $entity_name)); ?> style="font-family: '<?php echo $font; ?> '"><?php echo $font; ?> </option> <?php } ?> </select> </td> </tr> <tr valign="top" class="likebtn_custom hidden"> <th scope="row"><label><?php _e('Label font style', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <select name="likebtn_settings_label_fs_<?php echo $entity_name; ?> " class="likebtn_i_sm"> <?php foreach ($likebtn_fstyles as $fstyle => $fstyle_opts) { ?> <option value="<?php echo $fstyle; ?> " <?php selected($fstyle, get_option('likebtn_settings_label_fs_' . $entity_name)); ?> style="<?php echo $fstyle_opts['css']; ?> "><?php echo $fstyle_opts['name']; ?> </option> <?php } ?> </select> </td> </tr> <tr valign="top" class="likebtn_custom hidden"> <th scope="row"><label><?php _e('Counter font style', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <select name="likebtn_settings_counter_fs_<?php echo $entity_name; ?> " class="likebtn_i_sm"> <?php foreach ($likebtn_fstyles as $fstyle => $fstyle_opts) { ?> <option value="<?php echo $fstyle; ?> " <?php selected($fstyle, get_option('likebtn_settings_counter_fs_' . $entity_name)); ?> style="<?php echo $fstyle_opts['css']; ?> "><?php echo $fstyle_opts['name']; ?> </option> <?php } ?> </select> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Language', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <select name="likebtn_settings_lang_<?php echo $entity_name; ?> " id="settings_lang" class="likebtn_i_sm"> <?php foreach ($languages as $lang_code => $lang_info) { ?> <option value="<?php echo $lang_code; ?> " <?php selected($lang_code, get_option('likebtn_settings_lang_' . $entity_name)); ?> title="<?php echo $lang_info['en_name']; ?> ">[<?php echo $lang_code; ?> ] <?php echo $lang_info['name']; ?> </option> <?php } ?> </select> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Show buttons', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="checkbox" name="likebtn_settings_like_enabled_<?php echo $entity_name; ?> " value="1" <?php checked('1', get_option('likebtn_settings_like_enabled_' . $entity_name)); ?> /> <i><?php _e('Like', LIKEBTN_I18N_DOMAIN); ?> </i> <input type="checkbox" name="likebtn_settings_dislike_enabled_<?php echo $entity_name; ?> " value="1" <?php checked('1', get_option('likebtn_settings_dislike_enabled_' . $entity_name)); ?> /> <i><?php _e('Dislike', LIKEBTN_I18N_DOMAIN); ?> </i> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Show labels', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="checkbox" name="likebtn_settings_show_like_label_<?php echo $entity_name; ?> " value="1" <?php checked('1', get_option('likebtn_settings_show_like_label_' . $entity_name)); ?> /> <i><?php _e('Like', LIKEBTN_I18N_DOMAIN); ?> </i> <input type="checkbox" name="likebtn_settings_show_dislike_label_<?php echo $entity_name; ?> " value="1" <?php checked('1', get_option('likebtn_settings_show_dislike_label_' . $entity_name)); ?> /> <i><?php _e('Dislike', LIKEBTN_I18N_DOMAIN); ?> </i> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Show icons', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="checkbox" name="likebtn_settings_icon_like_show_<?php echo $entity_name; ?> " value="1" <?php checked('1', get_option('likebtn_settings_icon_like_show_' . $entity_name)); ?> /> <i><?php _e('Like', LIKEBTN_I18N_DOMAIN); ?> </i> <input type="checkbox" name="likebtn_settings_icon_dislike_show_<?php echo $entity_name; ?> " value="1" <?php checked('1', get_option('likebtn_settings_icon_dislike_show_' . $entity_name)); ?> /> <i><?php _e('Dislike', LIKEBTN_I18N_DOMAIN); ?> </i> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Counter type', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <select name="likebtn_settings_counter_type_<?php echo $entity_name; ?> " class="image_dropdown" id="settings_counter_type"> <option value="number" <?php selected('number', get_option('likebtn_settings_counter_type_' . $entity_name)); ?> ><?php _e('Number', LIKEBTN_I18N_DOMAIN); ?> </option> <option value="percent" <?php selected('percent', get_option('likebtn_settings_counter_type_' . $entity_name)); ?> ><?php _e('Percent', LIKEBTN_I18N_DOMAIN); ?> </option> <option value="subtract_dislikes" <?php selected('subtract_dislikes', get_option('likebtn_settings_counter_type_' . $entity_name)); ?> ><?php _e('Subtract dislikes', LIKEBTN_I18N_DOMAIN); ?> </option> <option value="single_number" <?php selected('single_number', get_option('likebtn_settings_counter_type_' . $entity_name)); ?> ><?php _e('Single number outside', LIKEBTN_I18N_DOMAIN); ?> </option> </select> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Show tooltips', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="checkbox" name="likebtn_settings_tooltip_enabled_<?php echo $entity_name; ?> " value="1" <?php checked('1', get_option('likebtn_settings_tooltip_enabled_' . $entity_name)); ?> /> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Like button text', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="text" name="likebtn_settings_i18n_like_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_i18n_like_' . $entity_name); ?> " class="likebtn_input likebtn_placeholder" placeholder="<?php _e('Like', LIKEBTN_I18N_DOMAIN); ?> "/> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Dislike button text', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="text" name="likebtn_settings_i18n_dislike_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_i18n_dislike_' . $entity_name); ?> " class="likebtn_input likebtn_placeholder" placeholder="<?php _e('Dislike', LIKEBTN_I18N_DOMAIN); ?> " /> </td> </tr> <tr valign="top" class="plan_dependent plan_vip"> <th scope="row"><label><?php _e('Remove branding', LIKEBTN_I18N_DOMAIN); ?> <i class="premium_feature" title="VIP / ULTRA"></i></label> <i class="likebtn_help" title="<?php _e('No LikeBtn.com branding link', LIKEBTN_I18N_DOMAIN); ?> "> </i> </th> <td> <input type="checkbox" name="likebtn_settings_white_label_<?php echo $entity_name; ?> " value="1" <?php checked('1', get_option('likebtn_settings_white_label_' . $entity_name)); ?> /> </td> </tr> <?php if ($entity_name !== LIKEBTN_ENTITY_COMMENT) { ?> <tr valign="top"> <th scope="row"><label><?php _e('Google Rich Snippets', LIKEBTN_I18N_DOMAIN); ?> </label> </th> <td> <input type="checkbox" name="likebtn_settings_rich_snippet_<?php echo $entity_name; ?> " value="1" <?php checked('1', get_option('likebtn_settings_rich_snippet_' . $entity_name)); ?> <?php if ($entity_name == LIKEBTN_ENTITY_PRODUCT || $entity_name == LIKEBTN_ENTITY_PRODUCT_LIST) { ?> disabled="disabled"<?php } ?> /> <?php if ($entity_name == LIKEBTN_ENTITY_PRODUCT || $entity_name == LIKEBTN_ENTITY_PRODUCT_LIST) { ?> <small style="color:gray"><?php echo __('WooCommerce is adding Rich Snippets to the products pages by default.', LIKEBTN_I18N_DOMAIN); ?> </small> <?php } else { ?> <small><a href="<?php echo __('https://likebtn.com/en/faq#rich_snippets', LIKEBTN_I18N_DOMAIN); ?> " target="_blank"><?php echo __('What are Google Rich Snippets and how do they boost traffic?', LIKEBTN_I18N_DOMAIN); ?> </a> / <a href="https://www.google.com/search?q=%D0%A1%D1%82%D0%B0%D0%BB%D0%B8%D0%BD%D1%81%D0%BA%D0%B0%D1%8F+%D1%8D%D0%BA%D0%BE%D0%BD%D0%BE%D0%BC%D0%B8%D0%BA%D0%B0+%D1%8D%D1%82%D0%BE+%D0%BD%D0%B5+%D1%8D%D0%BA%D0%BE%D0%BD%D0%BE%D0%BC%D0%B8%D0%BA%D0%B0+%D0%A1%D0%A1%D0%A1%D0%A0+%D0%94%D0%95%D0%A0%D0%96%D0%90%D0%92%D0%90+%D0%A1%D0%95%D0%93%D0%9E%D0%94%D0%9D%D0%AF" target="_blank"><?php echo __('Live demo', LIKEBTN_I18N_DOMAIN); ?> </a></small> <?php } ?> </td> </tr> <?php } ?> <?php if (empty($likebtn_entities_config['likebtn_alignment'][$entity_name]['hide'])) { ?> <tr valign="top"> <th scope="row"><label><?php _e('Horizontal alignment', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="radio" name="likebtn_alignment_<?php echo $entity_name; ?> " value="<?php echo LIKEBTN_ALIGNMENT_LEFT; ?> " <?php if (LIKEBTN_ALIGNMENT_LEFT == get_option('likebtn_alignment_' . $entity_name) || !get_option('likebtn_alignment_' . $entity_name)) { ?> checked="checked"<?php } ?> /> <?php _e('Left'); ?> <input type="radio" name="likebtn_alignment_<?php echo $entity_name; ?> " value="<?php echo LIKEBTN_ALIGNMENT_CENTER; ?> " <?php if (LIKEBTN_ALIGNMENT_CENTER == get_option('likebtn_alignment_' . $entity_name)) { ?> checked="checked"<?php } ?> /> <?php _e('Center'); ?> <input type="radio" name="likebtn_alignment_<?php echo $entity_name; ?> " value="<?php echo LIKEBTN_ALIGNMENT_RIGHT; ?> " <?php if (LIKEBTN_ALIGNMENT_RIGHT == get_option('likebtn_alignment_' . $entity_name)) { ?> checked="checked"<?php } ?> /> <?php _e('Right'); ?> </td> </tr> <?php } ?> <?php if (empty($likebtn_entities_config['likebtn_position'][$entity_name]['hide'])) { ?> <tr valign="top"> <th scope="row"><label><?php _e('Vertical alignment', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="radio" name="likebtn_position_<?php echo $entity_name; ?> " value="<?php echo LIKEBTN_POSITION_TOP; ?> " <?php if (LIKEBTN_POSITION_TOP == get_option('likebtn_position_' . $entity_name)) { ?> checked="checked"<?php } ?> /> <?php _e('Top of Content', LIKEBTN_I18N_DOMAIN); ?> <input type="radio" name="likebtn_position_<?php echo $entity_name; ?> " value="<?php echo LIKEBTN_POSITION_BOTTOM; ?> " <?php if (LIKEBTN_POSITION_BOTTOM == get_option('likebtn_position_' . $entity_name) || !get_option('likebtn_position_' . $entity_name)) { ?> checked="checked"<?php } ?> /> <?php _e('Bottom of Content', LIKEBTN_I18N_DOMAIN); ?> <input type="radio" name="likebtn_position_<?php echo $entity_name; ?> " value="<?php echo LIKEBTN_POSITION_BOTH; ?> " <?php if (LIKEBTN_POSITION_BOTH == get_option('likebtn_position_' . $entity_name)) { ?> checked="checked"<?php } ?> /> <?php _e('Top and Bottom', LIKEBTN_I18N_DOMAIN); ?> </td> </tr> <?php } ?> </table> <?php /*<div class="postbox"> <h3 style="cursor:pointer" onclick="toggleCollapsable(this)" class="likebtn_collapse_trigger"><small>►</small> <?php _e('Extended Settings', LIKEBTN_I18N_DOMAIN); ?></h3> <div class="inside"> <br/>*/ ?> <?php /*<p class="description"> <?php _e('You can find detailed settings description on <a href="http://likebtn.com/en/#settings" target="_blank">LikeBtn.com</a>', LIKEBTN_I18N_DOMAIN); ?></p><br/>*/ ?> <br/> <h3 class="nav-tab-wrapper" style="padding: 0" id="likebtn_extset_tabs"> <a class="nav-tab likebtn_tab_general nav-tab-active" href="javascript:likebtnGotoTab('general', '.likebtn_tab_extset', '#likebtn_extset_tab_', '#likebtn_extset_tabs');void(0);"><?php _e('General', LIKEBTN_I18N_DOMAIN); ?> </a> <a class="nav-tab likebtn_tab_popup" href="javascript:likebtnGotoTab('popup', '.likebtn_tab_extset', '#likebtn_extset_tab_', '#likebtn_extset_tabs');void(0);"><?php _e('Popup', LIKEBTN_I18N_DOMAIN); ?> </a> <a class="nav-tab likebtn_tab_voting" href="javascript:likebtnGotoTab('voting', '.likebtn_tab_extset', '#likebtn_extset_tab_', '#likebtn_extset_tabs');void(0);"><?php _e('Voting', LIKEBTN_I18N_DOMAIN); ?> </a> <a class="nav-tab likebtn_tab_counter" href="javascript:likebtnGotoTab('counter', '.likebtn_tab_extset', '#likebtn_extset_tab_', '#likebtn_extset_tabs');void(0);"><?php _e('Counter', LIKEBTN_I18N_DOMAIN); ?> </a> <a class="nav-tab likebtn_tab_loading" href="javascript:likebtnGotoTab('sharing', '.likebtn_tab_extset', '#likebtn_extset_tab_', '#likebtn_extset_tabs');void(0);"><?php _e('Sharing', LIKEBTN_I18N_DOMAIN); ?> </a> <?php /* <a class="nav-tab likebtn_tab_loading" href="javascript:likebtnGotoTab('loading', '.likebtn_tab_extset', '#likebtn_extset_tab_', '#likebtn_extset_tabs');void(0);"><?php _e('Loading', LIKEBTN_I18N_DOMAIN); ?></a> */ ?> <a class="nav-tab likebtn_tab_tooltips" href="javascript:likebtnGotoTab('tooltips', '.likebtn_tab_extset', '#likebtn_extset_tab_', '#likebtn_extset_tabs');void(0);"><?php _e('Tooltips', LIKEBTN_I18N_DOMAIN); ?> </a> <a class="nav-tab likebtn_tab_misc" href="javascript:likebtnGotoTab('misc', '.likebtn_tab_extset', '#likebtn_extset_tab_', '#likebtn_extset_tabs');void(0);"><?php _e('Misc', LIKEBTN_I18N_DOMAIN); ?> </a> <a class="nav-tab likebtn_tab_texts" href="javascript:likebtnGotoTab('texts', '.likebtn_tab_extset', '#likebtn_extset_tab_', '#likebtn_extset_tabs');void(0);"><?php _e('Texts', LIKEBTN_I18N_DOMAIN); ?> </a> <a class="nav-tab likebtn_tab_buddypress" href="javascript:likebtnGotoTab('buddypress', '.likebtn_tab_extset', '#likebtn_extset_tab_', '#likebtn_extset_tabs');void(0);">BuddyPress</a> </h3> <div class="postbox likebtn_tab_extset" id="likebtn_extset_tab_general"> <?php /*<h3 style="cursor:pointer" onclick="toggleCollapsable(this)" class="likebtn_collapse_trigger"><small>►</small> <?php _e('General', LIKEBTN_I18N_DOMAIN); ?></h3>*/ ?> <div class="inside"> <table class="form-table" > <?php /*if (!in_array($entity_name, $likebtn_no_excerpts)): ?> <tr valign="top"> <th scope="row"><label><?php _e('View mode', LIKEBTN_I18N_DOMAIN); ?></label></th> <td> <input type="radio" name="likebtn_post_view_mode_<?php echo $entity_name; ?>" value="<?php echo LIKEBTN_POST_VIEW_MODE_FULL; ?>" <?php checked(LIKEBTN_POST_VIEW_MODE_FULL, get_option('likebtn_post_view_mode_' . $entity_name)) ?> /> <?php _e('Full', LIKEBTN_I18N_DOMAIN); ?> <input type="radio" name="likebtn_post_view_mode_<?php echo $entity_name; ?>" value="<?php echo LIKEBTN_POST_VIEW_MODE_EXCERPT; ?>" <?php checked(LIKEBTN_POST_VIEW_MODE_EXCERPT, get_option('likebtn_post_view_mode_' . $entity_name)) ?> /> <?php _e('Excerpt', LIKEBTN_I18N_DOMAIN); ?> <input type="radio" name="likebtn_post_view_mode_<?php echo $entity_name; ?>" value="<?php echo LIKEBTN_POST_VIEW_MODE_BOTH; ?>" <?php checked(LIKEBTN_POST_VIEW_MODE_BOTH, get_option('likebtn_post_view_mode_' . $entity_name)) ?> /> <?php _e('Both', LIKEBTN_I18N_DOMAIN); ?> <i class="likebtn_help" title="<?php _e('Choose post display modes for which you want to show the Like Button', LIKEBTN_I18N_DOMAIN); ?>"></i> </td> </tr> <?php endif*/ ?> <tr valign="top"> <th scope="row"><label><?php _e('Format', LIKEBTN_I18N_DOMAIN); ?> </label> <i class="likebtn_help" title="<?php _e('Select post formats for which you want to show the Like Button', LIKEBTN_I18N_DOMAIN); ?> "> </i> </th> <td> <input type="checkbox" name="likebtn_post_format_<?php echo $entity_name; ?> []" value="all" <?php if (in_array('all', get_option('likebtn_post_format_' . $entity_name))) { ?> checked="checked"<?php } ?> onClick="postFormatAllChange(this, '<?php echo $entity_name; ?> ')" /> <?php _e('All', LIKEBTN_I18N_DOMAIN); ?> <span id="post_format_container_<?php echo $entity_name; ?> " <?php if (in_array('all', get_option('likebtn_post_format_' . $entity_name))) { ?> style="display:none"<?php } ?> > <?php foreach ($post_formats as $post_format) { ?> <input type="checkbox" name="likebtn_post_format_<?php echo $entity_name; ?> []" value="<?php echo $post_format; ?> " <?php if (in_array($post_format, get_option('likebtn_post_format_' . $entity_name))) { ?> checked="checked"<?php } ?> /> <?php _e(__(ucfirst($post_format), LIKEBTN_I18N_DOMAIN)); ?> <?php } ?> </span> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Exclude on selected sections', LIKEBTN_I18N_DOMAIN); ?> </label> <i class="likebtn_help" title="<?php _e('Choose sections where you DO NOT want to show the Like Button', LIKEBTN_I18N_DOMAIN); ?> "> </i> </th> <td> <input type="checkbox" name="likebtn_exclude_sections_<?php echo $entity_name; ?> []" value="home" <?php if (in_array('home', $excluded_sections)) { ?> checked="checked"<?php } ?> /> <?php _e('Home'); ?> <input type="checkbox" name="likebtn_exclude_sections_<?php echo $entity_name; ?> []" value="archive" <?php if (in_array('archive', $excluded_sections)) { ?> checked="checked"<?php } ?> /> <?php _e('Archive', LIKEBTN_I18N_DOMAIN); ?> <input type="checkbox" name="likebtn_exclude_sections_<?php echo $entity_name; ?> []" value="search" <?php if (in_array('search', $excluded_sections)) { ?> checked="checked"<?php } ?> /> <?php _e('Search', LIKEBTN_I18N_DOMAIN); ?> <input type="checkbox" name="likebtn_exclude_sections_<?php echo $entity_name; ?> []" value="category" <?php if (in_array('category', $excluded_sections)) { ?> checked="checked"<?php } ?> /> <?php _e('Category', LIKEBTN_I18N_DOMAIN); ?> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Exclude in selected categories', LIKEBTN_I18N_DOMAIN); ?> </label> <i class="likebtn_help" title="<?php _e('Select categories where you DO NOT want to show the Like Button', LIKEBTN_I18N_DOMAIN); ?> "> </i> </th> <td> <select name='likebtn_exclude_categories_<?php echo $entity_name; ?> []' multiple="multiple" id="likebtn_exclude_categories" class="likebtn_input"> <?php $categories = _likebtn_get_categories(); foreach ($categories as $category) { $selected = in_array($category->cat_ID, $excluded_categories) ? 'selected="selected"' : ''; $option = '<option value="' . $category->cat_ID . '" ' . $selected . '>'; $option .= $category->cat_name; $option .= ' (' . $category->category_count . ')'; $option .= '</option>'; echo $option; } ?> </select> </td> </tr> <?php if ($entity_name == LIKEBTN_ENTITY_BBP_POST) { ?> <tr valign="top"> <th scope="row"><label><?php _e('Allow in selected forum', LIKEBTN_I18N_DOMAIN); ?> </label> </th> <td> <select name='likebtn_allow_forums_<?php echo $entity_name; ?> []' multiple="multiple" id="likebtn_allow_forums" class="likebtn_input"> <?php $forums = _likebtn_get_forums(); foreach ($forums as $forum) { $selected = in_array($forum->ID, $allow_forums) ? 'selected="selected"' : ''; $option = '<option value="' . $forum->ID . '" ' . $selected . '>'; $option .= $forum->post_title; $option .= '</option>'; echo $option; } ?> </select> </td> </tr> <?php } ?> <tr valign="top"> <th scope="row"><label><?php _e('Allow post/page IDs', LIKEBTN_I18N_DOMAIN); ?> </label> <i class="likebtn_help" title="<?php _e('Suppose you have a post which belongs to more than one category and you have excluded one of those categories. So the Like Button will not be available for that post. Enter comma separated post ids where you want to show the Like Button irrespective of that post category being excluded.', LIKEBTN_I18N_DOMAIN); ?> "> </i> </th> <td> <input type="text" name="likebtn_allow_ids_<?php echo $entity_name; ?> " value="<?php _e(get_option('likebtn_allow_ids_' . $entity_name)); ?> " class="likebtn_input" /> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Exclude post/page IDs', LIKEBTN_I18N_DOMAIN); ?> </label> <i class="likebtn_help" title="<?php _e('Comma separated post/page IDs where you DO NOT want to show the Like Button', LIKEBTN_I18N_DOMAIN); ?> "> </i> </th> <td> <input type="text" name="likebtn_exclude_ids_<?php echo $entity_name; ?> " value="<?php _e(get_option('likebtn_exclude_ids_' . $entity_name)); ?> " class="likebtn_input" /> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('User authorization check', LIKEBTN_I18N_DOMAIN); ?> </label> </th> <td> <label> <input type="radio" name="likebtn_user_logged_in_<?php echo $entity_name; ?> " value="" class="user_logged_in_radio" <?php checked(LIKEBTN_USER_LOGGED_IN_ALL, get_option('likebtn_user_logged_in_' . $entity_name)); ?> /><?php _e('Show to all', LIKEBTN_I18N_DOMAIN); ?> </label> <br/> <label> <input type="radio" name="likebtn_user_logged_in_<?php echo $entity_name; ?> " value="<?php echo LIKEBTN_USER_LOGGED_IN_YES; ?> " class="user_logged_in_radio" <?php checked(LIKEBTN_USER_LOGGED_IN_YES, get_option('likebtn_user_logged_in_' . $entity_name)); ?> /><?php _e('Show to <strong>logged in</strong> users only', LIKEBTN_I18N_DOMAIN); ?> </label> <br/> <label> <input type="radio" name="likebtn_user_logged_in_<?php echo $entity_name; ?> " value="<?php echo LIKEBTN_USER_LOGGED_IN_NO; ?> " class="user_logged_in_radio" <?php checked(LIKEBTN_USER_LOGGED_IN_NO, get_option('likebtn_user_logged_in_' . $entity_name)); ?> /><?php _e('Show to <strong>non-logged in</strong> users only', LIKEBTN_I18N_DOMAIN); ?> </label> <br/> <label> <input type="radio" name="likebtn_user_logged_in_<?php echo $entity_name; ?> " value="<?php echo LIKEBTN_USER_LOGGED_IN_ALERT; ?> " class="user_logged_in_radio" <?php checked(LIKEBTN_USER_LOGGED_IN_ALERT, get_option('likebtn_user_logged_in_' . $entity_name)); ?> /><?php _e('Show a <strong>message</strong> asking to login instead of the button to non-logged in users', LIKEBTN_I18N_DOMAIN); ?> </label> <br/> <label> <input type="radio" name="likebtn_user_logged_in_<?php echo $entity_name; ?> " value="<?php echo LIKEBTN_USER_LOGGED_IN_ALERT_BTN; ?> " class="user_logged_in_radio" <?php checked(LIKEBTN_USER_LOGGED_IN_ALERT_BTN, get_option('likebtn_user_logged_in_' . $entity_name)); ?> /><?php _e('Show a <strong>message</strong> asking to login <strong>and the button</strong> to non-logged in users', LIKEBTN_I18N_DOMAIN); ?> </label> <br/> <label> <input type="radio" name="likebtn_user_logged_in_<?php echo $entity_name; ?> " value="<?php echo LIKEBTN_USER_LOGGED_IN_MODAL; ?> " class="user_logged_in_radio" <?php checked(LIKEBTN_USER_LOGGED_IN_MODAL, get_option('likebtn_user_logged_in_' . $entity_name)); ?> /><?php _e('Show a <strong>modal window</strong> with the message asking to login when non-logged in user votes', LIKEBTN_I18N_DOMAIN); ?> </label> <p class="notice update-nag param_user_logged_in_notice"><?php echo strtr(__('Make sure not to disable anonymous access to %admin_ajax%, otherwise votes from anonymous visitors will not be accepted.', LIKEBTN_I18N_DOMAIN), array('%admin_ajax%' => '<a href="' . admin_url('admin-ajax.php') . '" target="_blank">/wp-admin/admin-ajax.php</a>')); ?> </p> <p class="description param_user_logged_in_alert hidden"> <br/> <?php _e('Message', LIKEBTN_I18N_DOMAIN); ?> : <textarea name="likebtn_user_logged_in_alert_<?php echo $entity_name; ?> " class="likebtn_input" rows="2"><?php echo htmlspecialchars($user_logged_in_alert); ?> </textarea> </p> </td> </tr> <tr> <th scope="row"><label><?php _e('Like box', LIKEBTN_I18N_DOMAIN); ?> </label> <i class="likebtn_help" title="<?php _e('List of users who liked an item', LIKEBTN_I18N_DOMAIN); ?> "> </i> </th> <td> <label> <input type="radio" name="likebtn_like_box_<?php echo $entity_name; ?> " value="" class="like_box_radio" <?php checked('', get_option('likebtn_like_box_' . $entity_name)); ?> /><?php _e('Disabled', LIKEBTN_I18N_DOMAIN); ?> </label> <label> <input type="radio" name="likebtn_like_box_<?php echo $entity_name; ?> " value="<?php echo LIKEBTN_LIKE_BOX_AFTER; ?> " class="like_box_radio" <?php checked(LIKEBTN_LIKE_BOX_AFTER, get_option('likebtn_like_box_' . $entity_name)); ?> /><?php _e('After the button', LIKEBTN_I18N_DOMAIN); ?> </label> <label> <input type="radio" name="likebtn_like_box_<?php echo $entity_name; ?> " value="<?php echo LIKEBTN_LIKE_BOX_BEFORE; ?> " class="like_box_radio" <?php checked(LIKEBTN_LIKE_BOX_BEFORE, get_option('likebtn_like_box_' . $entity_name)); ?> /><?php _e('Before the button', LIKEBTN_I18N_DOMAIN); ?> </label> <div class="param_like_box hidden" style="position:absolute"><small><a target="_blank" href="https://likebtn.com/en/wordpress-like-button-plugin#like_box_template"><?php _e('How to alter like box template?', LIKEBTN_I18N_DOMAIN); ?> </a></small></div> </td> </tr> <tr valign="top" class="param_like_box hidden"> <th scope="row"><label><?php _e('Like box size', LIKEBTN_I18N_DOMAIN); ?> </label> <i class="likebtn_help" title="<?php _e('Number of users to display in the like box', LIKEBTN_I18N_DOMAIN); ?> "> </i> </th> <td> <input type="number" name="likebtn_like_box_size_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_like_box_size_' . $entity_name) ? get_option('likebtn_like_box_size_' . $entity_name) : $likebtn_buttons_options['likebtn_like_box_size']; ?> " class="likebtn_input likebtn_i_sm" min="1" maxlength="3"/> (<?php _e('users', LIKEBTN_I18N_DOMAIN); ?> ) </td> </tr> <tr valign="top" class="param_like_box hidden"> <th scope="row"><label><?php _e('Like box users', LIKEBTN_I18N_DOMAIN); ?> </label> </th> <td> <label> <input type="radio" name="likebtn_like_box_type_<?php echo $entity_name; ?> " value="<?php echo LIKEBTN_VOTE_LIKE; ?> " <?php if (get_option('likebtn_like_box_type_' . $entity_name) == LIKEBTN_VOTE_LIKE || get_option('likebtn_like_box_type_' . $entity_name) == '') { ?> checked="checked"<?php } ?> /><?php _e('Likers', LIKEBTN_I18N_DOMAIN); ?> </label> <label> <input type="radio" name="likebtn_like_box_type_<?php echo $entity_name; ?> " value="<?php echo LIKEBTN_VOTE_DISLIKE; ?> " <?php checked(LIKEBTN_VOTE_DISLIKE, get_option('likebtn_like_box_type_' . $entity_name)); ?> /><?php _e('Dislikers', LIKEBTN_I18N_DOMAIN); ?> </label> <label> <input type="radio" name="likebtn_like_box_type_<?php echo $entity_name; ?> " value="<?php echo LIKEBTN_VOTE_BOTH; ?> " <?php checked(LIKEBTN_VOTE_BOTH, get_option('likebtn_like_box_type_' . $entity_name)); ?> /><?php _e('Likers & dislikers', LIKEBTN_I18N_DOMAIN); ?> </label> </td> </tr> <tr valign="top" class="param_like_box hidden"> <th scope="row"><label><?php _e('Like box text', LIKEBTN_I18N_DOMAIN); ?> </label> </th> <td> <input type="text" name="likebtn_like_box_text_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_like_box_text_' . $entity_name); ?> " class="likebtn_input" /> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('HTML to put before', LIKEBTN_I18N_DOMAIN); ?> </label> <?php /*<i class="likebtn_help" title="<?php _e('HTML code to insert before the Like Button', LIKEBTN_I18N_DOMAIN); ?>"> </i>*/ ?> </th> <td> <textarea name="likebtn_html_before_<?php echo $entity_name; ?> " class="likebtn_input" rows="2"><?php echo get_option('likebtn_html_before_' . $entity_name); ?> </textarea> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('HTML to put after', LIKEBTN_I18N_DOMAIN); ?> </label> <?php /*<i class="likebtn_help" title="<?php _e('HTML code to insert after the Like Button', LIKEBTN_I18N_DOMAIN); ?>"> </i>*/ ?> </th> <td> <textarea name="likebtn_html_after_<?php echo $entity_name; ?> " class="likebtn_input" rows="2"><?php echo get_option('likebtn_html_after_' . $entity_name); ?> </textarea> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Display on a new line', LIKEBTN_I18N_DOMAIN); ?> </label> <i class="likebtn_help" title="<?php _e("Add a 'clear:both' style to the like button container", LIKEBTN_I18N_DOMAIN); ?> "> </i> </th> <td> <input type="checkbox" name="likebtn_newline_<?php echo $entity_name; ?> " value="1" <?php checked('1', get_option('likebtn_newline_' . $entity_name)); ?> /> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Wrap button in a div', LIKEBTN_I18N_DOMAIN); ?> </label> <i class="likebtn_help" title="<?php _e("If disabled alignment and new line options have no affect", LIKEBTN_I18N_DOMAIN); ?> "> </i> </th> <td> <input type="checkbox" name="likebtn_wrap_<?php echo $entity_name; ?> " value="1" <?php checked('1', get_option('likebtn_wrap_' . $entity_name)); ?> /> </td> </tr> </table> </div> </div> <div class="postbox likebtn_tab_extset hidden" id="likebtn_extset_tab_popup"> <?php /*<h3 style="cursor:pointer" onclick="toggleCollapsable(this)" class="likebtn_collapse_trigger"><small>►</small> <?php _e('Popup', LIKEBTN_I18N_DOMAIN); ?></h3>*/ ?> <div class="inside"> <table class="form-table"> <tr valign="top" class="plan_dependent plan_vip"> <th scope="row"><label><?php _e('Disable popup', LIKEBTN_I18N_DOMAIN); ?> <i class="premium_feature" title="VIP / ULTRA"></i></label></th> <td> <input type="checkbox" name="likebtn_settings_popup_disabled_<?php echo $entity_name; ?> " value="1" <?php checked('1', get_option('likebtn_settings_popup_disabled_' . $entity_name)); ?> /> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Show popup on disliking', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="checkbox" name="likebtn_settings_popup_dislike_<?php echo $entity_name; ?> " value="1" <?php checked('1', get_option('likebtn_settings_popup_dislike_' . $entity_name)); ?> /> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Show popup on button load', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="checkbox" name="likebtn_settings_popup_on_load_<?php echo $entity_name; ?> " value="1" <?php checked('1', get_option('likebtn_settings_popup_on_load_' . $entity_name)); ?> /> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Popup position', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <div class="image_toggle"> <input type="radio" name="likebtn_settings_popup_position_<?php echo $entity_name; ?> " id="likebtn_settings_popup_position_<?php echo $entity_name; ?> _top" value="top" <?php checked('top', get_option('likebtn_settings_popup_position_' . $entity_name)); ?> > <label for="likebtn_settings_popup_position_<?php echo $entity_name; ?> _top"><img src="<?php echo _likebtn_get_public_url(); ?> img/popup_position/top.png" alt="<?php _e('top', LIKEBTN_I18N_DOMAIN); ?> " title="<?php _e('top', LIKEBTN_I18N_DOMAIN); ?> " /></label> <input type="radio" name="likebtn_settings_popup_position_<?php echo $entity_name; ?> " id="likebtn_settings_popup_position_<?php echo $entity_name; ?> _right" value="right" <?php checked('right', get_option('likebtn_settings_popup_position_' . $entity_name)); ?> > <label for="likebtn_settings_popup_position_<?php echo $entity_name; ?> _right"><img src="<?php echo _likebtn_get_public_url(); ?> img/popup_position/right.png" alt="<?php _e('right', LIKEBTN_I18N_DOMAIN); ?> " title="<?php _e('right', LIKEBTN_I18N_DOMAIN); ?> " /></label> <input type="radio" name="likebtn_settings_popup_position_<?php echo $entity_name; ?> " id="likebtn_settings_popup_position_<?php echo $entity_name; ?> _bottom" value="bottom" <?php checked('bottom', get_option('likebtn_settings_popup_position_' . $entity_name)); ?> > <label for="likebtn_settings_popup_position_<?php echo $entity_name; ?> _bottom"><img src="<?php echo _likebtn_get_public_url(); ?> img/popup_position/bottom.png" alt="<?php _e('bottom', LIKEBTN_I18N_DOMAIN); ?> " title="<?php _e('bottom', LIKEBTN_I18N_DOMAIN); ?> " /></label> <input type="radio" name="likebtn_settings_popup_position_<?php echo $entity_name; ?> " id="likebtn_settings_popup_position_<?php echo $entity_name; ?> _left" value="left" <?php checked('left', get_option('likebtn_settings_popup_position_' . $entity_name)); ?> > <label for="likebtn_settings_popup_position_<?php echo $entity_name; ?> _left"><img src="<?php echo _likebtn_get_public_url(); ?> img/popup_position/left.png" alt="<?php _e('left', LIKEBTN_I18N_DOMAIN); ?> " title="<?php _e('left', LIKEBTN_I18N_DOMAIN); ?> " /></label> </div> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Popup style', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <div class="image_toggle"> <input type="radio" name="likebtn_settings_popup_style_<?php echo $entity_name; ?> " id="likebtn_settings_popup_style_<?php echo $entity_name; ?> _light" value="light" <?php checked('light', get_option('likebtn_settings_popup_style_' . $entity_name)); ?> > <label for="likebtn_settings_popup_style_<?php echo $entity_name; ?> _light"><img src="<?php echo _likebtn_get_public_url(); ?> img/popup_style/light.png" alt="<?php _e('light', LIKEBTN_I18N_DOMAIN); ?> " title="<?php _e('light', LIKEBTN_I18N_DOMAIN); ?> " /></label> <input type="radio" name="likebtn_settings_popup_style_<?php echo $entity_name; ?> " id="likebtn_settings_popup_style_<?php echo $entity_name; ?> _dark" value="dark" <?php checked('dark', get_option('likebtn_settings_popup_style_' . $entity_name)); ?> > <label for="likebtn_settings_popup_style_<?php echo $entity_name; ?> _dark"><img src="<?php echo _likebtn_get_public_url(); ?> img/popup_style/dark.png" alt="<?php _e('dark', LIKEBTN_I18N_DOMAIN); ?> " title="<?php _e('dark', LIKEBTN_I18N_DOMAIN); ?> " /></label> </div> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Popup width', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="number" name="likebtn_settings_popup_width_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_popup_width_' . $entity_name); ?> " size="8"/> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Hide popup when clicking outside', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="checkbox" name="likebtn_settings_popup_hide_on_outside_click_<?php echo $entity_name; ?> " value="1" <?php checked('1', get_option('likebtn_settings_popup_hide_on_outside_click_' . $entity_name)); ?> /> </td> </tr> <tr valign="top" class="plan_dependent plan_vip"> <th scope="row"><label><?php _e('Donate buttons', LIKEBTN_I18N_DOMAIN); ?> <i class="premium_feature" title="VIP / ULTRA"></i></label></th> <td> <div id="donate_wrapper"> <div id="donate_pveview" class="likebtn_input"></div> <a href="javascript:likebtnDG('popup_donate_input', false, {width: '80%'}, {preview_container: '#donate_pveview'});void(0);" id="popup_donate_trigger"><img src="<?php echo _likebtn_get_public_url(); ?> img/popup_donate.png" alt="<?php _e('Configure donate buttons', LIKEBTN_I18N_DOMAIN); ?> "></a> </div> <input type="hidden" name="likebtn_settings_popup_donate_<?php echo $entity_name; ?> " value="<?php echo htmlspecialchars(get_option('likebtn_settings_popup_donate_' . $entity_name)); ?> " id="popup_donate_input" class="likebtn_input"/> <p class="description"> <?php _e('Collect donations using', LIKEBTN_I18N_DOMAIN); ?> <a href="https://www.paypal.com" target="_blank">PayPal</a>, <a href="https://bitcoin.org" target="_blank">Bitcoin</a>, <a href="https://wallet.google.com" target="_blank">Google Wallet</a>, <a href="https://money.yandex.ru" target="_blank">Yandex.Money</a>, <a href="http://www.webmoney.ru" target="_blank">Webmoney</a>, <a href="https://qiwi.ru" target="_blank">Qiwi</a>, <a href="http://smscoin.com" target="_blank">SmsCoin</a>, <a href="https://zaypay.com" target="_blank"><?php _e('Zaypay Mobile Payments', LIKEBTN_I18N_DOMAIN); ?> </a>. </p> </td> </tr> <tr valign="top" class="plan_dependent plan_pro"> <th scope="row"><label><?php _e('Custom HTML', LIKEBTN_I18N_DOMAIN); ?> <i class="premium_feature" title="PRO / VIP / ULTRA"></i></label> <i class="likebtn_help" title="<?php _e("Custom HTML to insert into the popup", LIKEBTN_I18N_DOMAIN); ?> "> </i> </th> <td> <textarea name="likebtn_settings_popup_html_<?php echo $entity_name; ?> " class="likebtn_input" rows="2"><?php echo get_option('likebtn_settings_popup_html_' . $entity_name); ?> </textarea> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Popup content order', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <select id="settings_popup_content_order" multiple="multiple" class="likebtn_input"> <option value="popup_donate" ><?php _e('Donate buttons', LIKEBTN_I18N_DOMAIN); ?> </option> <option value="popup_share" ><?php _e('Share buttons', LIKEBTN_I18N_DOMAIN); ?> </option> <option value="popup_html" ><?php _e('Custom HTML', LIKEBTN_I18N_DOMAIN); ?> </option> </select> <input type="hidden" id="settings_popup_content_order_input" name="likebtn_settings_popup_content_order_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_popup_content_order_' . $entity_name); ?> " /> </td> </tr> </table> </div> </div> <div class="postbox likebtn_tab_extset hidden" id="likebtn_extset_tab_voting"> <?php /*<h3 style="cursor:pointer" onclick="toggleCollapsable(this)" class="likebtn_collapse_trigger"><small>►</small> <?php _e('Voting', LIKEBTN_I18N_DOMAIN); ?></h3>*/ ?> <div class="inside"> <table class="form-table"> <tr valign="top"> <th scope="row"><label><?php _e('Allow voting', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="checkbox" name="likebtn_settings_voting_enabled_<?php echo $entity_name; ?> " value="1" <?php checked('1', get_option('likebtn_settings_voting_enabled_' . $entity_name)); ?> /> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Allow to cancel a vote', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="checkbox" name="likebtn_settings_voting_cancelable_<?php echo $entity_name; ?> " value="1" <?php checked('1', get_option('likebtn_settings_voting_cancelable_' . $entity_name)); ?> /> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Allow to like and dislike at the same time', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="checkbox" name="likebtn_settings_voting_both_<?php echo $entity_name; ?> " value="1" <?php checked('1', get_option('likebtn_settings_voting_both_' . $entity_name)); ?> /> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Voting frequency', LIKEBTN_I18N_DOMAIN); ?> </label> </th> <td> <select name="likebtn_settings_voting_frequency_<?php echo $entity_name; ?> "> <option value=""><?php _e('Once', LIKEBTN_I18N_DOMAIN); ?> </option> <option value="1" <?php selected('1', get_option('likebtn_settings_voting_frequency_' . $entity_name)); ?> ><?php _e('Unlimited', LIKEBTN_I18N_DOMAIN); ?> *</option> <option value="60" <?php selected('60', get_option('likebtn_settings_voting_frequency_' . $entity_name)); ?> ><?php _e('Every minute', LIKEBTN_I18N_DOMAIN); ?> *</option> <option value="3600" <?php selected('3600', get_option('likebtn_settings_voting_frequency_' . $entity_name)); ?> ><?php _e('Hourly', LIKEBTN_I18N_DOMAIN); ?> *</option> <option value="86400" <?php selected('86400', get_option('likebtn_settings_voting_frequency_' . $entity_name)); ?> ><?php _e('Daily', LIKEBTN_I18N_DOMAIN); ?> </option> <option value="604800" <?php selected('604800', get_option('likebtn_settings_voting_frequency_' . $entity_name)); ?> ><?php _e('Weekly', LIKEBTN_I18N_DOMAIN); ?> </option> <option value="2592000" <?php selected('2592000', get_option('likebtn_settings_voting_frequency_' . $entity_name)); ?> ><?php _e('Monthly', LIKEBTN_I18N_DOMAIN); ?> </option> <option value="31536000" <?php selected('31536000', get_option('likebtn_settings_voting_frequency_' . $entity_name)); ?> ><?php _e('Annually', LIKEBTN_I18N_DOMAIN); ?> </option> </select> <p class="description"> * <?php echo strtr(__('Make sure that its value is larger than <a href="%url_interval%">IP address vote interval</a> of your website (default IP address vote interval is 24 hours).', LIKEBTN_I18N_DOMAIN), array('%url_interval%' => "javascript:likebtnPopup('" . __('http://likebtn.com/en/', LIKEBTN_I18N_DOMAIN) . "customer.php/websites');void(0);")); ?> </p> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Display a read-only button to the post author', LIKEBTN_I18N_DOMAIN); ?> </label> </th> <td> <input type="checkbox" name="likebtn_voting_author_<?php echo $entity_name; ?> " value="1" <?php checked('1', get_option('likebtn_voting_author_' . $entity_name)); ?> /> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Voting period', LIKEBTN_I18N_DOMAIN); ?> </label> <i class="likebtn_help" title="<?php _e("After the specified period of time the button will be displayed in a read-only mode", LIKEBTN_I18N_DOMAIN); ?> "> </i> </th> <td> <select name="likebtn_voting_period_<?php echo $entity_name; ?> " class="likebtn_input voting_period" id="likebtn_voting_period"> <option value=""><?php _e('Voting is always active', LIKEBTN_I18N_DOMAIN); ?> </option> <option value="<?php echo LIKEBTN_VOTING_PERIOD_DATE; ?> " <?php selected(LIKEBTN_VOTING_PERIOD_DATE, get_option('likebtn_voting_period_' . $entity_name)); ?> ><?php _e('Voting is active till specific date', LIKEBTN_I18N_DOMAIN); ?> </option> <option value="<?php echo LIKEBTN_VOTING_PERIOD_CREATED; ?> " <?php selected(LIKEBTN_VOTING_PERIOD_CREATED, get_option('likebtn_voting_period_' . $entity_name)); ?> ><?php _e('Voting is active for a period of time since item publication', LIKEBTN_I18N_DOMAIN); ?> </option> </select> <div class="param_voting_period param_vp_date hidden"> <br/> <?php _e('Date', LIKEBTN_I18N_DOMAIN); ?> : <input type="text" name="likebtn_voting_date_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_voting_date_' . $entity_name); ?> " id="likebtn_voting_date" size="16" /> <p class="description"> <?php _e('Keep in mind that you have to specify your server date and time.', LIKEBTN_I18N_DOMAIN); ?> <br/><?php _e('Current server date and time:', LIKEBTN_I18N_DOMAIN); ?> <?php echo date("Y/m/d H:i"); ?> </p> </div> <div class="param_voting_period param_vp_created hidden"> <br/> <div id="likebtn_voting_created_cntr"></div> <input type="number" name="likebtn_voting_created_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_voting_created_' . $entity_name); ?> " id="likebtn_voting_created" class="hidden" /> </div> </td> </tr> </table> </div> </div> <div class="postbox likebtn_tab_extset hidden" id="likebtn_extset_tab_counter"> <?php /*<h3 style="cursor:pointer" onclick="toggleCollapsable(this)" class="likebtn_collapse_trigger"><small>►</small> <?php _e('Counter', LIKEBTN_I18N_DOMAIN); ?></h3>*/ ?> <div class="inside"> <table class="form-table"> <tr valign="top"> <th scope="row"><label><?php _e('Show votes counter', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="checkbox" name="likebtn_settings_counter_show_<?php echo $entity_name; ?> " value="1" <?php checked('1', get_option('likebtn_settings_counter_show_' . $entity_name)); ?> /> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Votes counter is clickable', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="checkbox" name="likebtn_settings_counter_clickable_<?php echo $entity_name; ?> " value="1" <?php checked('1', get_option('likebtn_settings_counter_clickable_' . $entity_name)); ?> /> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Counter padding', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="text" name="likebtn_settings_counter_padding_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_counter_padding_' . $entity_name); ?> " class="likebtn_input" /> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Show zero value in counter', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="checkbox" name="likebtn_settings_counter_zero_show_<?php echo $entity_name; ?> " value="1" <?php checked('1', get_option('likebtn_settings_counter_zero_show_' . $entity_name)); ?> /> </td> </tr> </table> </div> </div> <?php /*<div class="postbox"> <h3 style="cursor:pointer" onclick="toggleCollapsable(this)" class="likebtn_collapse_trigger"><small>►</small> <?php _e('Sharing', LIKEBTN_I18N_DOMAIN); ?></h3> <div class="inside hidden"> <table class="form-table"> </table> </div> </div>*/ ?> <?php /* <div class="postbox likebtn_tab_extset hidden" id="likebtn_extset_tab_loading"> <?php /*<h3 style="cursor:pointer" onclick="toggleCollapsable(this)" class="likebtn_collapse_trigger"><small>►</small> <?php _e('Loading', LIKEBTN_I18N_DOMAIN); ?></h3> ?> <div class="inside"> <table class="form-table"> </table> </div> </div> */ ?> <div class="postbox likebtn_tab_extset hidden" id="likebtn_extset_tab_sharing"> <div class="inside"> <table class="form-table"> <tr valign="top" class="plan_dependent plan_plus"> <th scope="row"><label><?php _e('Show share buttons', LIKEBTN_I18N_DOMAIN); ?> <i class="premium_feature" title="PLUS / PRO / VIP / ULTRA"></i></label></th> <td> <input type="checkbox" name="likebtn_settings_share_enabled_<?php echo $entity_name; ?> " value="1" <?php checked('1', get_option('likebtn_settings_share_enabled_' . $entity_name)); ?> /> <?php /*<span class="description"><?php _e('Use popup_disabled option to enable/disable popup.', LIKEBTN_I18N_DOMAIN); ?></span>*/ ?> </td> </tr> <tr valign="top" class="plan_dependent plan_pro"> <th scope="row"> <label><?php _e('AddThis share buttons', LIKEBTN_I18N_DOMAIN); ?> <i class="premium_feature" title="PLUS / PRO / VIP / ULTRA"></i></label> </th> <td> <select id="settings_addthis_service_codes" class="likebtn_at16 likebtn_input" multiple="multiple" > <?php foreach ($likebtn_addthis_service_codes as $addthis_service_code) { ?> <option value="<?php echo $addthis_service_code; ?> "><?php echo $addthis_service_code; ?> </option> <?php } ?> </select> <input type="hidden" name="likebtn_settings_addthis_service_codes_<?php echo $entity_name; ?> " value="<?php echo $value_addthis_service_codes; ?> " class="likebtn_input" id="settings_addthis_service_codes_input"/> <p class="description"><?php _e('<a href="http://www.addthis.com" target="_blank">AddThis</a> is the content sharing and social insights platform helping users to share your content and drive viral traffic.', LIKEBTN_I18N_DOMAIN); ?> </p> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Share buttons size', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <div class="image_toggle"> <input type="radio" name="likebtn_settings_share_size_<?php echo $entity_name; ?> " id="likebtn_settings_share_size_<?php echo $entity_name; ?> _small" value="small" <?php checked('small', get_option('likebtn_settings_share_size_' . $entity_name)); ?> > <label for="likebtn_settings_share_size_<?php echo $entity_name; ?> _small"><img src="<?php echo _likebtn_get_public_url(); ?> img/share_size/small.png" alt="<?php _e('small', LIKEBTN_I18N_DOMAIN); ?> " title="<?php _e('small', LIKEBTN_I18N_DOMAIN); ?> " /></label> <input type="radio" name="likebtn_settings_share_size_<?php echo $entity_name; ?> " id="likebtn_settings_share_size_<?php echo $entity_name; ?> _medium" value="medium" <?php checked('medium', get_option('likebtn_settings_share_size_' . $entity_name)); checked('', get_option('likebtn_settings_share_size_' . $entity_name)); ?> > <label for="likebtn_settings_share_size_<?php echo $entity_name; ?> _medium"><img src="<?php echo _likebtn_get_public_url(); ?> img/share_size/medium.png" alt="<?php _e('medium', LIKEBTN_I18N_DOMAIN); ?> " title="<?php _e('medium', LIKEBTN_I18N_DOMAIN); ?> " /></label> <input type="radio" name="likebtn_settings_share_size_<?php echo $entity_name; ?> " id="likebtn_settings_share_size_<?php echo $entity_name; ?> _large" value="large" <?php checked('large', get_option('likebtn_settings_share_size_' . $entity_name)); ?> > <label for="likebtn_settings_share_size_<?php echo $entity_name; ?> _large"><img src="<?php echo _likebtn_get_public_url(); ?> img/share_size/large.png" alt="<?php _e('large', LIKEBTN_I18N_DOMAIN); ?> " title="<?php _e('large', LIKEBTN_I18N_DOMAIN); ?> " /></label> </div> </td> </tr> <tr valign="top" class="plan_dependent plan_pro"> <th scope="row"><label><?php _e('AddThis <a href="https://www.addthis.com/settings/publisher" target="_blank">Profile ID</a>', LIKEBTN_I18N_DOMAIN); ?> <i class="premium_feature" title="PLUS / PRO / VIP / ULTRA"></i></label> <i class="likebtn_help" title="<?php _e("Enter your AddThis Profile ID to collect sharing statistics and view it on AddThis analytics page", LIKEBTN_I18N_DOMAIN); ?> "> </i> </th> <td> <input type="text" name="likebtn_settings_addthis_pubid_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_addthis_pubid_' . $entity_name); ?> " class=" likebtn_input likebtn_placeholder" placeholder="ra-511b51aa3d843ec4" /> </td> </tr> <?php if (empty($likebtn_entities_config['likebtn_og'][$entity_name]['hide'])) { ?> <tr valign="top"> <th scope="row"><label><?php _e('Add Open Graph meta tags', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="checkbox" name="likebtn_og_<?php echo $entity_name; ?> " value="1" <?php checked('1', get_option('likebtn_og_' . $entity_name_clean)); ?> /> <p class="description"><?php _e('When sharing an item on Facebook it picks up the data (title, thumbnail image, description) from <a href="http://www.addthis.com/blog/2014/07/03/optimize-your-content-recommendations-with-open-graph-tags-2/#.Vn-z8Pl95nJ" target="_blank">Open Graph</a> meta tags. If these tags are not present the social network attempts to fetch information from the page itself. In order to figure out what Facebook sees use <a href="https://developers.facebook.com/tools/debug/" target="_blank">Facebook’s URL Debugger</a>', LIKEBTN_I18N_DOMAIN); ?> <?php /*<br/><br/> <?php _e('Open Graph meta tags can be added to the single post/page only. There is no way to add specific meta tag for each post in the list.', LIKEBTN_I18N_DOMAIN); ?>*/ ?> </p> </td> </tr> <?php } ?> </table> </div> </div> <div class="postbox likebtn_tab_extset hidden" id="likebtn_extset_tab_tooltips"> <div class="inside"> <table class="form-table"> <tr valign="top"> <th scope="row"><label><?php _e('Always show Like button tooltip', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="checkbox" name="likebtn_settings_tooltip_like_show_always_<?php echo $entity_name; ?> " value="1" <?php checked('1', get_option('likebtn_settings_tooltip_like_show_always_' . $entity_name)); ?> /> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Always show Dislike button tooltip', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="checkbox" name="likebtn_settings_tooltip_dislike_show_always_<?php echo $entity_name; ?> " value="1" <?php checked('1', get_option('likebtn_settings_tooltip_dislike_show_always_' . $entity_name)); ?> /> </td> </tr> </table> </div> </div> <?php /*<div class="postbox"> <h3 style="cursor:pointer" onclick="toggleCollapsable(this)" class="likebtn_collapse_trigger"><small>►</small> <?php _e('Domains', LIKEBTN_I18N_DOMAIN); ?></h3> <div class="inside hidden"> <table class="form-table"> <tr valign="top"> <th scope="row"><label><?php _e('Use domain of the parent window', LIKEBTN_I18N_DOMAIN); ?></label></th> <td> <input type="checkbox" name="likebtn_settings_domain_from_parent_<?php echo $entity_name; ?>" value="1" <?php checked('1', get_option('likebtn_settings_domain_from_parent_' . $entity_name)); ?> /> <span class="description">domain_from_parent</span> </td> </tr> </table> </div> </div>*/ ?> <div class="postbox likebtn_tab_extset hidden" id="likebtn_extset_tab_misc"> <?php /*<h3 style="cursor:pointer" onclick="toggleCollapsable(this)" class="likebtn_collapse_trigger"><small>►</small> <?php _e('Events', LIKEBTN_I18N_DOMAIN); ?></h3>*/ ?> <div class="inside"> <table class="form-table"> <tr valign="top"> <th colspan="2" scope="row"><h3 class="likebtn_subtitle"><?php _e('Loading', LIKEBTN_I18N_DOMAIN); ?> </h3></th> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Lazy load', LIKEBTN_I18N_DOMAIN); ?> </label> <i class="likebtn_help" title="<?php _e("If button is outside a viewport it is loaded when user scrolls to it", LIKEBTN_I18N_DOMAIN); ?> "> </i> </th> <td> <input type="checkbox" name="likebtn_settings_lazy_load_<?php echo $entity_name; ?> " value="1" <?php checked('1', get_option('likebtn_settings_lazy_load_' . $entity_name)); ?> /> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Show loader', LIKEBTN_I18N_DOMAIN); ?> </label> <i class="likebtn_help" title="<?php _e("Show loader while loading a button", LIKEBTN_I18N_DOMAIN); ?> "> </i> </th> <td> <input type="checkbox" name="likebtn_settings_loader_show_<?php echo $entity_name; ?> " value="1" <?php checked('1', get_option('likebtn_settings_loader_show_' . $entity_name)); ?> /> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Loader image', LIKEBTN_I18N_DOMAIN); ?> </label> <i class="likebtn_help" title="<?php _e("URL of the image to use as loader image (leave empty to display default image)", LIKEBTN_I18N_DOMAIN); ?> "> </i> </th> <td> <input type="text" name="likebtn_settings_loader_image_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_loader_image_' . $entity_name); ?> " class="likebtn_input" /> </td> </tr> <tr valign="top"> <th colspan="2" scope="row"><h3 class="likebtn_subtitle"><?php _e('Events', LIKEBTN_I18N_DOMAIN); ?> </h3></th> </tr> <tr valign="top"> <th scope="row"> <label> <?php _e('JavaScript callback function', LIKEBTN_I18N_DOMAIN); ?> </label> </th> <td class="description"> <input type="text" name="likebtn_settings_event_handler_<?php echo $entity_name; ?> " value="<?php _e(get_option('likebtn_settings_event_handler_' . $entity_name)); ?> " class="likebtn_input" /> <p class="description"> <?php _e('The provided function receives the event object as its single argument. The event object has the following properties:', LIKEBTN_I18N_DOMAIN); ?> <br/> <code>type</code> – <?php _e('indicates which event was dispatched:', LIKEBTN_I18N_DOMAIN); ?> <br/> ● "likebtn.loaded"<br/> ● "likebtn.like"<br/> ● "likebtn.unlike"<br/> ● "likebtn.dislike"<br/> ● "likebtn.undislike"<br/> <code>settings</code> – <?php _e('button settings', LIKEBTN_I18N_DOMAIN); ?> <br/> <code>wrapper</code> – <?php _e('button DOM-element', LIKEBTN_I18N_DOMAIN); ?> </p> </td> </tr> <?php /*<tr valign="top"> <th scope="row"><label><?php _e('Show info messages', LIKEBTN_I18N_DOMAIN); ?></label> <i class="likebtn_help" title="<?php _e("Show information message instead of the button when it is restricted by tariff plan", LIKEBTN_I18N_DOMAIN); ?>"> </i> </th> <td> <input type="checkbox" name="likebtn_settings_info_message_<?php echo $entity_name; ?>" value="1" <?php checked('1', get_option('likebtn_settings_info_message_' . $entity_name)); ?> /> </td> </tr>*/ ?> </table> </div> </div> <div class="postbox likebtn_tab_extset hidden" id="likebtn_extset_tab_texts"> <?php /*<h3 style="cursor:pointer" onclick="toggleCollapsable(this)" class="likebtn_collapse_trigger"><small>►</small> <?php _e('Texts', LIKEBTN_I18N_DOMAIN); ?></h3>*/ ?> <div class="inside"> <table class="form-table"> <tr valign="top"> <th scope="row"><label><?php _e('Like button text after liking', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="text" name="likebtn_settings_i18n_after_like_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_i18n_after_like_' . $entity_name); ?> " class="likebtn_input likebtn_placeholder" placeholder="<?php _e('Like', LIKEBTN_I18N_DOMAIN); ?> "/> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Dislike button text after disliking', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="text" name="likebtn_settings_i18n_after_dislike_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_i18n_after_dislike_' . $entity_name); ?> " class="likebtn_input likebtn_placeholder" placeholder="<?php _e('Dislike', LIKEBTN_I18N_DOMAIN); ?> "/> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Like button tooltip', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="text" name="likebtn_settings_i18n_like_tooltip_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_i18n_like_tooltip_' . $entity_name); ?> " class="likebtn_input likebtn_placeholder" placeholder="<?php _e('I like this', LIKEBTN_I18N_DOMAIN); ?> "/> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Dislike button tooltip', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="text" name="likebtn_settings_i18n_dislike_tooltip_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_i18n_dislike_tooltip_' . $entity_name); ?> " class="likebtn_input likebtn_placeholder" placeholder="<?php _e('I dislike this', LIKEBTN_I18N_DOMAIN); ?> "/> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Like button tooltip after liking', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="text" name="likebtn_settings_i18n_unlike_tooltip_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_i18n_unlike_tooltip_' . $entity_name); ?> " class="likebtn_input likebtn_placeholder" placeholder="<?php _e('Unlike', LIKEBTN_I18N_DOMAIN); ?> "/> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Dislike button tooltip after disliking', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="text" name="likebtn_settings_i18n_undislike_tooltip_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_i18n_undislike_tooltip_' . $entity_name); ?> " class="likebtn_input likebtn_placeholder" placeholder="<?php _e('Undislike', LIKEBTN_I18N_DOMAIN); ?> "/> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Text before share buttons', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="text" name="likebtn_settings_i18n_share_text_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_i18n_share_text_' . $entity_name); ?> " class="likebtn_input likebtn_placeholder" placeholder="<?php _e('Would you like to share?', LIKEBTN_I18N_DOMAIN); ?> "/> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Popup close button text', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="text" name="likebtn_settings_i18n_popup_close_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_i18n_popup_close_' . $entity_name); ?> " class="likebtn_input likebtn_placeholder" placeholder="<?php _e('Close', LIKEBTN_I18N_DOMAIN); ?> "/> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Popup text when sharing disabled', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="text" name="likebtn_settings_i18n_popup_text_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_i18n_popup_text_' . $entity_name); ?> " class="likebtn_input likebtn_placeholder" placeholder="<?php _e('Glad you liked it!', LIKEBTN_I18N_DOMAIN); ?> "/> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Text before donate buttons', LIKEBTN_I18N_DOMAIN); ?> </label></th> <td> <input type="text" name="likebtn_settings_i18n_popup_donate_<?php echo $entity_name; ?> " value="<?php echo get_option('likebtn_settings_i18n_popup_donate_' . $entity_name); ?> " class="likebtn_input likebtn_placeholder" placeholder="<?php _e('Show gratitude in the form of a donation', LIKEBTN_I18N_DOMAIN); ?> "/> </td> </tr> </tr> <tr valign="top"> <th scope="row" colspan="2"> <a href="javascript:likebtnPopup('<?php _e('http://likebtn.com/en/translate-like-button-widget', LIKEBTN_I18N_DOMAIN); ?> ');void(0);"><?php _e('Send us Translation', LIKEBTN_I18N_DOMAIN); ?> </a> </td> </tr> </table> </div> </div> <div class="postbox likebtn_tab_extset hidden" id="likebtn_extset_tab_buddypress"> <div class="inside"> <table class="form-table"> <tr> <th scope="row"><label><?php _e('Display notifications on likes & dislikes for users', LIKEBTN_I18N_DOMAIN); ?> </label> <i class="likebtn_help" title="<?php _e("Display a notification for the author when other authenticated user likes or dislikes author's content", LIKEBTN_I18N_DOMAIN); ?> "> </i> </th> <td> <input type="checkbox" name="likebtn_bp_notify_<?php echo $entity_name_clean; ?> " value="1" <?php checked('1', get_option('likebtn_bp_notify_' . $entity_name_clean)); ?> <?php if (!_likebtn_is_bp_active()) { ?> disabled="disabled"<?php } ?> /> </td> </tr> <tr> <th scope="row"><label><?php _e('Record vote action in activity stream', LIKEBTN_I18N_DOMAIN); ?> </label> </th> <td> <input type="checkbox" name="likebtn_bp_activity_<?php echo $entity_name_clean; ?> " value="1" class="bp_activity" <?php checked('1', get_option('likebtn_bp_activity_' . $entity_name_clean)); ?> <?php if (!_likebtn_is_bp_active()) { ?> disabled="disabled"<?php } ?> /> <br/><p class="description"> ● <?php _e('If you want to record vote actions for forums in BuddyPress groups, enable this option for (bbPress) Forum Posts', LIKEBTN_I18N_DOMAIN); ?> <br/> ● <?php _e('Votes in private groups are NOT displayed in the public activity stream', LIKEBTN_I18N_DOMAIN); ?> </p> </td> </tr> <tr class="param_bp_hide_sitewide"> <th scope="row"><label><?php _e('Hide vote actions from sitewide activity', LIKEBTN_I18N_DOMAIN); ?> </label> <i class="likebtn_help" title="<?php _e("Activity will be private and only visible for the logged in user when viewing his profile activities", LIKEBTN_I18N_DOMAIN); ?> "> </i> </th> <td> <input type="checkbox" name="likebtn_bp_hide_sitewide_<?php echo $entity_name_clean; ?> " value="1" <?php checked('1', get_option('likebtn_bp_hide_sitewide_' . $entity_name_clean)); ?> <?php if (!_likebtn_is_bp_active()) { ?> disabled="disabled"<?php } ?> /> </td> </tr> <tr class="param_bp_image"> <th scope="row"><label><?php _e('Include item snippet in activity stream', LIKEBTN_I18N_DOMAIN); ?> </label> </th> <td> <input type="checkbox" name="likebtn_bp_image_<?php echo $entity_name_clean; ?> " value="1" <?php checked('1', get_option('likebtn_bp_image_' . $entity_name_clean)); ?> <?php if (!_likebtn_is_bp_active()) { ?> disabled="disabled"<?php } ?> /> <br/><br/> <?php _e('Snippet template', LIKEBTN_I18N_DOMAIN); ?> : <br/> <textarea name="likebtn_bp_snippet_tpl_<?php echo $entity_name; ?> " class="likebtn_input" rows="7"><?php if (get_option('likebtn_bp_snippet_tpl_' . $entity_name)) { echo htmlspecialchars(get_option('likebtn_bp_snippet_tpl_' . $entity_name)); } else { echo htmlspecialchars(LIKEBTN_BP_SNIPPET_TPL); } ?> </textarea> <br/><br/> <img src="<?php echo _likebtn_get_public_url(); ?> img/buddypress_activity.png" class="likebtn_input" /> <br/><br/> <p class="description"> <small><?php _e('Keep in mind that BuddyPress has a list of allowed HTML-tags and attributes for activity snippets. If you need extra tags in snippet, add the following code to your theme\'s functions.php:', LIKEBTN_I18N_DOMAIN); ?> </small> <textarea class="likebtn_input disabled" rows="4" readonly="readonly">function custom_bp_activity_allowed_tags( $allowedtags ) { // New tags and attributes if (empty($allowedtags['td'])) { $allowedtags['td'] = array(); } if (empty($allowedtags['td']['style'])) { $allowedtags['td']['style'] = array(); } return $allowedtags; } add_filter('bp_activity_allowed_tags', 'custom_bp_activity_allowed_tags');</textarea> </p> <?php /* <?php /*<br/> <small class="description"><a target="_blank" href="https://likebtn.com/en/wordpress-like-button-plugin#bb_activity_snippet_template"><?php _e('How to alter snippet template?', LIKEBTN_I18N_DOMAIN); ?></a></small>*/ ?> </td> </tr> </table> </div> </div> <?php /* </div> </div>*/ ?> <div class="likebtn_reset_wrapper"> <span class="likebtn_sc_trgr"><a href="javascript:likebtnToggleShortcode('likebtn_sc_wr')"><?php _e('Get shortcode', LIKEBTN_I18N_DOMAIN); ?> </a> <small>▼</small></span> <input class="button-secondary" type="button" name="Reset" value="<?php _e('Reset', LIKEBTN_I18N_DOMAIN); ?> " onclick="return resetSettings('<?php echo $entity_name; ?> ', reset_settings)" /> </div> <div id="likebtn_sc_wr" class="postbox"> <br/> <textarea class="likebtn_input likebtn_disabled" rows="5" id="likebtn_sc" readonly="readonly"></textarea> <table class="form-table"> <tr> <th scope="row"> <label><?php _e('Button identifier', LIKEBTN_I18N_DOMAIN); ?> </label> </th> <td> <input type="radio" name="likebtn_identifier_type" value="post_id" checked="checked"/> <?php _e('Post ID', LIKEBTN_I18N_DOMAIN); ?> <input type="radio" name="likebtn_identifier_type" value="custom" /> <?php _e('Custom', LIKEBTN_I18N_DOMAIN); ?> <input type="text" id="likebtn_sc_identifier" value="item_1" class="likebtn_sc_identifier_custom hidden"/> </td> </tr> <tr class="likebtn_sc_identifier_custom hidden"> <th scope="row" class="no-padding-top"> </th> <td class="no-padding-top"> <p class="likebtn_error"> <?php _e('Identifier must be unique for all the buttons inserted using shortcode, otherwise buttons will reflect the same number of likes.', LIKEBTN_I18N_DOMAIN); ?> </p> <p class="likebtn_error"> <?php _e('If custom identifier is used you will see button identifier in statistics and most liked content widget instead of post title. You also will be unable to sort posts by likes.', LIKEBTN_I18N_DOMAIN); ?> </p> </td> </tr> </table> </div> </div> </div> </div> </div> </div> </div> <?php } ?> <input class="button-primary" type="submit" name="Save" value="<?php _e('Save Changes', LIKEBTN_I18N_DOMAIN); ?> " <?php /*if (get_option('likebtn_show_' . $entity_name) == '1'): ?>style="display: none"<?php endif*/ ?> /><br/><br/> </form> </div> <?php _likebtn_admin_footer(); }