Changeset 326463
- Timestamp:
- 12/27/2010 08:56:43 PM (15 years ago)
- Location:
- spodelime/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
spodelime.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
spodelime/trunk/readme.txt
r231552 r326463 1 1 === Бутон за споделяне === 2 2 Contributors: cloxy 3 Tags: share, bookmark, button3 Tags: share, sharing, bookmark, bookmarking, button, Facebook, Twitter, social, Bulgaria 4 4 Requires at least: 2.0 5 Tested up to: 2.9.26 Stable tag: 0.055 Tested up to: 3.0.3 6 Stable tag: trunk 7 7 8 8 Добавя бутон за споделяне в социални мрежи в края на всяка публикация. … … 18 18 == Installation == 19 19 20 1. Разархивирайте архива .21 1. Качете директорията `spodelime` във `/wp-content/plugins/` на вашия сървър 22 1. Включете разширението от менюто Разширения (Plugins) 20 1. Разархивирайте архива; 21 1. Качете директорията `spodelime` във `/wp-content/plugins/` на вашия сървър; 22 1. Включете разширението от менюто Разширения (Plugins); 23 23 1. Проверете дали бутонът за споделяне се появява в края на всяка публикация. 24 24 25 25 == Changelog == 26 26 27 = 1.4 = 28 * Кодът на бутона вече работи в асинхронен режим по стандартите на HTML5 чрез async атрибут. 29 27 30 = 1.3 = 28 * Промени по хедър информацията с цел разширението да бъде качено в хранилището на wordpress.org 31 * Промени по хедър информацията с цел разширението да бъде качено в хранилището на wordpress.org. 29 32 30 33 = 1.2 = -
spodelime/trunk/spodelime.php
r231552 r326463 6 6 Author: Васил Тошков 7 7 Author URI: http://spodelime.com/ 8 Version: 1. 38 Version: 1.4 9 9 */ 10 10 11 function s hare_button($content) {11 function spodelime($content) { 12 12 if(is_single()) { 13 $content.= "<p><a href=\"http://spodelime.com/\" class=\"spodelime\">бутон за споделяне в социални мрежи</a><script src=\"http://spodelime.com/sm.js\" type=\"text/javascript\"></script></p>\n"; 13 $anchor[] = "бутон за сайт"; 14 $anchor[] = "бутон за споделяне"; 15 $anchor[] = "бутони за споделяне"; 16 $anchor[] = "бутон за социални мрежи"; 17 $anchor[] = "бутони за социални мрежи"; 18 $anchor[] = "бутони към социални мрежи"; 19 $anchor[] = "споделяне на връзка"; 20 $anchor[] = "споделяне в социални мрежи"; 21 $anchor[] = "share button"; 22 $anchor[] = "сподели ме"; 23 $anchor[] = "сподели бутон"; 24 $anchor[] = "социални мрежи"; 25 26 $salt = crc32($_SERVER['REQUEST_URI']); 27 mt_srand($salt); 28 $index = mt_rand(0, count($anchor)-1); 29 30 $content.= "<p>"; 31 $content.= "<a href=\"http://spodelime.com/\" class=\"spodelime\">{$anchor[$index]}</a>"; 32 $content.= "<script src=\"http://spodelime.com/sm.js\" type=\"text/javascript\" async=\"async\"></script>"; 33 $content.= "</p>\n"; 14 34 } 15 return $content;35 return($content); 16 36 } 37 add_filter("the_content", "spodelime"); 17 38 18 add_filter('the_content', 'share_button');19 39 ?>
Note: See TracChangeset
for help on using the changeset viewer.