.appreplicaicons-css { width: ' . get_site_option('appreplicaicons-size', 24) . 'px; height: ' . get_site_option('appreplicaicons-size', 24) . 'px; opacity: ' . get_site_option('appreplicaicons-opacity', 1) . '; margin-left: ' . get_site_option('appreplicaicons-spacing-h', 3) . 'px; margin-right: ' . get_site_option('appreplicaicons-spacing-h', 3) . 'px; margin-top: ' . get_site_option('appreplicaicons-spacing-v', 3) . 'px; margin-bottom: ' . get_site_option('appreplicaicons-spacing-v', 3) . 'px; } .appreplicaicons-css:hover { opacity: ' . get_site_option('appreplicaicons-opacity-hover', 1) . '; } .appreplicaicons-other-css { font-size: ' . get_site_option('appreplicaicons-other-size', 24) . 'px; color: ' . get_site_option('appreplicaicons-other-color') . '; margin-left: ' . get_site_option('appreplicaicons-other-spacing-h', 3) . 'px; margin-right: ' . get_site_option('appreplicaicons-other-spacing-h', 3) . 'px; margin-top: ' . get_site_option('appreplicaicons-other-spacing-v', 3) . 'px; margin-bottom: ' . get_site_option('appreplicaicons-other-spacing-v', 3) . 'px; text-decoration: none !important; } a.appreplicaicons-other-css:link { color: ' . get_site_option('appreplicaicons-other-color') . '; text-decoration: none !important; } a.appreplicaicons-other-css:visited { color: ' . get_site_option('appreplicaicons-other-color') . '; text-decoration: none !important; } a.appreplicaicons-other-css:hover { color: ' . get_site_option('appreplicaicons-other-color-hover') . '; text-decoration: none !important; } '; # Create an array for items to output include ("appreplica-social-icons-list.php"); $i = 0; foreach ($appreplicaicons as $value) { $iconName = 'appreplicaicons_icon_' . $value[0] . '_' . $value[1]; if (get_site_option($iconName) == 1) { $icon[$i]['Url'] = $iconName . '_url'; $icon[$i]['tooltip'] = $iconName . '_text'; $icon[$i]['target'] = $iconName . '_target'; $icon[$i]['order'] = $iconName . '_order'; $icon[$i]['name'] = $value[0]; $icon[$i]['folder'] = $value[1]; $icon[$i]['UrlVal'] = get_site_option($icon[$i]['Url']); $icon[$i]['tooltipVal'] = get_site_option($icon[$i]['tooltip']); $icon[$i]['targetVal'] = get_site_option($icon[$i]['target'],0); $icon[$i]['orderVal'] = get_site_option($icon[$i]['order'],0); $i++; } } // add custom icons to array require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); $table_name = $wpdb->prefix . "appreplica_social_icons"; $sql = "SELECT * FROM " . $table_name . " WHERE 1"; $iconList = $wpdb->get_results($sql); foreach($iconList as $item) { $iconName = 'appreplicaicons_icon_custom_' . $item->id; $icon[$i]['Url'] = $iconName . '_url'; $icon[$i]['tooltip'] = $iconName . '_text'; $icon[$i]['target'] = $iconName . '_target'; $icon[$i]['order'] = $iconName . '_order'; $icon[$i]['name'] = $item->ar_title; $icon[$i]['folder'] = 999; // custom icon flag $icon[$i]['UrlVal'] = get_site_option($icon[$i]['Url']); $icon[$i]['ImgUrl'] = $item->ar_imageurl; $icon[$i]['tooltipVal'] = get_site_option($icon[$i]['tooltip']); $icon[$i]['targetVal'] = get_site_option($icon[$i]['target'],0); $icon[$i]['orderVal'] = get_site_option($icon[$i]['order'],0); $i++; } // sort according to custom order foreach ($icon as $key => $row) { $order[$key] = $row['orderVal']; } array_multisort($order, SORT_ASC, $icon); # Output icons List for ($j = 0 ; $j < count($icon) ; $j++) { if ($icon[$j]['targetVal'] == 1) { $target = '_blank'; } else { $target = '_self'; } # code if ($icon[$j]['folder'] <= 3) { $code .= ''; $code .= ''; $code .= ''; } if ($icon[$j]['folder'] == 99) { $code .= ''; $code .= ''; $code .= ''; } if ($icon[$j]['folder'] == 999) { $code .= ''; $code .= ''; $code .= ''; } } # Return code return $code; } # Create appreplicaicons settings menu for admin add_action( 'admin_menu', 'appreplicaicons_create_menu' ); add_action( 'network_admin_menu', 'appreplicaicons_network_admin_create_menu' ); # Create link to plugin options page from plugins list function appreplicaicons_plugin_add_settings_link( $links ) { $settings_link = 'Settings'; array_push( $links, $settings_link ); return $links; } $appreplicaicons_plugin_basename = plugin_basename( __FILE__ ); add_filter( 'plugin_action_links_' . $appreplicaicons_plugin_basename, 'appreplicaicons_plugin_add_settings_link' ); # Create new top level menu for sites function appreplicaicons_create_menu() { add_menu_page('Appreplica Options', 'Icons', 'install_plugins', 'appreplicaicons_settings_page', 'appreplicaicons_settings_page'); } # Create new top level menu for network admin function appreplicaicons_network_admin_create_menu() { add_menu_page('Appreplica Options', 'Icons', 'manage_options', 'appreplicaicons_settings_page', 'appreplicaicons_settings_page'); } function appreplicaicons_update_option($name, $value) { return is_multisite() ? update_site_option($name, $value) : update_option($name, $value); } # Define widget class AppreplicaIcons_Widget extends WP_Widget { # Register widget with WordPress function __construct() { parent::__construct( 'appreplicaicons_widget', // Base ID 'Appreplica Social Icons', // Name array( 'description' => __( 'Add social icons to your widgets sections' ), ) // Args ); } # Frontend display of widget public function widget( $args, $instance ) { extract($args); $title = apply_filters( 'widget_title', $instance['title'] ); echo $before_widget; if (!empty($title)) { echo $before_title . $title . $after_title; } echo embed_appreplicaicons(); echo $after_widget; } # Backend widget form. public function form( $instance ) { $title = ! empty( $instance['title'] ) ? $instance['title'] : __( 'New title', 'text_domain' ); ?>

prefix . "appreplica_social_icons"; if($wpdb->get_var("show tables like '$table_name'") != $table_name) { $sql2 = "CREATE TABLE `$table_name` ( `id` BIGINT(20) NOT NULL AUTO_INCREMENT, `ar_title` VARCHAR(255) NULL, `ar_imageurl` VARCHAR(255) NOT NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB;"; require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); dbDelta($sql2); } } register_activation_hook(__FILE__,'appreplicaicons_database_setup'); function appreplicaicons_settings_page() { ?>

Appreplica Social Icons (v.1.2)

prefix . "appreplica_social_icons"; $sql = "SELECT * FROM " . $table_name . " WHERE 1"; $iconList = $wpdb->get_results($sql); foreach($iconList as $item) { $varName = 'appreplicaicons_icon_custom_' . $item->id; $varNameUrl = $varName . '_url'; $varNametext = $varName . '_text'; $varNametarget = $varName . '_target'; $varNameorder = $varName . '_order'; appreplicaicons_update_option($varNameUrl, $_POST[$varNameUrl]); appreplicaicons_update_option($varNametext, $_POST[$varNametext]); appreplicaicons_update_option($varNametarget, intval($_POST[$varNametarget])); appreplicaicons_update_option($varNameorder, intval($_POST[$varNameorder])); } $confirmSave = 1; } wp_nonce_field('form-settings'); ?>
Your changes have been saved
'; } ?>

Welcome to Appreplica Social Icons! Add custom icons to your widgets sections.
Please select one or more icons from the Icons tab to get started.

0) { ?>
 
prefix . "appreplica_social_icons"; $sql = "SELECT * FROM " . $table_name . " WHERE 1"; $iconList = $wpdb->get_results($sql); foreach($iconList as $item) { $iconName = 'appreplicaicons_icon_custom_' . $item->id; $icon[$i]['Url'] = $iconName . '_url'; $icon[$i]['tooltip'] = $iconName . '_text'; $icon[$i]['target'] = $iconName . '_target'; $icon[$i]['order'] = $iconName . '_order'; $icon[$i]['name'] = $item->ar_title; $icon[$i]['folder'] = 999; // custom icon flag $icon[$i]['UrlVal'] = get_site_option($icon[$i]['Url']); $icon[$i]['ImgUrl'] = $item->ar_imageurl; $icon[$i]['tooltipVal'] = get_site_option($icon[$i]['tooltip']); $icon[$i]['targetVal'] = get_site_option($icon[$i]['target'],0); $icon[$i]['orderVal'] = get_site_option($icon[$i]['order'],0); $i++; } // sort according to custom order foreach ($icon as $key => $row) { $order[$key] = $row['orderVal']; } array_multisort($order, SORT_ASC, $icon); for ($j = 0 ; $j < count($icon) ; $j++) { if ($icon[$j]['targetVal'] == 1) { $checked = 'checked'; } else { $checked = ''; } if ($icon[$j]['folder'] <= 3) { ?>
Icon URL Tooltip Text New Window Order
>
>
>




Please select / deselect the icons you wish to include and then use the Configure tab to specify the URLs.
Don't forget to click Save Changes after making your selections!

Your changes have been saved

'; } ?>

 Appreplica Square Icons

 Flat Social Icons

 Shadow Social Icons

 Gloss Social Icons

 Single Color Brand Icons





0 && strlen($_POST['icon_url']) > 0) { $table_name = $wpdb->prefix . "appreplica_social_icons"; $results = $wpdb->insert( $table_name, array( 'ar_title' => sanitize_text_field($_POST['icon_title']), 'ar_imageurl' => sanitize_text_field($_POST['icon_url']), ), array( '%s', '%s', ) ); if (!$results) { $confirmSave = 0; } else { $confirmSave = 1; } } else { $err = 1; } } // delete icon if ($_GET['d'] && $_GET['id']) { $table_name = $wpdb->prefix . "appreplica_social_icons"; $wpdb->delete( $table_name, array( 'id' => $_GET['id'] ), array( '%d' ) ); } wp_nonce_field('form-settings'); ?>

Please enter the icon name and select the icon image.

Upload your own icons (only square icons are supported)

prefix . "appreplica_social_icons"; $sql = "SELECT * FROM " . $table_name . " WHERE 1"; $iconList = $wpdb->get_results($sql); foreach($iconList as $icon) { ?>
Name Image URL Icon  
ar_title; ?> ar_imageurl; ?>





Your changes have been saved
'; } ?>

Color Icons Size and Opacity

   Height / Width in Pixels   A number between 1 and 200
   Horizontal Spacing   A number between 0 and 25
   Vertical Spacing   A number between 0 and 25
   Opacity   A number between 0 and 1
   Opacity on Hover   A number between 0 and 1
   Preview prefix . "appreplica_social_icons"; $sql = "SELECT * FROM " . $table_name . " WHERE 1"; $iconList = $wpdb->get_results($sql); foreach($iconList as $item) { ?>


Single Color Brand Icons Size and Colors

   Height / Width in Pixels   A number between 1 and 200
   Horizontal Spacing   A number between 0 and 25
   Vertical Spacing   A number between 0 and 25
   Color
   Color on Hover
   Preview




How do I get started?

  1. From the Icons tab, select / deselect the predefined icons you wish to include in your widgets.
  2. Use to the Uploads tab to upload your own custom icons.
  3. Use to the Configure tab to specify the URL and name for each of your selected icons.
  4. Use the Size / Color tab to specify your own custom icon sizes and colors.
  5. Drag the Appreplica Social Icons widget from the Appearance > Widgets section to your desired widget locations.
  6. Alternatively you may use the shortcode [appreplicasocialicons][/appreplicasocialicons] with the built in Text widget and in Pages/Posts.

The shortcode doesn't work when I add it to the Text Widget?

Some themes are setup by default to not parse the text widget for shortcodes, resulting in only the shortcode text to appear instead of the icons. To fix this, you must enable shortcodes for the text widget by adding the following code to your theme's function.php file. In most cases, you can simply use the Appearance > Editor option to add this line without having to resort to FTP or other means of file access.

add_filter('widget_text', 'do_shortcode');

What's the purpose of this plugin?

This free plugin lets you add custom icons for major social and media content websites to the widgets sections of your WordPress powered websites. It's designed primarily for the users of our Appreplica Plugin in order to create icons in their widget sections linking to their embedded content pages, but it can also be used by others. Each icon can be linked to any relative or external URL of your choosing, and you can customize both the size and its colors.