Social Icons WordPress Plugin – AccessPress Social Icons - Version 1.0.0

Version Description

  • Plugin submitted to http://wordpress.org for review and approval

=

Download this release

Release Info

Developer Access Keys
Plugin Icon 128x128 Social Icons WordPress Plugin – AccessPress Social Icons
Version 1.0.0
Comparing to
See all releases

Version 1.0.0

Files changed (301) hide show
  1. accesspress-social-icons.php +351 -0
  2. css/animate.css +3158 -0
  3. css/backend.css +650 -0
  4. css/frontend.css +117 -0
  5. icon-sets/png/set1/Thumbs.db +0 -0
  6. icon-sets/png/set1/askfm.png +0 -0
  7. icon-sets/png/set1/classmates.png +0 -0
  8. icon-sets/png/set1/facebook.png +0 -0
  9. icon-sets/png/set1/flickr.png +0 -0
  10. icon-sets/png/set1/foursquare.png +0 -0
  11. icon-sets/png/set1/googlePlus.png +0 -0
  12. icon-sets/png/set1/instagram.png +0 -0
  13. icon-sets/png/set1/linkedin.png +0 -0
  14. icon-sets/png/set1/meetme.png +0 -0
  15. icon-sets/png/set1/meetup.png +0 -0
  16. icon-sets/png/set1/myspace.png +0 -0
  17. icon-sets/png/set1/pinterest.png +0 -0
  18. icon-sets/png/set1/reddit.png +0 -0
  19. icon-sets/png/set1/stumbleupon.png +0 -0
  20. icon-sets/png/set1/tagged.png +0 -0
  21. icon-sets/png/set1/tumblr.png +0 -0
  22. icon-sets/png/set1/twitter.png +0 -0
  23. icon-sets/png/set1/vine.png +0 -0
  24. icon-sets/png/set1/vk.png +0 -0
  25. icon-sets/png/set1/youtube.png +0 -0
  26. icon-sets/png/set10/Thumbs.db +0 -0
  27. icon-sets/png/set10/askfm.png +0 -0
  28. icon-sets/png/set10/classmates.png +0 -0
  29. icon-sets/png/set10/facebook.png +0 -0
  30. icon-sets/png/set10/flickr.png +0 -0
  31. icon-sets/png/set10/foursquare.png +0 -0
  32. icon-sets/png/set10/googleplus.png +0 -0
  33. icon-sets/png/set10/instagram.png +0 -0
  34. icon-sets/png/set10/linkedin.png +0 -0
  35. icon-sets/png/set10/meetme.png +0 -0
  36. icon-sets/png/set10/meetup.png +0 -0
  37. icon-sets/png/set10/myspace.png +0 -0
  38. icon-sets/png/set10/pinterest.png +0 -0
  39. icon-sets/png/set10/reddit.png +0 -0
  40. icon-sets/png/set10/stumbleupon.png +0 -0
  41. icon-sets/png/set10/tagged.png +0 -0
  42. icon-sets/png/set10/tumblr.png +0 -0
  43. icon-sets/png/set10/twitter.png +0 -0
  44. icon-sets/png/set10/vine.png +0 -0
  45. icon-sets/png/set10/vk.png +0 -0
  46. icon-sets/png/set10/youtube.png +0 -0
  47. icon-sets/png/set11/Thumbs.db +0 -0
  48. icon-sets/png/set11/askfm.png +0 -0
  49. icon-sets/png/set11/classmates.png +0 -0
  50. icon-sets/png/set11/facebook.png +0 -0
  51. icon-sets/png/set11/flickr.png +0 -0
  52. icon-sets/png/set11/foursquare.png +0 -0
  53. icon-sets/png/set11/googlePlus.png +0 -0
  54. icon-sets/png/set11/instagram.png +0 -0
  55. icon-sets/png/set11/linkedin.png +0 -0
  56. icon-sets/png/set11/meetme.png +0 -0
  57. icon-sets/png/set11/meetup.png +0 -0
  58. icon-sets/png/set11/myspace.png +0 -0
  59. icon-sets/png/set11/pinterest.png +0 -0
  60. icon-sets/png/set11/reddit.png +0 -0
  61. icon-sets/png/set11/stumbleupon.png +0 -0
  62. icon-sets/png/set11/tagged.png +0 -0
  63. icon-sets/png/set11/tumblr.png +0 -0
  64. icon-sets/png/set11/twitter.png +0 -0
  65. icon-sets/png/set11/vine.png +0 -0
  66. icon-sets/png/set11/vk.png +0 -0
  67. icon-sets/png/set11/youtube.png +0 -0
  68. icon-sets/png/set12/Thumbs.db +0 -0
  69. icon-sets/png/set12/askfm.png +0 -0
  70. icon-sets/png/set12/classmates.png +0 -0
  71. icon-sets/png/set12/facebook.png +0 -0
  72. icon-sets/png/set12/flickr.png +0 -0
  73. icon-sets/png/set12/foursquare.png +0 -0
  74. icon-sets/png/set12/googlePlus.png +0 -0
  75. icon-sets/png/set12/instagram.png +0 -0
  76. icon-sets/png/set12/linkedin.png +0 -0
  77. icon-sets/png/set12/meetme.png +0 -0
  78. icon-sets/png/set12/meetup.png +0 -0
  79. icon-sets/png/set12/myspace.png +0 -0
  80. icon-sets/png/set12/pinterest.png +0 -0
  81. icon-sets/png/set12/reddit.png +0 -0
  82. icon-sets/png/set12/stumbleupon.png +0 -0
  83. icon-sets/png/set12/tagged.png +0 -0
  84. icon-sets/png/set12/tumblr.png +0 -0
  85. icon-sets/png/set12/twitter.png +0 -0
  86. icon-sets/png/set12/vine.png +0 -0
  87. icon-sets/png/set12/vk.png +0 -0
  88. icon-sets/png/set12/youtube.png +0 -0
  89. icon-sets/png/set2/Thumbs.db +0 -0
  90. icon-sets/png/set2/askfm.png +0 -0
  91. icon-sets/png/set2/classmates.png +0 -0
  92. icon-sets/png/set2/facebook.png +0 -0
  93. icon-sets/png/set2/flickr.png +0 -0
  94. icon-sets/png/set2/foursquare.png +0 -0
  95. icon-sets/png/set2/googlePlus.png +0 -0
  96. icon-sets/png/set2/instagram.png +0 -0
  97. icon-sets/png/set2/linkedin.png +0 -0
  98. icon-sets/png/set2/meetme.png +0 -0
  99. icon-sets/png/set2/meetup.png +0 -0
  100. icon-sets/png/set2/myspace.png +0 -0
  101. icon-sets/png/set2/pinterest.png +0 -0
  102. icon-sets/png/set2/reddit.png +0 -0
  103. icon-sets/png/set2/stumbleupon.png +0 -0
  104. icon-sets/png/set2/tagged.png +0 -0
  105. icon-sets/png/set2/tumblr.png +0 -0
  106. icon-sets/png/set2/twitter.png +0 -0
  107. icon-sets/png/set2/vine.png +0 -0
  108. icon-sets/png/set2/vk.png +0 -0
  109. icon-sets/png/set2/youtube.png +0 -0
  110. icon-sets/png/set3/Thumbs.db +0 -0
  111. icon-sets/png/set3/askfm.png +0 -0
  112. icon-sets/png/set3/classmates.png +0 -0
  113. icon-sets/png/set3/facebook.png +0 -0
  114. icon-sets/png/set3/flickr.png +0 -0
  115. icon-sets/png/set3/foursquare.png +0 -0
  116. icon-sets/png/set3/googlePlus.png +0 -0
  117. icon-sets/png/set3/instagram.png +0 -0
  118. icon-sets/png/set3/linkedin.png +0 -0
  119. icon-sets/png/set3/meetme.png +0 -0
  120. icon-sets/png/set3/meetup.png +0 -0
  121. icon-sets/png/set3/myspace.png +0 -0
  122. icon-sets/png/set3/pinterest.png +0 -0
  123. icon-sets/png/set3/reddit.png +0 -0
  124. icon-sets/png/set3/stumbleupon.png +0 -0
  125. icon-sets/png/set3/tagged.png +0 -0
  126. icon-sets/png/set3/tumblr.png +0 -0
  127. icon-sets/png/set3/twitter.png +0 -0
  128. icon-sets/png/set3/vine.png +0 -0
  129. icon-sets/png/set3/vk.png +0 -0
  130. icon-sets/png/set3/youtube.png +0 -0
  131. icon-sets/png/set4/Thumbs.db +0 -0
  132. icon-sets/png/set4/askfm.png +0 -0
  133. icon-sets/png/set4/classmates.png +0 -0
  134. icon-sets/png/set4/facebook.png +0 -0
  135. icon-sets/png/set4/flickr.png +0 -0
  136. icon-sets/png/set4/foursquare.png +0 -0
  137. icon-sets/png/set4/googlePlus.png +0 -0
  138. icon-sets/png/set4/instagram.png +0 -0
  139. icon-sets/png/set4/linkedin.png +0 -0
  140. icon-sets/png/set4/meetme.png +0 -0
  141. icon-sets/png/set4/meetup.png +0 -0
  142. icon-sets/png/set4/myspace.png +0 -0
  143. icon-sets/png/set4/pinterest.png +0 -0
  144. icon-sets/png/set4/reddit.png +0 -0
  145. icon-sets/png/set4/stumbleupon.png +0 -0
  146. icon-sets/png/set4/tagged.png +0 -0
  147. icon-sets/png/set4/tumblr.png +0 -0
  148. icon-sets/png/set4/twitter.png +0 -0
  149. icon-sets/png/set4/vine.png +0 -0
  150. icon-sets/png/set4/vk.png +0 -0
  151. icon-sets/png/set4/youtube.png +0 -0
  152. icon-sets/png/set5/Thumbs.db +0 -0
  153. icon-sets/png/set5/askfm.png +0 -0
  154. icon-sets/png/set5/classmates.png +0 -0
  155. icon-sets/png/set5/facebook.png +0 -0
  156. icon-sets/png/set5/flickr.png +0 -0
  157. icon-sets/png/set5/foursquare.png +0 -0
  158. icon-sets/png/set5/googlePlus.png +0 -0
  159. icon-sets/png/set5/instagram.png +0 -0
  160. icon-sets/png/set5/linkedin.png +0 -0
  161. icon-sets/png/set5/meetme.png +0 -0
  162. icon-sets/png/set5/meetup.png +0 -0
  163. icon-sets/png/set5/myspace.png +0 -0
  164. icon-sets/png/set5/pinterest.png +0 -0
  165. icon-sets/png/set5/reddit.png +0 -0
  166. icon-sets/png/set5/stumbleupon.png +0 -0
  167. icon-sets/png/set5/tagged.png +0 -0
  168. icon-sets/png/set5/tumblr.png +0 -0
  169. icon-sets/png/set5/twitter.png +0 -0
  170. icon-sets/png/set5/vine.png +0 -0
  171. icon-sets/png/set5/vk.png +0 -0
  172. icon-sets/png/set5/youtube.png +0 -0
  173. icon-sets/png/set6/Thumbs.db +0 -0
  174. icon-sets/png/set6/askfm.png +0 -0
  175. icon-sets/png/set6/classmates.png +0 -0
  176. icon-sets/png/set6/facebook.png +0 -0
  177. icon-sets/png/set6/flickr.png +0 -0
  178. icon-sets/png/set6/foursquare.png +0 -0
  179. icon-sets/png/set6/googlePlus.png +0 -0
  180. icon-sets/png/set6/instagram.png +0 -0
  181. icon-sets/png/set6/linkedin.png +0 -0
  182. icon-sets/png/set6/meetme.png +0 -0
  183. icon-sets/png/set6/meetup.png +0 -0
  184. icon-sets/png/set6/myspace.png +0 -0
  185. icon-sets/png/set6/pinterest.png +0 -0
  186. icon-sets/png/set6/reddit.png +0 -0
  187. icon-sets/png/set6/stumbleupon.png +0 -0
  188. icon-sets/png/set6/tagged.png +0 -0
  189. icon-sets/png/set6/tumblr.png +0 -0
  190. icon-sets/png/set6/twitter.png +0 -0
  191. icon-sets/png/set6/vine.png +0 -0
  192. icon-sets/png/set6/vk.png +0 -0
  193. icon-sets/png/set6/youtube.png +0 -0
  194. icon-sets/png/set7/Thumbs.db +0 -0
  195. icon-sets/png/set7/askfm.png +0 -0
  196. icon-sets/png/set7/classmates.png +0 -0
  197. icon-sets/png/set7/facebook.png +0 -0
  198. icon-sets/png/set7/flickr.png +0 -0
  199. icon-sets/png/set7/foursquare.png +0 -0
  200. icon-sets/png/set7/googlePlus.png +0 -0
  201. icon-sets/png/set7/instagram.png +0 -0
  202. icon-sets/png/set7/linkedin.png +0 -0
  203. icon-sets/png/set7/meetme.png +0 -0
  204. icon-sets/png/set7/meetup.png +0 -0
  205. icon-sets/png/set7/myspace.png +0 -0
  206. icon-sets/png/set7/pinterest.png +0 -0
  207. icon-sets/png/set7/reddit.png +0 -0
  208. icon-sets/png/set7/stumbleupon.png +0 -0
  209. icon-sets/png/set7/tagged.png +0 -0
  210. icon-sets/png/set7/tumblr.png +0 -0
  211. icon-sets/png/set7/twitter.png +0 -0
  212. icon-sets/png/set7/vine.png +0 -0
  213. icon-sets/png/set7/vk.png +0 -0
  214. icon-sets/png/set7/youtube.png +0 -0
  215. icon-sets/png/set8/Thumbs.db +0 -0
  216. icon-sets/png/set8/askfm.png +0 -0
  217. icon-sets/png/set8/classmates.png +0 -0
  218. icon-sets/png/set8/facebook.png +0 -0
  219. icon-sets/png/set8/flickr.png +0 -0
  220. icon-sets/png/set8/foursquare.png +0 -0
  221. icon-sets/png/set8/googlePlus.png +0 -0
  222. icon-sets/png/set8/instagram.png +0 -0
  223. icon-sets/png/set8/linkedin.png +0 -0
  224. icon-sets/png/set8/meetme.png +0 -0
  225. icon-sets/png/set8/meetup.png +0 -0
  226. icon-sets/png/set8/myspace.png +0 -0
  227. icon-sets/png/set8/pinterest.png +0 -0
  228. icon-sets/png/set8/reddit.png +0 -0
  229. icon-sets/png/set8/stumbleupon.png +0 -0
  230. icon-sets/png/set8/tagged.png +0 -0
  231. icon-sets/png/set8/tumblr.png +0 -0
  232. icon-sets/png/set8/twitter.png +0 -0
  233. icon-sets/png/set8/vine.png +0 -0
  234. icon-sets/png/set8/vk.png +0 -0
  235. icon-sets/png/set8/youtube.png +0 -0
  236. icon-sets/png/set9/Thumbs.db +0 -0
  237. icon-sets/png/set9/askfm.png +0 -0
  238. icon-sets/png/set9/classmates.png +0 -0
  239. icon-sets/png/set9/facebok.png +0 -0
  240. icon-sets/png/set9/flickr.png +0 -0
  241. icon-sets/png/set9/foursquare.png +0 -0
  242. icon-sets/png/set9/googlePlus.png +0 -0
  243. icon-sets/png/set9/instagram.png +0 -0
  244. icon-sets/png/set9/linkedin.png +0 -0
  245. icon-sets/png/set9/meetme.png +0 -0
  246. icon-sets/png/set9/meetup.png +0 -0
  247. icon-sets/png/set9/myspace.png +0 -0
  248. icon-sets/png/set9/pinterest.png +0 -0
  249. icon-sets/png/set9/reddit.png +0 -0
  250. icon-sets/png/set9/stumbleupon.png +0 -0
  251. icon-sets/png/set9/tagged.png +0 -0
  252. icon-sets/png/set9/tumblr.png +0 -0
  253. icon-sets/png/set9/twitter.png +0 -0
  254. icon-sets/png/set9/vine.png +0 -0
  255. icon-sets/png/set9/vk.png +0 -0
  256. icon-sets/png/set9/youtube.png +0 -0
  257. images/ajax-loader.gif +0 -0
  258. images/anonymous-post-pro.png +0 -0
  259. images/anonymous-post.png +0 -0
  260. images/aplite.png +0 -0
  261. images/appro.png +0 -0
  262. images/flicker.png +0 -0
  263. images/googleplus.png +0 -0
  264. images/logo-social.png +0 -0
  265. images/overlay.png +0 -0
  266. images/pinterest.png +0 -0
  267. images/preview1.jpg +0 -0
  268. images/preview10.jpg +0 -0
  269. images/preview11.jpg +0 -0
  270. images/preview12.jpg +0 -0
  271. images/preview2.jpg +0 -0
  272. images/preview3.jpg +0 -0
  273. images/preview4.jpg +0 -0
  274. images/preview5.jpg +0 -0
  275. images/preview6.jpg +0 -0
  276. images/preview7.jpg +0 -0
  277. images/preview8.jpg +0 -0
  278. images/preview9.jpg +0 -0
  279. images/si-icon.png +0 -0
  280. images/twitter.png +0 -0
  281. inc/backend/about.php +123 -0
  282. inc/backend/activation.php +24 -0
  283. inc/backend/add-new-set.php +223 -0
  284. inc/backend/delete-icon-set.php +9 -0
  285. inc/backend/edit-icon-set.php +385 -0
  286. inc/backend/how-to-use.php +26 -0
  287. inc/backend/icon-adder.php +183 -0
  288. inc/backend/icon-themes.php +21 -0
  289. inc/backend/list-icon-sets.php +16 -0
  290. inc/backend/main-page.php +94 -0
  291. inc/backend/panel-head.php +35 -0
  292. inc/backend/promobar.php +0 -0
  293. inc/backend/save-set.php +213 -0
  294. inc/backend/theme-icon-set.php +95 -0
  295. inc/backend/widgets.php +109 -0
  296. inc/frontend/icon-group-list.php +107 -0
  297. inc/frontend/shortcode.php +19 -0
  298. index.php +2 -0
  299. js/backend.js +683 -0
  300. js/frontend.js +42 -0
  301. readme.txt +115 -0
accesspress-social-icons.php ADDED
@@ -0,0 +1,351 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ defined('ABSPATH') or die("No script kiddies please!");
3
+ /**
4
+ * Plugin Name:AccessPress Social Icons
5
+ * Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-social-icons/
6
+ * Description: A plugin to add social icons in your site wherever you want dynamically with handful of configurable settings.
7
+ * Version:1.0.0
8
+ * Author:AccessPress Themes
9
+ * Author URI:http://accesspressthemes.com/
10
+ * License:GPLv2 or later
11
+ * */
12
+ /**
13
+ * Declartion of necessary constants for plugin
14
+ * */
15
+ if (!defined('APS_IMAGE_DIR')) {
16
+ define('APS_IMAGE_DIR', plugin_dir_url(__FILE__) . 'images');
17
+ }
18
+ if (!defined('APS_JS_DIR')) {
19
+ define('APS_JS_DIR', plugin_dir_url(__FILE__) . 'js');
20
+ }
21
+ if (!defined('APS_CSS_DIR')) {
22
+ define('APS_CSS_DIR', plugin_dir_url(__FILE__) . 'css');
23
+ }
24
+ if (!defined('APS_ICONS_DIR')) {
25
+ define('APS_ICONS_DIR', plugin_dir_url(__FILE__) . 'icon-sets');
26
+ }
27
+ if (!defined('APS_LANG_DIR')) {
28
+ define('APS_LANG_DIR', plugin_dir_url(__FILE__) . 'languages');
29
+ }
30
+ /**
31
+ * Register of widgets
32
+ * */
33
+ include_once('inc/backend/widgets.php');
34
+ if (!class_exists('APS_Class')) {
35
+
36
+ class APS_Class {
37
+ /**
38
+ * Initialization of plugin from constructor
39
+ * */
40
+ function __construct() {
41
+ register_activation_hook(__FILE__, array($this, 'plugin_activation')); //calls plugin activation function
42
+ add_action('init', array($this, 'plugin_text_domain')); //loads text domain for translation ready
43
+ add_action('init', array($this, 'register_frontend_assets'));//registers assets for frontend
44
+ add_action('admin_menu', array($this, 'add_aps_menu')); //adds plugin menu in wp-admin
45
+ add_action('admin_init', array($this, 'register_admin_assets')); //registers all the assets required for wp-admin
46
+ add_action('admin_init', array($this, 'admin_session_init')); //intializes session
47
+ add_action('admin_post_aps_add_new_set', array($this, 'aps_add_new_set')); //add new set action
48
+ add_action('admin_post_aps_edit_action', array($this, 'aps_edit_action')); //icon set edit action
49
+ add_action('admin_post_aps_delete_action', array($this, 'aps_delete_action')); //icon set delete action
50
+ add_shortcode('aps-social', array($this, 'aps_social_shortcode')); //adds the aps-social shortcode
51
+ add_action('wp_ajax_aps_icon_list_action', array($this, 'aps_icon_list_action')); //admin ajax action for icon listing
52
+ add_action('wp_ajax_nopriv_aps_icon_list_action', array($this, 'no_permission')); //action for unauthenticate admin ajax call
53
+ add_action('wp_ajax_get_theme_icons', array($this, 'get_theme_icons')); //admin ajax for getting theme icons
54
+ add_action('wp_ajax_nopriv_get_theme_icons', array($this, 'no_permission')); //ajax action for unathenticate admin ajax call
55
+ add_action('widgets_init', array($this, 'register_aps_widget')); //register aps widget
56
+
57
+ }
58
+
59
+ //called when plugin is activated
60
+ function plugin_activation() {
61
+ include_once('inc/backend/activation.php');
62
+ }
63
+
64
+ //loads the text domain for translation
65
+ function plugin_text_domain() {
66
+ load_plugin_textdomain('aps-social', FALSE, APS_LANG_DIR);
67
+ }
68
+
69
+ //adds plugin menu in wp-admin
70
+ function add_aps_menu() {
71
+ add_menu_page('AccessPress Social', 'AccessPress <br/> Social Icons', 'manage_options', 'aps-social', array($this, 'main_page'), APS_IMAGE_DIR . '/si-icon.png');
72
+ add_submenu_page('aps-social', __('Social Icons','aps-social'), __('Social Icons','aps-social'), 'manage_options', 'aps-social', array($this, 'main_page'));
73
+ add_submenu_page('aps-social', __('Add New Set','aps-social'), __('Add New Set','aps-social'), 'manage_options', 'aps-social-add', array($this, 'add_new_set'));
74
+ add_submenu_page('aps-social', __('How to use','aps-social'), __('How to use','aps-social'), 'manage_options', 'aps-social-how-to-use', array($this, 'how_to_use'));
75
+ add_submenu_page('aps-social', __('About','aps-social'), __('About','aps-social'), 'manage_options', 'aps-about', array($this, 'about'));
76
+ }
77
+
78
+ //plugin's main page
79
+ function main_page() {
80
+ include_once('inc/backend/main-page.php');
81
+ }
82
+
83
+ //Add new set of social icons
84
+ function add_new_set() {
85
+ include_once('inc/backend/add-new-set.php');
86
+ }
87
+
88
+ //registers all the js and css in wp-admin
89
+ function register_admin_assets() {
90
+ //including the scripts in the plugins pages only
91
+ if (isset($_GET['page']) && ($_GET['page'] == 'aps-social' || $_GET['page'] == 'aps-social-add' || $_GET['page'] == 'aps-about'|| $_GET['page'] == 'aps-social-how-to-use')) {
92
+ $aps_script_variable = array('icon_preview' => __('Icon Preview', 'aps-social'),
93
+ 'icon_link' => __('Icon Link', 'aps-social'),
94
+ 'icon_link_target' => __('Icon Link Target','aps-social'),
95
+ 'icon_delete_confirm' => __('Are you sure you want to delete this icon from this list?', 'aps-social'),
96
+ 'set_name_required_message' => __('Please enter the name for the set', 'aps-social'),
97
+ 'min_icon_required_message' => __('Please add at least one icon in the set', 'aps-social'),
98
+ 'ajax_url' => admin_url() . 'admin-ajax.php',
99
+ 'ajax_nonce' => wp_create_nonce('aps-ajax-nonce'),
100
+ 'icon_warning' => __('Are you sure you want to discard the icons added previously?', 'aps-social'),
101
+ 'icon_collapse' => __('Collapse All', 'aps-social'),
102
+ 'icon_expand' => __('Expand All', 'aps-social'));
103
+ /**
104
+ * Backend CSS
105
+ * */
106
+ wp_enqueue_style('aps-admin-css', APS_CSS_DIR . '/backend.css'); //registering plugin admin css
107
+ wp_enqueue_style('aps-animate-css', APS_CSS_DIR . '/animate.css'); //animate.css library
108
+ wp_enqueue_style('thickbox'); //for including wp thickbox css
109
+ wp_enqueue_style('wp-color-picker'); //for including color picker css
110
+
111
+
112
+ /**
113
+ * Backend JS
114
+ * */
115
+ wp_enqueue_script('jquery-ui-sortable');
116
+ wp_enqueue_script('media-upload'); //for uploading image using wp native uploader
117
+ wp_enqueue_script('thickbox'); //for uploading image using wp native uploader + thickbox
118
+ wp_enqueue_script('aps-admin-js', APS_JS_DIR . '/backend.js', array('jquery', 'jquery-ui-sortable', 'wp-color-picker'));//registering plugin's admin js
119
+ wp_localize_script('aps-admin-js', 'aps_script_variable', $aps_script_variable); //localization of php variable in aps-admin-js
120
+ }
121
+ }
122
+
123
+ //registers all the assets for frontend
124
+ function register_frontend_assets() {
125
+ /**
126
+ * Frontend Style
127
+ * */
128
+ wp_enqueue_style('aps-animate-css', APS_CSS_DIR . '/animate.css');//registering animate.css
129
+ wp_enqueue_style('aps-frontend-css', APS_CSS_DIR . '/frontend.css'); //registering frontend css
130
+ wp_enqueue_script('aps-frontend-js', APS_JS_DIR . '/frontend.js', array('jquery'));//registering frontend js
131
+ }
132
+
133
+ //action to save the set in db
134
+ function aps_add_new_set() {
135
+ if (isset($_POST['aps_add_set_nonce'], $_POST['aps_icon_set_submit']) && wp_verify_nonce($_POST['aps_add_set_nonce'], 'aps_add_new_set')) {
136
+ include_once('inc/backend/save-set.php');
137
+ } else {
138
+ die('No script kiddies please!');
139
+ }
140
+ }
141
+
142
+ //prints the array in pre format
143
+ function print_array($array) {
144
+ echo "<pre>";
145
+ print_r($array);
146
+ echo "</pre>";
147
+ }
148
+
149
+ //starts the session
150
+ function admin_session_init() {
151
+ if (!session_id()) {
152
+ session_start();
153
+ }
154
+ }
155
+
156
+ //Icon set delete section
157
+ function aps_delete_action() {
158
+ if (isset($_GET['action'], $_GET['_wpnonce']) && wp_verify_nonce($_GET['_wpnonce'], 'aps-delete-nonce')) {
159
+ include_once('inc/backend/delete-icon-set.php');
160
+ } else {
161
+ die('No script kiddies please!');
162
+ }
163
+ }
164
+
165
+ //Icon set edit action
166
+ function aps_edit_action() {
167
+
168
+ if (isset($_POST['aps_edit_set_nonce'], $_POST['aps_icon_set_submit']) && wp_verify_nonce($_POST['aps_edit_set_nonce'], 'aps_edit_action')) {
169
+ include_once('inc/backend/save-set.php');
170
+ } else {
171
+ die('No script kiddies please!');
172
+ }
173
+ }
174
+
175
+
176
+
177
+
178
+ //shortcode function
179
+ function aps_social_shortcode($atts) {
180
+ if (isset($atts['id'])) {
181
+ //return (print_r($atts,true));
182
+ ob_start();
183
+ include('inc/frontend/shortcode.php');
184
+ $html = ob_get_contents();
185
+ ob_get_clean();
186
+ return $html;
187
+ }
188
+ }
189
+
190
+ //lists the available icons
191
+ function aps_icon_list_action() {
192
+ if (wp_verify_nonce($_POST['_wpnonce'], 'aps-ajax-nonce')) {
193
+ $plugin_path = plugin_dir_path(__FILE__);
194
+ //include_once('inc/backend/list-icon-sets.php');
195
+ for ($i = 1; $i <= 12; $i++) {
196
+ $icon_set_image_array = array();
197
+ ?>
198
+ <div class="aps-set-wrapper" id="aps-set-<?php echo $i; ?>">
199
+ <h3>Set <?php echo $i; ?></h3>
200
+ <div class="aps-row">
201
+ <?php
202
+ $handle = opendir(dirname(realpath(__FILE__)) . '/icon-sets/png/set' . $i);
203
+ while ($file = readdir($handle)) {
204
+ $filename_array = explode('.', $file);
205
+ $filename = ucfirst($filename_array[0]);
206
+ $ext = end($filename_array);
207
+ if ($file !== '.' && $file !== '..' && $ext == 'png') {
208
+ $icon_set_image_array[] = $file;
209
+
210
+
211
+ //echo '<img src="/'.$file.'" border="0" />';
212
+ }//if close
213
+ }//while close
214
+ if (count($icon_set_image_array) > 0) {
215
+ natsort($icon_set_image_array);
216
+ foreach ($icon_set_image_array as $file) {
217
+ $filename_array = explode('.', $file);
218
+ $filename = ucfirst($filename_array[0]);
219
+ ?>
220
+ <div class="aps-col-one-fourth">
221
+ <div class="aps-set-image-wrapper">
222
+ <a href='javascript:void(0);'>
223
+ <img src="<?php echo APS_ICONS_DIR . '/png/set' . $i . '/' . $file; ?>" alt="<?php echo $filename; ?>" title="<?php echo $filename; ?>"/>
224
+ <span class="aps-set-image-title"><?php echo $filename; ?></span>
225
+ </a>
226
+ </div>
227
+ </div>
228
+ <?php
229
+ }
230
+ }
231
+ /* $icon_set_path = 'icon-sets/set1';
232
+ $images = glob($icon_set_path . "*.*");
233
+ $this->print_array($images); */
234
+ ?>
235
+ </div>
236
+ </div><!--aps-set-wrapper-->
237
+ <div class="clear"></div>
238
+ <?php
239
+ }
240
+ die();
241
+ } else {
242
+ die('No script kiddies please!');
243
+ }
244
+ }
245
+
246
+ //lists the icons of specific theme
247
+ function get_theme_icons() {
248
+
249
+ if (wp_verify_nonce($_POST['_wpnonce'], 'aps-ajax-nonce')) {
250
+ $plugin_path = plugin_dir_path(__FILE__);
251
+ $sub_folder = $_POST['sub_folder'];
252
+ $folder = $_POST['folder'];
253
+ $handle = opendir(dirname(realpath(__FILE__)) . '/icon-sets/' . $sub_folder . '/' . $folder);
254
+ $icon_counter = 0;
255
+ $set_image_array = array();
256
+ while ($file = readdir($handle)) {
257
+ $filename_array = explode('.', $file);
258
+ $filename = ucfirst($filename_array[0]);
259
+ $ext = end($filename_array);
260
+ if ($file !== '.' && $file !== '..' && $ext == 'png') {
261
+ $icon_counter++;
262
+ $set_image_array[] = $file;
263
+ }
264
+ }
265
+
266
+ if (count($set_image_array) > 0) {
267
+ natsort($set_image_array);
268
+ $image_url_array = array();
269
+ foreach ($set_image_array as $file) {
270
+ $filename_array = explode('.', $file);
271
+ $filename = ucfirst($filename_array[0]);
272
+ if($_POST['url_only']=='yes')
273
+ {
274
+ $image_url_array[] = APS_ICONS_DIR . '/' . $sub_folder . '/' . $folder . '/' . $file;
275
+ }
276
+ else
277
+ {
278
+ include('inc/backend/theme-icon-set.php');
279
+ }
280
+
281
+ }
282
+ if($_POST['url_only']=='yes')
283
+ {
284
+ die(json_encode($image_url_array));
285
+ }
286
+ }
287
+ } else {
288
+ die('No script kiddies please');
289
+ }
290
+ die();
291
+ }
292
+
293
+ //prevents unauthorized ajax call
294
+ function no_permission() {
295
+ die('No script kiddies please!');
296
+ }
297
+
298
+ //returns the current page url
299
+ function curPageURL() {
300
+ $pageURL = 'http';
301
+ if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
302
+ $pageURL .= "s";
303
+ }
304
+ $pageURL .= "://";
305
+ if ($_SERVER["SERVER_PORT"] != "80") {
306
+ $pageURL .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
307
+ } else {
308
+ $pageURL .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
309
+ }
310
+ return $pageURL;
311
+ }
312
+
313
+ //registers the APS widget
314
+ function register_aps_widget() {
315
+ register_widget('APS_Widget');
316
+ }
317
+
318
+ //returns total number of displaying icons
319
+ function get_total_display_icons($icons)
320
+ {
321
+ $counter = 0;
322
+ foreach($icons as $icon)
323
+ {
324
+ if($icon['link']!='')
325
+ {
326
+ $counter++;
327
+ }
328
+ }
329
+ return $counter;
330
+ }
331
+
332
+ //about section
333
+ function about()
334
+ {
335
+ include('inc/backend/about.php');
336
+ }
337
+
338
+ //how to use section
339
+ function how_to_use()
340
+ {
341
+ include('inc/backend/how-to-use.php');
342
+ }
343
+
344
+ }
345
+
346
+ //APS_Class termination
347
+
348
+ $aps_object = new APS_Class();
349
+ }// class exists condition check
350
+
351
+
css/animate.css ADDED
@@ -0,0 +1,3158 @@