Changeset 1834179
- Timestamp:
- 03/06/2018 05:35:58 AM (8 years ago)
- Location:
- share-button
- Files:
-
- 7 deleted
- 13 edited
- 66 copied
-
tags/1.1 (copied) (copied from share-button/trunk)
-
tags/1.1/admin (copied) (copied from share-button/trunk/admin)
-
tags/1.1/admin/page_editor.php (copied) (copied from share-button/trunk/admin/page_editor.php)
-
tags/1.1/admin/update_mb.php (copied) (copied from share-button/trunk/admin/update_mb.php)
-
tags/1.1/classes (copied) (copied from share-button/trunk/classes)
-
tags/1.1/classes/blocks/admin_block.php (copied) (copied from share-button/trunk/classes/blocks/admin_block.php)
-
tags/1.1/classes/blocks/count_block.php (copied) (copied from share-button/trunk/classes/blocks/count_block.php) (2 diffs)
-
tags/1.1/classes/blocks/display_block.php (copied) (copied from share-button/trunk/classes/blocks/display_block.php) (2 diffs)
-
tags/1.1/classes/blocks/effect_block.php (copied) (copied from share-button/trunk/classes/blocks/effect_block.php)
-
tags/1.1/classes/blocks/general_block.php (copied) (copied from share-button/trunk/classes/blocks/general_block.php)
-
tags/1.1/classes/blocks/layout-block.php (copied) (copied from share-button/trunk/classes/blocks/layout-block.php)
-
tags/1.1/classes/blocks/network-block.php (copied) (copied from share-button/trunk/classes/blocks/network-block.php) (4 diffs)
-
tags/1.1/classes/blocks/preview_block.php (copied) (copied from share-button/trunk/classes/blocks/preview_block.php)
-
tags/1.1/classes/blocks/profile_block.php (copied) (copied from share-button/trunk/classes/blocks/profile_block.php)
-
tags/1.1/classes/blocks/style_block.php (copied) (copied from share-button/trunk/classes/blocks/style_block.php)
-
tags/1.1/classes/blocks/twitter_block.php (copied) (copied from share-button/trunk/classes/blocks/twitter_block.php)
-
tags/1.1/classes/class-admin.php (copied) (copied from share-button/trunk/classes/class-admin.php)
-
tags/1.1/classes/class-block.php (copied) (copied from share-button/trunk/classes/class-block.php)
-
tags/1.1/classes/class-collection.php (copied) (copied from share-button/trunk/classes/class-collection.php) (2 diffs)
-
tags/1.1/classes/class-collections.php (copied) (copied from share-button/trunk/classes/class-collections.php)
-
tags/1.1/classes/class-install.php (copied) (copied from share-button/trunk/classes/class-install.php)
-
tags/1.1/classes/class-network.php (copied) (copied from share-button/trunk/classes/class-network.php)
-
tags/1.1/classes/class-presets.php (copied) (copied from share-button/trunk/classes/class-presets.php)
-
tags/1.1/classes/class-social-networks.php (copied) (copied from share-button/trunk/classes/class-social-networks.php)
-
tags/1.1/classes/class-social.php (copied) (copied from share-button/trunk/classes/class-social.php) (1 diff)
-
tags/1.1/classes/class-style.php (copied) (copied from share-button/trunk/classes/class-style.php)
-
tags/1.1/classes/class-styles.php (copied) (copied from share-button/trunk/classes/class-styles.php)
-
tags/1.1/classes/network/buffer.php (copied) (copied from share-button/trunk/classes/network/buffer.php)
-
tags/1.1/classes/network/googleplus.php (copied) (copied from share-button/trunk/classes/network/googleplus.php)
-
tags/1.1/classes/network/mbcustom.php (copied) (copied from share-button/trunk/classes/network/mbcustom.php)
-
tags/1.1/classes/network/pinterest.php (copied) (copied from share-button/trunk/classes/network/pinterest.php)
-
tags/1.1/classes/network/simple.php (copied) (copied from share-button/trunk/classes/network/simple.php) (2 diffs)
-
tags/1.1/classes/network/twitter.php (copied) (copied from share-button/trunk/classes/network/twitter.php)
-
tags/1.1/classes/network/vk.php (copied) (copied from share-button/trunk/classes/network/vk.php)
-
tags/1.1/classes/styles/_dropsquare-style.php (copied) (copied from share-button/trunk/classes/styles/_dropsquare-style.php)
-
tags/1.1/classes/styles/_liftsquare-style.php (copied) (copied from share-button/trunk/classes/styles/_liftsquare-style.php)
-
tags/1.1/classes/styles/_rectangle-style.php (copied) (copied from share-button/trunk/classes/styles/_rectangle-style.php)
-
tags/1.1/classes/styles/_round-style-nucleo.php (copied) (copied from share-button/trunk/classes/styles/_round-style-nucleo.php)
-
tags/1.1/classes/styles/_roundflip-style.php (copied) (copied from share-button/trunk/classes/styles/_roundflip-style.php)
-
tags/1.1/classes/styles/_shiftsquare-style.php (copied) (copied from share-button/trunk/classes/styles/_shiftsquare-style.php)
-
tags/1.1/classes/styles/dropsquare-style.php (deleted)
-
tags/1.1/classes/styles/horizontal-style.php (copied) (copied from share-button/trunk/classes/styles/horizontal-style.php)
-
tags/1.1/classes/styles/liftsquare-style.php (deleted)
-
tags/1.1/classes/styles/rectangle-style.php (deleted)
-
tags/1.1/classes/styles/round-style-nucleo.php (deleted)
-
tags/1.1/classes/styles/round-style.php (copied) (copied from share-button/trunk/classes/styles/round-style.php)
-
tags/1.1/classes/styles/roundflip-style.php (deleted)
-
tags/1.1/classes/styles/shiftsquare-style.php (deleted)
-
tags/1.1/classes/styles/square-style.php (copied) (copied from share-button/trunk/classes/styles/square-style.php)
-
tags/1.1/css (copied) (copied from share-button/trunk/css)
-
tags/1.1/css/admin.css (copied) (copied from share-button/trunk/css/admin.css) (2 diffs)
-
tags/1.1/css/buttons.css (modified) (2 diffs)
-
tags/1.1/css/global-admin.css (copied) (copied from share-button/trunk/css/global-admin.css)
-
tags/1.1/images (copied) (copied from share-button/trunk/images)
-
tags/1.1/images/icons/shape_circle.png (copied) (copied from share-button/trunk/images/icons/shape_circle.png)
-
tags/1.1/images/icons/shape_square.png (copied) (copied from share-button/trunk/images/icons/shape_square.png)
-
tags/1.1/images/icons/shape_stretch.png (copied) (copied from share-button/trunk/images/icons/shape_stretch.png)
-
tags/1.1/images/mb-blue-network.png (copied) (copied from share-button/trunk/images/mb-blue-network.png)
-
tags/1.1/js (copied) (copied from share-button/trunk/js)
-
tags/1.1/js/maxbuttons-social.js (copied) (copied from share-button/trunk/js/maxbuttons-social.js) (7 diffs)
-
tags/1.1/js/social-front.js (copied) (copied from share-button/trunk/js/social-front.js)
-
tags/1.1/languages (copied) (copied from share-button/trunk/languages)
-
tags/1.1/libraries (copied) (copied from share-button/trunk/libraries)
-
tags/1.1/libraries/simple_template.php (deleted)
-
tags/1.1/libraries/whistle.php (copied) (copied from share-button/trunk/libraries/whistle.php)
-
tags/1.1/readme.txt (copied) (copied from share-button/trunk/readme.txt) (2 diffs)
-
tags/1.1/scss (copied) (copied from share-button/trunk/scss)
-
tags/1.1/scss/_editor.scss (copied) (copied from share-button/trunk/scss/_editor.scss)
-
tags/1.1/scss/_modals.scss (copied) (copied from share-button/trunk/scss/_modals.scss)
-
tags/1.1/scss/_networks.scss (copied) (copied from share-button/trunk/scss/_networks.scss) (2 diffs)
-
tags/1.1/scss/_postbox.scss (copied) (copied from share-button/trunk/scss/_postbox.scss)
-
tags/1.1/scss/_variables.scss (copied) (copied from share-button/trunk/scss/_variables.scss)
-
tags/1.1/scss/admin.scss (copied) (copied from share-button/trunk/scss/admin.scss)
-
tags/1.1/share-button.php (copied) (copied from share-button/trunk/share-button.php) (2 diffs)
-
trunk/classes/blocks/count_block.php (modified) (2 diffs)
-
trunk/classes/blocks/display_block.php (modified) (2 diffs)
-
trunk/classes/blocks/network-block.php (modified) (4 diffs)
-
trunk/classes/class-collection.php (modified) (2 diffs)
-
trunk/classes/class-social.php (modified) (1 diff)
-
trunk/classes/network/simple.php (modified) (2 diffs)
-
trunk/css/admin.css (modified) (2 diffs)
-
trunk/css/buttons.css (modified) (2 diffs)
-
trunk/js/maxbuttons-social.js (modified) (7 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/scss/_networks.scss (modified) (2 diffs)
-
trunk/share-button.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
share-button/tags/1.1/classes/blocks/count_block.php
r1827649 r1834179 110 110 if ($total < $min_count) 111 111 { 112 return $collectionObj; 112 return $collectionObj; 113 113 } 114 114 … … 263 263 $min_count->label = __('Minimum count to show shares','mbsocial'); 264 264 265 $admin->addField( $min_count, 'start', 'end' );265 $admin->addField( $min_count, 'start', 'end', false); 266 266 267 267 // *** COUNT SIZE *** // -
share-button/tags/1.1/classes/blocks/display_block.php
r1827649 r1834179 582 582 } 583 583 584 protected function getDisplayRules()584 /*protected function getDisplayRules() 585 585 { 586 586 $data = $this->data; … … 588 588 589 589 return array(); 590 591 592 } 590 } */ 593 591 594 592 protected function addRule($args) -
share-button/tags/1.1/classes/blocks/network-block.php
r1827649 r1834179 9 9 use \MaxButtons\maxField as maxField; 10 10 use \MaxButtons\maxBlocks as maxBlocks; 11 use \MaxButtons\maxInstall as maxInstall; 11 12 12 13 class networkBlock extends block … … 103 104 $icon_type = $network->get('icon_type'); 104 105 106 /*$fa5_present = method_exists('maxInstall', 'searchNewFa'); 107 var_dump($fa5_present); 108 var_dump($icon_type); 109 $fa5_present = true; 110 if ($icon_type == 'fa' && $fa5_present) 111 { 112 $conversion_path = MB()->get_plugin_path() . '/assets/libraries/font-awesome-5/shims.json'; 113 $conversion_array = json_decode(file_get_contents($conversion_path), ARRAY_A); 114 115 $icon = str_replace('fa-', '', $icon); 116 $icon_type = ''; 117 118 $icon = maxInstall::searchNewFA($icon, $conversion_array); 119 var_dump($icon); 120 } */ 121 105 122 $network_name = $network->get_nice_name(); 106 123 … … 108 125 { 109 126 case 'fa': 127 case 'fab': 110 128 case 'nucleo': 111 $output = "< i class='mb-icon " . $icon_type . " " . $icon . "' title='" . $network_name . "' > </i>";129 $output = "<span class='mb-icon'><i class='" . $icon_type . " " . $icon . "' title='" . $network_name . "' > </i></span>"; 112 130 break; 113 131 case 'svg': 114 132 case 'png': 115 $output = "< img class='mb-icon " . $icon_type . "' src='" . $icon . "' alt='" . $network_name . "'>";133 $output = "<span class='mb-icon " . $icon_type . "'><img src='" . $icon . "' alt='" . $network_name . "'></span>"; 116 134 break; 117 135 … … 188 206 $img = $this->getImage(null, true); 189 207 } 190 else // are there any other cases? Page / Archive should give back their main url like this. 208 elseif (is_category() ) 209 { 210 $obj = get_queried_object(); 211 $category_id = $obj->cat_ID; 212 $url = get_category_link($category_id); 213 $title = $obj->category_nicename; 214 215 } 216 else // are there any other cases? Page should give back their main url like this. 191 217 { 192 218 $url = get_permalink(); -
share-button/tags/1.1/classes/class-collection.php
r1827649 r1834179 223 223 $this->display_mode = $display; 224 224 225 if (! is_admin() ) 225 226 if (! is_admin() && is_singular() ) 226 227 { 227 228 global $post; … … 607 608 return; 608 609 610 MB()->load_library('fontawesome'); // always load lib since change is about 100% this includes FA. 611 609 612 maxUtils::startTime('collection-display-' . self::$count); 610 613 -
share-button/tags/1.1/classes/class-social.php
r1827649 r1834179 175 175 $submenu_function = array($this, 'load_admin_page'); 176 176 177 add_menu_page($page_title, $menu_title, $admin_capability, $menu_slug, $function, $icon_url, 8 1);177 add_menu_page($page_title, $menu_title, $admin_capability, $menu_slug, $function, $icon_url, 82); 178 178 179 179 } -
share-button/tags/1.1/classes/network/simple.php
r1827649 r1834179 53 53 { 54 54 protected $network = 'facebook'; 55 55 56 protected $icon = 'fa-facebook'; 56 57 protected $color = '#3b5998'; … … 84 85 $this->share_url = 'https://www.linkedin.com/shareArticle?mini=true&url={url}'; 85 86 $this->profile_url = 'https://www.linkedin.com/in/{profile}'; 86 // Linkedin counts where killed 87 // Linkedin counts where killed 87 88 //$this->count_api = 'https://www.linkedin.com/countserv/count/share?url={url}&format=json'; 88 89 //$this->countable = true; -
share-button/tags/1.1/css/admin.css
r1827649 r1834179 41 41 border-bottom: 2px solid #008e00; 42 42 border-top: 2px solid #114989;*/ } 43 #maxbuttons.maxbuttons-social .options.networks .item.facebook i{43 #maxbuttons.maxbuttons-social .options.networks .item.facebook .mb-icon { 44 44 background-color: #3b5998; } 45 #maxbuttons.maxbuttons-social .options.networks .item.facebook i:hover {45 #maxbuttons.maxbuttons-social .options.networks .item.facebook .mb-icon:hover { 46 46 background-color: #2d4373; } 47 #maxbuttons.maxbuttons-social .options.networks .item.twitter i{47 #maxbuttons.maxbuttons-social .options.networks .item.twitter .mb-icon { 48 48 background-color: #00aced; } 49 #maxbuttons.maxbuttons-social .options.networks .item.twitter i:hover {49 #maxbuttons.maxbuttons-social .options.networks .item.twitter .mb-icon:hover { 50 50 background-color: #0087ba; } 51 #maxbuttons.maxbuttons-social .options.networks .item.googleplus i{51 #maxbuttons.maxbuttons-social .options.networks .item.googleplus .mb-icon { 52 52 background-color: #dd4b39; } 53 #maxbuttons.maxbuttons-social .options.networks .item.googleplus i:hover {53 #maxbuttons.maxbuttons-social .options.networks .item.googleplus .mb-icon:hover { 54 54 background-color: #c23321; } 55 #maxbuttons.maxbuttons-social .options.networks .item.linkedin i{55 #maxbuttons.maxbuttons-social .options.networks .item.linkedin .mb-icon { 56 56 background-color: #007bb6; } 57 #maxbuttons.maxbuttons-social .options.networks .item.linkedin i:hover {57 #maxbuttons.maxbuttons-social .options.networks .item.linkedin .mb-icon:hover { 58 58 background-color: #005983; } 59 #maxbuttons.maxbuttons-social .options.networks .item.youtube i{59 #maxbuttons.maxbuttons-social .options.networks .item.youtube .mb-icon { 60 60 background-color: #bb0000; } 61 #maxbuttons.maxbuttons-social .options.networks .item.youtube i:hover {61 #maxbuttons.maxbuttons-social .options.networks .item.youtube .mb-icon:hover { 62 62 background-color: #880000; } 63 #maxbuttons.maxbuttons-social .options.networks .item.instagram i{63 #maxbuttons.maxbuttons-social .options.networks .item.instagram .mb-icon { 64 64 background-color: #517fa4; } 65 #maxbuttons.maxbuttons-social .options.networks .item.instagram i:hover {65 #maxbuttons.maxbuttons-social .options.networks .item.instagram .mb-icon:hover { 66 66 background-color: #406582; } 67 #maxbuttons.maxbuttons-social .options.networks .item.flickr i{67 #maxbuttons.maxbuttons-social .options.networks .item.flickr .mb-icon { 68 68 background-color: #ff0084; } 69 #maxbuttons.maxbuttons-social .options.networks .item.flickr i:hover {69 #maxbuttons.maxbuttons-social .options.networks .item.flickr .mb-icon:hover { 70 70 background-color: #cc006a; } 71 #maxbuttons.maxbuttons-social .options.networks .item.thumblr i{71 #maxbuttons.maxbuttons-social .options.networks .item.thumblr .mb-icon { 72 72 background-color: #32506d; } 73 #maxbuttons.maxbuttons-social .options.networks .item.thumblr i:hover {73 #maxbuttons.maxbuttons-social .options.networks .item.thumblr .mb-icon:hover { 74 74 background-color: #22364a; } 75 #maxbuttons.maxbuttons-social .options.networks .item.pinterest i{75 #maxbuttons.maxbuttons-social .options.networks .item.pinterest .mb-icon { 76 76 background-color: #cb2027; } 77 #maxbuttons.maxbuttons-social .options.networks .item.pinterest i:hover {77 #maxbuttons.maxbuttons-social .options.networks .item.pinterest .mb-icon:hover { 78 78 background-color: #9f191f; } 79 #maxbuttons.maxbuttons-social .options.networks .item.email i, #maxbuttons.maxbuttons-social .options.networks .item.print i{79 #maxbuttons.maxbuttons-social .options.networks .item.email .mb-icon, #maxbuttons.maxbuttons-social .options.networks .item.print .mb-icon { 80 80 background-color: #5e5e5e; } 81 #maxbuttons.maxbuttons-social .options.networks .item.email i:hover, #maxbuttons.maxbuttons-social .options.networks .item.print i:hover {81 #maxbuttons.maxbuttons-social .options.networks .item.email .mb-icon:hover, #maxbuttons.maxbuttons-social .options.networks .item.print .mb-icon:hover { 82 82 background-color: #454545; } 83 #maxbuttons.maxbuttons-social .options.networks .item.vkontakte i{83 #maxbuttons.maxbuttons-social .options.networks .item.vkontakte .mb-icon { 84 84 background-color: #4c75a3; } 85 #maxbuttons.maxbuttons-social .options.networks .item.vkontakte i:hover {85 #maxbuttons.maxbuttons-social .options.networks .item.vkontakte .mb-icon:hover { 86 86 background-color: #3c5c80; } 87 #maxbuttons.maxbuttons-social .options.networks .item.digg i{87 #maxbuttons.maxbuttons-social .options.networks .item.digg .mb-icon { 88 88 background-color: #000; } 89 #maxbuttons.maxbuttons-social .options.networks .item.digg i:hover {89 #maxbuttons.maxbuttons-social .options.networks .item.digg .mb-icon:hover { 90 90 background-color: black; } 91 #maxbuttons.maxbuttons-social .options.networks .item.blogloving i{91 #maxbuttons.maxbuttons-social .options.networks .item.blogloving .mb-icon { 92 92 background-color: #000; } 93 #maxbuttons.maxbuttons-social .options.networks .item.blogloving i:hover {93 #maxbuttons.maxbuttons-social .options.networks .item.blogloving .mb-icon:hover { 94 94 background-color: black; } 95 #maxbuttons.maxbuttons-social .options.networks .item.stumbleupon i{95 #maxbuttons.maxbuttons-social .options.networks .item.stumbleupon .mb-icon { 96 96 background-color: #eb4924; } 97 #maxbuttons.maxbuttons-social .options.networks .item.stumbleupon i:hover {97 #maxbuttons.maxbuttons-social .options.networks .item.stumbleupon .mb-icon:hover { 98 98 background-color: #ca3412; } 99 #maxbuttons.maxbuttons-social .options.networks .item.reddit i{99 #maxbuttons.maxbuttons-social .options.networks .item.reddit .mb-icon { 100 100 background-color: #ff4500; } 101 #maxbuttons.maxbuttons-social .options.networks .item.reddit i:hover {101 #maxbuttons.maxbuttons-social .options.networks .item.reddit .mb-icon:hover { 102 102 background-color: #cc3700; } 103 #maxbuttons.maxbuttons-social .options.networks .item.whatsapp i{103 #maxbuttons.maxbuttons-social .options.networks .item.whatsapp .mb-icon { 104 104 background-color: #4dc247; } 105 #maxbuttons.maxbuttons-social .options.networks .item.whatsapp i:hover {105 #maxbuttons.maxbuttons-social .options.networks .item.whatsapp .mb-icon:hover { 106 106 background-color: #3ba135; } 107 #maxbuttons.maxbuttons-social .options.networks .item.buffer i{107 #maxbuttons.maxbuttons-social .options.networks .item.buffer .mb-icon { 108 108 background-color: #242424; } 109 #maxbuttons.maxbuttons-social .options.networks .item.buffer i:hover {109 #maxbuttons.maxbuttons-social .options.networks .item.buffer .mb-icon:hover { 110 110 background-color: #0b0b0b; } 111 #maxbuttons.maxbuttons-social .options.networks .item.rss i{111 #maxbuttons.maxbuttons-social .options.networks .item.rss .mb-icon { 112 112 background-color: #F99000; } 113 #maxbuttons.maxbuttons-social .options.networks .item.rss i:hover {113 #maxbuttons.maxbuttons-social .options.networks .item.rss .mb-icon:hover { 114 114 background-color: #c67300; } 115 #maxbuttons.maxbuttons-social .options.networks .item.snapchat i{115 #maxbuttons.maxbuttons-social .options.networks .item.snapchat .mb-icon { 116 116 background-color: #fffc00; } 117 #maxbuttons.maxbuttons-social .options.networks .item.snapchat i:hover {117 #maxbuttons.maxbuttons-social .options.networks .item.snapchat .mb-icon:hover { 118 118 background-color: #ccca00; } 119 #maxbuttons.maxbuttons-social .options.networks .item.vimeo i{119 #maxbuttons.maxbuttons-social .options.networks .item.vimeo .mb-icon { 120 120 background-color: #1ab7ea; } 121 #maxbuttons.maxbuttons-social .options.networks .item.vimeo i:hover {121 #maxbuttons.maxbuttons-social .options.networks .item.vimeo .mb-icon:hover { 122 122 background-color: #1295bf; } 123 123 #maxbuttons.maxbuttons-social .options.networks .item .legend-circle { … … 155 155 max-height: 100%; 156 156 padding: 0; } 157 #maxbuttons.maxbuttons-social .options.networks .item svg { 158 position: relative; 159 width: 100%; } 157 160 #maxbuttons.maxbuttons-social .options.networks .item .config_button { 158 161 display: inline-block; -
share-button/tags/1.1/css/buttons.css
r1773299 r1834179 71 71 .social-colors.buffer a:hover { 72 72 background-color: #0b0b0b; } 73 .social-colors.rss a { 74 background-color: #F99000; } 75 .social-colors.rss a:hover { 76 background-color: #c67300; } 77 .social-colors.snapchat a { 78 background-color: #fffc00; } 79 .social-colors.snapchat a:hover { 80 background-color: #ccca00; } 81 .social-colors.vimeo a { 82 background-color: #1ab7ea; } 83 .social-colors.vimeo a:hover { 84 background-color: #1295bf; } 73 85 74 86 /* Default Sharing Setup */ … … 101 113 .maxcollection.vertical { 102 114 width: auto; } 103 104 /*# sourceMappingURL=buttons.css.map */ -
share-button/tags/1.1/js/maxbuttons-social.js
r1827649 r1834179 40 40 $(document).on('click', '.style_modal a', function (e) { e.preventDefault(); $(e.target).parents('label').click(); return false; }); 41 41 42 $(window).on('beforeunload', $.proxy(function () { if (this.form_updated) return max col_wp.leave_page; }, this));42 $(window).on('beforeunload', $.proxy(function () { if (this.form_updated) return maxajax.leave_page; }, this)); 43 43 44 44 $('#maxbuttons.maxbuttons-social').on('change', 'input,select', $.proxy( function (e, param) … … 210 210 var selection = $(parent).find('input:checked').val(); 211 211 212 if (options == '[]') // defaults212 /*if (options == '[]') // defaults 213 213 { 214 214 if (selection == 'static') … … 227 227 228 228 options = JSON.stringify(options); 229 } 229 } */ 230 230 231 231 // checked radio button … … 270 270 case 'radio': 271 271 $(field).children('[value="' + value + '"]').prop('checked',true); 272 272 273 $(field).each( function () { 273 274 if ( $(this).val() == value) … … 518 519 var index = $(this.mbCustomTarget).find('input[name="mbcustom_index[]"]').val(); 519 520 520 console.log('index' + index);521 522 521 if ( $(options).length > 0) 523 522 { … … 559 558 var option = $(options).find('select[name="mbcustom_network[' + index + ']"]').val(); 560 559 $(clone).find('select[name="mbcustom_network[' + index + ']"]').val(option); 561 console.log('clone existing settings');562 560 } 563 561 else 564 562 { 565 console.log('grabbing next settings'); 563 566 564 var nextdex = 0; 567 565 $('input[name="mbcustom_index[]"]').each(function() … … 574 572 var clone = $('.mbcustom-helper .mbcustom-options').clone(); 575 573 576 console.log('next index ' + nextdex);577 574 // put next index at clone 578 575 $(clone).find('input, select, label').each(function() { 579 //console.log( $(this).attr('name').replace(/-1/i, nextdex) );580 576 581 577 if (typeof $(this).attr('name') !== 'undefined') -
share-button/tags/1.1/readme.txt
r1829205 r1834179 2 2 Contributors: maxfoundry, basszje 3 3 Tags: wordpress share buttons, wordpress social share, social icons, facebook, twitter, instagram 4 Requires at least: 4. 04 Requires at least: 4.8 5 5 Tested up to: 4.9.4 6 6 Requires PHP: 5.3 7 Stable tag: 1. 07 Stable tag: 1.1 8 8 License: GPL V2 9 9 … … 56 56 == Changelog == 57 57 58 = 1.1 = 59 60 * Preparation for seamlessly moving to FA5 61 * Fixed menu removal problem on older WP versions 62 * Fixed issue with category / terms not sharing URL 63 * Fixed issue with defaults on display options 64 58 65 = 1.0 = 59 66 -
share-button/tags/1.1/scss/_networks.scss
r1827649 r1834179 44 44 45 45 .item { 46 @include socialcolors('i'); 46 // @include socialcolors('svg'); 47 @include socialcolors('.mb-icon'); // transfer period 48 47 49 display: inline-block; 48 50 vertical-align: bottom; … … 112 114 padding: 0; 113 115 } 116 } 117 118 svg { 119 position: relative; 120 width: 100%; 114 121 } 115 122 -
share-button/tags/1.1/share-button.php
r1827649 r1834179 4 4 Plugin URI: http://maxbuttons.com/share-button 5 5 Description: Wordpress Share Buttons lets you easily setup Social Share Buttons on your site 6 Version: 1. 06 Version: 1.1 7 7 Author: Max Foundry 8 8 Author URI: http://maxfoundry.com … … 16 16 17 17 define("MBSOCIAL_ROOT_FILE", __FILE__); 18 define('MBSOCIAL_VERSION_NUM', '1. 0');19 define('MBSOCIAL_RELEASE'," 24 feb2018");18 define('MBSOCIAL_VERSION_NUM', '1.1'); 19 define('MBSOCIAL_RELEASE',"7 Mar 2018"); 20 20 define('MBSOCIAL_REQUIRED_MB', '6.28'); 21 21 -
share-button/trunk/classes/blocks/count_block.php
r1827649 r1834179 110 110 if ($total < $min_count) 111 111 { 112 return $collectionObj; 112 return $collectionObj; 113 113 } 114 114 … … 263 263 $min_count->label = __('Minimum count to show shares','mbsocial'); 264 264 265 $admin->addField( $min_count, 'start', 'end' );265 $admin->addField( $min_count, 'start', 'end', false); 266 266 267 267 // *** COUNT SIZE *** // -
share-button/trunk/classes/blocks/display_block.php
r1827649 r1834179 582 582 } 583 583 584 protected function getDisplayRules()584 /*protected function getDisplayRules() 585 585 { 586 586 $data = $this->data; … … 588 588 589 589 return array(); 590 591 592 } 590 } */ 593 591 594 592 protected function addRule($args) -
share-button/trunk/classes/blocks/network-block.php
r1827649 r1834179 9 9 use \MaxButtons\maxField as maxField; 10 10 use \MaxButtons\maxBlocks as maxBlocks; 11 use \MaxButtons\maxInstall as maxInstall; 11 12 12 13 class networkBlock extends block … … 103 104 $icon_type = $network->get('icon_type'); 104 105 106 /*$fa5_present = method_exists('maxInstall', 'searchNewFa'); 107 var_dump($fa5_present); 108 var_dump($icon_type); 109 $fa5_present = true; 110 if ($icon_type == 'fa' && $fa5_present) 111 { 112 $conversion_path = MB()->get_plugin_path() . '/assets/libraries/font-awesome-5/shims.json'; 113 $conversion_array = json_decode(file_get_contents($conversion_path), ARRAY_A); 114 115 $icon = str_replace('fa-', '', $icon); 116 $icon_type = ''; 117 118 $icon = maxInstall::searchNewFA($icon, $conversion_array); 119 var_dump($icon); 120 } */ 121 105 122 $network_name = $network->get_nice_name(); 106 123 … … 108 125 { 109 126 case 'fa': 127 case 'fab': 110 128 case 'nucleo': 111 $output = "< i class='mb-icon " . $icon_type . " " . $icon . "' title='" . $network_name . "' > </i>";129 $output = "<span class='mb-icon'><i class='" . $icon_type . " " . $icon . "' title='" . $network_name . "' > </i></span>"; 112 130 break; 113 131 case 'svg': 114 132 case 'png': 115 $output = "< img class='mb-icon " . $icon_type . "' src='" . $icon . "' alt='" . $network_name . "'>";133 $output = "<span class='mb-icon " . $icon_type . "'><img src='" . $icon . "' alt='" . $network_name . "'></span>"; 116 134 break; 117 135 … … 188 206 $img = $this->getImage(null, true); 189 207 } 190 else // are there any other cases? Page / Archive should give back their main url like this. 208 elseif (is_category() ) 209 { 210 $obj = get_queried_object(); 211 $category_id = $obj->cat_ID; 212 $url = get_category_link($category_id); 213 $title = $obj->category_nicename; 214 215 } 216 else // are there any other cases? Page should give back their main url like this. 191 217 { 192 218 $url = get_permalink(); -
share-button/trunk/classes/class-collection.php
r1827649 r1834179 223 223 $this->display_mode = $display; 224 224 225 if (! is_admin() ) 225 226 if (! is_admin() && is_singular() ) 226 227 { 227 228 global $post; … … 607 608 return; 608 609 610 MB()->load_library('fontawesome'); // always load lib since change is about 100% this includes FA. 611 609 612 maxUtils::startTime('collection-display-' . self::$count); 610 613 -
share-button/trunk/classes/class-social.php
r1827649 r1834179 175 175 $submenu_function = array($this, 'load_admin_page'); 176 176 177 add_menu_page($page_title, $menu_title, $admin_capability, $menu_slug, $function, $icon_url, 8 1);177 add_menu_page($page_title, $menu_title, $admin_capability, $menu_slug, $function, $icon_url, 82); 178 178 179 179 } -
share-button/trunk/classes/network/simple.php
r1827649 r1834179 53 53 { 54 54 protected $network = 'facebook'; 55 55 56 protected $icon = 'fa-facebook'; 56 57 protected $color = '#3b5998'; … … 84 85 $this->share_url = 'https://www.linkedin.com/shareArticle?mini=true&url={url}'; 85 86 $this->profile_url = 'https://www.linkedin.com/in/{profile}'; 86 // Linkedin counts where killed 87 // Linkedin counts where killed 87 88 //$this->count_api = 'https://www.linkedin.com/countserv/count/share?url={url}&format=json'; 88 89 //$this->countable = true; -
share-button/trunk/css/admin.css
r1827649 r1834179 41 41 border-bottom: 2px solid #008e00; 42 42 border-top: 2px solid #114989;*/ } 43 #maxbuttons.maxbuttons-social .options.networks .item.facebook i{43 #maxbuttons.maxbuttons-social .options.networks .item.facebook .mb-icon { 44 44 background-color: #3b5998; } 45 #maxbuttons.maxbuttons-social .options.networks .item.facebook i:hover {45 #maxbuttons.maxbuttons-social .options.networks .item.facebook .mb-icon:hover { 46 46 background-color: #2d4373; } 47 #maxbuttons.maxbuttons-social .options.networks .item.twitter i{47 #maxbuttons.maxbuttons-social .options.networks .item.twitter .mb-icon { 48 48 background-color: #00aced; } 49 #maxbuttons.maxbuttons-social .options.networks .item.twitter i:hover {49 #maxbuttons.maxbuttons-social .options.networks .item.twitter .mb-icon:hover { 50 50 background-color: #0087ba; } 51 #maxbuttons.maxbuttons-social .options.networks .item.googleplus i{51 #maxbuttons.maxbuttons-social .options.networks .item.googleplus .mb-icon { 52 52 background-color: #dd4b39; } 53 #maxbuttons.maxbuttons-social .options.networks .item.googleplus i:hover {53 #maxbuttons.maxbuttons-social .options.networks .item.googleplus .mb-icon:hover { 54 54 background-color: #c23321; } 55 #maxbuttons.maxbuttons-social .options.networks .item.linkedin i{55 #maxbuttons.maxbuttons-social .options.networks .item.linkedin .mb-icon { 56 56 background-color: #007bb6; } 57 #maxbuttons.maxbuttons-social .options.networks .item.linkedin i:hover {57 #maxbuttons.maxbuttons-social .options.networks .item.linkedin .mb-icon:hover { 58 58 background-color: #005983; } 59 #maxbuttons.maxbuttons-social .options.networks .item.youtube i{59 #maxbuttons.maxbuttons-social .options.networks .item.youtube .mb-icon { 60 60 background-color: #bb0000; } 61 #maxbuttons.maxbuttons-social .options.networks .item.youtube i:hover {61 #maxbuttons.maxbuttons-social .options.networks .item.youtube .mb-icon:hover { 62 62 background-color: #880000; } 63 #maxbuttons.maxbuttons-social .options.networks .item.instagram i{63 #maxbuttons.maxbuttons-social .options.networks .item.instagram .mb-icon { 64 64 background-color: #517fa4; } 65 #maxbuttons.maxbuttons-social .options.networks .item.instagram i:hover {65 #maxbuttons.maxbuttons-social .options.networks .item.instagram .mb-icon:hover { 66 66 background-color: #406582; } 67 #maxbuttons.maxbuttons-social .options.networks .item.flickr i{67 #maxbuttons.maxbuttons-social .options.networks .item.flickr .mb-icon { 68 68 background-color: #ff0084; } 69 #maxbuttons.maxbuttons-social .options.networks .item.flickr i:hover {69 #maxbuttons.maxbuttons-social .options.networks .item.flickr .mb-icon:hover { 70 70 background-color: #cc006a; } 71 #maxbuttons.maxbuttons-social .options.networks .item.thumblr i{71 #maxbuttons.maxbuttons-social .options.networks .item.thumblr .mb-icon { 72 72 background-color: #32506d; } 73 #maxbuttons.maxbuttons-social .options.networks .item.thumblr i:hover {73 #maxbuttons.maxbuttons-social .options.networks .item.thumblr .mb-icon:hover { 74 74 background-color: #22364a; } 75 #maxbuttons.maxbuttons-social .options.networks .item.pinterest i{75 #maxbuttons.maxbuttons-social .options.networks .item.pinterest .mb-icon { 76 76 background-color: #cb2027; } 77 #maxbuttons.maxbuttons-social .options.networks .item.pinterest i:hover {77 #maxbuttons.maxbuttons-social .options.networks .item.pinterest .mb-icon:hover { 78 78 background-color: #9f191f; } 79 #maxbuttons.maxbuttons-social .options.networks .item.email i, #maxbuttons.maxbuttons-social .options.networks .item.print i{79 #maxbuttons.maxbuttons-social .options.networks .item.email .mb-icon, #maxbuttons.maxbuttons-social .options.networks .item.print .mb-icon { 80 80 background-color: #5e5e5e; } 81 #maxbuttons.maxbuttons-social .options.networks .item.email i:hover, #maxbuttons.maxbuttons-social .options.networks .item.print i:hover {81 #maxbuttons.maxbuttons-social .options.networks .item.email .mb-icon:hover, #maxbuttons.maxbuttons-social .options.networks .item.print .mb-icon:hover { 82 82 background-color: #454545; } 83 #maxbuttons.maxbuttons-social .options.networks .item.vkontakte i{83 #maxbuttons.maxbuttons-social .options.networks .item.vkontakte .mb-icon { 84 84 background-color: #4c75a3; } 85 #maxbuttons.maxbuttons-social .options.networks .item.vkontakte i:hover {85 #maxbuttons.maxbuttons-social .options.networks .item.vkontakte .mb-icon:hover { 86 86 background-color: #3c5c80; } 87 #maxbuttons.maxbuttons-social .options.networks .item.digg i{87 #maxbuttons.maxbuttons-social .options.networks .item.digg .mb-icon { 88 88 background-color: #000; } 89 #maxbuttons.maxbuttons-social .options.networks .item.digg i:hover {89 #maxbuttons.maxbuttons-social .options.networks .item.digg .mb-icon:hover { 90 90 background-color: black; } 91 #maxbuttons.maxbuttons-social .options.networks .item.blogloving i{91 #maxbuttons.maxbuttons-social .options.networks .item.blogloving .mb-icon { 92 92 background-color: #000; } 93 #maxbuttons.maxbuttons-social .options.networks .item.blogloving i:hover {93 #maxbuttons.maxbuttons-social .options.networks .item.blogloving .mb-icon:hover { 94 94 background-color: black; } 95 #maxbuttons.maxbuttons-social .options.networks .item.stumbleupon i{95 #maxbuttons.maxbuttons-social .options.networks .item.stumbleupon .mb-icon { 96 96 background-color: #eb4924; } 97 #maxbuttons.maxbuttons-social .options.networks .item.stumbleupon i:hover {97 #maxbuttons.maxbuttons-social .options.networks .item.stumbleupon .mb-icon:hover { 98 98 background-color: #ca3412; } 99 #maxbuttons.maxbuttons-social .options.networks .item.reddit i{99 #maxbuttons.maxbuttons-social .options.networks .item.reddit .mb-icon { 100 100 background-color: #ff4500; } 101 #maxbuttons.maxbuttons-social .options.networks .item.reddit i:hover {101 #maxbuttons.maxbuttons-social .options.networks .item.reddit .mb-icon:hover { 102 102 background-color: #cc3700; } 103 #maxbuttons.maxbuttons-social .options.networks .item.whatsapp i{103 #maxbuttons.maxbuttons-social .options.networks .item.whatsapp .mb-icon { 104 104 background-color: #4dc247; } 105 #maxbuttons.maxbuttons-social .options.networks .item.whatsapp i:hover {105 #maxbuttons.maxbuttons-social .options.networks .item.whatsapp .mb-icon:hover { 106 106 background-color: #3ba135; } 107 #maxbuttons.maxbuttons-social .options.networks .item.buffer i{107 #maxbuttons.maxbuttons-social .options.networks .item.buffer .mb-icon { 108 108 background-color: #242424; } 109 #maxbuttons.maxbuttons-social .options.networks .item.buffer i:hover {109 #maxbuttons.maxbuttons-social .options.networks .item.buffer .mb-icon:hover { 110 110 background-color: #0b0b0b; } 111 #maxbuttons.maxbuttons-social .options.networks .item.rss i{111 #maxbuttons.maxbuttons-social .options.networks .item.rss .mb-icon { 112 112 background-color: #F99000; } 113 #maxbuttons.maxbuttons-social .options.networks .item.rss i:hover {113 #maxbuttons.maxbuttons-social .options.networks .item.rss .mb-icon:hover { 114 114 background-color: #c67300; } 115 #maxbuttons.maxbuttons-social .options.networks .item.snapchat i{115 #maxbuttons.maxbuttons-social .options.networks .item.snapchat .mb-icon { 116 116 background-color: #fffc00; } 117 #maxbuttons.maxbuttons-social .options.networks .item.snapchat i:hover {117 #maxbuttons.maxbuttons-social .options.networks .item.snapchat .mb-icon:hover { 118 118 background-color: #ccca00; } 119 #maxbuttons.maxbuttons-social .options.networks .item.vimeo i{119 #maxbuttons.maxbuttons-social .options.networks .item.vimeo .mb-icon { 120 120 background-color: #1ab7ea; } 121 #maxbuttons.maxbuttons-social .options.networks .item.vimeo i:hover {121 #maxbuttons.maxbuttons-social .options.networks .item.vimeo .mb-icon:hover { 122 122 background-color: #1295bf; } 123 123 #maxbuttons.maxbuttons-social .options.networks .item .legend-circle { … … 155 155 max-height: 100%; 156 156 padding: 0; } 157 #maxbuttons.maxbuttons-social .options.networks .item svg { 158 position: relative; 159 width: 100%; } 157 160 #maxbuttons.maxbuttons-social .options.networks .item .config_button { 158 161 display: inline-block; -
share-button/trunk/css/buttons.css
r1773299 r1834179 71 71 .social-colors.buffer a:hover { 72 72 background-color: #0b0b0b; } 73 .social-colors.rss a { 74 background-color: #F99000; } 75 .social-colors.rss a:hover { 76 background-color: #c67300; } 77 .social-colors.snapchat a { 78 background-color: #fffc00; } 79 .social-colors.snapchat a:hover { 80 background-color: #ccca00; } 81 .social-colors.vimeo a { 82 background-color: #1ab7ea; } 83 .social-colors.vimeo a:hover { 84 background-color: #1295bf; } 73 85 74 86 /* Default Sharing Setup */ … … 101 113 .maxcollection.vertical { 102 114 width: auto; } 103 104 /*# sourceMappingURL=buttons.css.map */ -
share-button/trunk/js/maxbuttons-social.js
r1827649 r1834179 40 40 $(document).on('click', '.style_modal a', function (e) { e.preventDefault(); $(e.target).parents('label').click(); return false; }); 41 41 42 $(window).on('beforeunload', $.proxy(function () { if (this.form_updated) return max col_wp.leave_page; }, this));42 $(window).on('beforeunload', $.proxy(function () { if (this.form_updated) return maxajax.leave_page; }, this)); 43 43 44 44 $('#maxbuttons.maxbuttons-social').on('change', 'input,select', $.proxy( function (e, param) … … 210 210 var selection = $(parent).find('input:checked').val(); 211 211 212 if (options == '[]') // defaults212 /*if (options == '[]') // defaults 213 213 { 214 214 if (selection == 'static') … … 227 227 228 228 options = JSON.stringify(options); 229 } 229 } */ 230 230 231 231 // checked radio button … … 270 270 case 'radio': 271 271 $(field).children('[value="' + value + '"]').prop('checked',true); 272 272 273 $(field).each( function () { 273 274 if ( $(this).val() == value) … … 518 519 var index = $(this.mbCustomTarget).find('input[name="mbcustom_index[]"]').val(); 519 520 520 console.log('index' + index);521 522 521 if ( $(options).length > 0) 523 522 { … … 559 558 var option = $(options).find('select[name="mbcustom_network[' + index + ']"]').val(); 560 559 $(clone).find('select[name="mbcustom_network[' + index + ']"]').val(option); 561 console.log('clone existing settings');562 560 } 563 561 else 564 562 { 565 console.log('grabbing next settings'); 563 566 564 var nextdex = 0; 567 565 $('input[name="mbcustom_index[]"]').each(function() … … 574 572 var clone = $('.mbcustom-helper .mbcustom-options').clone(); 575 573 576 console.log('next index ' + nextdex);577 574 // put next index at clone 578 575 $(clone).find('input, select, label').each(function() { 579 //console.log( $(this).attr('name').replace(/-1/i, nextdex) );580 576 581 577 if (typeof $(this).attr('name') !== 'undefined') -
share-button/trunk/readme.txt
r1829205 r1834179 2 2 Contributors: maxfoundry, basszje 3 3 Tags: wordpress share buttons, wordpress social share, social icons, facebook, twitter, instagram 4 Requires at least: 4. 04 Requires at least: 4.8 5 5 Tested up to: 4.9.4 6 6 Requires PHP: 5.3 7 Stable tag: 1. 07 Stable tag: 1.1 8 8 License: GPL V2 9 9 … … 56 56 == Changelog == 57 57 58 = 1.1 = 59 60 * Preparation for seamlessly moving to FA5 61 * Fixed menu removal problem on older WP versions 62 * Fixed issue with category / terms not sharing URL 63 * Fixed issue with defaults on display options 64 58 65 = 1.0 = 59 66 -
share-button/trunk/scss/_networks.scss
r1827649 r1834179 44 44 45 45 .item { 46 @include socialcolors('i'); 46 // @include socialcolors('svg'); 47 @include socialcolors('.mb-icon'); // transfer period 48 47 49 display: inline-block; 48 50 vertical-align: bottom; … … 112 114 padding: 0; 113 115 } 116 } 117 118 svg { 119 position: relative; 120 width: 100%; 114 121 } 115 122 -
share-button/trunk/share-button.php
r1827649 r1834179 4 4 Plugin URI: http://maxbuttons.com/share-button 5 5 Description: Wordpress Share Buttons lets you easily setup Social Share Buttons on your site 6 Version: 1. 06 Version: 1.1 7 7 Author: Max Foundry 8 8 Author URI: http://maxfoundry.com … … 16 16 17 17 define("MBSOCIAL_ROOT_FILE", __FILE__); 18 define('MBSOCIAL_VERSION_NUM', '1. 0');19 define('MBSOCIAL_RELEASE'," 24 feb2018");18 define('MBSOCIAL_VERSION_NUM', '1.1'); 19 define('MBSOCIAL_RELEASE',"7 Mar 2018"); 20 20 define('MBSOCIAL_REQUIRED_MB', '6.28'); 21 21
Note: See TracChangeset
for help on using the changeset viewer.