Plugin Directory

Changeset 1286435


Ignore:
Timestamp:
11/15/2015 02:12:19 AM (10 years ago)
Author:
DarkWolf
Message:

New release 2.5!

Location:
my-custom-css
Files:
53 added
2 deleted
16 edited
3 copied

Legend:

Unmodified
Added
Removed
  • my-custom-css/tags/2.5/lang/default.pot

    r1277035 r1286435  
    33"Project-Id-Version: My Custom CSS\n"
    44"Report-Msgid-Bugs-To: \n"
    5 "POT-Creation-Date: 2013-01-25 19:29+0100\n"
     5"POT-Creation-Date: 2015-11-14 18:11+0100\n"
    66"PO-Revision-Date: \n"
    77"Last-Translator: Salvatore Noschese (DarkWolf) <[email protected]>\n"
    8 "Language-Team: DarkWolf <http://www.darkwolf.it/>\n"
     8"Language-Team: SalvatoreN <https://laltroweb.it/>\n"
    99"Language: it_IT\n"
    1010"MIME-Version: 1.0\n"
     
    1212"Content-Transfer-Encoding: 8bit\n"
    1313"X-Poedit-KeywordsList: _e;__\n"
    14 "X-Poedit-Basepath: E:\\my-custom-css\\trunk\\\n"
     14"X-Poedit-Basepath: E:\\WordPress\\my-custom-css\\trunk\\\n"
    1515"X-Poedit-SourceCharset: UTF-8\n"
    1616"X-Generator: Poedit 1.5.5\n"
    17 "X-Poedit-SearchPath-0: E:\\my-custom-css\\trunk\n"
     17"X-Poedit-SearchPath-0: E:\\WordPress\\my-custom-css\\trunk\n"
    1818
    19 #: E:\my-custom-css\trunk/my-custom-css.php:30
     19#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:108
    2020msgid "Settings"
    2121msgstr ""
    2222
    23 #: E:\my-custom-css\trunk/my-custom-css.php:33
     23#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:111
    2424msgid "Support"
    2525msgstr ""
    2626
    27 #: E:\my-custom-css\trunk/my-custom-css.php:42
     27#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:176
     28msgid "My custom CSS - Backup"
     29msgstr ""
     30
     31#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:182
     32#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:192
     33#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:226
     34#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:235
     35msgid "Close now!"
     36msgstr ""
     37
     38#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:185
     39msgid "I can't list any *.css: 'No file found'... "
     40msgstr ""
     41
     42#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:194
     43msgid "Erase all backup"
     44msgstr ""
     45
     46#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:194
     47msgid "Do you want really delete all backup?"
     48msgstr ""
     49
     50#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:200
     51msgid "File:"
     52msgstr ""
     53
     54#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:201
     55msgid "Path:"
     56msgstr ""
     57
     58#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:202
     59msgid "Saved:"
     60msgstr ""
     61
     62#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:203
     63msgid "Size:"
     64msgstr ""
     65
     66#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:219
     67msgid "My custom CSS - Erase Backup"
     68msgstr ""
     69
     70#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:229
     71msgid "I can't delete any *.css: 'No file found'... "
     72msgstr ""
     73
     74#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:241
     75msgid "bytes, was successfully deleted!!!"
     76msgstr ""
     77
     78#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:337
     79#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:472
    2880msgid "My Custom CSS Panel"
    2981msgstr ""
    3082
    31 #: E:\my-custom-css\trunk/my-custom-css.php:42
    32 msgid "My Custom CSS"
     83#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:339
     84msgid "Font Size:"
    3385msgstr ""
    3486
    35 #: E:\my-custom-css\trunk/my-custom-css.php:93
    36 msgid "Custom CSS Code:"
     87#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:349
     88msgid "Theme:"
    3789msgstr ""
    3890
    39 #: E:\my-custom-css\trunk/my-custom-css.php:97
     91#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:350
     92msgid ""
     93"Warning!!! This will refresh entire page (Unsaved data will be lost) - "
     94"Continue?"
     95msgstr ""
     96
     97#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:388
     98msgid "Bright:"
     99msgstr ""
     100
     101#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:405
     102msgid "Dark:"
     103msgstr ""
     104
     105#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:442
    40106msgid "Save"
    41107msgstr ""
    42108
    43 #: Description of mccss
    44 msgid ""
    45 "With this plugin you can put custom css code without edit your theme and/or "
    46 "your plugins (really useful in case of any theme/plugin update)."
     109#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:449
     110msgid "No backup found..."
    47111msgstr ""
     112
     113#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:450
     114msgid "View backups :)"
     115msgstr ""
     116
     117#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:450
     118msgid "Click to view all backups!"
     119msgstr ""
     120
     121#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:472
     122msgid "My Custom CSS"
     123msgstr ""
  • my-custom-css/tags/2.5/lang/my-custom-css-it_IT.po

    r1277035 r1286435  
    33"Project-Id-Version: My Custom CSS\n"
    44"Report-Msgid-Bugs-To: \n"
    5 "POT-Creation-Date: 2013-01-25 19:29+0100\n"
     5"POT-Creation-Date: 2015-11-14 22:16+0100\n"
    66"PO-Revision-Date: \n"
    77"Last-Translator: Salvatore Noschese (DarkWolf) <[email protected]>\n"
    8 "Language-Team: DarkWolf <http://www.darkwolf.it/>\n"
     8"Language-Team: SalvatoreN <https://laltroweb.it/>\n"
    99"Language: it_IT\n"
    1010"MIME-Version: 1.0\n"
     
    1212"Content-Transfer-Encoding: 8bit\n"
    1313"X-Poedit-KeywordsList: _e;__\n"
    14 "X-Poedit-Basepath: C:\\wamp\\www\\my-custom-css\n"
    15 "X-Poedit-SourceCharset: utf-8\n"
     14"X-Poedit-Basepath: E:\\WordPress\\my-custom-css\\trunk\\\n"
     15"X-Poedit-SourceCharset: UTF-8\n"
    1616"X-Generator: Poedit 1.5.5\n"
    17 "X-Poedit-SearchPath-0: C:\\wamp\\www\\my-custom-css\n"
     17"X-Poedit-SearchPath-0: E:\\WordPress\\my-custom-css\\trunk\n"
    1818
    19 #: E:\my-custom-css\trunk/my-custom-css.php:30
     19#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:106
    2020msgid "Settings"
    2121msgstr "Opzioni"
    2222
    23 #: E:\my-custom-css\trunk/my-custom-css.php:33
     23#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:109
    2424msgid "Support"
    2525msgstr "Supporto"
    2626
    27 #: E:\my-custom-css\trunk/my-custom-css.php:42
     27#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:174
     28msgid "My custom CSS - Backup"
     29msgstr "My custom CSS - Backup"
     30
     31#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:180
     32#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:190
     33#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:224
     34#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:233
     35msgid "Close now!"
     36msgstr "Chiudi ora!"
     37
     38#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:183
     39msgid "I can't list any *.css: 'No file found'... "
     40msgstr "Non posso elencare nessun *.css: 'File non trovato' ..."
     41
     42#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:192
     43msgid "Erase all backup"
     44msgstr "Cancellare tutti i backup"
     45
     46#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:192
     47msgid "Do you want really delete all backup?"
     48msgstr "Vuoi davvero eliminare tutti i backup?"
     49
     50#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:198
     51msgid "File:"
     52msgstr "File:"
     53
     54#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:199
     55msgid "Path:"
     56msgstr "Percorso:"
     57
     58#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:200
     59msgid "Saved:"
     60msgstr "Salvato:"
     61
     62#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:201
     63msgid "Size:"
     64msgstr "Dimensioni:"
     65
     66#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:217
     67msgid "My custom CSS - Erase Backup"
     68msgstr "My custom CSS - Cancella i backup"
     69
     70#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:227
     71msgid "I can't delete any *.css: 'No file found'... "
     72msgstr "Non posso eliminare nessun *.css: 'File non trovato' ..."
     73
     74#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:239
     75msgid "bytes, was successfully deleted!!!"
     76msgstr "byte, &egrave; stato cancellato con successo!!!"
     77
     78#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:336
     79#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:471
    2880msgid "My Custom CSS Panel"
    2981msgstr "Pannello My Custom CSS"
    3082
    31 #: E:\my-custom-css\trunk/my-custom-css.php:42
     83#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:338
     84msgid "Font Size:"
     85msgstr "Dimensione dei font:"
     86
     87#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:348
     88msgid "Theme:"
     89msgstr "Tema:"
     90
     91#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:349
     92msgid ""
     93"Warning!!! This will refresh entire page (Unsaved data will be lost) - "
     94"Continue?"
     95msgstr ""
     96"Attenzione!!! Questo aggiorner&agrave; la pagina intera (i dati non salvati "
     97"andranno persi) - Continuare?"
     98
     99#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:387
     100msgid "Bright:"
     101msgstr "Luminoso:"
     102
     103#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:404
     104msgid "Dark:"
     105msgstr "Scuro:"
     106
     107#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:441
     108msgid "Save"
     109msgstr "Salva"
     110
     111#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:448
     112msgid "No backup found..."
     113msgstr "Nessun backup trovato..."
     114
     115#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:449
     116msgid "View backups :)"
     117msgstr "Visualizza i backup :)"
     118
     119#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:449
     120msgid "Click to view all backups!"
     121msgstr "Clicca per vedere tutti i backup!"
     122
     123#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:471
    32124msgid "My Custom CSS"
    33125msgstr "My Custom CSS"
    34126
    35 #: E:\my-custom-css\trunk/my-custom-css.php:93
    36 msgid "Custom CSS Code:"
    37 msgstr "Codice CSS Personale:"
     127#~ msgid "No backup here..."
     128#~ msgstr "Nessun backup qui..."
    38129
    39 #: E:\my-custom-css\trunk/my-custom-css.php:97
    40 msgid "Save"
    41 msgstr "Salva"
     130#~ msgid "Custom CSS Code:"
     131#~ msgstr "Codice CSS Personale:"
    42132
    43 #: Description of mccss
    44 msgid ""
    45 "With this plugin you can put custom css code without edit your theme and/or "
    46 "your plugins (really useful in case of any theme/plugin update)."
    47 msgstr ""
    48 "Con questo plugin puoi inserire codice css personale senza modificare il tuo "
    49 "tema e/o i tuoi plugin (molto utile in caso di aggiornamenti)."
     133#~ msgid ""
     134#~ "With this plugin you can put custom css code without edit your theme and/"
     135#~ "or your plugins (really useful in case of any theme/plugin update)."
     136#~ msgstr ""
     137#~ "Con questo plugin puoi inserire codice css personale senza modificare il "
     138#~ "tuo tema e/o i tuoi plugin (molto utile in caso di aggiornamenti)."
  • my-custom-css/tags/2.5/my-custom-css.php

    r1284549 r1286435  
    88PS: support file backup and - very important - static css file (fantastic for performance) ;)
    99Author: Salvatore Noschese - DarkWolf
    10 Version: 2.4
     10Version: 2.5
    1111Author URI: https://laltroweb.it/
    1212Text Domain: my-custom-css
     
    1919}
    2020
    21 // Textarea Font size and type (change this if u want big pixel)!
    22 function setfontarea()
    23 {
    24     $setfontarea = '14px "Monaco","Menlo","Ubuntu Mono","Consolas","source-code-pro",monospace;';
    25     return $setfontarea;   
    26 }
     21// Text Domain: my-custom-css
     22load_plugin_textdomain('my-custom-css', false, dirname(plugin_basename(__FILE__)) . '/lang/');
     23
    2724
    2825function mystylecss_basedir()
     
    125122// End Add link on plugins page
    126123
    127 
    128 // Icon in base 64
    129 function mycustomcss_data_icon()
    130 {
    131     $mycustomcss_data_icon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnNJREFUeNqUU01IVFEU/u77m7/GRqqhbbUpnVAYIULIRoMwmjApaNGiVgViJErUolpE2KKFEIGGi4JK0wpjtCCKqChQxmYKiwojaSW0GJkabGbevNe59zxRalPvvfPuPeee853fK6YubM85FSfiOi7+5xGagKZrC4Y03nY4CdgOoDAEfWJZ03WVyPsR7/DW0DB5MxUxlOfiIvD+CisrAAPQiBybZBXpjsikvc0kPdV2Qtoaysj+ATTdB6It7OX7S+BFuydrYtm9KLBjBf+uSzk0FJpdYOO7a8gzeWqfJw2NlUerKdwQsRbzIxHADAKbDqhUNc6rxKjWasC/DpiooX2YZTsfADr50S3mEykC9HmpLAHA5kUeKPIzwMRm0tGBfXMsf7iFVvKe/EryCiyqjaaKJiurCk3pOL+A3W8oZDI0A8DU0WVwXxWQOYGa8wJ1qWsIw5I1ENyWXBpo/cjKOQLQqRbNaeYXMpx34jVqzwpc79kPQ/hxZGCIAGSLZI4zp2mlYpXzXLBAFLFzQtV4Zg/NiX89YmR8o+cQMq+GEWvcy4HJiYKPQNxqnoPAWtXzrakhDHaTIWUX70upKAe725DNDkOnRnT2j+NOsRmGK5CfHJmtWhplQa+fApMRF908Zj89x+WOhDr78HkMJjXq6mPgNhnnRTkvs687ldxYX7LlyHkD68ApLrqlbOvc6LE26lGZS2FSZgNjQP2jDQfDYS14afzLW6QvNsozSh7BP4h6iXhLL9xb35h29arbEvfOQtLWkNa0Kay8aRrFEXJNHF/1bPrpSTRYOlQ7npxBQ6IP0/0/EyiIMgX67zc47tFfz28BBgBxJMx44bFMEAAAAABJRU5ErkJggg==';
    132     return $mycustomcss_data_icon;
    133 }
    134 
    135124// Change the CSS for this plugin on admin plugins page
    136125function mycustomcss_admin_style()
     
    139128    if ($pagenow == "plugins.php")
    140129    {
    141         echo "<style type='text/css'>\n#my-custom-css td.plugin-title strong {\n\tbackground: url(".mycustomcss_data_icon().") no-repeat scroll 115px 2px;\n}\n#my-custom-css div.row-actions-visible {\n\tpadding-top: 15px;\n}\n#my-custom-css div.plugin-version-author-uri {\n\tbackground-color: #EAEAEA;\n\tborder-radius: 5px;\n\tbox-shadow: 0 8px 6px -6px gray; \n\tfont-weight: bold; \n\tpadding: 7px; \n\tmargin-bottom: 12px;\n}\n</style>\n";
     130        echo "<style type='text/css'>\n#my-custom-css td.plugin-title strong {\n\tbackground: url('".plugin_dir_url(__FILE__)."/mccss.png') no-repeat scroll 115px 2px;\n}\n#my-custom-css div.row-actions-visible {\n\tpadding-top: 15px;\n}\n#my-custom-css div.plugin-version-author-uri {\n\tbackground-color: #EAEAEA;\n\tborder-radius: 5px;\n\tbox-shadow: 0 8px 6px -6px gray; \n\tfont-weight: bold; \n\tpadding: 7px; \n\tmargin-bottom: 12px;\n}\n</style>\n";
    142131    }
    143132}
     
    183172<html>
    184173  <head>
    185     <title>My custom CSS - Backup</title>
     174    <title>' .  __('My custom CSS - Backup','my-custom-css') . '</title>
    186175  </head>
    187176    <body style="background: #F1F1F1; padding: 20px; width: 90%; margin: 20px auto; border: 1px 0 dotted gray">';
     
    189178    {
    190179    echo '
    191     <input type="button" value="Close now!" onclick="self.close()" style="margin: 0px 20px; float: right" />
     180    <input type="button" value="' .  __('Close now!','my-custom-css') . '" onclick="self.close()" style="margin: 0px 20px; float: right" />
    192181    <br />
    193182    <div style="border: 1px dotted gray; margin: 20px; padding: 10px; background: #fff">
    194         I can\'t list any *.css: "No file found"...
     183        ' .  __("I can't list any *.css: 'No file found'... ","my-custom-css") . '
    195184    </div>';
    196185    }
     
    199188    echo '
    200189    <form method="post" action="'. admin_url( 'admin.php' ) .'?action=my_custom_css?erase_backup" style="margin-right: 20px; float: right">
    201         <input type="button" value="Close now!" onclick="self.close()" style="padding: 2px 5px" />
     190        <input type="button" value="' .  __('Close now!','my-custom-css') . '" onclick="self.close()" style="padding: 2px 5px" />
    202191         |
    203         <input type="submit" name="erasebackup" class="button" value="Erase backup" style="color: red; padding: 2px 5px" onclick="return confirm(\'Do you want really delete all backup?\');" />
     192        <input type="submit" name="erasebackup" class="button" value="' .  __('Erase all backup','my-custom-css') . '" style="color: red; padding: 2px 5px" onclick="return confirm(\'' .  __('Do you want really delete all backup?','my-custom-css') . '\');" />
    204193    </form>
    205194    <br />';
     
    207196    echo '
    208197    <div style="border: 1px dotted gray; margin: 20px; padding: 10px; background: #fff">
    209     <p><b>File:</b> <a href="'.$href.$file.'">'.$href.$file.'</a></p>
    210     <p><b>Path:</b> '.$directory.$file.'</p>
    211     <p><b>Saved:</b> '.date("M d Y | h:i:s (a)",current_time($date)).'</p>
    212     <p><b>Size:</b> '.(round(filesize($directory.$file). " bytes")).' bytes</p>
     198    <p><b>' .  __('File:','my-custom-css') . '</b> <a href="'.$href.$file.'">'.$href.$file.'</a></p>
     199    <p><b>' .  __('Path:','my-custom-css') . '</b> '.$directory.$file.'</p>
     200    <p><b>' .  __('Saved:','my-custom-css') . '</b> '.date("M d Y | h:i:s (a)",current_time($date)).'</p>
     201    <p><b>' .  __('Size:','my-custom-css') . '</b> '.(round(filesize($directory.$file). " bytes")).' bytes</p>
    213202    </div>';
    214203    }
     
    226215<html>
    227216  <head>
    228     <title>My custom CSS - Erase Backup</title>
     217    <title>' .  __('My custom CSS - Erase Backup','my-custom-css') . '</title>
    229218  </head>
    230219    <body style="background: #F1F1F1; padding: 20px; width: 90%; margin: 20px auto; border: 1px 0 dotted gray">';
     
    233222    {
    234223    echo '
    235     <input type="button" value="Close now!" onclick="self.close()" style="margin: 0px 20px; float: right" />
     224    <input type="button" value="' .  __('Close now!','my-custom-css') . '" onclick="self.close()" style="margin: 0px 20px; float: right" />
    236225    <br />
    237226    <div style="border: 1px dotted gray; margin: 20px; padding: 10px; background: #fff">
    238         I can\'t delete any *.css: "No file found"...
     227        ' .  __("I can't delete any *.css: 'No file found'... ","my-custom-css") . '
    239228    </div>';
    240229    }
     
    242231    {
    243232        echo '
    244         <input type="button" value="Close now!" onclick="self.close()" style="margin: 0px 20px; float: right" />
     233        <input type="button" value="' .  __('Close now!','my-custom-css') . '" onclick="self.close()" style="margin: 0px 20px; float: right" />
    245234        <br />';
    246235        foreach (glob(mystylecss_basedir()."/my_custom_css/bkk/*.css") as $filename)
     
    248237        echo '
    249238        <div style="border: 1px dotted gray; margin: 20px; padding: 10px; background: #fff">
    250             '.$filename.' - ' . filesize($filename) . 'bytes was successfully deleted!!!
     239            '.$filename.' - ' . filesize($filename) . '' .  __('bytes, was successfully deleted!!!','my-custom-css') . '
    251240        </div>';
    252241        unlink($filename);
     
    258247}
    259248
     249function set_theme()
     250{
     251    if (isset($_POST["themelist"]) && !empty($_POST["themelist"]))
     252    {
     253        $settheme = $_POST["themelist"];
     254    }
     255    else if (!isset($_COOKIE['_mccss_ace_themelist_']))
     256    {
     257        $settheme = 'ace/theme/chrome';
     258    }
     259    else
     260    {
     261        $settheme = $_COOKIE['_mccss_ace_themelist_'];
     262    }
     263    return $settheme;
     264}
    260265
    261266// Option page code:
     
    265270<!-- Start My Custom CSS Code -->
    266271<!-- Ace Editor -->
    267 <script language="javascript" src="'.plugin_dir_url(__FILE__).'scripts/ace.js" charset="utf-8"></script>
    268 <script language="javascript" src="'.plugin_dir_url(__FILE__).'scripts/custom-mode.js" charset="utf-8"></script>
    269 <!-- Scroll ToTop -->
     272<script type="text/javascript" src="'.plugin_dir_url(__FILE__).'editor/ace.js" charset="utf-8"></script>
     273<script type="text/javascript" src="'.plugin_dir_url(__FILE__).'editor/ext-searchbox.js" charset="utf-8"></script>
     274<script type="text/javascript" src="'.plugin_dir_url(__FILE__).'editor/ext-language_tools.js" charset="utf-8"></script>
    270275<script type="text/javascript">
    271 jQuery(document).ready(function($)
    272 {
    273     $(window).scroll(function()
    274     {
    275         if ($(this).scrollTop() > 100)
    276         {
    277             $(\'.scrollup\').fadeIn();
    278         }
    279         else
    280         {
    281             $(\'.scrollup\').fadeOut();
    282         }
    283     });
    284     $(\'.scrollup\').click(function()
    285     {
    286         $("html, body").animate({ scrollTop: 0 }, 600);
     276// Ace Setting
     277( function( global, $ ) {
     278    var editor,
     279        syncCSS = function() {
     280            $( \'#my_custom_css_textarea\' ).val( editor.getSession().getValue() );
     281        },
     282        loadAce = function() {
     283            editor = ace.edit( \'my_custom_css\' );
     284            editor.session.setMode("ace/mode/css");
     285            global.safecss_editor = editor;
     286            editor.getSession().setUseWrapMode( true );
     287            editor.setShowPrintMargin( false );
     288            editor.getSession().setValue( $( \'#my_custom_css_textarea\' ).val() );
     289            editor.setOptions({maxLines: Infinity});
     290            editor.setTheme("'.set_theme().'");
     291            editor.setOptions({minLines: 10});
     292            editor.execCommand("find");
     293            // enable autocompletion and snippets
     294            ace.require("ace/ext/language_tools");
     295                editor.setOptions({
     296                enableBasicAutocompletion: true,
     297                enableSnippets: true,
     298                enableLiveAutocompletion: true
     299            });
     300            jQuery.fn.spin&&$( \'#my_custom_css_container\' ).spin( false );
     301            $( \'#my-custom-css\' ).submit( syncCSS );
     302        };
     303    if ( $.browser.msie&&parseInt( $.browser.version, 10 ) <= 7 ) {
     304        $( \'#my_custom_css_container\' ).hide();
     305        $( \'#my_custom_css_textarea\' ).show();
    287306        return false;
    288     });
    289 });
     307    } else {
     308        $( global ).load( loadAce );
     309    }
     310    global.aceSyncCSS = syncCSS;
     311} )( this, jQuery );
    290312</script>
     313<script type="text/javascript" src="'.plugin_dir_url(__FILE__).'editor/_scrolltop.js"></script>
     314<script type="text/javascript" src="'.plugin_dir_url(__FILE__).'editor/textresizer/cookie.js"></script>
     315<script type="text/javascript" src="'.plugin_dir_url(__FILE__).'editor/textresizer/textresizer.min.js"></script>
     316<script type="text/javascript" src="'.plugin_dir_url(__FILE__).'editor/textresizer/textresizer_target.js"></script>
    291317<!-- CSS Code -->
    292 <style type="text/css">
    293 /* Scroll ToTop */
    294 .scrollup, .scrollup:hover, .scrollup:visited, .scrollup:focus {
    295     color: #fff;
    296     box-shadow: none;
    297 }
    298 .scrollup {
    299     background-color: rgba(0, 0, 0, 0.3);
    300     border-radius: 50% !important;
    301     width: 40px;
    302     line-height: 40px;
    303     text-align: center;
    304     text-decoration: none;
    305     position: fixed;
    306     right: 25px;
    307     bottom: 20px;
    308     display: none;
    309     z-index: 10000;
    310 }
    311 /* Set font type-size */
    312 .wrap > form *
    313 {
    314     font: '.setfontarea().'
    315 }
    316 .button-primary
    317 {
    318     height: 50px !important;
    319     width: 130px !important;
    320     position: fixed;
    321     right: 25px;
    322     top: 45px;
    323     z-index: 50;
    324     font-size: 30px !important;
    325     border-radius: 10% !important;
    326 }
    327 #my_custom_css
    328 {
    329     border: 1px solid #DFDFDF;
    330     border-radius: 3px;
    331     width: 100%;
    332     height: 400px;
    333     position: relative;
    334 }
    335 /* Fix wordpress footer */
    336 #wpfooter
    337 {
    338     position: relative;
    339 }
    340 #footer-upgrade
    341 {
    342     float: left;
    343     padding-left: 5px;
    344     font-style: italic;
    345 }
    346 </style>
     318<link rel="stylesheet" id="ace-editor-custom-css" href="'.plugin_dir_url(__FILE__).'editor/ace_custom.css" type="text/css" media="all" />
    347319<!-- End My Custom CSS Code -->
    348320';
    349321}
    350 
    351 
    352322// Register Settings
    353323function mycustomcss_registersetting()
     
    359329function mccss_options()
    360330{
    361 
    362331    // Get plugin version:
    363332    $plugin_data = get_plugin_data(__FILE__);
    364333    $plugin_version = $plugin_data['Version'];
    365 
    366     // If no backup exist, disable button!
    367     $glob = glob(mystylecss_basedir()."/my_custom_css/bkk/*.css");
    368     if ($glob == false)
    369     {
    370         $submit_backup = " value=\"No backup here...\" title=\"No backup found...\" disabled";
    371     }
    372     else
    373     {
    374         $submit_backup = " value=\"View backup :)\" title=\"Click to view all backup!\" ";
    375     }
     334   
     335    // BrightTheme
     336    $chrome = 'ace/theme/chrome';
     337    $clouds = 'ace/theme/clouds';
     338    $crimson_editor = 'ace/theme/crimson_editor';
     339    $dawn = 'ace/theme/dawn';
     340    $dreamweaver = 'ace/theme/dreamweaver';
     341    $eclipse = 'ace/theme/eclipse';
     342    $github = 'ace/theme/github';
     343    $iplastic = 'ace/theme/iplastic';
     344    $solarized_light = 'ace/theme/solarized_light';
     345    $textmate = 'ace/theme/textmate';
     346    $tomorrow = 'ace/theme/tomorrow';
     347    $xcode = 'ace/theme/xcode';
     348    $kuroir = 'ace/theme/kuroir';
     349    $katzenmilch = 'ace/theme/katzenmilch';
     350    $sqlserver = 'ace/theme/sqlserver';
     351    // DarkTheme
     352    $ambiance = 'ace/theme/ambiance';
     353    $chaos = 'ace/theme/chaos';
     354    $clouds_midnight = 'ace/theme/clouds_midnight';
     355    $cobalt = 'ace/theme/cobalt';
     356    $idle_fingers = 'ace/theme/idle_fingers';
     357    $kr_theme = 'ace/theme/kr_theme';
     358    $merbivore = 'ace/theme/merbivore';
     359    $merbivore_soft = 'ace/theme/merbivore_soft';
     360    $mono_industrial = 'ace/theme/mono_industrial';
     361    $monokai = 'ace/theme/monokai';
     362    $pastel_on_dark = 'ace/theme/pastel_on_dark';
     363    $solarized_dark = 'ace/theme/solarized_dark';
     364    $terminal = 'ace/theme/terminal';
     365    $tomorrow_night = 'ace/theme/tomorrow_night';
     366    $tomorrow_night_blue = 'ace/theme/tomorrow_night_blue';
     367    $tomorrow_night_bright = 'ace/theme/tomorrow_night_bright';
     368    $tomorrow_night_eighties = 'ace/theme/tomorrow_night_eighties';
     369    $twilight = 'ace/theme/twilight';
     370    $vibrant_ink = 'ace/theme/vibrant_ink';
    376371
    377372echo '
    378373<div class="wrap">
    379374    <h2>' .  __('My Custom CSS Panel','my-custom-css') . ' - v'.$plugin_version.'</h2>
     375        <div id="textsizer">
     376            <p>' .  __('Font Size:','my-custom-css') . '</p>
     377                <ul class="textresizer">
     378                  <li><a href="#nogo" class="small-text" title="12px (Small)">A-</a></li>
     379                  <li><a href="#nogo" class="medium-text" title="14px (Medium)">A</a></li>
     380                  <li><a href="#nogo" class="large-text" title="16px (Large)">A+</a></li>
     381                  <li><a href="#nogo" class="larger-text" title="18px (Larger)">A++</a></li>
     382                  <li><a href="#nogo" class="giga-text" title="26px (Giga)">A+++</a></li>
     383                </ul>
     384        </div>
     385        <form action="'.admin_url( 'admin.php' ).'?page=my_custom_css" method="post" id="thememenu">
     386            <label for="theme">' .  __('Theme:','my-custom-css') . '</label>
     387                <select name="themelist" id="themelist" onchange="if(confirm(\'' .  __('Warning!!! This will refresh entire page (Unsaved data will be lost) - Continue?','my-custom-css') . '\')){this.form.submit()}">
     388                    <optgroup label="' .  __('Bright:','my-custom-css') . '">
     389                        <option value="'.$chrome.'"'.(set_theme() == $chrome ? ' selected="selected"' : false).'>Chrome</option>
     390                        <option value="'.$clouds.'"'.(set_theme() == $clouds ? ' selected="selected"' : false).'>Clouds</option>
     391                        <option value="'.$crimson_editor.'"'.(set_theme() == $crimson_editor ? ' selected="selected"' : false).'>Crimson Editor</option>
     392                        <option value="'.$dawn.'"'.(set_theme() == $dawn ? ' selected="selected"' : false).'>Dawn</option>
     393                        <option value="'.$dreamweaver.'"'.(set_theme() == $dreamweaver ? ' selected="selected"' : false).'>Dreamweaver</option>
     394                        <option value="'.$eclipse.'"'.(set_theme() == $eclipse ? ' selected="selected"' : false).'>Eclipse</option>
     395                        <option value="'.$github.'"'.(set_theme() == $github ? ' selected="selected"' : false).'>GitHub</option>
     396                        <option value="'.$iplastic.'"'.(set_theme() == $iplastic ? ' selected="selected"' : false).'>IPlastic</option>
     397                        <option value="'.$solarized_light.'"'.(set_theme() == $solarized_light ? ' selected="selected"' : false).'>Solarized Light</option>
     398                        <option value="'.$textmate.'"'.(set_theme() == $textmate ? ' selected="selected"' : false).'>TextMate</option>
     399                        <option value="'.$tomorrow.'"'.(set_theme() == $tomorrow ? ' selected="selected"' : false).'>Tomorrow</option>
     400                        <option value="'.$xcode.'"'.(set_theme() == $xcode ? ' selected="selected"' : false).'>XCode</option>
     401                        <option value="'.$kuroir.'"'.(set_theme() == $kuroir ? ' selected="selected"' : false).'>Kuroir</option>
     402                        <option value="'.$katzenmilch.'"'.(set_theme() == $katzenmilch ? ' selected="selected"' : false).'>KatzenMilch</option>
     403                        <option value="'.$sqlserver.'"'.(set_theme() == $sqlserver ? ' selected="selected"' : false).'>SQL Server</option>
     404                    </optgroup>
     405                    <optgroup label="' .  __('Dark:','my-custom-css') . '">
     406                        <option value="'.$ambiance.'"'.(set_theme() == $ambiance ? ' selected="selected"' : false).'>Ambiance</option>
     407                        <option value="'.$chaos.'"'.(set_theme() == $chaos ? ' selected="selected"' : false).'>Chaos</option>
     408                        <option value="'.$clouds_midnight.'"'.(set_theme() == $clouds_midnight ? ' selected="selected"' : false).'>Clouds Midnight</option>
     409                        <option value="'.$cobalt.'"'.(set_theme() == $cobalt ? ' selected="selected"' : false).'>Cobalt</option>
     410                        <option value="'.$idle_fingers.'"'.(set_theme() == $idle_fingers ? ' selected="selected"' : false).'>idle Fingers</option>
     411                        <option value="'.$kr_theme.'"'.(set_theme() == $kr_theme ? ' selected="selected"' : false).'>krTheme</option>
     412                        <option value="'.$merbivore.'"'.(set_theme() == $merbivore ? ' selected="selected"' : false).'>Merbivore</option>
     413                        <option value="'.$merbivore_soft.'"'.(set_theme() == $merbivore_soft ? ' selected="selected"' : false).'>Merbivore Soft</option>
     414                        <option value="'.$mono_industrial.'"'.(set_theme() == $mono_industrial ? ' selected="selected"' : false).'>Mono Industrial</option>
     415                        <option value="'.$monokai.'"'.(set_theme() == $monokai ? ' selected="selected"' : false).'>Monokai</option>
     416                        <option value="'.$pastel_on_dark.'"'.(set_theme() == $pastel_on_dark ? ' selected="selected"' : false).'>Pastel on dark</option>
     417                        <option value="'.$solarized_dark.'"'.(set_theme() == $solarized_dark ? ' selected="selected"' : false).'>Solarized Dark</option>
     418                        <option value="'.$terminal.'"'.(set_theme() == $terminal ? ' selected="selected"' : false).'>Terminal</option>
     419                        <option value="'.$tomorrow_night.'"'.(set_theme() == $tomorrow_night ? ' selected="selected"' : false).'>Tomorrow Night</option>
     420                        <option value="'.$tomorrow_night_blue.'"'.(set_theme() == $tomorrow_night_blue ? ' selected="selected"' : false).'>Tomorrow Night Blue</option>
     421                        <option value="'.$tomorrow_night_bright.'"'.(set_theme() == $tomorrow_night_bright ? ' selected="selected"' : false).'>Tomorrow Night Bright</option>
     422                        <option value="'.$tomorrow_night_eighties.'"'.(set_theme() == $tomorrow_night_eighties ? ' selected="selected"' : false).'>Tomorrow Night 80s</option>
     423                        <option value="'.$twilight.'"'.(set_theme() == $twilight ? ' selected="selected"' : false).'>Twilight</option>
     424                        <option value="'.$vibrant_ink.'"'.(set_theme() == $vibrant_ink ? ' selected="selected"' : false).'>Vibrant Ink</option>
     425                    </optgroup>
     426                </select>
     427        </form>';
     428        if (isset($_POST["themelist"]) && !empty($_POST["themelist"]))
     429        {
     430            setcookie('_mccss_ace_themelist_', $_POST['themelist'], time()+31556926 ,'/');
     431        }
     432    echo'
    380433    <form id="my-custom-css" method="post" action="options.php">';
    381434    settings_fields( 'mccss_settings' );
    382435echo '
    383     <p>' .  __('Custom CSS Code:','my-custom-css') . '
    384         <input type="submit" name="save" class="button-primary" value="' .  __('Save','my-custom-css') . '" />
    385     </p>
    386436        <div id="my_custom_css_container">
    387437            <div name="my_custom_css" id="my_custom_css"></div>
    388438        </div>
    389439        <textarea id="my_custom_css_textarea" name="my_custom_css" style="display: none;">'.get_option('my_custom_css').'</textarea>
     440        <input type="submit" name="save" class="button-primary" value="' .  __('Save','my-custom-css') . '" />
    390441    </form>
    391442    <p><!-- Smooth Scroll by DarkWolf --><a href="#" class="scrollup">&#9650;</a><!-- Smooth Scroll by DarkWolf --></p>
    392443</div>';
    393444
     445// If no backup exist, disable button!
     446$glob = glob(mystylecss_basedir()."/my_custom_css/bkk/*.css");
     447if ($glob == false) { $submit_backup = 'value="' .  __('No backup found...','my-custom-css') . '" title="' .  __('No backup found...','my-custom-css') . '" disabled'; }
     448else { $submit_backup = 'value="' .  __('View backups :)','my-custom-css') . '" title="' .  __('Click to view all backups!','my-custom-css') . '" '; }
    394449// Hidden view/erase button for blog id > 1 (security fix in multisite)
    395450$blog_id = get_current_blog_id();
     
    398453echo '
    399454    <form method="post" action="'.admin_url( 'admin.php' ).'?action=my_custom_css?show_backup" target="_blank">
    400         <input type="submit" name="viewbackup" class="button-secondary" style="float: left;"'.$submit_backup.' />
     455        <input type="submit" name="viewbackup" class="button-secondary" style="float: left;" '.$submit_backup.' />
    401456    </form>';
    402457}
     
    413468function mycustomcss_admin()
    414469{
    415     $plugin_page = add_menu_page(__('My Custom CSS Panel','my-custom-css'),__('My Custom CSS','my-custom-css'), 'manage_options', 'my_custom_css', 'mccss_options', mycustomcss_data_icon(), 61);
     470    $plugin_page = add_menu_page(__('My Custom CSS Panel','my-custom-css'),__('My Custom CSS','my-custom-css'), 'manage_options', 'my_custom_css', 'mccss_options', plugin_dir_url(__FILE__).'/mccss.png', 61);
    416471    add_action('admin_init', 'mycustomcss_registersetting');
    417472    add_action('admin_head-'. $plugin_page, 'mycustomcss_scripts');
     
    450505add_filter('plugin_row_meta', 'add_plugin_meta_links', 10, 2);
    451506add_filter('plugin_action_links_'.plugin_basename(__FILE__).'', 'mycustomcss_links');
    452 load_plugin_textdomain('my-custom-css', false, dirname(plugin_basename(__FILE__)) . '/lang/');
    453 
    454507
    455508?>
  • my-custom-css/tags/2.5/readme.txt

    r1285118 r1286435  
    55Requires at least: 3.0
    66Tested up to: 4.3.1
    7 Stable tag: 2.4
     7Stable tag: 2.5
    88
    99Enable to add Custom CSS Code via admin panel with Ace (Ajax.org Cloud9 Editor)
     
    3636== Screenshots ==
    3737
    38 1. Custom Menu in Admin Panel + Box
    39 2. Source code: <a href="http://vegamami.altervista.org/">Vegamami</a> | Stylesheet: <a href="http://www.vegamami.it/wp-content/uploads/my_custom_css/my_style.css">.wp-content/uploads/my_custom_css/my_style.css</a>
    40 3. Backup List (New Feature)!
    41 4. Confirm when delete backup!
    42 5. textsizer ... New feature (coming very soon) :)
    43 
     381. My Custom CSS Panel + With All feature and DarkTheme
     392. My Custom CSS Panel + With error and LightTheme
     403. Preview in browser sourcecodeSource code
     414. Backup List (New Feature)!
     425. Confirm when delete backup!
    4443
    4544== Installation ==
     
    5049== Upgrade Notice ==
    5150
    52 = 2.4 =
     51= 2.5 =
    5352
    54 * Now support https and fix incompatibility issue with blue admin plugin!
     53* Now with live auto-complete; text-zoom; theme-changer; and search bar!!!
    5554
    5655== Changelog ==
     56
     57= 2.5 =
     58
     59* More code clean, fix, and optimization!
     60* All string translated (also in backup pages)!
     61* Now with live auto-complete; text-zoom; theme-changer; and search bar!!!
    5762
    5863= 2.4 =
  • my-custom-css/trunk/lang/default.pot

    r1277035 r1286435  
    33"Project-Id-Version: My Custom CSS\n"
    44"Report-Msgid-Bugs-To: \n"
    5 "POT-Creation-Date: 2013-01-25 19:29+0100\n"
     5"POT-Creation-Date: 2015-11-14 18:11+0100\n"
    66"PO-Revision-Date: \n"
    77"Last-Translator: Salvatore Noschese (DarkWolf) <[email protected]>\n"
    8 "Language-Team: DarkWolf <http://www.darkwolf.it/>\n"
     8"Language-Team: SalvatoreN <https://laltroweb.it/>\n"
    99"Language: it_IT\n"
    1010"MIME-Version: 1.0\n"
     
    1212"Content-Transfer-Encoding: 8bit\n"
    1313"X-Poedit-KeywordsList: _e;__\n"
    14 "X-Poedit-Basepath: E:\\my-custom-css\\trunk\\\n"
     14"X-Poedit-Basepath: E:\\WordPress\\my-custom-css\\trunk\\\n"
    1515"X-Poedit-SourceCharset: UTF-8\n"
    1616"X-Generator: Poedit 1.5.5\n"
    17 "X-Poedit-SearchPath-0: E:\\my-custom-css\\trunk\n"
     17"X-Poedit-SearchPath-0: E:\\WordPress\\my-custom-css\\trunk\n"
    1818
    19 #: E:\my-custom-css\trunk/my-custom-css.php:30
     19#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:108
    2020msgid "Settings"
    2121msgstr ""
    2222
    23 #: E:\my-custom-css\trunk/my-custom-css.php:33
     23#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:111
    2424msgid "Support"
    2525msgstr ""
    2626
    27 #: E:\my-custom-css\trunk/my-custom-css.php:42
     27#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:176
     28msgid "My custom CSS - Backup"
     29msgstr ""
     30
     31#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:182
     32#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:192
     33#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:226
     34#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:235
     35msgid "Close now!"
     36msgstr ""
     37
     38#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:185
     39msgid "I can't list any *.css: 'No file found'... "
     40msgstr ""
     41
     42#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:194
     43msgid "Erase all backup"
     44msgstr ""
     45
     46#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:194
     47msgid "Do you want really delete all backup?"
     48msgstr ""
     49
     50#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:200
     51msgid "File:"
     52msgstr ""
     53
     54#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:201
     55msgid "Path:"
     56msgstr ""
     57
     58#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:202
     59msgid "Saved:"
     60msgstr ""
     61
     62#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:203
     63msgid "Size:"
     64msgstr ""
     65
     66#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:219
     67msgid "My custom CSS - Erase Backup"
     68msgstr ""
     69
     70#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:229
     71msgid "I can't delete any *.css: 'No file found'... "
     72msgstr ""
     73
     74#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:241
     75msgid "bytes, was successfully deleted!!!"
     76msgstr ""
     77
     78#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:337
     79#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:472
    2880msgid "My Custom CSS Panel"
    2981msgstr ""
    3082
    31 #: E:\my-custom-css\trunk/my-custom-css.php:42
    32 msgid "My Custom CSS"
     83#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:339
     84msgid "Font Size:"
    3385msgstr ""
    3486
    35 #: E:\my-custom-css\trunk/my-custom-css.php:93
    36 msgid "Custom CSS Code:"
     87#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:349
     88msgid "Theme:"
    3789msgstr ""
    3890
    39 #: E:\my-custom-css\trunk/my-custom-css.php:97
     91#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:350
     92msgid ""
     93"Warning!!! This will refresh entire page (Unsaved data will be lost) - "
     94"Continue?"
     95msgstr ""
     96
     97#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:388
     98msgid "Bright:"
     99msgstr ""
     100
     101#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:405
     102msgid "Dark:"
     103msgstr ""
     104
     105#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:442
    40106msgid "Save"
    41107msgstr ""
    42108
    43 #: Description of mccss
    44 msgid ""
    45 "With this plugin you can put custom css code without edit your theme and/or "
    46 "your plugins (really useful in case of any theme/plugin update)."
     109#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:449
     110msgid "No backup found..."
    47111msgstr ""
     112
     113#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:450
     114msgid "View backups :)"
     115msgstr ""
     116
     117#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:450
     118msgid "Click to view all backups!"
     119msgstr ""
     120
     121#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:472
     122msgid "My Custom CSS"
     123msgstr ""
  • my-custom-css/trunk/lang/my-custom-css-it_IT.po

    r1277037 r1286435  
    33"Project-Id-Version: My Custom CSS\n"
    44"Report-Msgid-Bugs-To: \n"
    5 "POT-Creation-Date: 2013-01-25 19:29+0100\n"
     5"POT-Creation-Date: 2015-11-14 22:16+0100\n"
    66"PO-Revision-Date: \n"
    77"Last-Translator: Salvatore Noschese (DarkWolf) <[email protected]>\n"
    8 "Language-Team: DarkWolf <http://www.darkwolf.it/>\n"
     8"Language-Team: SalvatoreN <https://laltroweb.it/>\n"
    99"Language: it_IT\n"
    1010"MIME-Version: 1.0\n"
     
    1212"Content-Transfer-Encoding: 8bit\n"
    1313"X-Poedit-KeywordsList: _e;__\n"
    14 "X-Poedit-Basepath: C:\\wamp\\www\\my-custom-css\n"
    15 "X-Poedit-SourceCharset: utf-8\n"
     14"X-Poedit-Basepath: E:\\WordPress\\my-custom-css\\trunk\\\n"
     15"X-Poedit-SourceCharset: UTF-8\n"
    1616"X-Generator: Poedit 1.5.5\n"
    17 "X-Poedit-SearchPath-0: C:\\wamp\\www\\my-custom-css\n"
     17"X-Poedit-SearchPath-0: E:\\WordPress\\my-custom-css\\trunk\n"
    1818
    19 #: E:\my-custom-css\trunk/my-custom-css.php:30
     19#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:106
    2020msgid "Settings"
    2121msgstr "Opzioni"
    2222
    23 #: E:\my-custom-css\trunk/my-custom-css.php:33
     23#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:109
    2424msgid "Support"
    2525msgstr "Supporto"
    2626
    27 #: E:\my-custom-css\trunk/my-custom-css.php:42
     27#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:174
     28msgid "My custom CSS - Backup"
     29msgstr "My custom CSS - Backup"
     30
     31#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:180
     32#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:190
     33#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:224
     34#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:233
     35msgid "Close now!"
     36msgstr "Chiudi ora!"
     37
     38#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:183
     39msgid "I can't list any *.css: 'No file found'... "
     40msgstr "Non posso elencare nessun *.css: 'File non trovato' ..."
     41
     42#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:192
     43msgid "Erase all backup"
     44msgstr "Cancellare tutti i backup"
     45
     46#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:192
     47msgid "Do you want really delete all backup?"
     48msgstr "Vuoi davvero eliminare tutti i backup?"
     49
     50#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:198
     51msgid "File:"
     52msgstr "File:"
     53
     54#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:199
     55msgid "Path:"
     56msgstr "Percorso:"
     57
     58#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:200
     59msgid "Saved:"
     60msgstr "Salvato:"
     61
     62#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:201
     63msgid "Size:"
     64msgstr "Dimensioni:"
     65
     66#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:217
     67msgid "My custom CSS - Erase Backup"
     68msgstr "My custom CSS - Cancella i backup"
     69
     70#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:227
     71msgid "I can't delete any *.css: 'No file found'... "
     72msgstr "Non posso eliminare nessun *.css: 'File non trovato' ..."
     73
     74#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:239
     75msgid "bytes, was successfully deleted!!!"
     76msgstr "byte, &egrave; stato cancellato con successo!!!"
     77
     78#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:336
     79#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:471
    2880msgid "My Custom CSS Panel"
    2981msgstr "Pannello My Custom CSS"
    3082
    31 #: E:\my-custom-css\trunk/my-custom-css.php:42
     83#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:338
     84msgid "Font Size:"
     85msgstr "Dimensione dei font:"
     86
     87#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:348
     88msgid "Theme:"
     89msgstr "Tema:"
     90
     91#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:349
     92msgid ""
     93"Warning!!! This will refresh entire page (Unsaved data will be lost) - "
     94"Continue?"
     95msgstr ""
     96"Attenzione!!! Questo aggiorner&agrave; la pagina intera (i dati non salvati "
     97"andranno persi) - Continuare?"
     98
     99#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:387
     100msgid "Bright:"
     101msgstr "Luminoso:"
     102
     103#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:404
     104msgid "Dark:"
     105msgstr "Scuro:"
     106
     107#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:441
     108msgid "Save"
     109msgstr "Salva"
     110
     111#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:448
     112msgid "No backup found..."
     113msgstr "Nessun backup trovato..."
     114
     115#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:449
     116msgid "View backups :)"
     117msgstr "Visualizza i backup :)"
     118
     119#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:449
     120msgid "Click to view all backups!"
     121msgstr "Clicca per vedere tutti i backup!"
     122
     123#: E:\WordPress\my-custom-css\trunk/my-custom-css.php:471
    32124msgid "My Custom CSS"
    33125msgstr "My Custom CSS"
    34126
    35 #: E:\my-custom-css\trunk/my-custom-css.php:93
    36 msgid "Custom CSS Code:"
    37 msgstr "Codice CSS Personale:"
     127#~ msgid "No backup here..."
     128#~ msgstr "Nessun backup qui..."
    38129
    39 #: E:\my-custom-css\trunk/my-custom-css.php:97
    40 msgid "Save"
    41 msgstr "Salva"
     130#~ msgid "Custom CSS Code:"
     131#~ msgstr "Codice CSS Personale:"
    42132
    43 #: Description of mccss
    44 msgid ""
    45 "With this plugin you can put custom css code without edit your theme and/or "
    46 "your plugins (really useful in case of any theme/plugin update)."
    47 msgstr ""
    48 "Con questo plugin puoi inserire codice css personale senza modificare il tuo "
    49 "tema e/o i tuoi plugin (molto utile in caso di aggiornamenti)."
     133#~ msgid ""
     134#~ "With this plugin you can put custom css code without edit your theme and/"
     135#~ "or your plugins (really useful in case of any theme/plugin update)."
     136#~ msgstr ""
     137#~ "Con questo plugin puoi inserire codice css personale senza modificare il "
     138#~ "tuo tema e/o i tuoi plugin (molto utile in caso di aggiornamenti)."
  • my-custom-css/trunk/my-custom-css.php

    r1284549 r1286435  
    88PS: support file backup and - very important - static css file (fantastic for performance) ;)
    99Author: Salvatore Noschese - DarkWolf
    10 Version: 2.4
     10Version: 2.5
    1111Author URI: https://laltroweb.it/
    1212Text Domain: my-custom-css
     
    1919}
    2020
    21 // Textarea Font size and type (change this if u want big pixel)!
    22 function setfontarea()
    23 {
    24     $setfontarea = '14px "Monaco","Menlo","Ubuntu Mono","Consolas","source-code-pro",monospace;';
    25     return $setfontarea;   
    26 }
     21// Text Domain: my-custom-css
     22load_plugin_textdomain('my-custom-css', false, dirname(plugin_basename(__FILE__)) . '/lang/');
     23
    2724
    2825function mystylecss_basedir()
     
    125122// End Add link on plugins page
    126123
    127 
    128 // Icon in base 64
    129 function mycustomcss_data_icon()
    130 {
    131     $mycustomcss_data_icon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAnNJREFUeNqUU01IVFEU/u77m7/GRqqhbbUpnVAYIULIRoMwmjApaNGiVgViJErUolpE2KKFEIGGi4JK0wpjtCCKqChQxmYKiwojaSW0GJkabGbevNe59zxRalPvvfPuPeee853fK6YubM85FSfiOi7+5xGagKZrC4Y03nY4CdgOoDAEfWJZ03WVyPsR7/DW0DB5MxUxlOfiIvD+CisrAAPQiBybZBXpjsikvc0kPdV2Qtoaysj+ATTdB6It7OX7S+BFuydrYtm9KLBjBf+uSzk0FJpdYOO7a8gzeWqfJw2NlUerKdwQsRbzIxHADAKbDqhUNc6rxKjWasC/DpiooX2YZTsfADr50S3mEykC9HmpLAHA5kUeKPIzwMRm0tGBfXMsf7iFVvKe/EryCiyqjaaKJiurCk3pOL+A3W8oZDI0A8DU0WVwXxWQOYGa8wJ1qWsIw5I1ENyWXBpo/cjKOQLQqRbNaeYXMpx34jVqzwpc79kPQ/hxZGCIAGSLZI4zp2mlYpXzXLBAFLFzQtV4Zg/NiX89YmR8o+cQMq+GEWvcy4HJiYKPQNxqnoPAWtXzrakhDHaTIWUX70upKAe725DNDkOnRnT2j+NOsRmGK5CfHJmtWhplQa+fApMRF908Zj89x+WOhDr78HkMJjXq6mPgNhnnRTkvs687ldxYX7LlyHkD68ApLrqlbOvc6LE26lGZS2FSZgNjQP2jDQfDYS14afzLW6QvNsozSh7BP4h6iXhLL9xb35h29arbEvfOQtLWkNa0Kay8aRrFEXJNHF/1bPrpSTRYOlQ7npxBQ6IP0/0/EyiIMgX67zc47tFfz28BBgBxJMx44bFMEAAAAABJRU5ErkJggg==';
    132     return $mycustomcss_data_icon;
    133 }
    134 
    135124// Change the CSS for this plugin on admin plugins page
    136125function mycustomcss_admin_style()
     
    139128    if ($pagenow == "plugins.php")
    140129    {
    141         echo "<style type='text/css'>\n#my-custom-css td.plugin-title strong {\n\tbackground: url(".mycustomcss_data_icon().") no-repeat scroll 115px 2px;\n}\n#my-custom-css div.row-actions-visible {\n\tpadding-top: 15px;\n}\n#my-custom-css div.plugin-version-author-uri {\n\tbackground-color: #EAEAEA;\n\tborder-radius: 5px;\n\tbox-shadow: 0 8px 6px -6px gray; \n\tfont-weight: bold; \n\tpadding: 7px; \n\tmargin-bottom: 12px;\n}\n</style>\n";
     130        echo "<style type='text/css'>\n#my-custom-css td.plugin-title strong {\n\tbackground: url('".plugin_dir_url(__FILE__)."/mccss.png') no-repeat scroll 115px 2px;\n}\n#my-custom-css div.row-actions-visible {\n\tpadding-top: 15px;\n}\n#my-custom-css div.plugin-version-author-uri {\n\tbackground-color: #EAEAEA;\n\tborder-radius: 5px;\n\tbox-shadow: 0 8px 6px -6px gray; \n\tfont-weight: bold; \n\tpadding: 7px; \n\tmargin-bottom: 12px;\n}\n</style>\n";
    142131    }
    143132}
     
    183172<html>
    184173  <head>
    185     <title>My custom CSS - Backup</title>
     174    <title>' .  __('My custom CSS - Backup','my-custom-css') . '</title>
    186175  </head>
    187176    <body style="background: #F1F1F1; padding: 20px; width: 90%; margin: 20px auto; border: 1px 0 dotted gray">';
     
    189178    {
    190179    echo '
    191     <input type="button" value="Close now!" onclick="self.close()" style="margin: 0px 20px; float: right" />
     180    <input type="button" value="' .  __('Close now!','my-custom-css') . '" onclick="self.close()" style="margin: 0px 20px; float: right" />
    192181    <br />
    193182    <div style="border: 1px dotted gray; margin: 20px; padding: 10px; background: #fff">
    194         I can\'t list any *.css: "No file found"...
     183        ' .  __("I can't list any *.css: 'No file found'... ","my-custom-css") . '
    195184    </div>';
    196185    }
     
    199188    echo '
    200189    <form method="post" action="'. admin_url( 'admin.php' ) .'?action=my_custom_css?erase_backup" style="margin-right: 20px; float: right">
    201         <input type="button" value="Close now!" onclick="self.close()" style="padding: 2px 5px" />
     190        <input type="button" value="' .  __('Close now!','my-custom-css') . '" onclick="self.close()" style="padding: 2px 5px" />
    202191         |
    203         <input type="submit" name="erasebackup" class="button" value="Erase backup" style="color: red; padding: 2px 5px" onclick="return confirm(\'Do you want really delete all backup?\');" />
     192        <input type="submit" name="erasebackup" class="button" value="' .  __('Erase all backup','my-custom-css') . '" style="color: red; padding: 2px 5px" onclick="return confirm(\'' .  __('Do you want really delete all backup?','my-custom-css') . '\');" />
    204193    </form>
    205194    <br />';
     
    207196    echo '
    208197    <div style="border: 1px dotted gray; margin: 20px; padding: 10px; background: #fff">
    209     <p><b>File:</b> <a href="'.$href.$file.'">'.$href.$file.'</a></p>
    210     <p><b>Path:</b> '.$directory.$file.'</p>
    211     <p><b>Saved:</b> '.date("M d Y | h:i:s (a)",current_time($date)).'</p>
    212     <p><b>Size:</b> '.(round(filesize($directory.$file). " bytes")).' bytes</p>
     198    <p><b>' .  __('File:','my-custom-css') . '</b> <a href="'.$href.$file.'">'.$href.$file.'</a></p>
     199    <p><b>' .  __('Path:','my-custom-css') . '</b> '.$directory.$file.'</p>
     200    <p><b>' .  __('Saved:','my-custom-css') . '</b> '.date("M d Y | h:i:s (a)",current_time($date)).'</p>
     201    <p><b>' .  __('Size:','my-custom-css') . '</b> '.(round(filesize($directory.$file). " bytes")).' bytes</p>
    213202    </div>';
    214203    }
     
    226215<html>
    227216  <head>
    228     <title>My custom CSS - Erase Backup</title>
     217    <title>' .  __('My custom CSS - Erase Backup','my-custom-css') . '</title>
    229218  </head>
    230219    <body style="background: #F1F1F1; padding: 20px; width: 90%; margin: 20px auto; border: 1px 0 dotted gray">';
     
    233222    {
    234223    echo '
    235     <input type="button" value="Close now!" onclick="self.close()" style="margin: 0px 20px; float: right" />
     224    <input type="button" value="' .  __('Close now!','my-custom-css') . '" onclick="self.close()" style="margin: 0px 20px; float: right" />
    236225    <br />
    237226    <div style="border: 1px dotted gray; margin: 20px; padding: 10px; background: #fff">
    238         I can\'t delete any *.css: "No file found"...
     227        ' .  __("I can't delete any *.css: 'No file found'... ","my-custom-css") . '
    239228    </div>';
    240229    }
     
    242231    {
    243232        echo '
    244         <input type="button" value="Close now!" onclick="self.close()" style="margin: 0px 20px; float: right" />
     233        <input type="button" value="' .  __('Close now!','my-custom-css') . '" onclick="self.close()" style="margin: 0px 20px; float: right" />
    245234        <br />';
    246235        foreach (glob(mystylecss_basedir()."/my_custom_css/bkk/*.css") as $filename)
     
    248237        echo '
    249238        <div style="border: 1px dotted gray; margin: 20px; padding: 10px; background: #fff">
    250             '.$filename.' - ' . filesize($filename) . 'bytes was successfully deleted!!!
     239            '.$filename.' - ' . filesize($filename) . '' .  __('bytes, was successfully deleted!!!','my-custom-css') . '
    251240        </div>';
    252241        unlink($filename);
     
    258247}
    259248
     249function set_theme()
     250{
     251    if (isset($_POST["themelist"]) && !empty($_POST["themelist"]))
     252    {
     253        $settheme = $_POST["themelist"];
     254    }
     255    else if (!isset($_COOKIE['_mccss_ace_themelist_']))
     256    {
     257        $settheme = 'ace/theme/chrome';
     258    }
     259    else
     260    {
     261        $settheme = $_COOKIE['_mccss_ace_themelist_'];
     262    }
     263    return $settheme;
     264}
    260265
    261266// Option page code:
     
    265270<!-- Start My Custom CSS Code -->
    266271<!-- Ace Editor -->
    267 <script language="javascript" src="'.plugin_dir_url(__FILE__).'scripts/ace.js" charset="utf-8"></script>
    268 <script language="javascript" src="'.plugin_dir_url(__FILE__).'scripts/custom-mode.js" charset="utf-8"></script>
    269 <!-- Scroll ToTop -->
     272<script type="text/javascript" src="'.plugin_dir_url(__FILE__).'editor/ace.js" charset="utf-8"></script>
     273<script type="text/javascript" src="'.plugin_dir_url(__FILE__).'editor/ext-searchbox.js" charset="utf-8"></script>
     274<script type="text/javascript" src="'.plugin_dir_url(__FILE__).'editor/ext-language_tools.js" charset="utf-8"></script>
    270275<script type="text/javascript">
    271 jQuery(document).ready(function($)
    272 {
    273     $(window).scroll(function()
    274     {
    275         if ($(this).scrollTop() > 100)
    276         {
    277             $(\'.scrollup\').fadeIn();
    278         }
    279         else
    280         {
    281             $(\'.scrollup\').fadeOut();
    282         }
    283     });
    284     $(\'.scrollup\').click(function()
    285     {
    286         $("html, body").animate({ scrollTop: 0 }, 600);
     276// Ace Setting
     277( function( global, $ ) {
     278    var editor,
     279        syncCSS = function() {
     280            $( \'#my_custom_css_textarea\' ).val( editor.getSession().getValue() );
     281        },
     282        loadAce = function() {
     283            editor = ace.edit( \'my_custom_css\' );
     284            editor.session.setMode("ace/mode/css");
     285            global.safecss_editor = editor;
     286            editor.getSession().setUseWrapMode( true );
     287            editor.setShowPrintMargin( false );
     288            editor.getSession().setValue( $( \'#my_custom_css_textarea\' ).val() );
     289            editor.setOptions({maxLines: Infinity});
     290            editor.setTheme("'.set_theme().'");
     291            editor.setOptions({minLines: 10});
     292            editor.execCommand("find");
     293            // enable autocompletion and snippets
     294            ace.require("ace/ext/language_tools");
     295                editor.setOptions({
     296                enableBasicAutocompletion: true,
     297                enableSnippets: true,
     298                enableLiveAutocompletion: true
     299            });
     300            jQuery.fn.spin&&$( \'#my_custom_css_container\' ).spin( false );
     301            $( \'#my-custom-css\' ).submit( syncCSS );
     302        };
     303    if ( $.browser.msie&&parseInt( $.browser.version, 10 ) <= 7 ) {
     304        $( \'#my_custom_css_container\' ).hide();
     305        $( \'#my_custom_css_textarea\' ).show();
    287306        return false;
    288     });
    289 });
     307    } else {
     308        $( global ).load( loadAce );
     309    }
     310    global.aceSyncCSS = syncCSS;
     311} )( this, jQuery );
    290312</script>
     313<script type="text/javascript" src="'.plugin_dir_url(__FILE__).'editor/_scrolltop.js"></script>
     314<script type="text/javascript" src="'.plugin_dir_url(__FILE__).'editor/textresizer/cookie.js"></script>
     315<script type="text/javascript" src="'.plugin_dir_url(__FILE__).'editor/textresizer/textresizer.min.js"></script>
     316<script type="text/javascript" src="'.plugin_dir_url(__FILE__).'editor/textresizer/textresizer_target.js"></script>
    291317<!-- CSS Code -->
    292 <style type="text/css">
    293 /* Scroll ToTop */
    294 .scrollup, .scrollup:hover, .scrollup:visited, .scrollup:focus {
    295     color: #fff;
    296     box-shadow: none;
    297 }
    298 .scrollup {
    299     background-color: rgba(0, 0, 0, 0.3);
    300     border-radius: 50% !important;
    301     width: 40px;
    302     line-height: 40px;
    303     text-align: center;
    304     text-decoration: none;
    305     position: fixed;
    306     right: 25px;
    307     bottom: 20px;
    308     display: none;
    309     z-index: 10000;
    310 }
    311 /* Set font type-size */
    312 .wrap > form *
    313 {
    314     font: '.setfontarea().'
    315 }
    316 .button-primary
    317 {
    318     height: 50px !important;
    319     width: 130px !important;
    320     position: fixed;
    321     right: 25px;
    322     top: 45px;
    323     z-index: 50;
    324     font-size: 30px !important;
    325     border-radius: 10% !important;
    326 }
    327 #my_custom_css
    328 {
    329     border: 1px solid #DFDFDF;
    330     border-radius: 3px;
    331     width: 100%;
    332     height: 400px;
    333     position: relative;
    334 }
    335 /* Fix wordpress footer */
    336 #wpfooter
    337 {
    338     position: relative;
    339 }
    340 #footer-upgrade
    341 {
    342     float: left;
    343     padding-left: 5px;
    344     font-style: italic;
    345 }
    346 </style>
     318<link rel="stylesheet" id="ace-editor-custom-css" href="'.plugin_dir_url(__FILE__).'editor/ace_custom.css" type="text/css" media="all" />
    347319<!-- End My Custom CSS Code -->
    348320';
    349321}
    350 
    351 
    352322// Register Settings
    353323function mycustomcss_registersetting()
     
    359329function mccss_options()
    360330{
    361 
    362331    // Get plugin version:
    363332    $plugin_data = get_plugin_data(__FILE__);
    364333    $plugin_version = $plugin_data['Version'];
    365 
    366     // If no backup exist, disable button!
    367     $glob = glob(mystylecss_basedir()."/my_custom_css/bkk/*.css");
    368     if ($glob == false)
    369     {
    370         $submit_backup = " value=\"No backup here...\" title=\"No backup found...\" disabled";
    371     }
    372     else
    373     {
    374         $submit_backup = " value=\"View backup :)\" title=\"Click to view all backup!\" ";
    375     }
     334   
     335    // BrightTheme
     336    $chrome = 'ace/theme/chrome';
     337    $clouds = 'ace/theme/clouds';
     338    $crimson_editor = 'ace/theme/crimson_editor';
     339    $dawn = 'ace/theme/dawn';
     340    $dreamweaver = 'ace/theme/dreamweaver';
     341    $eclipse = 'ace/theme/eclipse';
     342    $github = 'ace/theme/github';
     343    $iplastic = 'ace/theme/iplastic';
     344    $solarized_light = 'ace/theme/solarized_light';
     345    $textmate = 'ace/theme/textmate';
     346    $tomorrow = 'ace/theme/tomorrow';
     347    $xcode = 'ace/theme/xcode';
     348    $kuroir = 'ace/theme/kuroir';
     349    $katzenmilch = 'ace/theme/katzenmilch';
     350    $sqlserver = 'ace/theme/sqlserver';
     351    // DarkTheme
     352    $ambiance = 'ace/theme/ambiance';
     353    $chaos = 'ace/theme/chaos';
     354    $clouds_midnight = 'ace/theme/clouds_midnight';
     355    $cobalt = 'ace/theme/cobalt';
     356    $idle_fingers = 'ace/theme/idle_fingers';
     357    $kr_theme = 'ace/theme/kr_theme';
     358    $merbivore = 'ace/theme/merbivore';
     359    $merbivore_soft = 'ace/theme/merbivore_soft';
     360    $mono_industrial = 'ace/theme/mono_industrial';
     361    $monokai = 'ace/theme/monokai';
     362    $pastel_on_dark = 'ace/theme/pastel_on_dark';
     363    $solarized_dark = 'ace/theme/solarized_dark';
     364    $terminal = 'ace/theme/terminal';
     365    $tomorrow_night = 'ace/theme/tomorrow_night';
     366    $tomorrow_night_blue = 'ace/theme/tomorrow_night_blue';
     367    $tomorrow_night_bright = 'ace/theme/tomorrow_night_bright';
     368    $tomorrow_night_eighties = 'ace/theme/tomorrow_night_eighties';
     369    $twilight = 'ace/theme/twilight';
     370    $vibrant_ink = 'ace/theme/vibrant_ink';
    376371
    377372echo '
    378373<div class="wrap">
    379374    <h2>' .  __('My Custom CSS Panel','my-custom-css') . ' - v'.$plugin_version.'</h2>
     375        <div id="textsizer">
     376            <p>' .  __('Font Size:','my-custom-css') . '</p>
     377                <ul class="textresizer">
     378                  <li><a href="#nogo" class="small-text" title="12px (Small)">A-</a></li>
     379                  <li><a href="#nogo" class="medium-text" title="14px (Medium)">A</a></li>
     380                  <li><a href="#nogo" class="large-text" title="16px (Large)">A+</a></li>
     381                  <li><a href="#nogo" class="larger-text" title="18px (Larger)">A++</a></li>
     382                  <li><a href="#nogo" class="giga-text" title="26px (Giga)">A+++</a></li>
     383                </ul>
     384        </div>
     385        <form action="'.admin_url( 'admin.php' ).'?page=my_custom_css" method="post" id="thememenu">
     386            <label for="theme">' .  __('Theme:','my-custom-css') . '</label>
     387                <select name="themelist" id="themelist" onchange="if(confirm(\'' .  __('Warning!!! This will refresh entire page (Unsaved data will be lost) - Continue?','my-custom-css') . '\')){this.form.submit()}">
     388                    <optgroup label="' .  __('Bright:','my-custom-css') . '">
     389                        <option value="'.$chrome.'"'.(set_theme() == $chrome ? ' selected="selected"' : false).'>Chrome</option>
     390                        <option value="'.$clouds.'"'.(set_theme() == $clouds ? ' selected="selected"' : false).'>Clouds</option>
     391                        <option value="'.$crimson_editor.'"'.(set_theme() == $crimson_editor ? ' selected="selected"' : false).'>Crimson Editor</option>
     392                        <option value="'.$dawn.'"'.(set_theme() == $dawn ? ' selected="selected"' : false).'>Dawn</option>
     393                        <option value="'.$dreamweaver.'"'.(set_theme() == $dreamweaver ? ' selected="selected"' : false).'>Dreamweaver</option>
     394                        <option value="'.$eclipse.'"'.(set_theme() == $eclipse ? ' selected="selected"' : false).'>Eclipse</option>
     395                        <option value="'.$github.'"'.(set_theme() == $github ? ' selected="selected"' : false).'>GitHub</option>
     396                        <option value="'.$iplastic.'"'.(set_theme() == $iplastic ? ' selected="selected"' : false).'>IPlastic</option>
     397                        <option value="'.$solarized_light.'"'.(set_theme() == $solarized_light ? ' selected="selected"' : false).'>Solarized Light</option>
     398                        <option value="'.$textmate.'"'.(set_theme() == $textmate ? ' selected="selected"' : false).'>TextMate</option>
     399                        <option value="'.$tomorrow.'"'.(set_theme() == $tomorrow ? ' selected="selected"' : false).'>Tomorrow</option>
     400                        <option value="'.$xcode.'"'.(set_theme() == $xcode ? ' selected="selected"' : false).'>XCode</option>
     401                        <option value="'.$kuroir.'"'.(set_theme() == $kuroir ? ' selected="selected"' : false).'>Kuroir</option>
     402                        <option value="'.$katzenmilch.'"'.(set_theme() == $katzenmilch ? ' selected="selected"' : false).'>KatzenMilch</option>
     403                        <option value="'.$sqlserver.'"'.(set_theme() == $sqlserver ? ' selected="selected"' : false).'>SQL Server</option>
     404                    </optgroup>
     405                    <optgroup label="' .  __('Dark:','my-custom-css') . '">
     406                        <option value="'.$ambiance.'"'.(set_theme() == $ambiance ? ' selected="selected"' : false).'>Ambiance</option>
     407                        <option value="'.$chaos.'"'.(set_theme() == $chaos ? ' selected="selected"' : false).'>Chaos</option>
     408                        <option value="'.$clouds_midnight.'"'.(set_theme() == $clouds_midnight ? ' selected="selected"' : false).'>Clouds Midnight</option>
     409                        <option value="'.$cobalt.'"'.(set_theme() == $cobalt ? ' selected="selected"' : false).'>Cobalt</option>
     410                        <option value="'.$idle_fingers.'"'.(set_theme() == $idle_fingers ? ' selected="selected"' : false).'>idle Fingers</option>
     411                        <option value="'.$kr_theme.'"'.(set_theme() == $kr_theme ? ' selected="selected"' : false).'>krTheme</option>
     412                        <option value="'.$merbivore.'"'.(set_theme() == $merbivore ? ' selected="selected"' : false).'>Merbivore</option>
     413                        <option value="'.$merbivore_soft.'"'.(set_theme() == $merbivore_soft ? ' selected="selected"' : false).'>Merbivore Soft</option>
     414                        <option value="'.$mono_industrial.'"'.(set_theme() == $mono_industrial ? ' selected="selected"' : false).'>Mono Industrial</option>
     415                        <option value="'.$monokai.'"'.(set_theme() == $monokai ? ' selected="selected"' : false).'>Monokai</option>
     416                        <option value="'.$pastel_on_dark.'"'.(set_theme() == $pastel_on_dark ? ' selected="selected"' : false).'>Pastel on dark</option>
     417                        <option value="'.$solarized_dark.'"'.(set_theme() == $solarized_dark ? ' selected="selected"' : false).'>Solarized Dark</option>
     418                        <option value="'.$terminal.'"'.(set_theme() == $terminal ? ' selected="selected"' : false).'>Terminal</option>
     419                        <option value="'.$tomorrow_night.'"'.(set_theme() == $tomorrow_night ? ' selected="selected"' : false).'>Tomorrow Night</option>
     420                        <option value="'.$tomorrow_night_blue.'"'.(set_theme() == $tomorrow_night_blue ? ' selected="selected"' : false).'>Tomorrow Night Blue</option>
     421                        <option value="'.$tomorrow_night_bright.'"'.(set_theme() == $tomorrow_night_bright ? ' selected="selected"' : false).'>Tomorrow Night Bright</option>
     422                        <option value="'.$tomorrow_night_eighties.'"'.(set_theme() == $tomorrow_night_eighties ? ' selected="selected"' : false).'>Tomorrow Night 80s</option>
     423                        <option value="'.$twilight.'"'.(set_theme() == $twilight ? ' selected="selected"' : false).'>Twilight</option>
     424                        <option value="'.$vibrant_ink.'"'.(set_theme() == $vibrant_ink ? ' selected="selected"' : false).'>Vibrant Ink</option>
     425                    </optgroup>
     426                </select>
     427        </form>';
     428        if (isset($_POST["themelist"]) && !empty($_POST["themelist"]))
     429        {
     430            setcookie('_mccss_ace_themelist_', $_POST['themelist'], time()+31556926 ,'/');
     431        }
     432    echo'
    380433    <form id="my-custom-css" method="post" action="options.php">';
    381434    settings_fields( 'mccss_settings' );
    382435echo '
    383     <p>' .  __('Custom CSS Code:','my-custom-css') . '
    384         <input type="submit" name="save" class="button-primary" value="' .  __('Save','my-custom-css') . '" />
    385     </p>
    386436        <div id="my_custom_css_container">
    387437            <div name="my_custom_css" id="my_custom_css"></div>
    388438        </div>
    389439        <textarea id="my_custom_css_textarea" name="my_custom_css" style="display: none;">'.get_option('my_custom_css').'</textarea>
     440        <input type="submit" name="save" class="button-primary" value="' .  __('Save','my-custom-css') . '" />
    390441    </form>
    391442    <p><!-- Smooth Scroll by DarkWolf --><a href="#" class="scrollup">&#9650;</a><!-- Smooth Scroll by DarkWolf --></p>
    392443</div>';
    393444
     445// If no backup exist, disable button!
     446$glob = glob(mystylecss_basedir()."/my_custom_css/bkk/*.css");
     447if ($glob == false) { $submit_backup = 'value="' .  __('No backup found...','my-custom-css') . '" title="' .  __('No backup found...','my-custom-css') . '" disabled'; }
     448else { $submit_backup = 'value="' .  __('View backups :)','my-custom-css') . '" title="' .  __('Click to view all backups!','my-custom-css') . '" '; }
    394449// Hidden view/erase button for blog id > 1 (security fix in multisite)
    395450$blog_id = get_current_blog_id();
     
    398453echo '
    399454    <form method="post" action="'.admin_url( 'admin.php' ).'?action=my_custom_css?show_backup" target="_blank">
    400         <input type="submit" name="viewbackup" class="button-secondary" style="float: left;"'.$submit_backup.' />
     455        <input type="submit" name="viewbackup" class="button-secondary" style="float: left;" '.$submit_backup.' />
    401456    </form>';
    402457}
     
    413468function mycustomcss_admin()
    414469{
    415     $plugin_page = add_menu_page(__('My Custom CSS Panel','my-custom-css'),__('My Custom CSS','my-custom-css'), 'manage_options', 'my_custom_css', 'mccss_options', mycustomcss_data_icon(), 61);
     470    $plugin_page = add_menu_page(__('My Custom CSS Panel','my-custom-css'),__('My Custom CSS','my-custom-css'), 'manage_options', 'my_custom_css', 'mccss_options', plugin_dir_url(__FILE__).'/mccss.png', 61);
    416471    add_action('admin_init', 'mycustomcss_registersetting');
    417472    add_action('admin_head-'. $plugin_page, 'mycustomcss_scripts');
     
    450505add_filter('plugin_row_meta', 'add_plugin_meta_links', 10, 2);
    451506add_filter('plugin_action_links_'.plugin_basename(__FILE__).'', 'mycustomcss_links');
    452 load_plugin_textdomain('my-custom-css', false, dirname(plugin_basename(__FILE__)) . '/lang/');
    453 
    454507
    455508?>
  • my-custom-css/trunk/readme.txt

    r1285119 r1286435  
    55Requires at least: 3.0
    66Tested up to: 4.3.1
    7 Stable tag: 2.4
     7Stable tag: 2.5
    88
    99Enable to add Custom CSS Code via admin panel with Ace (Ajax.org Cloud9 Editor)
     
    3636== Screenshots ==
    3737
    38 1. Custom Menu in Admin Panel + Box
    39 2. Source code: <a href="http://vegamami.altervista.org/">Vegamami</a> | Stylesheet: <a href="http://www.vegamami.it/wp-content/uploads/my_custom_css/my_style.css">.wp-content/uploads/my_custom_css/my_style.css</a>
    40 3. Backup List (New Feature)!
    41 4. Confirm when delete backup!
    42 5. textsizer ... New feature (coming very soon) :)
    43 
     381. My Custom CSS Panel + With All feature and DarkTheme
     392. My Custom CSS Panel + With error and LightTheme
     403. Preview in browser sourcecodeSource code
     414. Backup List (New Feature)!
     425. Confirm when delete backup!
    4443
    4544== Installation ==
     
    5049== Upgrade Notice ==
    5150
    52 = 2.4 =
     51= 2.5 =
    5352
    54 * Now support https and fix incompatibility issue with blue admin plugin!
     53* Now with live auto-complete; text-zoom; theme-changer; and search bar!!!
    5554
    5655== Changelog ==
     56
     57= 2.5 =
     58
     59* More code clean, fix, and optimization!
     60* All string translated (also in backup pages)!
     61* Now with live auto-complete; text-zoom; theme-changer; and search bar!!!
    5762
    5863= 2.4 =
Note: See TracChangeset for help on using the changeset viewer.