WordPress.org

Plugin Directory

Changeset 1678280


Ignore:
Timestamp:
06/14/17 11:51:22 (13 days ago)
Author:
petersplugins
Message:

Version 2.0 - unified admin interface and code improvements

Location:
smart-custom-display-name
Files:
15 added
1 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • smart-custom-display-name/assets/icon.svg

    r1512535 r1678280  
    1717   inkscape:version="0.91 r13725" 
    1818   sodipodi:docname="smart-custom-display-name.svg" 
    19    inkscape:export-filename="D:\Eigene Dateien\Google Drive\web\websites\EIGENE\html\dev.smartware.cc\wp-content\plugins\smart-custom-display-name\pluginicon.png" 
    20    inkscape:export-xdpi="2.8800001" 
    21    inkscape:export-ydpi="2.8800001"> 
     19   inkscape:export-filename="D:\Eigene Dateien\Google Drive\web\websites\EIGENE\html\dev.smartware.cc\wp-content\plugins\smart-custom-display-name\assets\pluginicon.png" 
     20   inkscape:export-xdpi="4.3200002" 
     21   inkscape:export-ydpi="4.3200002"> 
    2222  <defs 
    2323     id="defs4" /> 
     
    2929     inkscape:pageopacity="0.0" 
    3030     inkscape:pageshadow="2" 
    31      inkscape:zoom="0.49497475" 
    32      inkscape:cx="536.81037" 
    33      inkscape:cy="371.11975" 
     31     inkscape:zoom="0.7" 
     32     inkscape:cx="398.41991" 
     33     inkscape:cy="430.06441" 
    3434     inkscape:document-units="px" 
    3535     inkscape:current-layer="layer1" 
     
    5959     transform="translate(0,-52.362161)"> 
    6060    <rect 
    61        style="fill:#333333;fill-opacity:1;fill-rule:nonzero;stroke:#333333;stroke-width:74.44760895;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:7;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" 
    62        id="rect3036" 
    63        width="925.55237" 
    64        height="925.55237" 
    65        x="37.223816" 
    66        y="89.585976" /> 
    67     <g 
    68        id="g4162" 
    69        transform="matrix(1.125,0,0,1.125,199.64431,351.62057)" /> 
     61       style="fill:#444444;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:74.44760895;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:7;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" 
     62       id="rect3036-9" 
     63       width="1000" 
     64       height="1000" 
     65       x="0" 
     66       y="52.362007" /> 
     67    <rect 
     68       style="opacity:1;fill:#222222;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.06299996;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" 
     69       id="rect4199" 
     70       width="480.83261" 
     71       height="480.83261" 
     72       x="-167.1333" 
     73       y="619.6817" 
     74       transform="matrix(0.70710677,-0.70710679,0.70710677,0.70710679,0,0)" /> 
     75    <rect 
     76       style="opacity:1;fill:#222222;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.06299996;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" 
     77       id="rect4199-4" 
     78       width="141.42136" 
     79       height="141.42136" 
     80       x="-602.711" 
     81       y="744.13232" 
     82       transform="matrix(0.70710677,-0.70710679,0.70710677,0.70710679,0,0)" /> 
     83    <rect 
     84       style="opacity:1;fill:#222222;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.06299996;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" 
     85       id="rect4236" 
     86       width="799.97638" 
     87       height="496" 
     88       x="200.02367" 
     89       y="556.36218" /> 
     90    <rect 
     91       style="opacity:1;fill:#444444;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.06299996;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" 
     92       id="rect4238" 
     93       width="511.10657" 
     94       height="231.32494" 
     95       x="175.76653" 
     96       y="461.42273" /> 
     97    <rect 
     98       style="opacity:1;fill:#444444;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.06299996;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" 
     99       id="rect4240" 
     100       width="224.25386" 
     101       height="171.72594" 
     102       x="121.21826" 
     103       y="747.29602" /> 
    70104    <g 
    71105       id="g4164" 
     
    221255       style="fill:#ffffff" /> 
    222256    <path 
    223        inkscape:connector-curvature="0" 
    224        d="M -1020,538.07644" 
    225        id="path3391" /> 
    226     <path 
    227257       id="path3405" 
    228258       d="m 807.83596,834.02518 c 5.16145,5.16144 7.74216,11.48674 7.74216,18.97589 0,7.48915 -2.58071,13.81444 -7.74216,18.97589 -5.16145,5.16144 -11.48674,7.74215 -18.97589,7.74215 -7.48914,0 -13.81444,-2.58071 -18.97589,-7.74215 -5.16144,-5.16145 -7.74216,-11.48674 -7.74216,-18.97589 0,-7.48915 2.58072,-13.81445 7.74216,-18.97589 5.16145,-5.16144 11.48675,-7.74216 18.97589,-7.74216 7.48915,0 13.81444,2.58072 18.97589,7.74216 z m 132.83123,18.97589 c 0,13.96626 -1.82169,27.42648 -5.46506,40.38068 -3.64438,12.95322 -8.75423,25.04719 -15.33253,36.28189 -6.57831,11.23373 -14.47228,21.45541 -23.68191,30.66504 -9.20863,9.20964 -19.43131,17.10459 -30.66503,23.6819 -11.23472,6.57832 -23.32769,11.68916 -36.2824,15.33251 -12.9537,3.64341 -26.41393,5.46511 -40.38019,5.46511 -13.96625,0 -27.42648,-1.8217 -40.3807,-5.46511 -12.9542,-3.64435 -25.04816,-8.75419 -36.2819,-15.33251 -11.23372,-6.5783 -21.4554,-14.47226 -30.66503,-23.6819 -9.20963,-9.20864 -17.1036,-19.43131 -23.68191,-30.66504 -6.57831,-11.2347 -11.68915,-23.32768 -15.33251,-36.28189 -3.64337,-12.9542 -5.46506,-26.41442 -5.46506,-40.38068 0,-13.96625 1.82169,-27.42648 5.46506,-40.3807 3.64336,-12.9542 8.7542,-25.04817 15.33251,-36.2819 6.57831,-11.23372 14.47228,-21.4554 23.68191,-30.66503 9.20963,-9.20964 19.43131,-17.1036 30.66503,-23.68192 11.23374,-6.5783 23.3277,-11.68914 36.2819,-15.33251 12.95422,-3.64336 26.41445,-5.46505 40.3807,-5.46505 20.84817,0 40.5325,3.99759 59.05297,11.99276 18.52046,7.99518 34.61201,18.82408 48.27465,32.48672 13.66263,13.66263 24.49155,29.75419 32.48672,48.27466 7.9952,18.52046 11.99278,38.20479 11.99278,59.05297 z m -61.02647,-10.01928 c 0,-1.21444 -0.45542,-2.2771 -1.36627,-3.18794 -0.91084,-0.91085 -1.97399,-1.36626 -3.18894,-1.36626 l -23.07468,-2.42892 c -0.60722,-2.83373 -1.46747,-5.51565 -2.58072,-8.04578 -1.11326,-2.53012 -2.37831,-5.11083 -3.79419,-7.74216 l 14.57349,-17.91325 c 1.82168,-2.22649 1.72048,-4.3518 -0.30362,-6.37589 l -13.96625,-13.96626 c -1.01205,-1.01204 -2.1243,-1.51807 -3.33876,-1.51807 -1.21446,0 -2.2265,0.40482 -3.03614,1.21446 l -17.91325,14.57348 c -2.63131,-1.41686 -5.21204,-2.68192 -7.74116,-3.79517 -2.53111,-1.11326 -5.21206,-1.97399 -8.04578,-2.58072 l -2.42892,-23.07469 c 0,-1.21446 -0.45541,-2.2771 -1.36627,-3.18795 -0.91083,-0.91084 -1.97399,-1.36626 -3.18794,-1.36626 l -20.03854,0 c -1.21445,0 -2.2771,0.45542 -3.18794,1.36626 -0.91085,0.91085 -1.36627,1.97349 -1.36627,3.18795 l -2.42892,23.07469 c -2.83372,0.60723 -5.51566,1.46746 -8.04577,2.58072 -2.53012,1.11325 -5.11085,2.37831 -7.74216,3.79517 l -17.91324,-14.57348 c -0.80964,-0.80964 -1.82169,-1.21446 -3.03615,-1.21446 -1.21446,0 -2.3277,0.50603 -3.33975,1.51807 l -13.96625,13.96626 c -2.0241,2.02409 -2.1253,4.1494 -0.30362,6.37589 l 14.57349,17.91325 c -1.41687,2.63133 -2.68193,5.21204 -3.79519,7.74216 -1.11324,2.53013 -1.97349,5.21205 -2.58072,8.04578 l -23.07467,2.42892 c -1.21446,0 -2.27711,0.45541 -3.18795,1.36626 -0.91084,0.91084 -1.36627,1.9735 -1.36627,3.18794 l 0,20.03855 c 0,1.21345 0.45543,2.2771 1.36627,3.18795 0.91084,0.91084 1.97349,1.36627 3.18795,1.36627 l 23.07467,2.4289 c 0.60723,2.83374 1.46748,5.51467 2.58072,8.04578 1.11326,2.53012 2.37832,5.11084 3.79519,7.74117 l -14.57349,17.91323 c -1.82168,2.22651 -1.72048,4.35131 0.30362,6.37591 l 13.96625,13.96623 c 1.01205,1.01205 2.12529,1.51857 3.33975,1.51857 1.21446,0 2.22651,-0.40433 3.03615,-1.21397 l 17.91324,-14.57346 c 2.63131,1.41588 5.21204,2.68093 7.74216,3.79419 2.53011,1.11325 5.21205,1.97399 8.04577,2.58071 l 2.42892,23.07468 c 0,1.21445 0.45542,2.27808 1.36627,3.18894 0.91084,0.91083 1.97349,1.36626 3.18794,1.36626 l 20.03854,0 c 1.21395,0 2.27711,-0.45543 3.18794,-1.36626 0.91086,-0.91086 1.36627,-1.97399 1.36627,-3.18894 l 2.42892,-23.07468 c 2.83372,-0.60721 5.51467,-1.46746 8.04578,-2.58071 2.53011,-1.11326 5.11084,-2.37831 7.74116,-3.79419 l 17.91325,14.57346 c 0.80964,0.80964 1.82168,1.21397 3.03614,1.21397 1.21446,0 2.32671,-0.50652 3.33876,-1.51857 l 13.96625,-13.96623 c 2.0241,-2.0241 2.1253,-4.14841 0.30362,-6.37591 l -14.57349,-17.91323 c 1.41588,-2.63133 2.68093,-5.21204 3.79419,-7.74117 1.11325,-2.53111 1.97399,-5.21204 2.58072,-8.04578 l 23.07468,-2.4289 c 1.21446,0 2.2781,-0.45543 3.18894,-1.36627 0.91085,-0.91085 1.36627,-1.97399 1.36627,-3.18795 l 0,-20.03855 z" 
    229259       inkscape:connector-curvature="0" 
    230        style="opacity:1;fill:#333333;fill-opacity:1" /> 
     260       style="opacity:1;fill:#444444;fill-opacity:1" /> 
     261    <g 
     262       id="g4162-2" 
     263       transform="matrix(1.125,0,0,1.125,-466.02072,582.91993)" /> 
     264    <g 
     265       id="g4164-9" 
     266       transform="matrix(1.125,0,0,1.125,-466.02072,582.91993)" /> 
     267    <g 
     268       id="g4166-9" 
     269       transform="matrix(1.125,0,0,1.125,-466.02072,582.91993)" /> 
     270    <g 
     271       id="g4168-3" 
     272       transform="matrix(1.125,0,0,1.125,-466.02072,582.91993)" /> 
     273    <g 
     274       id="g4170-9" 
     275       transform="matrix(1.125,0,0,1.125,-466.02072,582.91993)" /> 
     276    <g 
     277       id="g4172-7" 
     278       transform="matrix(1.125,0,0,1.125,-466.02072,582.91993)" /> 
     279    <g 
     280       id="g4174-3" 
     281       transform="matrix(1.125,0,0,1.125,-466.02072,582.91993)" /> 
     282    <g 
     283       id="g4176-7" 
     284       transform="matrix(1.125,0,0,1.125,-466.02072,582.91993)" /> 
     285    <g 
     286       id="g4178-3" 
     287       transform="matrix(1.125,0,0,1.125,-466.02072,582.91993)" /> 
     288    <g 
     289       id="g4180-1" 
     290       transform="matrix(1.125,0,0,1.125,-466.02072,582.91993)" /> 
     291    <g 
     292       id="g4182-4" 
     293       transform="matrix(1.125,0,0,1.125,-466.02072,582.91993)" /> 
     294    <g 
     295       id="g4184-1" 
     296       transform="matrix(1.125,0,0,1.125,-466.02072,582.91993)" /> 
     297    <g 
     298       id="g4186-5" 
     299       transform="matrix(1.125,0,0,1.125,-466.02072,582.91993)" /> 
     300    <g 
     301       id="g4188-5" 
     302       transform="matrix(1.125,0,0,1.125,-466.02072,582.91993)" /> 
     303    <g 
     304       id="g4190-3" 
     305       transform="matrix(1.125,0,0,1.125,-466.02072,582.91993)" /> 
     306    <g 
     307       transform="matrix(38.671874,0,0,38.671874,-523.43297,371.60793)" 
     308       style="fill:#ffffff" 
     309       id="g4256-0-1" /> 
     310    <g 
     311       transform="matrix(38.671874,0,0,38.671874,-523.43297,371.60793)" 
     312       style="fill:#ffffff" 
     313       id="g4258-7-5" /> 
     314    <g 
     315       transform="matrix(38.671874,0,0,38.671874,-523.43297,371.60793)" 
     316       style="fill:#ffffff" 
     317       id="g4260-7-0" /> 
     318    <g 
     319       transform="matrix(38.671874,0,0,38.671874,-523.43297,371.60793)" 
     320       style="fill:#ffffff" 
     321       id="g4262-8-7" /> 
     322    <g 
     323       transform="matrix(38.671874,0,0,38.671874,-523.43297,371.60793)" 
     324       style="fill:#ffffff" 
     325       id="g4264-7-4" /> 
     326    <g 
     327       transform="matrix(38.671874,0,0,38.671874,-523.43297,371.60793)" 
     328       style="fill:#ffffff" 
     329       id="g4266-8-2" /> 
     330    <g 
     331       transform="matrix(38.671874,0,0,38.671874,-523.43297,371.60793)" 
     332       style="fill:#ffffff" 
     333       id="g4268-4-4" /> 
     334    <g 
     335       transform="matrix(38.671874,0,0,38.671874,-523.43297,371.60793)" 
     336       style="fill:#ffffff" 
     337       id="g4270-9-3" /> 
     338    <g 
     339       transform="matrix(38.671874,0,0,38.671874,-523.43297,371.60793)" 
     340       style="fill:#ffffff" 
     341       id="g4272-7-0" /> 
     342    <g 
     343       transform="matrix(38.671874,0,0,38.671874,-523.43297,371.60793)" 
     344       style="fill:#ffffff" 
     345       id="g4274-0-7" /> 
     346    <g 
     347       transform="matrix(38.671874,0,0,38.671874,-523.43297,371.60793)" 
     348       style="fill:#ffffff" 
     349       id="g4276-3-8" /> 
     350    <g 
     351       transform="matrix(38.671874,0,0,38.671874,-523.43297,371.60793)" 
     352       style="fill:#ffffff" 
     353       id="g4278-5-1" /> 
     354    <g 
     355       transform="matrix(38.671874,0,0,38.671874,-523.43297,371.60793)" 
     356       style="fill:#ffffff" 
     357       id="g4280-4-2" /> 
     358    <g 
     359       transform="matrix(38.671874,0,0,38.671874,-523.43297,371.60793)" 
     360       style="fill:#ffffff" 
     361       id="g4282-5-0" /> 
     362    <g 
     363       transform="matrix(38.671874,0,0,38.671874,-523.43297,371.60793)" 
     364       style="fill:#ffffff" 
     365       id="g4284-3-0" /> 
     366    <g 
     367       transform="matrix(1.125,0,0,1.125,-1091.8438,283.34682)" 
     368       id="g4516-2" /> 
     369    <g 
     370       transform="matrix(1.125,0,0,1.125,-1091.8438,283.34682)" 
     371       id="g4518-8" /> 
     372    <g 
     373       transform="matrix(1.125,0,0,1.125,-1091.8438,283.34682)" 
     374       id="g4520-5" /> 
     375    <g 
     376       transform="matrix(1.125,0,0,1.125,-1091.8438,283.34682)" 
     377       id="g4522-0" /> 
     378    <g 
     379       transform="matrix(1.125,0,0,1.125,-1091.8438,283.34682)" 
     380       id="g4524-3" /> 
     381    <g 
     382       transform="matrix(1.125,0,0,1.125,-1091.8438,283.34682)" 
     383       id="g4526-6" /> 
     384    <g 
     385       transform="matrix(1.125,0,0,1.125,-1091.8438,283.34682)" 
     386       id="g4528-9" /> 
     387    <g 
     388       transform="matrix(1.125,0,0,1.125,-1091.8438,283.34682)" 
     389       id="g4530-8" /> 
     390    <g 
     391       transform="matrix(1.125,0,0,1.125,-1091.8438,283.34682)" 
     392       id="g4532-9" /> 
     393    <g 
     394       transform="matrix(1.125,0,0,1.125,-1091.8438,283.34682)" 
     395       id="g4534-9" /> 
     396    <g 
     397       transform="matrix(1.125,0,0,1.125,-1091.8438,283.34682)" 
     398       id="g4536-5" /> 
     399    <g 
     400       transform="matrix(1.125,0,0,1.125,-1091.8438,283.34682)" 
     401       id="g4538-0" /> 
     402    <g 
     403       transform="matrix(1.125,0,0,1.125,-1091.8438,283.34682)" 
     404       id="g4540-1" /> 
     405    <g 
     406       transform="matrix(1.125,0,0,1.125,-1091.8438,283.34682)" 
     407       id="g4542-5" /> 
     408    <g 
     409       transform="matrix(1.125,0,0,1.125,-1091.8438,283.34682)" 
     410       id="g4544-4" /> 
     411    <g 
     412       style="fill:#ffffff" 
     413       id="g3386" 
     414       transform="matrix(1.3494962,0,0,1.4365365,-565.66503,357.86276)" /> 
     415    <g 
     416       style="fill:#ffffff" 
     417       id="g3388" 
     418       transform="matrix(1.3494962,0,0,1.4365365,-565.66503,357.86276)" /> 
     419    <g 
     420       style="fill:#ffffff" 
     421       id="g3390" 
     422       transform="matrix(1.3494962,0,0,1.4365365,-565.66503,357.86276)" /> 
     423    <g 
     424       style="fill:#ffffff" 
     425       id="g3392" 
     426       transform="matrix(1.3494962,0,0,1.4365365,-565.66503,357.86276)" /> 
     427    <g 
     428       style="fill:#ffffff" 
     429       id="g3394" 
     430       transform="matrix(1.3494962,0,0,1.4365365,-565.66503,357.86276)" /> 
     431    <g 
     432       style="fill:#ffffff" 
     433       id="g3396" 
     434       transform="matrix(1.3494962,0,0,1.4365365,-565.66503,357.86276)" /> 
     435    <g 
     436       style="fill:#ffffff" 
     437       id="g3398" 
     438       transform="matrix(1.3494962,0,0,1.4365365,-565.66503,357.86276)" /> 
     439    <g 
     440       style="fill:#ffffff" 
     441       id="g3400" 
     442       transform="matrix(1.3494962,0,0,1.4365365,-565.66503,357.86276)" /> 
     443    <g 
     444       style="fill:#ffffff" 
     445       id="g3402" 
     446       transform="matrix(1.3494962,0,0,1.4365365,-565.66503,357.86276)" /> 
     447    <g 
     448       style="fill:#ffffff" 
     449       id="g3404" 
     450       transform="matrix(1.3494962,0,0,1.4365365,-565.66503,357.86276)" /> 
     451    <g 
     452       style="fill:#ffffff" 
     453       id="g3406" 
     454       transform="matrix(1.3494962,0,0,1.4365365,-565.66503,357.86276)" /> 
     455    <g 
     456       style="fill:#ffffff" 
     457       id="g3408" 
     458       transform="matrix(1.3494962,0,0,1.4365365,-565.66503,357.86276)" /> 
     459    <g 
     460       style="fill:#ffffff" 
     461       id="g3410" 
     462       transform="matrix(1.3494962,0,0,1.4365365,-565.66503,357.86276)" /> 
     463    <g 
     464       style="fill:#ffffff" 
     465       id="g3412" 
     466       transform="matrix(1.3494962,0,0,1.4365365,-565.66503,357.86276)" /> 
     467    <g 
     468       style="fill:#ffffff" 
     469       id="g3414" 
     470       transform="matrix(1.3494962,0,0,1.4365365,-565.66503,357.86276)" /> 
    231471  </g> 
    232472</svg> 
  • smart-custom-display-name/trunk/inc/class-smart-custom-display-name.php

    r1512535 r1678280  
    11<?php 
    22 
     3/** 
     4 * The smart Custom Display Name core plugin class 
     5 */ 
     6 
     7  
     8// If this file is called directly, abort 
    39if ( ! defined( 'WPINC' ) ) { 
    410    die; 
    511} 
    612 
    7 if ( !class_exists( 'Smart_Custom_Display_Name' ) ) {  
    813 
    9   class Smart_Custom_Display_Name { 
     14/** 
     15 * The core plugin class 
     16 */ 
     17if ( !class_exists( 'PP_Smart_Custom_Display_Name' ) ) {  
     18 
     19  class PP_Smart_Custom_Display_Name { 
    1020     
    1121    private $_file; 
     
    1626    private $my_url; 
    1727    private $dc_url; 
     28    private $admin_handle; 
    1829     
     30     
     31    /** 
     32       * here we go 
     33     */ 
    1934    public function __construct( $file ) { 
    2035      $this->_file = $file; 
    2136      $this->plugin_name = 'smart Custom Display Name'; 
    2237      $this->plugin_slug = 'smart-custom-display-name'; 
    23       $this->version = '1.2'; 
     38      $this->version = '2.0'; 
    2439      $this->init(); 
    2540    } 
    2641     
     42     
     43    /** 
     44     * do plugin init  
     45     */ 
    2746    function init() { 
     47      $this->wp_url = 'https://wordpress.org/plugins/' . $this->plugin_slug; 
     48      $this->my_url = 'http://petersplugins.com/free-wordpress-plugins/' . $this->plugin_slug; 
     49      $this->dc_url = 'http://petersplugins.com/docs/' . $this->plugin_slug; 
     50       
     51      // we only need to do something if we're in admin 
    2852      if ( is_admin() ) { 
    29         add_action( 'admin_init', array( $this, 'admin_init' ) ); 
     53        add_action( 'init', array( $this, 'add_text_domain' ) ); 
     54        add_action( 'admin_head', array( $this, 'admin_css' ) ); 
    3055        add_action( 'admin_menu', array( $this, 'add_info_page' ) ); 
    31         add_filter( 'plugin_action_links_' . plugin_basename( $this->_file ), array( $this, 'add_link' ) );  
     56        add_filter( 'plugin_action_links_' . plugin_basename( $this->_file ), array( $this, 'add_links' ) );  
    3257        add_action( 'admin_footer-user-edit.php', array( $this, 'display_name_customizer_js' ) ); 
    3358        add_action( 'admin_footer-profile.php', array( $this, 'display_name_customizer_js' ) ); 
     
    3762    } 
    3863 
    39     function admin_init() { 
    40       $this->wp_url = 'https://wordpress.org/plugins/' . $this->plugin_slug; 
    41       $this->my_url = 'http://petersplugins.com/free-wordpress-plugins/' . $this->plugin_slug; 
    42       $this->dc_url = 'http://petersplugins.com/docs/' . $this->plugin_slug; 
    43       load_plugin_textdomain( 'smart-custom-display-name' ); 
    44     } 
    4564     
     65    /* 
     66     * add javascript to change display name field from a select box to an input field 
     67     */ 
    4668    function display_name_customizer_js() { 
    4769      ?> 
     
    5274    } 
    5375     
     76     
     77    /* 
     78     * add css for the javascript generated input field 
     79     */ 
    5480    function display_name_customizer_css() { 
    5581      ?> 
     
    6086    } 
    6187     
    62     function add_link( $links ) { 
    63       return array_merge( $links, array( '<a class="dashicons dashicons-editor-help" href="' . menu_page_url( $this->plugin_slug, false ) . '"></a>', '<a href="https://wordpress.org/support/plugin/' . $this->plugin_slug . '/reviews/">' . __( 'Please rate Plugin', 'smart-custom-display-name' ) .'</a>' ) ); 
     88     
     89    /** 
     90     * add text domain 
     91     */ 
     92    function add_text_domain() {  
     93      load_plugin_textdomain( 'smart-custom-display-name' ); 
    6494    } 
    6595     
    66     function add_info_page() { 
    67       add_submenu_page( null, $this->plugin_name, $this->plugin_name, 'read', $this->plugin_slug, array( $this, 'show_info_page' ) ); 
     96     
     97    /** 
     98     * add links to plugins table 
     99     */ 
     100    function add_links( $links ) { 
     101      return array_merge( $links, array( '<a class="dashicons dashicons-admin-tools" href="' . menu_page_url( $this->plugin_slug, false ) . '" title="' . __( 'Show plugin info', 'smart-custom-display-name' ) . '"></a>', '<a class="dashicons dashicons-star-filled" href="https://wordpress.org/support/plugin/' . $this->plugin_slug . '/reviews/" title="' . __( 'Please rate plugin', 'smart-custom-display-name' ) . '"></a>' ) ); 
    68102    } 
    69103     
     104     
     105    /** 
     106     * init backend 
     107     */ 
     108    function add_info_page() { 
     109      $this->admin_handle = add_submenu_page( null, $this->plugin_name, null, 'read', $this->plugin_slug, array( $this, 'show_info_page' ) ); 
     110    } 
     111     
     112     
     113    /** 
     114     * show info page 
     115     */ 
    70116    function show_info_page() { 
    71117      ?>     
    72118      <div class="wrap"> 
    73         <?php screen_icon(); ?> 
    74         <h2 style="min-height: 32px; line-height: 32px; padding-left: 40px; background-image: url(<?php echo plugins_url( 'pluginicon.png', $this->_file ); ?>); background-repeat: no-repeat; background-position: left center"><a href="<?php echo $this->my_url; ?>"><?php echo $this->plugin_name; ?></a></h2> 
    75         <hr /> 
    76         <p>Plugin Version: <?php echo $this->version; ?> <a class="dashicons dashicons-editor-help" href="<?php echo $this->wp_url; ?>/changelog/"></a></p> 
    77         <div id="poststuff"> 
    78           <div id="post-body" class="metabox-holder columns-2"> 
    79             <div id="post-body-content"> 
    80               <div class="meta-box-sortables ui-sortable"> 
    81                 <div class="postbox"> 
    82                   <div class="inside"> 
    83                     <p><strong><?php _e( 'This plugin allows you to change the users Display Name to anything you like.', 'smart-custom-display-name' ); ?></strong></p> 
    84                     <p><?php _e( 'There are no settings. When activated the plugin changes the "Display name publicly as" field on the user settings page from a select box where you only can choose from maximum 6 possible values to a  regular text input field where you can type in anything you like.', 'smart-custom-display-name' ); ?></p> 
    85                   </div> 
    86                 </div> 
    87                 <div class="postbox"> 
    88                   <div class="inside"> 
    89                     <p><strong><?php _e( 'Do you like the smart Custom Display Name Plugin?', 'smart-custom-display-name' ); ?></strong></p> 
    90                     <p><a href="https://profiles.wordpress.org/petersplugins/#content-plugins"><?php _e( 'Please take a look at my other plugins.', 'smart-custom-display-name' ); ?></a></p> 
    91                   </div> 
    92                 </div> 
    93               </div> 
    94             </div> 
    95             <?php { $this->show_meta_boxes(); } ?> 
     119        <h1 id="pp-plugin-info-smart-custom-display-name"><?php echo $this->plugin_name; ?><span><a class="dashicons dashicons-star-filled" href="https://wordpress.org/support/plugin/<?php echo $this->plugin_slug; ?>/reviews/" title="<?php _e( 'Please rate plugin', 'smart-custom-display-name' ); ?>"></a> <a class="dashicons dashicons-wordpress" href="<?php echo $this->wp_url; ?>/" title="<?php _e( 'wordpress.org plugin directory', 'smart-custom-display-name' ); ?>"></a> <a class="dashicons dashicons-admin-home" href="http://petersplugins.com/" title="<?php _e( 'Author homepage', 'smart-custom-display-name' );?>"></a> <a class="dashicons dashicons-googleplus" href="http://g.petersplugins.com/" title="<?php _e( 'Authors Google+ Page', 'smart-custom-display-name' ); ?>"></a> <a class="dashicons dashicons-facebook-alt" href="http://f.petersplugins.com/" title="<?php _e( 'Authors facebook Page', 'smart-custom-display-name' ); ?>"></a> <a class="dashicons dashicons-editor-help" href="http://wordpress.org/support/plugin/<?php echo $this->plugin_slug; ?>/" title="<?php _e( 'Support', 'smart-custom-display-name'); ?>"></a> <a class="dashicons dashicons-admin-comments" href="http://petersplugins.com/contact/" title="<?php _e( 'Contact Author', 'smart-custom-display-name' ); ?>"></a></span></h1> 
     120        <?php settings_errors(); ?> 
     121         
     122        <div class="postbox"> 
     123          <div class="inside"> 
     124            <p><strong><?php _e( 'This plugin allows you to change the users Display Name to anything you like', 'smart-custom-display-name' ); ?></strong></p> 
     125            <p><?php _e( 'There are no settings. When activated the plugin changes the "Display name publicly as" field on the user settings page from a select box where you only can choose from maximum 6 possible values to a  regular text input field where you can type in anything you like.', 'smart-custom-display-name' ); ?></p> 
    96126          </div> 
    97           <br class="clear"> 
    98         </div>     
     127        </div> 
     128         
    99129      </div> 
    100130      <?php 
    101131    } 
    102132     
    103     // show meta boxes 
    104     function show_meta_boxes() { 
    105       ?> 
    106       <div id="postbox-container-1" class="postbox-container"> 
    107         <div class="meta-box-sortables"> 
    108           <div class="postbox"> 
    109             <h3><span><?php _e( 'Like this Plugin?', 'smart-custom-display-name' ); ?></span></h3> 
    110             <div class="inside"> 
    111               <ul> 
    112                 <li><div class="dashicons dashicons-wordpress"></div>&nbsp;&nbsp;<a href="<?php echo $this->wp_url; ?>/"><?php _e( 'Please rate the plugin', 'smart-custom-display-name' ); ?></a></li> 
    113                 <li><div class="dashicons dashicons-admin-home"></div>&nbsp;&nbsp;<a href="<?php echo $this->my_url; ?>/"><?php _e( 'Plugin homepage', 'smart-custom-display-name'); ?></a></li> 
    114                 <li><div class="dashicons dashicons-admin-home"></div>&nbsp;&nbsp;<a href="http://petersplugins.com/"><?php _e( 'Author homepage', 'smart-custom-display-name' );?></a></li> 
    115                 <li><div class="dashicons dashicons-googleplus"></div>&nbsp;&nbsp;<a href="http://g.petersplugins.com/"><?php _e( 'Authors Google+ Page', 'smart-custom-display-name' ); ?></a></li> 
    116                 <li><div class="dashicons dashicons-facebook-alt"></div>&nbsp;&nbsp;<a href="http://f.petersplugins.com/"><?php _e( 'Authors facebook Page', 'smart-custom-display-name' ); ?></a></li> 
    117               </ul> 
    118             </div> 
    119           </div> 
    120           <div class="postbox"> 
    121             <h3><span><?php _e( 'Need help?', 'smart-custom-display-name' ); ?></span></h3> 
    122             <div class="inside"> 
    123               <ul> 
    124                 <li><div class="dashicons dashicons-book-alt"></div>&nbsp;&nbsp;<a href="<?php echo $this->dc_url; ?>"><?php _e( 'Take a look at the Plugin Doc', 'smart-custom-display-name' ); ?></a></li> 
    125                 <li><div class="dashicons dashicons-wordpress"></div>&nbsp;&nbsp;<a href="<?php echo $this->wp_url; ?>/faq/"><?php _e( 'Take a look at the FAQ section', 'smart-custom-display-name' ); ?></a></li> 
    126                 <li><div class="dashicons dashicons-wordpress"></div>&nbsp;&nbsp;<a href="http://wordpress.org/support/plugin/<?php echo $this->plugin_slug; ?>/"><?php _e( 'Take a look at the Support section', 'smart-custom-display-name'); ?></a></li> 
    127                 <li><div class="dashicons dashicons-admin-comments"></div>&nbsp;&nbsp;<a href="http://petersplugins.com/contact/"><?php _e( 'Feel free to contact the Author', 'smart-custom-display-name' ); ?></a></li> 
    128               </ul> 
    129             </div> 
    130           </div> 
    131           <div class="postbox"> 
    132             <h3><span><?php _e( 'Translate this Plugin', 'smart-custom-display-name' ); ?></span></h3> 
    133             <div class="inside"> 
    134               <p><?php _e( 'It would be great if you\'d support the smart Custom Display Name Plugin by adding a new translation or keeping an existing one up to date!', 'smart-custom-display-name' ); ?></p> 
    135               <p><a href="https://translate.wordpress.org/projects/wp-plugins/<?php echo $this->plugin_slug; ?>"><?php _e( 'Translate online', 'smart-custom-display-name' ); ?></a></p> 
    136             </div> 
    137           </div> 
    138         </div> 
    139       </div> 
    140       <?php 
     133     
     134    /** 
     135     * add admin css 
     136     */ 
     137    function admin_css() { 
     138      if ( get_current_screen()->id == $this->admin_handle ) { 
     139        echo '<style type="text/css">#pp-plugin-info-smart-custom-display-name{ min-height: 48px; line-height: 48px; vertical-align: middle; padding-left: 60px; background-image: url(' . plugins_url( 'assets/pluginicon.png', $this->_file ) .'); background-repeat: no-repeat; background-position: left center;}#pp-plugin-info-smart-custom-display-name span{float: right; padding-left: 50px;}#pp-plugin-info-smart-custom-display-name .dashicons{ vertical-align: middle; }#pp-plugin-info-smart-custom-display-name + .postbox{margin-top: 20px}</style>'; 
     140      } 
    141141    } 
     142     
    142143  } 
    143144 
  • smart-custom-display-name/trunk/readme.txt

    r1547077 r1678280  
    44Tags: author, authors, user, users, name, display name, profile, user-profile, custom name, user name, author name, the_author, get_the_author, the_author_link, get_the_author_link, the_author_posts_link, wp_list_authors 
    55Requires at least: 3.0 
    6 Tested up to: 4.7 
    7 Stable tag: 1.2 
     6Tested up to: 4.8 
     7Stable tag: 2.0 
    88License: GPLv2 or later 
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html 
     
    1313== Description == 
    1414 
    15 > Set your Display Name to anything you like! 
     15Set your Display Name to anything you like 
    1616 
    17 See also [Plugin Homepage](http://petersplugins.com/free-wordpress-plugins/smart-custom-display-name/) 
     17= Usage = 
    1818 
    19 The "Display Name" is the name shown as post author - e.g. "posted by John Doe". 
     19The "Display Name" is the name shown as post author - e.g. "posted by John Doe". WordPress only allows you to select from a few given values. This plugin changes the Display Name field to a regular text input field where you can type in anything you like. There are no settings. Just install and activate. 
    2020 
    21 WordPress only allows you to select from these given values: 
     21= Need more information? = 
    2222 
    23 * Nickname - e.g. "JoDo" 
    24 * Username (Login) - e.g. "J0hnD03" 
    25 * First Name - e.g. "John" 
    26 * Last Name - e.g. "Doe" 
    27 * First + Last - e.g. "John Doe" 
    28 * Last + First - e.g. "Doe John" 
    29  
    30 It is not possible to set the Display Name to anything else you want to be displayed - like e.g. "John - the JoDo - Doe". 
    31  
    32 For real? OK, indeed it is possible - with this simple and handy plugin. There are no settings. Just install and activate. Display Name field becomes a regular text input field where you can type in anything you like. 
     23See [Plugin Homepage](http://petersplugins.com/free-wordpress-plugins/smart-custom-display-name/) 
    3324 
    3425= Do you like the smart Custom Display Name Plugin? = 
     
    4233* **[smart User Slug Hider](https://wordpress.org/plugins/smart-user-slug-hider/)** - Hide usernames in author pages URLs to enhance security  
    4334* [See all](https://profiles.wordpress.org/petersplugins/#content-plugins) 
    44  
    45 == Installation == 
    46  
    47 = From your WordPress dashboard = 
    48  
    49 1. Visit 'Plugins' -> 'Add New' 
    50 1. Search for 'smart Custom Display Name' 
    51 1. Activate the plugin through the 'Plugins' menu in WordPress 
    52  
    53 = Manually from wordpress.org = 
    54  
    55 1. Download smart Custom Display Name from wordpress.org and unzip the archive 
    56 1. Upload the `smart-custom-display-name` folder to your `/wp-content/plugins/` directory 
    57 1. Activate the plugin through the 'Plugins' menu in WordPress 
    5835 
    5936== Frequently Asked Questions == 
     
    7451== Changelog == 
    7552 
     53= 2.0 (2017-06-14) = 
     54* redesigned admin interface 
     55* code improvement 
     56 
    7657= 1.2 (2016-10-11) = 
    7758* Some changes under the hood, no functional changes 
     
    8566== Upgrade Notice == 
    8667 
     68= 2.0 = 
     69unified admin interface 
     70 
    8771= 1.2 = 
    8872Some changes under the hood, no functional changes 
  • smart-custom-display-name/trunk/smart-custom-display-name.php

    r1512535 r1678280  
    11<?php 
    2 /* 
    3 Plugin Name: smart Custom Display Name 
    4 Plugin URI: http://petersplugins.com/free-wordpress-plugins/smart-custom-display-name/ 
    5 Description: Set users "Display Name" to any custom value 
    6 Version: 1.2 
    7 Author: Peter's Plugins, smartware.cc 
    8 Author URI: http://petersplugins.com 
    9 Text Domain: smart-custom-display-name 
    10 License: GPL2+ 
    11 License URI: http://www.gnu.org/licenses/gpl-2.0.txt 
    12 */ 
    132 
     3/** 
     4 * The smart Custom Display Name Plugin 
     5 * 
     6 * smart Custom Display Name allows you to set your Display Name to anything you like 
     7 * 
     8 * @wordpress-plugin 
     9 * Plugin Name: smart Custom Display Name 
     10 * Plugin URI: http://petersplugins.com/free-wordpress-plugins/smart-custom-display-name/ 
     11 * Description: Set users "Display Name" to any custom value 
     12 * Version: 2.0 
     13 * Author: Peter Raschendorfer 
     14 * Author URI: http://petersplugins.com 
     15 * Text Domain: smart-custom-display-name 
     16 * License: GPL2+ 
     17 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt 
     18 */ 
     19 
     20 
     21// If this file is called directly, abort 
    1422if ( ! defined( 'WPINC' ) ) { 
    1523    die; 
    1624} 
    1725 
     26 
     27/** 
     28 * Load core plugin class and run the plugin 
     29 */ 
    1830require_once( plugin_dir_path( __FILE__ ) . '/inc/class-smart-custom-display-name.php' ); 
    19  
    20 $smart_custom_display_name = new Smart_Custom_Display_Name( __FILE__ ); 
     31$pp_smart_custom_display_name = new PP_Smart_Custom_Display_Name( __FILE__ ); 
    2132 
    2233?> 
Note: See TracChangeset for help on using the changeset viewer.