Changeset 1313576
- Timestamp:
- 12/21/2015 03:54:15 PM (10 years ago)
- Location:
- my-custom-css
- Files:
-
- 63 added
- 11 edited
-
assets/screenshot-1.png (modified) (previous)
-
assets/screenshot-2.png (modified) (previous)
-
assets/screenshot-3.png (modified) (previous)
-
assets/screenshot-4.png (modified) (previous)
-
assets/screenshot-5.png (modified) (previous)
-
assets/screenshot-6.png (added)
-
tags/3.0 (added)
-
tags/3.0/editor (added)
-
tags/3.0/editor/_scrolltop.js (added)
-
tags/3.0/editor/ace.js (added)
-
tags/3.0/editor/ace_custom.css (added)
-
tags/3.0/editor/ext-language_tools.js (added)
-
tags/3.0/editor/ext-searchbox.js (added)
-
tags/3.0/editor/index.php (added)
-
tags/3.0/editor/mode-css.js (added)
-
tags/3.0/editor/snippets (added)
-
tags/3.0/editor/snippets/css.js (added)
-
tags/3.0/editor/snippets/index.php (added)
-
tags/3.0/editor/snippets/text.js (added)
-
tags/3.0/editor/textresizer (added)
-
tags/3.0/editor/textresizer/cookie.js (added)
-
tags/3.0/editor/textresizer/index.php (added)
-
tags/3.0/editor/textresizer/textresizer.min.js (added)
-
tags/3.0/editor/textresizer/textresizer_target.js (added)
-
tags/3.0/editor/theme-ambiance.js (added)
-
tags/3.0/editor/theme-chaos.js (added)
-
tags/3.0/editor/theme-chrome.js (added)
-
tags/3.0/editor/theme-clouds.js (added)
-
tags/3.0/editor/theme-clouds_midnight.js (added)
-
tags/3.0/editor/theme-cobalt.js (added)
-
tags/3.0/editor/theme-crimson_editor.js (added)
-
tags/3.0/editor/theme-dawn.js (added)
-
tags/3.0/editor/theme-dreamweaver.js (added)
-
tags/3.0/editor/theme-eclipse.js (added)
-
tags/3.0/editor/theme-github.js (added)
-
tags/3.0/editor/theme-idle_fingers.js (added)
-
tags/3.0/editor/theme-iplastic.js (added)
-
tags/3.0/editor/theme-katzenmilch.js (added)
-
tags/3.0/editor/theme-kr_theme.js (added)
-
tags/3.0/editor/theme-kuroir.js (added)
-
tags/3.0/editor/theme-merbivore.js (added)
-
tags/3.0/editor/theme-merbivore_soft.js (added)
-
tags/3.0/editor/theme-mono_industrial.js (added)
-
tags/3.0/editor/theme-monokai.js (added)
-
tags/3.0/editor/theme-pastel_on_dark.js (added)
-
tags/3.0/editor/theme-solarized_dark.js (added)
-
tags/3.0/editor/theme-solarized_light.js (added)
-
tags/3.0/editor/theme-sqlserver.js (added)
-
tags/3.0/editor/theme-terminal.js (added)
-
tags/3.0/editor/theme-textmate.js (added)
-
tags/3.0/editor/theme-tomorrow.js (added)
-
tags/3.0/editor/theme-tomorrow_night.js (added)
-
tags/3.0/editor/theme-tomorrow_night_blue.js (added)
-
tags/3.0/editor/theme-tomorrow_night_bright.js (added)
-
tags/3.0/editor/theme-tomorrow_night_eighties.js (added)
-
tags/3.0/editor/theme-twilight.js (added)
-
tags/3.0/editor/theme-vibrant_ink.js (added)
-
tags/3.0/editor/theme-xcode.js (added)
-
tags/3.0/editor/worker-css.js (added)
-
tags/3.0/index.php (added)
-
tags/3.0/lang (added)
-
tags/3.0/lang/default.mo (added)
-
tags/3.0/lang/default.pot (added)
-
tags/3.0/lang/index.php (added)
-
tags/3.0/lang/my-custom-css-it_IT.mo (added)
-
tags/3.0/lang/my-custom-css-it_IT.po (added)
-
tags/3.0/my-custom-css.php (added)
-
tags/3.0/readme.txt (added)
-
trunk/editor/ace_custom.css (modified) (5 diffs)
-
trunk/lang/default.pot (modified) (3 diffs)
-
trunk/lang/my-custom-css-it_IT.mo (modified) (previous)
-
trunk/lang/my-custom-css-it_IT.po (modified) (3 diffs)
-
trunk/my-custom-css.php (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
my-custom-css/trunk/editor/ace_custom.css
r1301563 r1313576 2 2 /* !important, in some class/id/selector, is required to overwrite wp rules */ 3 3 4 /* Remove some element if screen is minor than 1024px */ 5 @media only screen and (max-width : 979px) { 6 .scrollup, #text-resizer, .ace_search.right { 7 display: none !important; 8 } 9 .ace_gutter, .ace_scroller { 10 top: 0 !important; 11 } 12 #my_custom_css { 13 font-size: 14px !important; 14 padding-bottom: 0 !important; 15 } 16 #my-custom-css > .button-primary { 17 background-image: none !important; 18 font-size: 15px !important; 19 height: 25px !important; 20 line-height: 15px !important; 21 padding: 0 15px !important; 22 top: 50px !important; 23 } 24 #thememenu, #backup { 25 margin-right: 5px !important; 26 } 27 #thememenu, #backup, #invisibles, #margin, #linenumbers, #disablebackup, #basicautocomplete { 28 margin-top: 0 !important; 29 margin-left: 0 !important; 30 } 31 } 4 32 /* Scroll ToTop */ 5 33 .scrollup,.scrollup:hover,.scrollup:visited,.scrollup:focus { … … 21 49 z-index: 10000; 22 50 } 23 .wrap { 24 min-width: 820px; 25 } 26 .wrap > h2#h2left { 51 .wrap > #h2left { 27 52 float: left; 28 53 } … … 31 56 height: 20px; 32 57 } 58 input { 59 vertical-align: middle !important; 60 } 61 label { 62 cursor: default !important; 63 } 64 #advanced { 65 display: none; 66 } 33 67 #backup > input { 34 background: rgb(0, 0, 0); 35 background: rgba(0, 0, 0, 0) url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABVklEQVQ4jY3TT0tVURQF8J+vB4lESMkbi4QIQQMnQUioOGgg+AFq6ED8BkbkrIkjkbCguZEz/+BAHEqKhAPNQKUMLUGeTlS0EG1w9ovrRfQt2Bzuvnuts/c659RIKKATPWhFI+pwhj2sYQ6fcCCHFizjooo4RH9eYKVKcjbaKuQCinnFKvCfcyvaeoj7VRBPMYhv+F0RmMAAPuI4creD8Be7mMc7vMFzychlqMEPyfVNTOELdnAUrZZwHv9KuBfC3ytt9cYu15nWhW6M4WV+rq94hj5MXyF2jGaMxPd2llxEPWawgEkMoxxzlmMU0ollVxUP+jCEO7nOHqMBHUHqwqMQ/BA127CIdrzGEv5EqyWM3+DNSRFNmJVcHsWq5PIB1qW3AHdRK51IOXJb8CKzazbeu3xL30b+lyvQHAU/cyL72MCDmwSyKElP+imeBLmAVzjB52zxP6oLfiu3RGvKAAAAAElFTkSuQmCC") no-repeat scroll 95% center; 36 padding: 0 30px 0 10px; 37 vertical-align: middle; 38 } 39 #backup > input:disabled { 40 background: rgb(0, 0, 0); 41 background: rgba(0, 0, 0, 0) url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABhUlEQVR42pWTIUhDURSGH2IQEYPBYDCKmEVMIiJiMCzIMIlJxGAwWBdMBpElk5gMm7i3TZwMkSEiIiILsjBERGQY5AUxDMPQ75fz4O3xxOeDj3vvufecd87573Ucvkql0um6bgL28vl8lfGN0YMG3EAa26QT9bE5AnX4isFFLpfrDweoxXT2yYQD1P8TgFKO2gJgWGbjKWaAW/UqnMEzzMOi0oMHDjUZP+HDStyXI+MKXEYFUPRaoVDYggWYgHF1HpZgl/0XO3cSLmHVJItTwmNUCfcYZ2BD6VnaQSePvVP1CgnnWJ+FM3jF2GI8J+31YrE4xXrUx4InUqlURzab7cO2Jj/Odf8EkJM17TfZmhweZH7I/E5ByGRIPWG9qRKuYRp2pEBEEA+nHpVq66pdcc2PHbv3kuyAeRLGfFSCqZFkPhC6tWXeUJdj2rb+6H7a0m4EbFWV4yuhhmX403tUCaVSqTdwD8qBcq7aFNGzpmHDUoLUZ3Wh1EBTa1s1K229SDVU0n4DdpZf1EjbaRYAAAAASUVORK5CYII=") no-repeat scroll 95% center !important; 42 } 43 form#erase, input#close { 68 background-position: 95% center !important; 69 background-repeat: no-repeat !important; 70 padding: 0 30px 0 10px !important; 71 } 72 #backup > .button { 73 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABVklEQVQ4jY3TT0tVURQF8J+vB4lESMkbi4QIQQMnQUioOGgg+AFq6ED8BkbkrIkjkbCguZEz/+BAHEqKhAPNQKUMLUGeTlS0EG1w9ovrRfQt2Bzuvnuts/c659RIKKATPWhFI+pwhj2sYQ6fcCCHFizjooo4RH9eYKVKcjbaKuQCinnFKvCfcyvaeoj7VRBPMYhv+F0RmMAAPuI4creD8Be7mMc7vMFzychlqMEPyfVNTOELdnAUrZZwHv9KuBfC3ytt9cYu15nWhW6M4WV+rq94hj5MXyF2jGaMxPd2llxEPWawgEkMoxxzlmMU0ollVxUP+jCEO7nOHqMBHUHqwqMQ/BA127CIdrzGEv5EqyWM3+DNSRFNmJVcHsWq5PIB1qW3AHdRK51IOXJb8CKzazbeu3xL30b+lyvQHAU/cyL72MCDmwSyKElP+imeBLmAVzjB52zxP6oLfiu3RGvKAAAAAElFTkSuQmCC") !important; 74 } 75 #backup > .button-secondary { 76 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABhUlEQVR42pWTIUhDURSGH2IQEYPBYDCKmEVMIiJiMCzIMIlJxGAwWBdMBpElk5gMm7i3TZwMkSEiIiILsjBERGQY5AUxDMPQ75fz4O3xxOeDj3vvufecd87573Ucvkql0um6bgL28vl8lfGN0YMG3EAa26QT9bE5AnX4isFFLpfrDweoxXT2yYQD1P8TgFKO2gJgWGbjKWaAW/UqnMEzzMOi0oMHDjUZP+HDStyXI+MKXEYFUPRaoVDYggWYgHF1HpZgl/0XO3cSLmHVJItTwmNUCfcYZ2BD6VnaQSePvVP1CgnnWJ+FM3jF2GI8J+31YrE4xXrUx4InUqlURzab7cO2Jj/Odf8EkJM17TfZmhweZH7I/E5ByGRIPWG9qRKuYRp2pEBEEA+nHpVq66pdcc2PHbv3kuyAeRLGfFSCqZFkPhC6tWXeUJdj2rb+6H7a0m4EbFWV4yuhhmX403tUCaVSqTdwD8qBcq7aFNGzpmHDUoLUZ3Wh1EBTa1s1K229SDVU0n4DdpZf1EjbaRYAAAAASUVORK5CYII=") !important; 77 } 78 #erase, #close { 44 79 margin-top: 5px; 45 80 float: right; 46 81 } 47 form#erase > input[type="button"] { 48 padding: 2px 5px; 49 } 50 form#erase > input[type="submit"] { 51 background: rgb(0, 0, 0); 52 background: rgba(0, 0, 0, 0) url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAACB0RVh0U29mdHdhcmUATWFjcm9tZWRpYSBGaXJld29ya3MgTVi7kSokAAAAFnRFWHRDcmVhdGlvbiBUaW1lADExLzA1LzA33bqJ2wAAAp9JREFUeJxVk8tr1FcUxz/3/n55VFMT8gCtQ6uLUBqqCCbiSgqFgpa2mVIEQUo2QnFZioj0QQVduOhf0FXBnTQDpVJ3RkTETqXkYTudjRknhj6m6TiTYfL73XNOF7+ZMHM253Lvh/M9j3ucmdFry2feOOoGB7/GR7Pmo5yqoMlOVZOdoiU7X83dfbbcy7veAKv5Y4v4aL69WSGtbyEi2YOPiPaO4EbHIYTCybuVfF+Ayo3Phhs/L5XTrX9y29WniMHUhwtMX/4GQylf/5Q/C98RAX5sAoaGq63J3PQ73z9sOzNjNX9sMTTq883qU4JBMHjrUY2fzhyhFuDs7cfcOrGfAzHEDtzLY7g4Lpx6+HferX40O2eqj+prj0kNpvILzFz/FtTAFFMFU1Bl5YtP+OuHmww4kNEJnNkJrzvta+3NCtJRPnzxcxDFVDAR6HhT5bULl9hMM863mlhIr8Vu+KWZtL6FAAK8WPqRRhRlHeo2uOM1BJqacT4kpPHQjFe1gyKCkWUdHXqdqfwCmDH5wcdMvncegIl3z5G+cpghl3GYEVQPetVsVN1h1n/7tVO3ZWWo7J5rv6/gHLu8qeA1hA18ROee1sY6dOcvWQDDQJXGxjqDXRCHimx4bTWfRHtHcIB30Cgt96miCgYmQq20RuwyLjhHrPLEWzRwxY2OEwER0Cqt9KmaSJawCrXyGkMu49rmENUrfu5OqUgIBT82QeyA7Rf8W7zPyJtzu2McPPAqz395QNJssMdD4jxOtfB+WYvOzLh3/u1hXymVpbWds8Z/BIPNAA3p2zP2RTA+4EnUqs8Tm764bu2+Zbp3cmoxVZvPPkmS9aHTsOAcbXNd5f5l6rWl46NHgnE1qM2majlTAZGqUylGpl+e/kNXevn/AT0JpV86x3yxAAAAAElFTkSuQmCC') no-repeat scroll 95% center !important; 53 color: red; 82 #erase > input.button-primary { 83 background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAACB0RVh0U29mdHdhcmUATWFjcm9tZWRpYSBGaXJld29ya3MgTVi7kSokAAAAFnRFWHRDcmVhdGlvbiBUaW1lADExLzA1LzA33bqJ2wAAAp9JREFUeJxVk8tr1FcUxz/3/n55VFMT8gCtQ6uLUBqqCCbiSgqFgpa2mVIEQUo2QnFZioj0QQVduOhf0FXBnTQDpVJ3RkTETqXkYTudjRknhj6m6TiTYfL73XNOF7+ZMHM253Lvh/M9j3ucmdFry2feOOoGB7/GR7Pmo5yqoMlOVZOdoiU7X83dfbbcy7veAKv5Y4v4aL69WSGtbyEi2YOPiPaO4EbHIYTCybuVfF+Ayo3Phhs/L5XTrX9y29WniMHUhwtMX/4GQylf/5Q/C98RAX5sAoaGq63J3PQ73z9sOzNjNX9sMTTq883qU4JBMHjrUY2fzhyhFuDs7cfcOrGfAzHEDtzLY7g4Lpx6+HferX40O2eqj+prj0kNpvILzFz/FtTAFFMFU1Bl5YtP+OuHmww4kNEJnNkJrzvta+3NCtJRPnzxcxDFVDAR6HhT5bULl9hMM863mlhIr8Vu+KWZtL6FAAK8WPqRRhRlHeo2uOM1BJqacT4kpPHQjFe1gyKCkWUdHXqdqfwCmDH5wcdMvncegIl3z5G+cpghl3GYEVQPetVsVN1h1n/7tVO3ZWWo7J5rv6/gHLu8qeA1hA18ROee1sY6dOcvWQDDQJXGxjqDXRCHimx4bTWfRHtHcIB30Cgt96miCgYmQq20RuwyLjhHrPLEWzRwxY2OEwER0Cqt9KmaSJawCrXyGkMu49rmENUrfu5OqUgIBT82QeyA7Rf8W7zPyJtzu2McPPAqz395QNJssMdD4jxOtfB+WYvOzLh3/u1hXymVpbWds8Z/BIPNAA3p2zP2RTA+4EnUqs8Tm764bu2+Zbp3cmoxVZvPPkmS9aHTsOAcbXNd5f5l6rWl46NHgnE1qM2majlTAZGqUylGpl+e/kNXevn/AT0JpV86x3yxAAAAAElFTkSuQmCC'); 84 background-position: 95% center; 85 background-repeat: no-repeat; 86 color: #fff; 54 87 padding: 0 30px 0 10px; 55 88 } … … 151 184 } 152 185 #my-custom-css > .button-primary { 186 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABKRJREFUeNqsVs1PHVUUP2fmzjyg5dEC5UuxqJhgtBsMXdWEGFcm1rix7shb4D9A4lYTF4R/wTTaQlxUF24UY62xGKJRsYbEGFNLmrCQgAgU3uN9zHtz/Z1zZ94HUD8Sh8xj7p1zz+/8fufcc4ettfSw68aHN/DLlvFrydkx/tLnI2O+8tqVE/3w/Pw8GWN0UK1WT5fL5Q+KxeLlSqVCvb29NDU1Rf/mmp+/Tjs7u+T7Pnmep3OlUqljZmamaGRC2MD5uUKh8Mn4+PjFjY0NNdre3qbDw0P68vZtBBCRjWN65eXLxwCiqEIIjIaHh3U8ODhIS0tL7yLQQyFiBACDx/P5/M2xsbHR5eVlwrMad/f00EH+gAqFPK189z09c+GCsD0CECGQAqIu0+rqqs6tra3R5OTkG4uLizo2WOSD1kcTExMKIJH7vqcql0sl2t3dpUK+oMYH+/vqNAKQOBbbGOwk0CJsnUyM+SJtbm5Smm+DRTWAPLe1taWUPeOTJFpQICHt7e0hyiL1DfRT/uCA7v52F8wjTTYnqRdjsZV8SJUw1qZpUJDp6Wmam5sj9ph8AMg8u9VgcEj7cPzU6Khzxi5Pid96fcljVClTR8dpSiNkOBFQBUmqCsg+Jk2T2payXVm6dfOLfy4tOO7p6a0jS1l7kDwMwwaIXD7opaUsdCy7HdA/MOCkkfXcQqHhUmWBNTck9L1GKddBZEKZiDfbiJCJWsb1YQraGCRrue4vvRRE9POgnwmMsnDxIkK2idP6TBOLNBiugzf3gjQfrXIJCOS6t9JLP376CMWRpf96Mfxeen2dhp/e1ZwcA5HJAEx++vxReufbi/TzHzH5LLRFX6eM15IPphisa3H6n+jZcx699bxPI2/nW4roGJPglE+/bMf0AzpLiMhEQeNZB1RPA+seEMdV3BGaQKWGIDgmc8r58U6SS0vYBBR0BhQapo7Q0ktjUnWWDCd5Eybsqi/GY4wkw7ey+exXqwGFnQhUQDzvJCaevgy7jDLoCJm+WcciWATCxLeI1BWDtYlENUsRUKIaUzvsM1gXnjHK5KGJ9/Gy7WxIAd63B5ZefFKkYgqEheSEKakwMAATvUEpgmS37ltdl+kK1I9/lIlQk1uYZM4aNW5DZCvISyaQxUzoOJDNyWVVqoRFlalStdQujGHX1h3oVjhWXZlMRnPiKUigDtuMpRceA7DnFvucyJX0qlhZAMRK0pm+Wk+Y6PpA/aUdxKRSCXK5UFC5DPTPBER3tvHfCJsYeXKlnHaEqshUExY4ASOxYy0SWV+Cn5Yu7FqVROnohWcQiUfq9NKAJBMRSl/TKuN6B64i+VAJclkqxR59/bsUB6ncbt+xHL8NEDl4urJZ6h8aokxsdC9I1Hd2LKoM0iEvaZXJu9i6/VFWFrgrafUhOCS+f2iQujqzej7VQeTAuX7t2r2pXG40eGDofKen1SWOdUMmtwBL0SAmlw9JPIKotOFGAfS1MYVZQyPnR+i9q1dz+GZ4P5fL+SzH6+zsbDfO+T9lw/W9OufK1DZ9BDV1X07PxLT7qnzNH0ZMWx+/qUczQJ5YWFi4z3/33fV/XX8JMACy4xzn2a+hdAAAAABJRU5ErkJggg=="); 187 background-position: 92% center; 188 background-repeat: no-repeat; 153 189 border-radius: 15px !important; 154 font-size: 30px;155 height: 50px;190 font-size: 25px; 191 height: 35px; 156 192 position: fixed; 157 right: 25px;158 top: 4 5px;159 width: 130px;193 right: 19px; 194 top: 48px; 195 padding: 0 38px 0 10px; 160 196 z-index: 9999; 161 197 } 162 #thememenu, #backup {198 #thememenu, #backup, #invisibles, #margin, #linenumbers, #disablebackup, #basicautocomplete { 163 199 float: left; 164 margin- left: 10px;200 margin-right: 7px; 165 201 margin-top: -5px; 202 line-height: 25px; 203 } 204 #invisibles, #margin, #linenumbers, #disablebackup, #basicautocomplete { 205 border: 1px solid #656565; 206 border-radius: 5px; 207 padding: 1px 3px; 208 margin-bottom: 2px; 166 209 } 167 210 #thememenu > select { 168 211 height: 28px; 212 } 213 form > input[type="radio"] { 214 margin: 0 !important; 215 height: 14px !important; 216 width: 14px !important; 169 217 } 170 218 /* Fix wordpress footer */ … … 179 227 font-style: italic; 180 228 } 181 #mccss_credit a {229 #mccss_credit a, #toggle { 182 230 text-decoration: none; 183 231 } -
my-custom-css/trunk/lang/default.pot
r1301563 r1313576 4 4 "Project-Id-Version: My Custom CSS\n" 5 5 "Report-Msgid-Bugs-To: \n" 6 "POT-Creation-Date: 2015-12- 06 19:38+0100\n"6 "POT-Creation-Date: 2015-12-21 12:05+0100\n" 7 7 "PO-Revision-Date: \n" 8 8 "Last-Translator: Salvatore Noschese (DarkWolf) <[email protected]>\n" … … 18 18 "X-Poedit-SearchPath-0: .\n" 19 19 20 #: my-custom-css.php:6 620 #: my-custom-css.php:69 21 21 msgid "Settings" 22 22 msgstr "" 23 23 24 #: my-custom-css.php: 6924 #: my-custom-css.php:72 25 25 msgid "Support" 26 26 msgstr "" 27 27 28 #: my-custom-css.php: 250 my-custom-css.php:42328 #: my-custom-css.php:378 my-custom-css.php:576 29 29 msgid "My Custom CSS Panel" 30 30 msgstr "" 31 31 32 #: my-custom-css.php: 25333 msgid "Font Size:"32 #: my-custom-css.php:381 33 msgid "Font:" 34 34 msgstr "" 35 35 36 #: my-custom-css.php: 26336 #: my-custom-css.php:391 37 37 msgid "Theme:" 38 38 msgstr "" 39 39 40 #: my-custom-css.php:264 40 #: my-custom-css.php:392 my-custom-css.php:459 my-custom-css.php:463 41 #: my-custom-css.php:467 my-custom-css.php:471 my-custom-css.php:475 41 42 msgid "" 42 43 "Warning!!! This will refresh entire page (Unsaved data will be lost) - " … … 44 45 msgstr "" 45 46 46 #: my-custom-css.php: 26547 #: my-custom-css.php:393 47 48 msgid "Bright:" 48 49 msgstr "" 49 50 50 #: my-custom-css.php: 28251 #: my-custom-css.php:410 51 52 msgid "Dark:" 52 53 msgstr "" 53 54 54 #: my-custom-css.php: 31255 #: my-custom-css.php:440 55 56 msgid "No backup found" 56 57 msgstr "" 57 58 58 #: my-custom-css.php: 31659 #: my-custom-css.php:444 59 60 msgid "View backups" 60 61 msgstr "" 61 62 62 #: my-custom-css.php: 31663 #: my-custom-css.php:444 63 64 msgid "Click to view all backups!" 64 65 msgstr "" 65 66 66 #: my-custom-css.php: 32067 #: my-custom-css.php:448 67 68 msgid "Backup:" 68 69 msgstr "" 69 70 70 #: my-custom-css.php:334 71 #: my-custom-css.php:452 72 msgid "Enable" 73 msgstr "" 74 75 #: my-custom-css.php:453 76 msgid "Disable" 77 msgstr "" 78 79 #: my-custom-css.php:455 80 msgid "Advanced" 81 msgstr "" 82 83 #: my-custom-css.php:458 84 msgid "Invisibles" 85 msgstr "" 86 87 #: my-custom-css.php:462 88 msgid "Margin" 89 msgstr "" 90 91 #: my-custom-css.php:466 92 msgid "LineNumbers" 93 msgstr "" 94 95 #: my-custom-css.php:470 96 msgid "Backup" 97 msgstr "" 98 99 #: my-custom-css.php:474 100 msgid "Autocomplete" 101 msgstr "" 102 103 #: my-custom-css.php:487 71 104 msgid "Save" 72 105 msgstr "" 73 106 74 #: my-custom-css.php: 356107 #: my-custom-css.php:509 75 108 msgid "My custom CSS - Backup" 76 109 msgstr "" 77 110 78 #: my-custom-css.php: 358 my-custom-css.php:378111 #: my-custom-css.php:511 my-custom-css.php:531 79 112 msgid "Close now!" 80 113 msgstr "" 81 114 82 #: my-custom-css.php: 360115 #: my-custom-css.php:513 83 116 msgid "Erase all backup?" 84 117 msgstr "" 85 118 86 #: my-custom-css.php: 360119 #: my-custom-css.php:513 87 120 msgid "Do you want really delete all backup?" 88 121 msgstr "" 89 122 90 #: my-custom-css.php: 366123 #: my-custom-css.php:519 91 124 msgid "File:" 92 125 msgstr "" 93 126 94 #: my-custom-css.php: 367127 #: my-custom-css.php:520 95 128 msgid "Path:" 96 129 msgstr "" 97 130 98 #: my-custom-css.php: 368131 #: my-custom-css.php:521 99 132 msgid "Saved:" 100 133 msgstr "" 101 134 102 #: my-custom-css.php: 369135 #: my-custom-css.php:522 103 136 msgid "Size:" 104 137 msgstr "" 105 138 106 #: my-custom-css.php: 377139 #: my-custom-css.php:530 107 140 msgid "My custom CSS - Erase Backup" 108 141 msgstr "" 109 142 110 #: my-custom-css.php: 384143 #: my-custom-css.php:537 111 144 msgid "bytes, was successfully deleted!!!" 112 145 msgstr "" 113 146 114 #: my-custom-css.php: 423147 #: my-custom-css.php:576 115 148 msgid "My Custom CSS" 116 149 msgstr "" -
my-custom-css/trunk/lang/my-custom-css-it_IT.po
r1301563 r1313576 3 3 "Project-Id-Version: My Custom CSS\n" 4 4 "Report-Msgid-Bugs-To: \n" 5 "POT-Creation-Date: 2015-12- 06 19:39+0100\n"5 "POT-Creation-Date: 2015-12-21 12:05+0100\n" 6 6 "PO-Revision-Date: \n" 7 7 "Last-Translator: Salvatore Noschese (DarkWolf) <[email protected]>\n" … … 12 12 "Content-Transfer-Encoding: 8bit\n" 13 13 "X-Poedit-KeywordsList: _e;__\n" 14 "X-Poedit-Basepath: E:/WordPress/my-custom-css/trunk\n"14 "X-Poedit-Basepath: .\n" 15 15 "X-Poedit-SourceCharset: UTF-8\n" 16 16 "X-Generator: Poedit 1.8.6\n" 17 "X-Poedit-SearchPath-0: E:/WordPress/my-custom-css/trunk\n"17 "X-Poedit-SearchPath-0: .\n" 18 18 19 #: my-custom-css.php:6 619 #: my-custom-css.php:69 20 20 msgid "Settings" 21 21 msgstr "Opzioni" 22 22 23 #: my-custom-css.php: 6923 #: my-custom-css.php:72 24 24 msgid "Support" 25 25 msgstr "Supporto" 26 26 27 #: my-custom-css.php: 250 my-custom-css.php:42327 #: my-custom-css.php:378 my-custom-css.php:576 28 28 msgid "My Custom CSS Panel" 29 29 msgstr "Pannello My Custom CSS" 30 30 31 #: my-custom-css.php: 25332 msgid "Font Size:"33 msgstr " Dimensione dei font:"31 #: my-custom-css.php:381 32 msgid "Font:" 33 msgstr "Font:" 34 34 35 #: my-custom-css.php: 26335 #: my-custom-css.php:391 36 36 msgid "Theme:" 37 37 msgstr "Tema:" 38 38 39 #: my-custom-css.php:264 39 #: my-custom-css.php:392 my-custom-css.php:459 my-custom-css.php:463 40 #: my-custom-css.php:467 my-custom-css.php:471 my-custom-css.php:475 40 41 msgid "" 41 42 "Warning!!! This will refresh entire page (Unsaved data will be lost) - " … … 45 46 "andranno persi) - Continuare?" 46 47 47 #: my-custom-css.php: 26548 #: my-custom-css.php:393 48 49 msgid "Bright:" 49 50 msgstr "Luminoso:" 50 51 51 #: my-custom-css.php: 28252 #: my-custom-css.php:410 52 53 msgid "Dark:" 53 54 msgstr "Scuro:" 54 55 55 #: my-custom-css.php: 31256 #: my-custom-css.php:440 56 57 msgid "No backup found" 57 58 msgstr "Nessun backup trovato" 58 59 59 #: my-custom-css.php: 31660 #: my-custom-css.php:444 60 61 msgid "View backups" 61 62 msgstr "Visualizza i backup" 62 63 63 #: my-custom-css.php: 31664 #: my-custom-css.php:444 64 65 msgid "Click to view all backups!" 65 66 msgstr "Clicca per vedere tutti i backup!" 66 67 67 #: my-custom-css.php: 32068 #: my-custom-css.php:448 68 69 msgid "Backup:" 69 70 msgstr "Backup:" 70 71 71 #: my-custom-css.php:334 72 #: my-custom-css.php:452 73 msgid "Enable" 74 msgstr "Abilita" 75 76 #: my-custom-css.php:453 77 msgid "Disable" 78 msgstr "Disabilita" 79 80 #: my-custom-css.php:455 81 msgid "Advanced" 82 msgstr "Avanzate" 83 84 #: my-custom-css.php:458 85 msgid "Invisibles" 86 msgstr "Invisibili" 87 88 #: my-custom-css.php:462 89 msgid "Margin" 90 msgstr "Margine" 91 92 #: my-custom-css.php:466 93 msgid "LineNumbers" 94 msgstr "Numeri di riga" 95 96 #: my-custom-css.php:470 97 msgid "Backup" 98 msgstr "Backup" 99 100 #: my-custom-css.php:474 101 msgid "Autocomplete" 102 msgstr "Autocompletamento" 103 104 #: my-custom-css.php:487 72 105 msgid "Save" 73 106 msgstr "Salva" 74 107 75 #: my-custom-css.php: 356108 #: my-custom-css.php:509 76 109 msgid "My custom CSS - Backup" 77 110 msgstr "My custom CSS - Backup" 78 111 79 #: my-custom-css.php: 358 my-custom-css.php:378112 #: my-custom-css.php:511 my-custom-css.php:531 80 113 msgid "Close now!" 81 114 msgstr "Chiudi ora!" 82 115 83 #: my-custom-css.php: 360116 #: my-custom-css.php:513 84 117 msgid "Erase all backup?" 85 118 msgstr "Cancellare tutti i backup?" 86 119 87 #: my-custom-css.php: 360120 #: my-custom-css.php:513 88 121 msgid "Do you want really delete all backup?" 89 122 msgstr "Vuoi davvero eliminare tutti i backup?" 90 123 91 #: my-custom-css.php: 366124 #: my-custom-css.php:519 92 125 msgid "File:" 93 126 msgstr "File:" 94 127 95 #: my-custom-css.php: 367128 #: my-custom-css.php:520 96 129 msgid "Path:" 97 130 msgstr "Percorso:" 98 131 99 #: my-custom-css.php: 368132 #: my-custom-css.php:521 100 133 msgid "Saved:" 101 134 msgstr "Salvato:" 102 135 103 #: my-custom-css.php: 369136 #: my-custom-css.php:522 104 137 msgid "Size:" 105 138 msgstr "Dimensioni:" 106 139 107 #: my-custom-css.php: 377140 #: my-custom-css.php:530 108 141 msgid "My custom CSS - Erase Backup" 109 142 msgstr "My custom CSS - Cancella i backup" 110 143 111 #: my-custom-css.php: 384144 #: my-custom-css.php:537 112 145 msgid "bytes, was successfully deleted!!!" 113 146 msgstr "byte, è stato cancellato con successo!!!" 114 147 115 #: my-custom-css.php: 423148 #: my-custom-css.php:576 116 149 msgid "My Custom CSS" 117 150 msgstr "My Custom CSS" 151 152 #~ msgid "Invisible" 153 #~ msgstr "Invisibile" 154 155 #~ msgid "Invisible:" 156 #~ msgstr "Invisibile:" 157 158 #~ msgid "Margin:" 159 #~ msgstr "Margine:" 160 161 #~ msgid "LineNumbers:" 162 #~ msgstr "Line Numbers:" 163 164 #~ msgid "Autocomplete:" 165 #~ msgstr "Autocompletamento:" 166 167 #~ msgid "LineNumber:" 168 #~ msgstr "Numero di riga:" 169 170 #~ msgid "Font Size:" 171 #~ msgstr "Dimensione dei font:" 118 172 119 173 #~ msgid "No backup found..." -
my-custom-css/trunk/my-custom-css.php
r1301583 r1313576 8 8 PS: support file backup and - very important - static css file (fantastic for performance) ;) 9 9 Author: DarkWolf 10 Version: 2.910 Version: 3.0 11 11 Author URI: https://laltroweb.it/ 12 12 Text Domain: my-custom-css 13 13 */ 14 14 15 // Prevent Direct Access with homepage redirect 16 if (defined('DB_NAME')) 17 { 18 19 // Text Domain: my-custom-css 20 load_plugin_textdomain('my-custom-css', false, dirname(plugin_basename(__FILE__)) . '/lang/'); 21 22 // Generate basedir and baseurl 23 function plugin_basedir() { $upload_dir = wp_upload_dir(); $plugin_basedir = $upload_dir['basedir']; return $plugin_basedir; } 24 function plugin_url() { $upload_dir = wp_upload_dir(); $plugin_url = set_url_scheme($upload_dir['baseurl']); return $plugin_url; } 25 26 // Generate my_style_id url: 27 function my_style_id() { $blog_id = get_current_blog_id(); $cssid = ( $blog_id > "1" ) ? $cssid = "_id-".$blog_id : $cssid = null; $my_style_id = "/my_custom_css/my_style".$cssid.".css"; return $my_style_id; } 28 29 // Generate css url and css path 30 function css_url() { $css_url = plugin_url().my_style_id(); return $css_url; } 31 function css_path() { $css_path = plugin_basedir().my_style_id(); return $css_path; } 32 33 // make my_style.css and write write css code! 34 function getdata() { $getdata = strip_tags(get_option('my_custom_css')); return $getdata; } 35 36 // Write in source! 37 function mycustomcss_head() 38 { 39 $data = getdata(); 40 if (!empty($data)) 41 { 42 echo "\n<!-- My Custom CSS -->\n<link rel='stylesheet' id='mccss_stylesheet' href='".css_url()."?".@filemtime(css_path())."' type='text/css' media='all' />\n<!-- My Custom CSS -->\n"; 43 } 44 } 45 46 // Make css file 47 function makecss() 48 { 49 $makecss = file_put_contents(css_path(), "/******* Do not edit this file *******/\n/*\nMy Custom CSS - by Salvatore Noschese\naka L'AltroWeb - https://laltroweb.it/\n/*\nSaved: ".date("M d Y | h:i:s (a)",current_time('timestamp'))."\n/*\n/******* Do not edit this file *******/\n\n".getdata()); 50 return $makecss; 51 } 52 53 // Fix first upgrade from old release or manual my_style.css deletion! 54 if (!file_exists(css_path()) || isset($_POST['save'])) { makecss(); } 55 56 // Fix old backup folder or no exist 57 if (!is_dir(plugin_basedir().'/my_custom_css/bkk')) { wp_mkdir_p(plugin_basedir().'/my_custom_css/bkk'); } 58 // And Blank index.php to prevent listing directory 59 else if(!file_exists(plugin_basedir()."/my_custom_css/index.php") || !file_exists(plugin_basedir()."/my_custom_css/bkk/index.php")) 60 { file_put_contents(plugin_basedir()."/my_custom_css/index.php", "<?php \n// Prevent Directory Listing..."); file_put_contents(plugin_basedir()."/my_custom_css/bkk/index.php", "<?php \n// Prevent Directory Listing..."); } 61 62 // Start Add link on plugins page 63 function mycustomcss_links($links) 64 { 65 # Settings: 66 $settings_link = '<a href="admin.php?page=my_custom_css" title="My Custom CSS">'.__('Settings','my-custom-css').'</a>'; 67 array_unshift($links, $settings_link); 68 # Support: 69 $support_forum = '<a href="https://laltroweb.it/" title="laltroweb.it">'.__('Support','my-custom-css').'</a>'; 70 array_unshift($links, $support_forum); 71 # return: 72 return $links; 73 } 74 function add_plugin_meta_links($links, $file) 75 { 76 if ($file == plugin_basename(__FILE__)) 77 { 78 $links[] = '<a href="https://www.paypal.me/SalvatoreN" title="Buy Me a Beer ;)">Donate 😊</a>'; 79 } 80 return $links; 81 } 82 83 function mccss_png() 84 { 85 $mccss_png = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAnFBMVEUAAAAAAABuRSAAAADJgjl3TCIAAADOgj3Ifjb/////qg//2IP/tSj/rRf/68LHfTT/uTH/siAqfQD/783/zFnI8E7/xk7/vjg6iQAvgQD/0W7/zlP/wkLbgEG/60CdxwAziAD/3IT/0Wf/z1rM8VjPfjul4gCi2ACd0gBJigBDhwD/6bz/1Xv/1Hr/zWP/1l3H7k2gzwCbwACatQA6TvqRAAAACHRSTlMACVkz8F4v8dedY+EAAACsSURBVBjTVY7ZDoIwEAAXq9jFAqXc93166///mwWMkUlmk53sw8KebtgDLU9/lBToRZPoX68UzOiMaOgG4mxkgnlDTUddjtlIXjhoMWahYc1WS2Ccc2YgYzZW7RIYci71fRGmQB0b0fYXhdsEQOvESxJPCM8TzduV4R7HcR26jzB0X3mRrq+3RZZnWf4s0iOoh91M0A9DH+wOKoCyQKaum4iiwA8yjgQ2kHX/AB8tDwIctw6nAAAAAElFTkSuQmCC"; 86 return $mccss_png; 87 } 88 // Change the CSS for this plugin on admin plugins page 89 function mycustomcss_admin_style() 90 { 91 global $pagenow; 92 if ($pagenow == "plugins.php") 93 { 94 echo "<style type='text/css'>\n#my-custom-css td.plugin-title strong {\n\tbackground: url(".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"; 95 } 96 } 97 98 // Get plugin version 99 function plug_ver() 100 { 101 $plugin_data = get_plugin_data(__FILE__); 102 $plug_ver = $plugin_data['Version']; 103 return $plug_ver; 104 } 105 106 // Set Theme 107 function thl() 108 { 109 if(isset($_POST["themelist"])) 110 { 111 $thl = $_POST["themelist"]; 112 return $thl; 113 } 114 } 15 /* To prevent PHP errors */ 16 if (!defined('DB_NAME')) 17 { 18 header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' ); 19 exit; 20 } 21 22 // Text Domain: my-custom-css 23 load_plugin_textdomain('my-custom-css', false, dirname(plugin_basename(__FILE__)) . '/lang/'); 24 25 // Generate basedir and baseurl 26 function plugin_basedir() { $upload_dir = wp_upload_dir(); $plugin_basedir = $upload_dir['basedir']; return $plugin_basedir; } 27 function plugin_url() { $upload_dir = wp_upload_dir(); $plugin_url = set_url_scheme($upload_dir['baseurl']); return $plugin_url; } 28 29 // Generate my_style_id url: 30 function my_style_id() { $blog_id = get_current_blog_id(); $cssid = ( $blog_id > "1" ) ? $cssid = "_id-".$blog_id : $cssid = null; $my_style_id = "/my_custom_css/my_style".$cssid.".css"; return $my_style_id; } 31 32 // Generate css url and css path 33 function css_url() { $css_url = plugin_url().my_style_id(); return $css_url; } 34 function css_path() { $css_path = plugin_basedir().my_style_id(); return $css_path; } 35 36 // make my_style.css and write write css code! 37 function getdata() { $getdata = strip_tags(get_option('my_custom_css')); return $getdata; } 38 39 // Write in source! 40 function mycustomcss_head() 41 { 42 $data = getdata(); 43 if (!empty($data)) 44 { 45 echo "\n<!-- My Custom CSS -->\n<link rel='stylesheet' id='mccss_stylesheet' href='".css_url()."?".@filemtime(css_path())."' type='text/css' media='all' />\n<!-- My Custom CSS -->\n"; 46 } 47 } 48 49 // Make css file 50 function makecss() 51 { 52 $makecss = file_put_contents(css_path(), "/******* Do not edit this file *******/\n/*\nMy Custom CSS - by Salvatore Noschese\naka L'AltroWeb - https://laltroweb.it/\n/*\nSaved: ".date("M d Y | h:i:s (a)",current_time('timestamp'))."\n/*\n/******* Do not edit this file *******/\n\n".getdata()); 53 return $makecss; 54 } 55 56 // Fix first upgrade from old release or manual my_style.css deletion! 57 if (!file_exists(css_path()) || isset($_POST['save'])) { makecss(); } 58 59 // Fix old backup folder or no exist 60 if (!is_dir(plugin_basedir().'/my_custom_css/bkk')) { wp_mkdir_p(plugin_basedir().'/my_custom_css/bkk'); } 61 // And Blank index.php to prevent listing directory 62 else if(!file_exists(plugin_basedir()."/my_custom_css/index.php") || !file_exists(plugin_basedir()."/my_custom_css/bkk/index.php")) 63 { file_put_contents(plugin_basedir()."/my_custom_css/index.php", "<?php \n// Prevent Directory Listing..."); file_put_contents(plugin_basedir()."/my_custom_css/bkk/index.php", "<?php \n// Prevent Directory Listing..."); } 64 65 // Start Add link on plugins page 66 function mycustomcss_links($links) 67 { 68 # Settings: 69 $settings_link = '<a href="admin.php?page=my_custom_css" title="My Custom CSS">'.__('Settings','my-custom-css').'</a>'; 70 array_unshift($links, $settings_link); 71 # Support: 72 $support_forum = '<a href="https://laltroweb.it/" title="laltroweb.it">'.__('Support','my-custom-css').'</a>'; 73 array_unshift($links, $support_forum); 74 # return: 75 return $links; 76 } 77 function add_plugin_meta_links($links, $file) 78 { 79 if ($file == plugin_basename(__FILE__)) 80 { 81 $links[] = '<a href="https://www.paypal.me/SalvatoreN" title="Buy Me a Beer ;)">Donate 😊</a>'; 82 } 83 return $links; 84 } 85 86 function mccss_png() 87 { 88 $mccss_png = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAnFBMVEUAAAAAAABuRSAAAADJgjl3TCIAAADOgj3Ifjb/////qg//2IP/tSj/rRf/68LHfTT/uTH/siAqfQD/783/zFnI8E7/xk7/vjg6iQAvgQD/0W7/zlP/wkLbgEG/60CdxwAziAD/3IT/0Wf/z1rM8VjPfjul4gCi2ACd0gBJigBDhwD/6bz/1Xv/1Hr/zWP/1l3H7k2gzwCbwACatQA6TvqRAAAACHRSTlMACVkz8F4v8dedY+EAAACsSURBVBjTVY7ZDoIwEAAXq9jFAqXc93166///mwWMkUlmk53sw8KebtgDLU9/lBToRZPoX68UzOiMaOgG4mxkgnlDTUddjtlIXjhoMWahYc1WS2Ccc2YgYzZW7RIYci71fRGmQB0b0fYXhdsEQOvESxJPCM8TzduV4R7HcR26jzB0X3mRrq+3RZZnWf4s0iOoh91M0A9DH+wOKoCyQKaum4iiwA8yjgQ2kHX/AB8tDwIctw6nAAAAAElFTkSuQmCC"; 89 return $mccss_png; 90 } 91 // Change the CSS for this plugin on admin plugins page 92 function mycustomcss_admin_style() 93 { 94 global $pagenow; 95 if ($pagenow == "plugins.php") 96 { 97 echo "<style type='text/css'>\n#my-custom-css td.plugin-title strong {\n\tbackground: url(".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"; 98 } 99 } 100 101 // Get plugin version 102 function plug_ver() 103 { 104 $plugin_data = get_plugin_data(__FILE__); 105 $plug_ver = $plugin_data['Version']; 106 return $plug_ver; 107 } 108 // Get plugin title 109 function plug_name() 110 { 111 $plugin_data = get_plugin_data(__FILE__); 112 $plug_name = $plugin_data['Name']; 113 return $plug_name; 114 } 115 116 // Set Theme 117 function thl() 118 { 119 if(isset($_POST["themelist"])) 120 { 121 $thl = $_POST["themelist"]; 122 return $thl; 123 } 124 } 125 $thl = thl(); 126 if (isset($thl) && !empty($thl)) 127 { 128 setcookie('_mccss_ace_themelist_', $thl, time()+31556926 ,'/'); 129 } 130 function sth() 131 { 115 132 $thl = thl(); 116 133 if (isset($thl) && !empty($thl)) 117 134 { 118 setcookie('_mccss_ace_themelist_', $thl, time()+31556926 ,'/'); 119 } 120 function sth() 121 { 122 $thl = thl(); 123 if (isset($thl) && !empty($thl)) 124 { 125 $sth = $thl; 135 $sth = $thl; 136 } 137 else if (!isset($_COOKIE['_mccss_ace_themelist_'])) 138 { 139 $sth = 'ace/theme/textmate'; 140 } 141 else 142 { 143 $sth = $_COOKIE['_mccss_ace_themelist_']; 144 } 145 return $sth; 146 } 147 148 // Set Invisibles 149 function enable_invisibles() 150 { 151 if(!isset($_POST['invisibles']) && empty($_POST['invisibles']) && isset($_COOKIE['_mccss_enable_invisibles_'])) 152 { 153 $invisibles = $_COOKIE['_mccss_enable_invisibles_']; 154 } 155 else if(isset($_POST['invisibles']) && !empty($_POST['invisibles']) && $_COOKIE['_mccss_enable_invisibles_'] === "false") 156 { 157 $invisibles = "true"; 158 header('location: '.$_SERVER['REQUEST_URI'].''); 159 } 160 else if(isset($_POST['invisibles']) && !empty($_POST['invisibles']) && $_COOKIE['_mccss_enable_invisibles_'] === "true") 161 { 162 $invisibles = "false"; 163 header('location: '.$_SERVER['REQUEST_URI'].''); 164 } 165 else 166 { 167 $invisibles = "false"; 168 } 169 return $invisibles; 170 } 171 172 // Set Margin 173 function enable_margin() 174 { 175 if(!isset($_POST['margin']) && empty($_POST['margin']) && isset($_COOKIE['_mccss_enable_margin_'])) 176 { 177 $margin = $_COOKIE['_mccss_enable_margin_']; 178 } 179 else if(isset($_POST['margin']) && !empty($_POST['margin']) && $_COOKIE['_mccss_enable_margin_'] === "false") 180 { 181 $margin = "true"; 182 header('location: '.$_SERVER['REQUEST_URI'].''); 183 } 184 else if(isset($_POST['margin']) && !empty($_POST['margin']) && $_COOKIE['_mccss_enable_margin_'] === "true") 185 { 186 $margin = "false"; 187 header('location: '.$_SERVER['REQUEST_URI'].''); 188 } 189 else 190 { 191 $margin = "false"; 192 } 193 return $margin; 194 } 195 196 // Set LineNumbers 197 function enable_linenumbers() 198 { 199 if(!isset($_POST['linenumbers']) && empty($_POST['linenumbers']) && isset($_COOKIE['_mccss_enable_linenumbers_'])) 200 { 201 $linenumbers = $_COOKIE['_mccss_enable_linenumbers_']; 202 } 203 else if(isset($_POST['linenumbers']) && !empty($_POST['linenumbers']) && $_COOKIE['_mccss_enable_linenumbers_'] === "false") 204 { 205 $linenumbers = "true"; 206 header('location: '.$_SERVER['REQUEST_URI'].''); 207 } 208 else if(isset($_POST['linenumbers']) && !empty($_POST['linenumbers']) && $_COOKIE['_mccss_enable_linenumbers_'] === "true") 209 { 210 $linenumbers = "false"; 211 header('location: '.$_SERVER['REQUEST_URI'].''); 212 } 213 else 214 { 215 $linenumbers = "true"; 216 } 217 return $linenumbers; 218 } 219 220 // Set disablebackup 221 function enable_backup() 222 { 223 if(!isset($_POST['disablebackup']) && empty($_POST['disablebackup']) && isset($_COOKIE['_mccss_enable_backup_'])) 224 { 225 $disablebackup = $_COOKIE['_mccss_enable_backup_']; 226 } 227 else if(isset($_POST['disablebackup']) && !empty($_POST['disablebackup']) && $_COOKIE['_mccss_enable_backup_'] === "false") 228 { 229 $disablebackup = "true"; 230 header('location: '.$_SERVER['REQUEST_URI'].''); 231 } 232 else if(isset($_POST['disablebackup']) && !empty($_POST['disablebackup']) && $_COOKIE['_mccss_enable_backup_'] === "true") 233 { 234 $disablebackup = "false"; 235 header('location: '.$_SERVER['REQUEST_URI'].''); 236 } 237 else 238 { 239 $disablebackup = "true"; 240 } 241 return $disablebackup; 242 } 243 244 // Set basicautocomplete 245 function enable_autocomplete() 246 { 247 if(!isset($_POST['basicautocomplete']) && empty($_POST['basicautocomplete']) && isset($_COOKIE['_mccss_enable_autocomplete_'])) 248 { 249 $basicautocomplete = $_COOKIE['_mccss_enable_autocomplete_']; 250 } 251 else if(isset($_POST['basicautocomplete']) && !empty($_POST['basicautocomplete']) && $_COOKIE['_mccss_enable_autocomplete_'] === "false") 252 { 253 $basicautocomplete = "true"; 254 header('location: '.$_SERVER['REQUEST_URI'].''); 255 } 256 else if(isset($_POST['basicautocomplete']) && !empty($_POST['basicautocomplete']) && $_COOKIE['_mccss_enable_autocomplete_'] === "true") 257 { 258 $basicautocomplete = "false"; 259 header('location: '.$_SERVER['REQUEST_URI'].''); 260 } 261 else 262 { 263 $basicautocomplete = "true"; 264 } 265 return $basicautocomplete; 266 } 267 268 // Option page code: 269 function mycustomcss_scripts() 270 { 271 echo ' 272 <!-- Start My Custom CSS Code --> 273 <script type="text/javascript" src="'.plugin_dir_url(__FILE__).'editor/_scrolltop.js?plug_ver='.plug_ver().'"></script>'; 274 if(!isset($_POST['viewbackup']) && !isset($_POST['erasebackup'])) 275 { 276 echo ' 277 <!-- Ace Editor --> 278 <script type="text/javascript" src="'.plugin_dir_url(__FILE__).'editor/ace.js?plug_ver='.plug_ver().'" charset="utf-8"></script> 279 <script type="text/javascript" src="'.plugin_dir_url(__FILE__).'editor/ext-searchbox.js?plug_ver='.plug_ver().'" charset="utf-8"></script> 280 <script type="text/javascript" src="'.plugin_dir_url(__FILE__).'editor/ext-language_tools.js?plug_ver='.plug_ver().'" charset="utf-8"></script> 281 <script type="text/javascript"> 282 // Ace Setting 283 ( function( global, $ ) { 284 var editor, 285 syncCSS = function() { 286 $("#my_custom_css_textarea").val(editor.getSession().getValue()); 287 }, 288 loadAce = function() { 289 editor = ace.edit("my_custom_css"); 290 global.safecss_editor = editor; 291 editor.session.setMode("ace/mode/css"); 292 editor.$blockScrolling = Infinity; 293 editor.getSession().setUseWrapMode(true); 294 editor.getSession().setValue($("#my_custom_css_textarea").val()); 295 editor.getSession().setUseSoftTabs(true); 296 editor.setHighlightActiveLine(true); 297 editor.setOptions({minLines: 10}); 298 editor.setOptions({maxLines: Infinity}); 299 editor.setTheme("'.sth().'"); 300 editor.setOption("firstLineNumber", 1) 301 editor.setShowPrintMargin('.enable_margin().'); 302 editor.setShowInvisibles('.enable_invisibles().'); 303 editor.setOption("showLineNumbers", '.enable_linenumbers().'); 304 editor.execCommand("find"); 305 // enable autocompletion and snippets 306 ace.require("ace/ext/language_tools"); 307 editor.setOptions({ 308 enableBasicAutocompletion: '.enable_autocomplete().', 309 enableSnippets: '.enable_autocomplete().', 310 enableLiveAutocompletion: '.enable_autocomplete().' 311 }); 312 jQuery.fn.spin&&$("#my_custom_css_container").spin(false); 313 $("#my-custom-css").submit(syncCSS); 314 }; 315 if ($.browser.msie&&parseInt($.browser.version, 10) <= 7) { 316 $("#my_custom_css_container").hide(); 317 $("#my_custom_css_textarea").show(); 318 return false; 319 } else { 320 $(global).load(loadAce); 126 321 } 127 else if (!isset($_COOKIE['_mccss_ace_themelist_']))128 {129 $sth = 'ace/theme/textmate';130 }131 else132 {133 $sth = $_COOKIE['_mccss_ace_themelist_'];134 }135 return $sth;136 }137 138 139 // Option page code: 140 function mycustomcss_scripts() 141 { 142 echo ' 143 <!-- Start My Custom CSS Code -->144 <script type="text/javascript" src="'.plugin_dir_url(__FILE__).'editor/_scrolltop.js?plug_ver='.plug_ver().'"></script>';322 global.aceSyncCSS = syncCSS; 323 } )(this, jQuery); 324 </script> 325 <script type="text/javascript" src="'.plugin_dir_url(__FILE__).'editor/textresizer/cookie.js?plug_ver='.plug_ver().'"></script> 326 <script type="text/javascript" src="'.plugin_dir_url(__FILE__).'editor/textresizer/textresizer.min.js?plug_ver='.plug_ver().'"></script> 327 <script type="text/javascript" src="'.plugin_dir_url(__FILE__).'editor/textresizer/textresizer_target.js?plug_ver='.plug_ver().'"></script>'; 328 } 329 echo ' 330 <!-- CSS Code --> 331 <link rel="stylesheet" id="ace-editor-custom-css" href="'.plugin_dir_url(__FILE__).'editor/ace_custom.css?plug_ver='.plug_ver().'" type="text/css" media="all" /> 332 <!-- End My Custom CSS Code -->'; 333 } 334 335 // Textarea/Form: 336 function mccss_admin_page() 337 { 338 echo ' 339 <div class="wrap">'; 145 340 if(!isset($_POST['viewbackup']) && !isset($_POST['erasebackup'])) 146 341 { 147 echo ' 148 <!-- Ace Editor --> 149 <script type="text/javascript" src="'.plugin_dir_url(__FILE__).'editor/ace.js?plug_ver='.plug_ver().'" charset="utf-8"></script> 150 <script type="text/javascript" src="'.plugin_dir_url(__FILE__).'editor/ext-searchbox.js?plug_ver='.plug_ver().'" charset="utf-8"></script> 151 <script type="text/javascript" src="'.plugin_dir_url(__FILE__).'editor/ext-language_tools.js?plug_ver='.plug_ver().'" charset="utf-8"></script> 152 <script type="text/javascript"> 153 // Ace Setting 154 ( function( global, $ ) { 155 var editor, 156 syncCSS = function() { 157 $("#my_custom_css_textarea").val(editor.getSession().getValue()); 158 }, 159 loadAce = function() { 160 editor = ace.edit("my_custom_css"); 161 global.safecss_editor = editor; 162 editor.session.setMode("ace/mode/css"); 163 editor.$blockScrolling = Infinity; 164 editor.getSession().setUseWrapMode(true); 165 editor.getSession().setValue($("#my_custom_css_textarea").val()); 166 editor.getSession().setUseSoftTabs(true); 167 editor.setHighlightActiveLine(true); 168 editor.setOptions({minLines: 10}); 169 editor.setOptions({maxLines: Infinity}); 170 editor.setTheme("'.sth().'"); 171 editor.setOption("firstLineNumber", 1) 172 editor.setShowPrintMargin(true); 173 editor.setShowInvisibles(true); 174 editor.execCommand("find"); 175 // enable autocompletion and snippets 176 ace.require("ace/ext/language_tools"); 177 editor.setOptions({ 178 enableBasicAutocompletion: true, 179 enableSnippets: true, 180 enableLiveAutocompletion: true 181 }); 182 jQuery.fn.spin&&$("#my_custom_css_container").spin(false); 183 $("#my-custom-css").submit(syncCSS); 184 }; 185 if ($.browser.msie&&parseInt($.browser.version, 10) <= 7) { 186 $("#my_custom_css_container").hide(); 187 $("#my_custom_css_textarea").show(); 188 return false; 189 } else { 190 $(global).load(loadAce); 191 } 192 global.aceSyncCSS = syncCSS; 193 } )(this, jQuery); 194 </script> 195 <script type="text/javascript" src="'.plugin_dir_url(__FILE__).'editor/textresizer/cookie.js?plug_ver='.plug_ver().'"></script> 196 <script type="text/javascript" src="'.plugin_dir_url(__FILE__).'editor/textresizer/textresizer.min.js?plug_ver='.plug_ver().'"></script> 197 <script type="text/javascript" src="'.plugin_dir_url(__FILE__).'editor/textresizer/textresizer_target.js?plug_ver='.plug_ver().'"></script>'; 198 } 199 echo ' 200 <!-- CSS Code --> 201 <link rel="stylesheet" id="ace-editor-custom-css" href="'.plugin_dir_url(__FILE__).'editor/ace_custom.css?plug_ver='.plug_ver().'" type="text/css" media="all" /> 202 <!-- End My Custom CSS Code -->'; 203 } 204 205 // Textarea/Form: 206 function mccss_admin_page() 207 { 208 echo ' 209 <div class="wrap">'; 210 if(!isset($_POST['viewbackup']) && !isset($_POST['erasebackup'])) 211 { 212 $at = "ace/theme/"; 213 // BrightTheme 214 $b1 = $at."chrome"; 215 $b2 = $at."clouds"; 216 $b3 = $at."crimson_editor"; 217 $b4 = $at."dawn"; 218 $b5 = $at."dreamweaver"; 219 $b6 = $at."eclipse"; 220 $b7 = $at."github"; 221 $b8 = $at."iplastic"; 222 $b9 = $at."solarized_light"; 223 $b10 = $at."textmate"; 224 $b11 = $at."tomorrow"; 225 $b12 = $at."xcode"; 226 $b13 = $at."kuroir"; 227 $b14 = $at."katzenmilch"; 228 $b15 = $at."sqlserver"; 229 // DarkTheme 230 $d1 = $at."ambiance"; 231 $d2 = $at."chaos"; 232 $d3 = $at."clouds_midnight"; 233 $d4 = $at."cobalt"; 234 $d5 = $at."idle_fingers"; 235 $d6 = $at."kr_theme"; 236 $d7 = $at."merbivore"; 237 $d8 = $at."merbivore_soft"; 238 $d9 = $at."mono_industrial"; 239 $d10 = $at."monokai"; 240 $d11 = $at."pastel_on_dark"; 241 $d12 = $at."solarized_dark"; 242 $d13 = $at."terminal"; 243 $d14 = $at."tomorrow_night"; 244 $d15 = $at."tomorrow_night_blue"; 245 $d16 = $at."tomorrow_night_bright"; 246 $d17 = $at."tomorrow_night_eighties"; 247 $d18 = $at."twilight"; 248 $d19 = $at."vibrant_ink"; 342 $at = "ace/theme/"; 343 // BrightTheme 344 $b1 = $at."chrome"; 345 $b2 = $at."clouds"; 346 $b3 = $at."crimson_editor"; 347 $b4 = $at."dawn"; 348 $b5 = $at."dreamweaver"; 349 $b6 = $at."eclipse"; 350 $b7 = $at."github"; 351 $b8 = $at."iplastic"; 352 $b9 = $at."solarized_light"; 353 $b10 = $at."textmate"; 354 $b11 = $at."tomorrow"; 355 $b12 = $at."xcode"; 356 $b13 = $at."kuroir"; 357 $b14 = $at."katzenmilch"; 358 $b15 = $at."sqlserver"; 359 // DarkTheme 360 $d1 = $at."ambiance"; 361 $d2 = $at."chaos"; 362 $d3 = $at."clouds_midnight"; 363 $d4 = $at."cobalt"; 364 $d5 = $at."idle_fingers"; 365 $d6 = $at."kr_theme"; 366 $d7 = $at."merbivore"; 367 $d8 = $at."merbivore_soft"; 368 $d9 = $at."mono_industrial"; 369 $d10 = $at."monokai"; 370 $d11 = $at."pastel_on_dark"; 371 $d12 = $at."solarized_dark"; 372 $d13 = $at."terminal"; 373 $d14 = $at."tomorrow_night"; 374 $d15 = $at."tomorrow_night_blue"; 375 $d16 = $at."tomorrow_night_bright"; 376 $d17 = $at."tomorrow_night_eighties"; 377 $d18 = $at."twilight"; 378 $d19 = $at."vibrant_ink"; 379 echo ' 380 <h2>' . __('My Custom CSS Panel','my-custom-css') . ' - v'.plug_ver().'</h2> 381 <div id="tools"> 382 <div id="text-resizer"> 383 <p>' . __('Font:','my-custom-css') . '</p> 384 <ul class="textresizer"> 385 <li><a href="#nogo" class="small-text" title="12px (Small)">A-</a></li> 386 <li><a href="#nogo" class="medium-text" title="14px (Medium)">A</a></li> 387 <li><a href="#nogo" class="large-text" title="16px (Large)">A+</a></li> 388 <li><a href="#nogo" class="larger-text" title="18px (Larger)">A++</a></li> 389 <li><a href="#nogo" class="giga-text" title="26px (Giga)">A+++</a></li> 390 </ul> 391 </div> 392 <form action="" method="post" id="thememenu"> 393 <label for="theme">' . __('Theme:','my-custom-css') . '</label> 394 <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()}"> 395 <optgroup label="' . __('Bright:','my-custom-css') . '"> 396 <option value="'.$b1.'"'.(sth() == $b1 ? ' selected="selected"' : false).'>Chrome</option> 397 <option value="'.$b2.'"'.(sth() == $b2 ? ' selected="selected"' : false).'>Clouds</option> 398 <option value="'.$b3.'"'.(sth() == $b3 ? ' selected="selected"' : false).'>Crimson Editor</option> 399 <option value="'.$b4.'"'.(sth() == $b4 ? ' selected="selected"' : false).'>Dawn</option> 400 <option value="'.$b5.'"'.(sth() == $b5 ? ' selected="selected"' : false).'>Dreamweaver</option> 401 <option value="'.$b6.'"'.(sth() == $b6 ? ' selected="selected"' : false).'>Eclipse</option> 402 <option value="'.$b7.'"'.(sth() == $b7 ? ' selected="selected"' : false).'>GitHub</option> 403 <option value="'.$b8.'"'.(sth() == $b8 ? ' selected="selected"' : false).'>IPlastic</option> 404 <option value="'.$b9.'"'.(sth() == $b9 ? ' selected="selected"' : false).'>Solarized Light</option> 405 <option value="'.$b10.'"'.(sth() == $b10 ? ' selected="selected"' : false).'>TextMate</option> 406 <option value="'.$b11.'"'.(sth() == $b11 ? ' selected="selected"' : false).'>Tomorrow</option> 407 <option value="'.$b12.'"'.(sth() == $b12 ? ' selected="selected"' : false).'>XCode</option> 408 <option value="'.$b13.'"'.(sth() == $b13 ? ' selected="selected"' : false).'>Kuroir</option> 409 <option value="'.$b14.'"'.(sth() == $b14 ? ' selected="selected"' : false).'>KatzenMilch</option> 410 <option value="'.$b15.'"'.(sth() == $b15 ? ' selected="selected"' : false).'>SQL Server</option> 411 </optgroup> 412 <optgroup label="' . __('Dark:','my-custom-css') . '"> 413 <option value="'.$d1.'"'.(sth() == $d1 ? ' selected="selected"' : false).'>Ambiance</option> 414 <option value="'.$d2.'"'.(sth() == $d2 ? ' selected="selected"' : false).'>Chaos</option> 415 <option value="'.$d3.'"'.(sth() == $d3 ? ' selected="selected"' : false).'>Clouds Midnight</option> 416 <option value="'.$d4.'"'.(sth() == $d4 ? ' selected="selected"' : false).'>Cobalt</option> 417 <option value="'.$d5.'"'.(sth() == $d5 ? ' selected="selected"' : false).'>idle Fingers</option> 418 <option value="'.$d6.'"'.(sth() == $d6 ? ' selected="selected"' : false).'>krTheme</option> 419 <option value="'.$d7.'"'.(sth() == $d7 ? ' selected="selected"' : false).'>Merbivore</option> 420 <option value="'.$d8.'"'.(sth() == $d8 ? ' selected="selected"' : false).'>Merbivore Soft</option> 421 <option value="'.$d9.'"'.(sth() == $d9 ? ' selected="selected"' : false).'>Mono Industrial</option> 422 <option value="'.$d10.'"'.(sth() == $d10 ? ' selected="selected"' : false).'>Monokai</option> 423 <option value="'.$d11.'"'.(sth() == $d11 ? ' selected="selected"' : false).'>Pastel on dark</option> 424 <option value="'.$d12.'"'.(sth() == $d12 ? ' selected="selected"' : false).'>Solarized Dark</option> 425 <option value="'.$d13.'"'.(sth() == $d13 ? ' selected="selected"' : false).'>Terminal</option> 426 <option value="'.$d14.'"'.(sth() == $d14 ? ' selected="selected"' : false).'>Tomorrow Night</option> 427 <option value="'.$d15.'"'.(sth() == $d15 ? ' selected="selected"' : false).'>Tomorrow Night Blue</option> 428 <option value="'.$d16.'"'.(sth() == $d16 ? ' selected="selected"' : false).'>Tomorrow Night Bright</option> 429 <option value="'.$d17.'"'.(sth() == $d17 ? ' selected="selected"' : false).'>Tomorrow Night 80s</option> 430 <option value="'.$d18.'"'.(sth() == $d18 ? ' selected="selected"' : false).'>Twilight</option> 431 <option value="'.$d19.'"'.(sth() == $d19 ? ' selected="selected"' : false).'>Vibrant Ink</option> 432 </optgroup> 433 </select> 434 </form>'; 435 // Hidden view/erase button for blog id > 1 (security fix in multisite) 436 if(get_current_blog_id() == 1 && enable_backup() === "true") 437 { 438 // If no backup exist, disable button! 439 $glob = glob(plugin_basedir()."/my_custom_css/bkk/*.css"); 440 if ($glob == false) 441 { 442 $submit_backup = 'value="' . __('No backup found','my-custom-css') . '" title="' . __('No backup found','my-custom-css') . '" disabled="disabled" class="button-secondary"'; 443 } 444 else 445 { 446 $submit_backup = 'value="' . __('View backups','my-custom-css') . '" title="' . __('Click to view all backups!','my-custom-css') . '" class="button"'; 447 } 448 echo ' 449 <form id="backup" method="post" action="'.admin_url( 'admin.php' ).'?page=my_custom_css"> 450 <label for="backup">' . __('Backup:','my-custom-css') . '</label> 451 <input type="submit" name="viewbackup" '.$submit_backup.' /> 452 </form>'; 453 } 454 $enable = __('Enable','my-custom-css'); 455 $disable = __('Disable','my-custom-css'); 456 echo ' 457 <p><a href="#" onclick="jQuery(\'#advanced\').toggle();" id="toggle">' . __('Advanced','my-custom-css') . ' ⇕</a></p> 458 <div id="advanced"> 459 <form action="" method="post" id="invisibles"> 460 <label for="invisibles">'.(enable_invisibles() == "false" ? ''.$enable.'' : ''.$disable.'').'/' . __('Invisibles','my-custom-css') . '</label> 461 <Input type="radio" name="invisibles" onchange="if(confirm(\'' . __('Warning!!! This will refresh entire page (Unsaved data will be lost) - Continue?','my-custom-css') . '\')){this.form.submit()}" value="'.enable_invisibles().'" /> 462 </form> 463 <form action="" method="post" id="margin"> 464 <label for="margin">'.(enable_margin() == "false" ? ''.$enable.'' : ''.$disable.'').'/' . __('Margin','my-custom-css') . '</label> 465 <Input type="radio" name="margin" onchange="if(confirm(\'' . __('Warning!!! This will refresh entire page (Unsaved data will be lost) - Continue?','my-custom-css') . '\')){this.form.submit()}" value="'.enable_margin().'" /> 466 </form> 467 <form action="" method="post" id="linenumbers"> 468 <label for="linenumbers">'.(enable_linenumbers() == "false" ? ''.$enable.'' : ''.$disable.'').'/' . __('LineNumbers','my-custom-css') . '</label> 469 <Input type="radio" name="linenumbers" onchange="if(confirm(\'' . __('Warning!!! This will refresh entire page (Unsaved data will be lost) - Continue?','my-custom-css') . '\')){this.form.submit()}" value="'.enable_linenumbers().'" /> 470 </form> 471 <form action="" method="post" id="disablebackup"> 472 <label for="disablebackup">'.(enable_backup() == "false" ? ''.$enable.'' : ''.$disable.'').'/' . __('Backup','my-custom-css') . '</label> 473 <Input type="radio" name="disablebackup" onchange="if(confirm(\'' . __('Warning!!! This will refresh entire page (Unsaved data will be lost) - Continue?','my-custom-css') . '\')){this.form.submit()}" value="'.enable_backup().'" /> 474 </form> 475 <form action="" method="post" id="basicautocomplete"> 476 <label for="basicautocomplete">'.(enable_autocomplete() == "false" ? ''.$enable.'' : ''.$disable.'').'/' . __('Autocomplete','my-custom-css') . '</label> 477 <Input type="radio" name="basicautocomplete" onchange="if(confirm(\'' . __('Warning!!! This will refresh entire page (Unsaved data will be lost) - Continue?','my-custom-css') . '\')){this.form.submit()}" value="'.enable_autocomplete().'" /> 478 </form> 479 </div> 480 </div> 481 <div id="my_custom_css_container"> 482 <form id="my-custom-css" method="post" action="options.php">'; 483 settings_fields( 'mccss_settings' ); 249 484 echo ' 250 <h2>' . __('My Custom CSS Panel','my-custom-css') . ' - v'.plug_ver().'</h2> 251 <div id="tools"> 252 <div id="text-resizer"> 253 <p>' . __('Font Size:','my-custom-css') . '</p> 254 <ul class="textresizer"> 255 <li><a href="#nogo" class="small-text" title="12px (Small)">A-</a></li> 256 <li><a href="#nogo" class="medium-text" title="14px (Medium)">A</a></li> 257 <li><a href="#nogo" class="large-text" title="16px (Large)">A+</a></li> 258 <li><a href="#nogo" class="larger-text" title="18px (Larger)">A++</a></li> 259 <li><a href="#nogo" class="giga-text" title="26px (Giga)">A+++</a></li> 260 </ul> 261 </div> 262 <form action="" method="post" id="thememenu"> 263 <label for="theme">' . __('Theme:','my-custom-css') . '</label> 264 <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()}"> 265 <optgroup label="' . __('Bright:','my-custom-css') . '"> 266 <option value="'.$b1.'"'.(sth() == $b1 ? ' selected="selected"' : false).'>Chrome</option> 267 <option value="'.$b2.'"'.(sth() == $b2 ? ' selected="selected"' : false).'>Clouds</option> 268 <option value="'.$b3.'"'.(sth() == $b3 ? ' selected="selected"' : false).'>Crimson Editor</option> 269 <option value="'.$b4.'"'.(sth() == $b4 ? ' selected="selected"' : false).'>Dawn</option> 270 <option value="'.$b5.'"'.(sth() == $b5 ? ' selected="selected"' : false).'>Dreamweaver</option> 271 <option value="'.$b6.'"'.(sth() == $b6 ? ' selected="selected"' : false).'>Eclipse</option> 272 <option value="'.$b7.'"'.(sth() == $b7 ? ' selected="selected"' : false).'>GitHub</option> 273 <option value="'.$b8.'"'.(sth() == $b8 ? ' selected="selected"' : false).'>IPlastic</option> 274 <option value="'.$b9.'"'.(sth() == $b9 ? ' selected="selected"' : false).'>Solarized Light</option> 275 <option value="'.$b10.'"'.(sth() == $b10 ? ' selected="selected"' : false).'>TextMate</option> 276 <option value="'.$b11.'"'.(sth() == $b11 ? ' selected="selected"' : false).'>Tomorrow</option> 277 <option value="'.$b12.'"'.(sth() == $b12 ? ' selected="selected"' : false).'>XCode</option> 278 <option value="'.$b13.'"'.(sth() == $b13 ? ' selected="selected"' : false).'>Kuroir</option> 279 <option value="'.$b14.'"'.(sth() == $b14 ? ' selected="selected"' : false).'>KatzenMilch</option> 280 <option value="'.$b15.'"'.(sth() == $b15 ? ' selected="selected"' : false).'>SQL Server</option> 281 </optgroup> 282 <optgroup label="' . __('Dark:','my-custom-css') . '"> 283 <option value="'.$d1.'"'.(sth() == $d1 ? ' selected="selected"' : false).'>Ambiance</option> 284 <option value="'.$d2.'"'.(sth() == $d2 ? ' selected="selected"' : false).'>Chaos</option> 285 <option value="'.$d3.'"'.(sth() == $d3 ? ' selected="selected"' : false).'>Clouds Midnight</option> 286 <option value="'.$d4.'"'.(sth() == $d4 ? ' selected="selected"' : false).'>Cobalt</option> 287 <option value="'.$d5.'"'.(sth() == $d5 ? ' selected="selected"' : false).'>idle Fingers</option> 288 <option value="'.$d6.'"'.(sth() == $d6 ? ' selected="selected"' : false).'>krTheme</option> 289 <option value="'.$d7.'"'.(sth() == $d7 ? ' selected="selected"' : false).'>Merbivore</option> 290 <option value="'.$d8.'"'.(sth() == $d8 ? ' selected="selected"' : false).'>Merbivore Soft</option> 291 <option value="'.$d9.'"'.(sth() == $d9 ? ' selected="selected"' : false).'>Mono Industrial</option> 292 <option value="'.$d10.'"'.(sth() == $d10 ? ' selected="selected"' : false).'>Monokai</option> 293 <option value="'.$d11.'"'.(sth() == $d11 ? ' selected="selected"' : false).'>Pastel on dark</option> 294 <option value="'.$d12.'"'.(sth() == $d12 ? ' selected="selected"' : false).'>Solarized Dark</option> 295 <option value="'.$d13.'"'.(sth() == $d13 ? ' selected="selected"' : false).'>Terminal</option> 296 <option value="'.$d14.'"'.(sth() == $d14 ? ' selected="selected"' : false).'>Tomorrow Night</option> 297 <option value="'.$d15.'"'.(sth() == $d15 ? ' selected="selected"' : false).'>Tomorrow Night Blue</option> 298 <option value="'.$d16.'"'.(sth() == $d16 ? ' selected="selected"' : false).'>Tomorrow Night Bright</option> 299 <option value="'.$d17.'"'.(sth() == $d17 ? ' selected="selected"' : false).'>Tomorrow Night 80s</option> 300 <option value="'.$d18.'"'.(sth() == $d18 ? ' selected="selected"' : false).'>Twilight</option> 301 <option value="'.$d19.'"'.(sth() == $d19 ? ' selected="selected"' : false).'>Vibrant Ink</option> 302 </optgroup> 303 </select> 304 </form>'; 305 // Hidden view/erase button for blog id > 1 (security fix in multisite) 306 if(get_current_blog_id() == 1) 307 { 308 // If no backup exist, disable button! 309 $glob = glob(plugin_basedir()."/my_custom_css/bkk/*.css"); 310 if ($glob == false) 311 { 312 $submit_backup = 'value="' . __('No backup found','my-custom-css') . '" title="' . __('No backup found','my-custom-css') . '" disabled="disabled"'; 313 } 314 else 315 { 316 $submit_backup = 'value="' . __('View backups','my-custom-css') . '" title="' . __('Click to view all backups!','my-custom-css') . '" '; 317 } 318 echo ' 319 <form id="backup" method="post" action="'.admin_url( 'admin.php' ).'?page=my_custom_css"> 320 <label for="backup">' . __('Backup:','my-custom-css') . '</label> 321 <input type="submit" name="viewbackup" class="button-secondary" '.$submit_backup.' /> 322 </form>'; 323 } 324 echo ' 325 </div> 326 <div id="my_custom_css_container"> 327 <form id="my-custom-css" method="post" action="options.php">'; 328 settings_fields( 'mccss_settings' ); 329 echo ' 330 <div name="my_custom_css" id="my_custom_css"></div> 485 <div name="my_custom_css" id="my_custom_css"></div> 331 486 <!-- start textarea --> 332 487 <textarea id="my_custom_css_textarea" name="my_custom_css" style="display: none;">'.get_option('my_custom_css').'</textarea> 333 488 <!-- end textarea --> 334 <input type="submit" name="save" class="button-primary" value="' . __("Save","my-custom-css") . '" /> 335 </form> 489 <input type="submit" name="save" class="button-primary" value="' . __("Save","my-custom-css") . '" /> 490 </form> 491 </div>'; 492 } 493 494 // View backup (view only css) 495 else if(isset($_POST['viewbackup'])) 496 { 497 date_default_timezone_set(ini_get('date.timezone') ? ini_get('date.timezone') : 'UTC'); 498 $bd = plugin_basedir()."/my_custom_css/bkk/"; 499 $files=array(); 500 if ($dh=opendir($bd)) 501 { 502 while (($file=readdir($dh))!==false) 503 if ($file!="." && $file!=".." && preg_match("/\.(css)$/", $file)) 504 $files[filemtime($bd.$file)]=$file; 505 closedir($dh); 506 } 507 krsort($files); 508 reset($files); 509 $href = plugin_url()."/my_custom_css/bkk/"; 510 echo ' 511 <h2 id="h2left">' . __('My custom CSS - Backup','my-custom-css') . '</h2> 512 <form method="post" id="erase" action=""> 513 <input type="button" class="button" value="' . __('Close now!','my-custom-css') . '" onclick="location.reload();" /> 514 | 515 <input type="submit" class="button-primary" name="erasebackup" value="' . __('Erase all backup?','my-custom-css') . '" onclick="return confirm(\'' . __('Do you want really delete all backup?','my-custom-css') . '\');" /> 516 </form> 517 <br />'; 518 while (list($date,$file)=each($files)) 519 echo ' 520 <div class="backup_list"> 521 <p><b>' . __('File:','my-custom-css') . '</b> <a href="'.$href.$file.'">'.$href.$file.'</a></p> 522 <p><b>' . __('Path:','my-custom-css') . '</b> '.$bd.$file.'</p> 523 <p><b>' . __('Saved:','my-custom-css') . '</b> '.date("M d Y | h:i:s (a)",current_time($date)).'</p> 524 <p><b>' . __('Size:','my-custom-css') . '</b> '.(round(filesize($bd.$file). " bytes")).' bytes</p> 336 525 </div>'; 337 } 338 339 // View backup (view only css) 340 else if(isset($_POST['viewbackup'])) 341 { 342 date_default_timezone_set(ini_get('date.timezone') ? ini_get('date.timezone') : 'UTC'); 343 $bd = plugin_basedir()."/my_custom_css/bkk/"; 344 $files=array(); 345 if ($dh=opendir($bd)) 346 { 347 while (($file=readdir($dh))!==false) 348 if ($file!="." && $file!=".." && preg_match("/\.(css)$/", $file)) 349 $files[filemtime($bd.$file)]=$file; 350 closedir($dh); 351 } 352 krsort($files); 353 reset($files); 354 $href = plugin_url()."/my_custom_css/bkk/"; 355 echo ' 356 <h2 id="h2left">' . __('My custom CSS - Backup','my-custom-css') . '</h2> 357 <form method="post" id="erase" action=""> 358 <input type="button" value="' . __('Close now!','my-custom-css') . '" onclick="location.reload();" /> 359 | 360 <input type="submit" name="erasebackup" class="button" value="' . __('Erase all backup?','my-custom-css') . '" onclick="return confirm(\'' . __('Do you want really delete all backup?','my-custom-css') . '\');" /> 361 </form> 362 <br />'; 363 while (list($date,$file)=each($files)) 364 echo ' 365 <div class="backup_list"> 366 <p><b>' . __('File:','my-custom-css') . '</b> <a href="'.$href.$file.'">'.$href.$file.'</a></p> 367 <p><b>' . __('Path:','my-custom-css') . '</b> '.$bd.$file.'</p> 368 <p><b>' . __('Saved:','my-custom-css') . '</b> '.date("M d Y | h:i:s (a)",current_time($date)).'</p> 369 <p><b>' . __('Size:','my-custom-css') . '</b> '.(round(filesize($bd.$file). " bytes")).' bytes</p> 370 </div>'; 371 } 372 373 // Erase backup: 374 else if(isset($_POST['erasebackup'])) 526 } 527 528 // Erase backup: 529 else if(isset($_POST['erasebackup'])) 530 { 531 echo ' 532 <h2 id="h2left">' . __('My custom CSS - Erase Backup','my-custom-css') . '</h2> 533 <input type="button" class="button-primary" id="close" value="' . __('Close now!','my-custom-css') . '" onclick="location.reload();" /> 534 <br />'; 535 foreach (glob(plugin_basedir()."/my_custom_css/bkk/*.css") as $filename) 375 536 { 376 537 echo ' 377 <h2 id="h2left">' . __('My custom CSS - Erase Backup','my-custom-css') . '</h2> 378 <input type="button" id="close" value="' . __('Close now!','my-custom-css') . '" onclick="location.reload();" /> 379 <br />'; 380 foreach (glob(plugin_basedir()."/my_custom_css/bkk/*.css") as $filename) 381 { 382 echo ' 383 <div class="backup_list"> 384 '.$filename.' - ' . filesize($filename) . '' . __('bytes, was successfully deleted!!!','my-custom-css') . ' 385 </div>'; 386 unlink($filename); 387 } 538 <div class="backup_list"> 539 '.$filename.' - ' . filesize($filename) . '' . __('bytes, was successfully deleted!!!','my-custom-css') . ' 540 </div>'; 541 unlink($filename); 388 542 } 389 echo '390 <div id="mccss_credit">391 <a href="https://wordpress.org/plugins/my-custom-css/" title="My Custom CSS">My Custom CSS v'.plug_ver().'</a> | Author: <a href="https://laltroweb.it/" title="Salvatore Noschese - (L\'AltroWeb)">Salvatore Noschese</a> - Support my work: <a href="https://www.paypal.me/SalvatoreN" title="Even 1$ can help... :)">Donate 😊</a>392 </div>393 <!-- Smooth Scroll --><a href="#" class="scrollup">▲</a><!-- Smooth Scroll -->394 </div>';395 }396 397 // Make backup when save!398 if(isset($_POST['save']))399 {400 $directory = plugin_basedir()."/my_custom_css/bkk/*.css";401 if (glob($directory) != false)402 {403 $filecount = count(glob($directory))+1;404 543 } 405 else 406 { 407 $filecount = 1; 408 } 409 $oldname = css_path(); 410 $newname = plugin_basedir().'/my_custom_css/bkk/' . ( $filecount ++ ) . $cssid . '_' . filemtime($oldname) .'.css'; 411 rename($oldname, $newname); 412 } 413 414 // Register Settings 415 function mycustomcss_registersetting() 416 { 417 register_setting('mccss_settings','my_custom_css'); 418 } 419 420 // Admin section: 421 function mycustomcss_admin() 422 { 423 $plugin_page = add_menu_page(__('My Custom CSS Panel','my-custom-css'),__('My Custom CSS','my-custom-css'), 'manage_options', 'my_custom_css', 'mccss_admin_page', mccss_png(), 61); 424 add_action('admin_init', 'mycustomcss_registersetting'); 425 add_action('admin_head-'. $plugin_page, 'mycustomcss_scripts'); 426 } 427 428 add_action('admin_menu', 'mycustomcss_admin'); 429 add_action('wp_head', 'mycustomcss_head', 99999); 430 add_action('admin_print_styles', 'mycustomcss_admin_style'); 431 add_filter('plugin_row_meta', 'add_plugin_meta_links', 10, 2); 432 add_filter('plugin_action_links_'.plugin_basename(__FILE__).'', 'mycustomcss_links'); 433 434 } 544 echo ' 545 <div id="mccss_credit"> 546 <a href="https://wordpress.org/plugins/my-custom-css/" title="My Custom CSS">My Custom CSS v'.plug_ver().'</a> | Author: <a href="https://laltroweb.it/" title="Salvatore Noschese - (L\'AltroWeb)">Salvatore Noschese</a> - Support my work: <a href="https://www.paypal.me/SalvatoreN" title="Even 1$ can help... :)">Donate 😊</a> 547 </div> 548 <!-- Smooth Scroll --><a href="#" class="scrollup">▲</a><!-- Smooth Scroll --> 549 </div>'; 550 } 551 552 553 // Make backup when save! 554 $data = getdata(); 555 if(isset($_POST['save']) && !empty($data) && enable_backup() === "true") 556 { 557 $directory = plugin_basedir()."/my_custom_css/bkk/*.css"; 558 if (glob($directory) != false) 559 { 560 $filecount = count(glob($directory))+1; 561 } 562 else 563 { 564 $filecount = 1; 565 } 566 $oldname = css_path(); 567 $newname = plugin_basedir().'/my_custom_css/bkk/' . ( $filecount ++ ) . $cssid . '_' . filemtime($oldname) .'.css'; 568 rename($oldname, $newname); 569 } 570 571 // Register Settings 572 function mycustomcss_registersetting() 573 { 574 // Set cookie only if can manage plugin 575 if ( current_user_can( 'manage_options' ) ) 576 { 577 setcookie('_mccss_enable_invisibles_', enable_invisibles(), time()+31556926 ,'/'); 578 setcookie('_mccss_enable_margin_', enable_margin(), time()+31556926 ,'/'); 579 setcookie('_mccss_enable_linenumbers_', enable_linenumbers(), time()+31556926 ,'/'); 580 setcookie('_mccss_enable_backup_', enable_backup(), time()+31556926 ,'/'); 581 setcookie('_mccss_enable_autocomplete_', enable_autocomplete(), time()+31556926 ,'/'); 582 } 583 register_setting('mccss_settings','my_custom_css'); 584 } 585 586 // Admin section: 587 function mycustomcss_admin() 588 { 589 $plugin_page = add_menu_page(__('My Custom CSS Panel','my-custom-css'),__('My Custom CSS','my-custom-css'), 'manage_options', 'my_custom_css', 'mccss_admin_page', mccss_png(), 61); 590 add_action('admin_init', 'mycustomcss_registersetting'); 591 add_action('admin_head-'. $plugin_page, 'mycustomcss_scripts'); 592 } 593 594 add_action('admin_menu', 'mycustomcss_admin'); 595 add_action('wp_head', 'mycustomcss_head', 99999); 596 add_action('admin_print_styles', 'mycustomcss_admin_style'); 597 add_filter('plugin_row_meta', 'add_plugin_meta_links', 10, 2); 598 add_filter('plugin_action_links_'.plugin_basename(__FILE__).'', 'mycustomcss_links'); -
my-custom-css/trunk/readme.txt
r1301583 r1313576 4 4 Tags: css, style, custom, theme, plugin, stylesheet, darkwolf, laltroweb, ace, cloud9 editor 5 5 Requires at least: 4.0 6 Tested up to: 4.4 -RC1-357697 Stable tag: 2.96 Tested up to: 4.4.1 7 Stable tag: 3.0 8 8 9 9 Enable to add Custom CSS Code via admin panel with Ace (Ajax.org Cloud9 Editor) … … 32 32 * English 33 33 * Italian 34 * (If you translate in your language, please, send me) :)34 * Full translatable! 35 35 36 36 == Screenshots == 37 37 38 1. My Custom CSS Panel with All feature and DarkTheme 39 2. My Custom CSS Panel with LightTheme 40 3. Preview in browser sourcecode 41 4. Backup List (New Feature)! 42 5. Confirm when delete backup! 38 1. New advanced menu, in 3.0!!! 39 2. My Custom CSS Panel with All feature and DarkTheme 40 3. My Custom CSS Panel with LightTheme 41 4. Preview in browser sourcecode 42 5. Backup List (New Feature)! 43 6. Confirm when delete backup! 43 44 44 45 == Installation == … … 49 50 == Upgrade Notice == 50 51 52 = 3.0 = 53 54 * More advanced setting for enable/disable many feature! 55 56 == Changelog == 57 58 = 3.0 = 59 60 * More advanced setting for enable/disable many feature: 61 * Enable/Disable invisible elements; 62 * Enable/Disable print margin; 63 * Enable/Disable line numbers; 64 * Enable/Disable backups (end, if enabled, save only if exist data to save = no more empty backup)! 65 * Enable/Disable autocomplete; 66 * All setting saved with cookies only when an admin access in backend! 67 51 68 = 2.9 = 52 69 53 * Fixed some bug, rewrite more css and sourcecode.54 55 == Changelog ==56 57 = 2.9 =58 59 70 * Added version querystring in css and javascript (prevent cache issue from old release). 60 * Fixed more bug in sourcecode and css.61 * Tested with wp-dev "4.4-RC1-35769 (debug enabled - now no warning, nor error!)62 * Added some little background icon in input button.63 71 64 72 = 2.8 =
Note: See TracChangeset
for help on using the changeset viewer.