Plugin Directory

Changeset 1942576


Ignore:
Timestamp:
09/17/2018 11:57:11 AM (8 years ago)
Author:
sharpay
Message:

Add mini widget

Location:
sharpay
Files:
20 added
7 edited

Legend:

Unmodified
Added
Removed
  • sharpay/trunk/includes/sharpay-admin.php

    r1925822 r1942576  
    3939        'share_counter' => false,
    4040        'share_counter_mode' => 'page',
     41        'mini_widget' => false,
    4142        'image' => ''
    4243    );
     
    7071    if ( empty($sharpay_options) ) {
    7172        $sharpay_options = sharpay_default_options();
     73    }
     74    if ( !isset($sharpay_options['floating_options']['mini_widget']) ) {
     75        $sharpay_options['floating_options']['mini_widget'] = false;
    7276    }
    7377
     
    198202
    199203    <div class="group">
     204        <input type="checkbox" name="sharpay_options[floating_options][mini_widget]" id="mini_widget" class="mini_widget"
     205            <?php echo $sharpay_options['floating_options']['mini_widget'] === true ? 'checked' : '' ?> >
     206        <label for="mini_widget"><?php echo __('Mini widget', 'sharpay-plugin'); ?></label>
     207
     208        <p class="description"><?php echo __('Makes a floating widget compact.', 'sharpay-plugin'); ?></p>
     209    </div>
     210
     211    <div class="group">
    200212        <input type="text" id="image" name="sharpay_options[floating_options][image]"
    201213            value="<?php echo $sharpay_options['floating_options']['image'] ?>"
     
    299311    $input['style'] = $style;
    300312
     313    $input['mini_widget'] = sharpay_sanitize_checkbox($input, 'mini_widget');
     314
    301315    return $input;
    302316}
  • sharpay/trunk/includes/sharpay-public.php

    r1865952 r1942576  
    7979        $src .= 'data-dark="true" ';
    8080    }
     81    if ( $is_floating && $options['mini_widget'] ) {
     82        $src .= 'data-mini="true" ';
     83    }
    8184
    8285    if ( $is_static && $options['height'] != 32 ) {
  • sharpay/trunk/languages/sharpay-plugin-ru_RU.po

    r1925822 r1942576  
    22msgstr ""
    33"Project-Id-Version: Sharpay WordPress Plugin\n"
    4 "POT-Creation-Date: 2018-08-16 16:31+0300\n"
    5 "PO-Revision-Date: 2018-08-16 16:36+0300\n"
     4"POT-Creation-Date: 2018-09-17 14:45+0300\n"
     5"PO-Revision-Date: 2018-09-17 14:45+0300\n"
    66"Last-Translator: \n"
    77"Language-Team: tech@sharpay.io\n"
     
    2727"сайта в настройках плагина."
    2828
    29 #: includes/class-sharpay-widget.php:63 includes/sharpay-admin.php:215
     29#: includes/class-sharpay-widget.php:63 includes/sharpay-admin.php:227
    3030msgid "32px"
    3131msgstr "32px"
    3232
    33 #: includes/class-sharpay-widget.php:67 includes/sharpay-admin.php:218
     33#: includes/class-sharpay-widget.php:67 includes/sharpay-admin.php:230
    3434msgid "24px"
    3535msgstr "24px"
    3636
    37 #: includes/class-sharpay-widget.php:71 includes/sharpay-admin.php:221
     37#: includes/class-sharpay-widget.php:71 includes/sharpay-admin.php:233
    3838msgid "16px"
    3939msgstr "16px"
    4040
    41 #: includes/class-sharpay-widget.php:73 includes/sharpay-admin.php:222
     41#: includes/class-sharpay-widget.php:73 includes/sharpay-admin.php:234
    4242msgid ""
    4343"Set button height to make button smaller. Button width will change "
     
    4747"пропорционально."
    4848
    49 #: includes/class-sharpay-widget.php:80 includes/sharpay-admin.php:186
    50 #: includes/sharpay-admin.php:228
     49#: includes/class-sharpay-widget.php:80 includes/sharpay-admin.php:190
     50#: includes/sharpay-admin.php:240
    5151msgid "Share counter"
    5252msgstr "Счетчик шерингов"
    5353
    54 #: includes/class-sharpay-widget.php:85 includes/sharpay-admin.php:191
    55 #: includes/sharpay-admin.php:233
     54#: includes/class-sharpay-widget.php:85 includes/sharpay-admin.php:195
     55#: includes/sharpay-admin.php:245
    5656msgid "Separate for every page"
    5757msgstr "Отдельно для каждой страницы"
    5858
    59 #: includes/class-sharpay-widget.php:88 includes/sharpay-admin.php:194
    60 #: includes/sharpay-admin.php:236
     59#: includes/class-sharpay-widget.php:88 includes/sharpay-admin.php:198
     60#: includes/sharpay-admin.php:248
    6161msgid "Common for all site"
    6262msgstr "Общий для всего сайта"
    6363
    64 #: includes/class-sharpay-widget.php:90 includes/sharpay-admin.php:196
    65 #: includes/sharpay-admin.php:238
     64#: includes/class-sharpay-widget.php:90 includes/sharpay-admin.php:200
     65#: includes/sharpay-admin.php:250
    6666msgid ""
    6767"Check if you want our button to show how many times your page was shared via "
     
    7171"ваша страница была разшарена."
    7272
    73 #: includes/class-sharpay-widget.php:97 includes/sharpay-admin.php:244
     73#: includes/class-sharpay-widget.php:97 includes/sharpay-admin.php:256
    7474msgid "Would you like to use your own HTML markup for Sharpay button?"
    7575msgstr "Хотите использовать собственную разметку HTML для кнопки Sharpay?"
    7676
    77 #: includes/class-sharpay-widget.php:102 includes/sharpay-admin.php:249
     77#: includes/class-sharpay-widget.php:102 includes/sharpay-admin.php:261
    7878msgid "Enter HTML markup which represents your custom multishare button."
    7979msgstr "Введите разметку HTML, которая нужна для отображения кнопки."
    8080
    81 #: includes/class-sharpay-widget.php:108 includes/sharpay-admin.php:202
    82 #: includes/sharpay-admin.php:255
     81#: includes/class-sharpay-widget.php:108 includes/sharpay-admin.php:214
     82#: includes/sharpay-admin.php:267
    8383msgid ".img | #img | http://..."
    8484msgstr ".img | #img | http://…"
    8585
    86 #: includes/class-sharpay-widget.php:109 includes/sharpay-admin.php:203
    87 #: includes/sharpay-admin.php:256
     86#: includes/class-sharpay-widget.php:109 includes/sharpay-admin.php:215
     87#: includes/sharpay-admin.php:268
    8888msgid ""
    8989"Enter class, id or URL of an image to make it selected by default in sharing "
     
    100100msgstr "Sharpay"
    101101
    102 #: includes/sharpay-admin.php:76
     102#: includes/sharpay-admin.php:80
    103103msgid "Sharpay Settings"
    104104msgstr "Настройки Sharpay"
    105105
    106 #: includes/sharpay-admin.php:82
     106#: includes/sharpay-admin.php:86
    107107msgid "Sharpay project ID"
    108108msgstr "ID проекта в Sharpay"
    109109
    110 #: includes/sharpay-admin.php:87
     110#: includes/sharpay-admin.php:91
    111111msgid "Get your project ID or register new project for your site in Sharpay"
    112112msgstr ""
    113113"Получить ID проекта или создать новый проект для вашего сайта в Sharpay"
    114114
    115 #: includes/sharpay-admin.php:110
    116 #| msgid ""
    117 #| "To get site ID register your site <a href=\"https://app.sharpay.io/"
    118 #| "webmaster\" target=\"_blanc\">here</a>."
     115#: includes/sharpay-admin.php:114
    119116msgid ""
    120117"To make Sharpay multisharing button work you need register your site as a "
     
    126123"и ввести полученный ID проекта."
    127124
    128 #: includes/sharpay-admin.php:116
     125#: includes/sharpay-admin.php:120
    129126msgid "Choose where and how <br> show Sharpay multishare button"
    130127msgstr "Выберите где и как показывать кнопку <br> Sharpay"
    131128
    132 #: includes/sharpay-admin.php:122
     129#: includes/sharpay-admin.php:126
    133130msgid "floating button at the BOTTOM of the page"
    134131msgstr "плавающая кнопка ВНИЗУ страницы"
    135132
    136 #: includes/sharpay-admin.php:130
     133#: includes/sharpay-admin.php:134
    137134msgid "BEFORE post/page content"
    138135msgstr "ПЕРЕД содержимым поста"
    139136
    140 #: includes/sharpay-admin.php:138
     137#: includes/sharpay-admin.php:142
    141138msgid "AFTER post/page content"
    142139msgstr "ПОСЛЕ содержимого поста"
    143140
    144 #: includes/sharpay-admin.php:146
     141#: includes/sharpay-admin.php:150
    145142msgid "anywhere INSIDE CONTENT using [sharpay] shortcode"
    146143msgstr "в любом месте ВНУТРИ КОНТЕНТА с использованием тега [sharpay]"
    147144
    148 #: includes/sharpay-admin.php:166
     145#: includes/sharpay-admin.php:170
    149146msgid "Left"
    150147msgstr "Слева"
    151148
    152 #: includes/sharpay-admin.php:169
     149#: includes/sharpay-admin.php:173
    153150msgid "Right"
    154151msgstr "Справа"
    155152
    156 #: includes/sharpay-admin.php:170
     153#: includes/sharpay-admin.php:174
    157154msgid "Select floating button position at the bottom of the page."
    158155msgstr "Выберите позицию плавающей кнопки внизу страницы."
    159156
    160 #: includes/sharpay-admin.php:176
     157#: includes/sharpay-admin.php:180
    161158msgid "Light"
    162159msgstr "Светлый"
    163160
    164 #: includes/sharpay-admin.php:179
     161#: includes/sharpay-admin.php:183
    165162msgid "Dark"
    166163msgstr "Темный"
    167164
    168 #: includes/sharpay-admin.php:180
     165#: includes/sharpay-admin.php:184
    169166msgid "Select floating button style."
    170167msgstr "Выберите стиль плавающей кнопки."
     168
     169#: includes/sharpay-admin.php:206
     170msgid "Mini widget"
     171msgstr "Мини виджет"
     172
     173#: includes/sharpay-admin.php:208
     174msgid "Makes a floating widget compact."
     175msgstr "Делает плавающую кнопку компактной."
    171176
    172177#: sharpay.php:40
  • sharpay/trunk/languages/sharpay-plugin.pot

    r1925822 r1942576  
    33msgstr ""
    44"Project-Id-Version: Sharpay WordPress Plugin\n"
    5 "POT-Creation-Date: 2018-08-16 16:34+0300\n"
     5"POT-Creation-Date: 2018-09-17 14:45+0300\n"
    66"PO-Revision-Date: 2018-04-25 11:09+0300\n"
    77"Last-Translator: \n"
     
    2626msgstr ""
    2727
    28 #: includes/class-sharpay-widget.php:63 includes/sharpay-admin.php:215
     28#: includes/class-sharpay-widget.php:63 includes/sharpay-admin.php:227
    2929msgid "32px"
    3030msgstr ""
    3131
    32 #: includes/class-sharpay-widget.php:67 includes/sharpay-admin.php:218
     32#: includes/class-sharpay-widget.php:67 includes/sharpay-admin.php:230
    3333msgid "24px"
    3434msgstr ""
    3535
    36 #: includes/class-sharpay-widget.php:71 includes/sharpay-admin.php:221
     36#: includes/class-sharpay-widget.php:71 includes/sharpay-admin.php:233
    3737msgid "16px"
    3838msgstr ""
    3939
    40 #: includes/class-sharpay-widget.php:73 includes/sharpay-admin.php:222
     40#: includes/class-sharpay-widget.php:73 includes/sharpay-admin.php:234
    4141msgid ""
    4242"Set button height to make button smaller. Button width will change "
     
    4444msgstr ""
    4545
    46 #: includes/class-sharpay-widget.php:80 includes/sharpay-admin.php:186
    47 #: includes/sharpay-admin.php:228
     46#: includes/class-sharpay-widget.php:80 includes/sharpay-admin.php:190
     47#: includes/sharpay-admin.php:240
    4848msgid "Share counter"
    4949msgstr ""
    5050
    51 #: includes/class-sharpay-widget.php:85 includes/sharpay-admin.php:191
    52 #: includes/sharpay-admin.php:233
     51#: includes/class-sharpay-widget.php:85 includes/sharpay-admin.php:195
     52#: includes/sharpay-admin.php:245
    5353msgid "Separate for every page"
    5454msgstr ""
    5555
    56 #: includes/class-sharpay-widget.php:88 includes/sharpay-admin.php:194
    57 #: includes/sharpay-admin.php:236
     56#: includes/class-sharpay-widget.php:88 includes/sharpay-admin.php:198
     57#: includes/sharpay-admin.php:248
    5858msgid "Common for all site"
    5959msgstr ""
    6060
    61 #: includes/class-sharpay-widget.php:90 includes/sharpay-admin.php:196
    62 #: includes/sharpay-admin.php:238
     61#: includes/class-sharpay-widget.php:90 includes/sharpay-admin.php:200
     62#: includes/sharpay-admin.php:250
    6363msgid ""
    6464"Check if you want our button to show how many times your page was shared via "
     
    6666msgstr ""
    6767
    68 #: includes/class-sharpay-widget.php:97 includes/sharpay-admin.php:244
     68#: includes/class-sharpay-widget.php:97 includes/sharpay-admin.php:256
    6969msgid "Would you like to use your own HTML markup for Sharpay button?"
    7070msgstr ""
    7171
    72 #: includes/class-sharpay-widget.php:102 includes/sharpay-admin.php:249
     72#: includes/class-sharpay-widget.php:102 includes/sharpay-admin.php:261
    7373msgid "Enter HTML markup which represents your custom multishare button."
    7474msgstr ""
    7575
    76 #: includes/class-sharpay-widget.php:108 includes/sharpay-admin.php:202
    77 #: includes/sharpay-admin.php:255
     76#: includes/class-sharpay-widget.php:108 includes/sharpay-admin.php:214
     77#: includes/sharpay-admin.php:267
    7878msgid ".img | #img | http://..."
    7979msgstr ""
    8080
    81 #: includes/class-sharpay-widget.php:109 includes/sharpay-admin.php:203
    82 #: includes/sharpay-admin.php:256
     81#: includes/class-sharpay-widget.php:109 includes/sharpay-admin.php:215
     82#: includes/sharpay-admin.php:268
    8383msgid ""
    8484"Enter class, id or URL of an image to make it selected by default in sharing "
     
    9494msgstr ""
    9595
    96 #: includes/sharpay-admin.php:76
     96#: includes/sharpay-admin.php:80
    9797msgid "Sharpay Settings"
    9898msgstr ""
    9999
    100 #: includes/sharpay-admin.php:82
     100#: includes/sharpay-admin.php:86
    101101msgid "Sharpay project ID"
    102102msgstr ""
    103103
    104 #: includes/sharpay-admin.php:87
     104#: includes/sharpay-admin.php:91
    105105msgid "Get your project ID or register new project for your site in Sharpay"
    106106msgstr ""
    107107
    108 #: includes/sharpay-admin.php:110
     108#: includes/sharpay-admin.php:114
    109109msgid ""
    110110"To make Sharpay multisharing button work you need register your site as a "
     
    113113msgstr ""
    114114
    115 #: includes/sharpay-admin.php:116
     115#: includes/sharpay-admin.php:120
    116116msgid "Choose where and how <br> show Sharpay multishare button"
    117117msgstr ""
    118118
    119 #: includes/sharpay-admin.php:122
     119#: includes/sharpay-admin.php:126
    120120msgid "floating button at the BOTTOM of the page"
    121121msgstr ""
    122122
    123 #: includes/sharpay-admin.php:130
     123#: includes/sharpay-admin.php:134
    124124msgid "BEFORE post/page content"
    125125msgstr ""
    126126
    127 #: includes/sharpay-admin.php:138
     127#: includes/sharpay-admin.php:142
    128128msgid "AFTER post/page content"
    129129msgstr ""
    130130
    131 #: includes/sharpay-admin.php:146
     131#: includes/sharpay-admin.php:150
    132132msgid "anywhere INSIDE CONTENT using [sharpay] shortcode"
    133133msgstr ""
    134134
    135 #: includes/sharpay-admin.php:166
     135#: includes/sharpay-admin.php:170
    136136msgid "Left"
    137137msgstr ""
    138138
    139 #: includes/sharpay-admin.php:169
     139#: includes/sharpay-admin.php:173
    140140msgid "Right"
    141141msgstr ""
    142142
    143 #: includes/sharpay-admin.php:170
     143#: includes/sharpay-admin.php:174
    144144msgid "Select floating button position at the bottom of the page."
    145145msgstr ""
    146146
    147 #: includes/sharpay-admin.php:176
     147#: includes/sharpay-admin.php:180
    148148msgid "Light"
    149149msgstr ""
    150150
    151 #: includes/sharpay-admin.php:179
     151#: includes/sharpay-admin.php:183
    152152msgid "Dark"
    153153msgstr ""
    154154
    155 #: includes/sharpay-admin.php:180
     155#: includes/sharpay-admin.php:184
    156156msgid "Select floating button style."
     157msgstr ""
     158
     159#: includes/sharpay-admin.php:206
     160msgid "Mini widget"
     161msgstr ""
     162
     163#: includes/sharpay-admin.php:208
     164msgid "Makes a floating widget compact."
    157165msgstr ""
    158166
  • sharpay/trunk/readme.txt

    r1925822 r1942576  
    3636== Changelog ==
    3737
     38= 1.2 =
     39* The user can set new "Mini widget" option for floating Sharpay button.
     40
    3841= 1.1 =
    3942* Now the user can register new site (project) in Sharpay without leaving Sharpay settings page in WordPress admin.
  • sharpay/trunk/sharpay.php

    r1925822 r1942576  
    2121Plugin URI: https://github.com/sharpay-io/wordpress
    2222Description: Sharpay is multisharing button with blockchain profit. It allows you to reward site's visitors for sharing content to their audience via Facebook, Twitter, Medium, Reddit and many other social networks.
    23 Version: 1.1
     23Version: 1.2
    2424Author: Sharpay Inc
    2525Author URI: https://sharpay.io
     
    2929*/
    3030
    31 define('SHARPAY_PLUGIN_VERSION', '1.1');
     31define('SHARPAY_PLUGIN_VERSION', '1.2');
    3232
    3333register_activation_hook(__FILE__, 'sharpay_activate');
Note: See TracChangeset for help on using the changeset viewer.