├── .gitignore ├── LICENSE ├── colorbox ├── colorbox.css ├── images │ ├── controls.png │ └── loading.gif └── jquery.colorbox-min.js ├── composer.json ├── developer.css ├── developer.js ├── developer.php ├── includes ├── class-empty-upgrader-skin.php └── class-wp-cli-commands.php ├── languages ├── a8c-developer-fr_FR.mo ├── a8c-developer-fr_FR.po └── developer.pot ├── readme.txt ├── screenshot-1.png ├── screenshot-2.png ├── screenshot-3.png └── screenshot-4.png /.gitignore: -------------------------------------------------------------------------------- 1 | .svn 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /colorbox/colorbox.css: -------------------------------------------------------------------------------- 1 | /* 2 | ColorBox Core Style: 3 | The following CSS is consistent between example themes and should not be altered. 4 | */ 5 | #colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;} 6 | #cboxOverlay{position:fixed; width:100%; height:100%;} 7 | #cboxMiddleLeft, #cboxBottomLeft{clear:left;} 8 | #cboxContent{position:relative;} 9 | #cboxLoadedContent{overflow:auto;} 10 | #cboxTitle{margin:0;} 11 | #cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;} 12 | #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;} 13 | .cboxPhoto{float:left; margin:auto; border:0; display:block;} 14 | .cboxIframe{width:100%; height:100%; display:block; border:0;} 15 | 16 | /* 17 | User Style: 18 | Change the following styles to modify the appearance of ColorBox. They are 19 | ordered & tabbed in a way that represents the nesting of the generated HTML. 20 | */ 21 | #cboxOverlay{background:#000;} 22 | #colorbox{} 23 | #cboxContent{margin-top:20px;} 24 | .cboxIframe{background:#fff;} 25 | #cboxError{padding:50px; border:1px solid #ccc;} 26 | #cboxLoadedContent{border:5px solid #000; background:#fff;} 27 | #cboxTitle{position:absolute; top:-20px; left:0; color:#ccc;} 28 | #cboxCurrent{position:absolute; top:-20px; right:0px; color:#ccc;} 29 | #cboxSlideshow{position:absolute; top:-20px; right:90px; color:#fff;} 30 | #cboxPrevious{position:absolute; top:50%; left:5px; margin-top:-32px; background:url(images/controls.png) no-repeat top left; width:28px; height:65px; text-indent:-9999px;} 31 | #cboxPrevious:hover{background-position:bottom left;} 32 | #cboxNext{position:absolute; top:50%; right:5px; margin-top:-32px; background:url(images/controls.png) no-repeat top right; width:28px; height:65px; text-indent:-9999px;} 33 | #cboxNext:hover{background-position:bottom right;} 34 | #cboxLoadingOverlay{background:#000;} 35 | #cboxLoadingGraphic{background:url(images/loading.gif) no-repeat center center;} 36 | #cboxClose{position:absolute; top:5px; right:5px; display:block; background:url(images/controls.png) no-repeat top center; width:38px; height:19px; text-indent:-9999px;} 37 | #cboxClose:hover{background-position:bottom center;} -------------------------------------------------------------------------------- /colorbox/images/controls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automattic/developer/cff96e8acb44684db0fc167487314787de6a5098/colorbox/images/controls.png -------------------------------------------------------------------------------- /colorbox/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automattic/developer/cff96e8acb44684db0fc167487314787de6a5098/colorbox/images/loading.gif -------------------------------------------------------------------------------- /colorbox/jquery.colorbox-min.js: -------------------------------------------------------------------------------- 1 | // ColorBox v1.3.19 - jQuery lightbox plugin 2 | // (c) 2011 Jack Moore - jacklmoore.com 3 | // License: http://www.opensource.org/licenses/mit-license.php 4 | (function(a,b,c){function Z(c,d,e){var g=b.createElement(c);return d&&(g.id=f+d),e&&(g.style.cssText=e),a(g)}function $(a){var b=y.length,c=(Q+a)%b;return c<0?b+c:c}function _(a,b){return Math.round((/%/.test(a)?(b==="x"?z.width():z.height())/100:1)*parseInt(a,10))}function ba(a){return K.photo||/\.(gif|png|jpe?g|bmp|ico)((#|\?).*)?$/i.test(a)}function bb(){var b;K=a.extend({},a.data(P,e));for(b in K)a.isFunction(K[b])&&b.slice(0,2)!=="on"&&(K[b]=K[b].call(P));K.rel=K.rel||P.rel||"nofollow",K.href=K.href||a(P).attr("href"),K.title=K.title||P.title,typeof K.href=="string"&&(K.href=a.trim(K.href))}function bc(b,c){a.event.trigger(b),c&&c.call(P)}function bd(){var a,b=f+"Slideshow_",c="click."+f,d,e,g;K.slideshow&&y[1]?(d=function(){F.text(K.slideshowStop).unbind(c).bind(j,function(){if(K.loop||y[Q+1])a=setTimeout(W.next,K.slideshowSpeed)}).bind(i,function(){clearTimeout(a)}).one(c+" "+k,e),r.removeClass(b+"off").addClass(b+"on"),a=setTimeout(W.next,K.slideshowSpeed)},e=function(){clearTimeout(a),F.text(K.slideshowStart).unbind([j,i,k,c].join(" ")).one(c,function(){W.next(),d()}),r.removeClass(b+"on").addClass(b+"off")},K.slideshowAuto?d():e()):r.removeClass(b+"off "+b+"on")}function be(b){U||(P=b,bb(),y=a(P),Q=0,K.rel!=="nofollow"&&(y=a("."+g).filter(function(){var b=a.data(this,e).rel||this.rel;return b===K.rel}),Q=y.index(P),Q===-1&&(y=y.add(P),Q=y.length-1)),S||(S=T=!0,r.show(),K.returnFocus&&a(P).blur().one(l,function(){a(this).focus()}),q.css({opacity:+K.opacity,cursor:K.overlayClose?"pointer":"auto"}).show(),K.w=_(K.initialWidth,"x"),K.h=_(K.initialHeight,"y"),W.position(),o&&z.bind("resize."+p+" scroll."+p,function(){q.css({width:z.width(),height:z.height(),top:z.scrollTop(),left:z.scrollLeft()})}).trigger("resize."+p),bc(h,K.onOpen),J.add(D).hide(),I.html(K.close).show()),W.load(!0))}function bf(){!r&&b.body&&(Y=!1,z=a(c),r=Z(X).attr({id:e,"class":n?f+(o?"IE6":"IE"):""}).hide(),q=Z(X,"Overlay",o?"position:absolute":"").hide(),s=Z(X,"Wrapper"),t=Z(X,"Content").append(A=Z(X,"LoadedContent","width:0; height:0; overflow:hidden"),C=Z(X,"LoadingOverlay").add(Z(X,"LoadingGraphic")),D=Z(X,"Title"),E=Z(X,"Current"),G=Z(X,"Next"),H=Z(X,"Previous"),F=Z(X,"Slideshow").bind(h,bd),I=Z(X,"Close")),s.append(Z(X).append(Z(X,"TopLeft"),u=Z(X,"TopCenter"),Z(X,"TopRight")),Z(X,!1,"clear:left").append(v=Z(X,"MiddleLeft"),t,w=Z(X,"MiddleRight")),Z(X,!1,"clear:left").append(Z(X,"BottomLeft"),x=Z(X,"BottomCenter"),Z(X,"BottomRight"))).find("div div").css({"float":"left"}),B=Z(X,!1,"position:absolute; width:9999px; visibility:hidden; display:none"),J=G.add(H).add(E).add(F),a(b.body).append(q,r.append(s,B)))}function bg(){return r?(Y||(Y=!0,L=u.height()+x.height()+t.outerHeight(!0)-t.height(),M=v.width()+w.width()+t.outerWidth(!0)-t.width(),N=A.outerHeight(!0),O=A.outerWidth(!0),r.css({"padding-bottom":L,"padding-right":M}),G.click(function(){W.next()}),H.click(function(){W.prev()}),I.click(function(){W.close()}),q.click(function(){K.overlayClose&&W.close()}),a(b).bind("keydown."+f,function(a){var b=a.keyCode;S&&K.escKey&&b===27&&(a.preventDefault(),W.close()),S&&K.arrowKey&&y[1]&&(b===37?(a.preventDefault(),H.click()):b===39&&(a.preventDefault(),G.click()))}),a("."+g,b).live("click",function(a){a.which>1||a.shiftKey||a.altKey||a.metaKey||(a.preventDefault(),be(this))})),!0):!1}var d={transition:"elastic",speed:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,inline:!1,html:!1,iframe:!1,fastIframe:!0,photo:!1,href:!1,title:!1,rel:!1,opacity:.9,preloading:!0,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:!1,returnFocus:!0,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:undefined},e="colorbox",f="cbox",g=f+"Element",h=f+"_open",i=f+"_load",j=f+"_complete",k=f+"_cleanup",l=f+"_closed",m=f+"_purge",n=!a.support.opacity&&!a.support.style,o=n&&!c.XMLHttpRequest,p=f+"_IE6",q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X="div",Y;if(a.colorbox)return;a(bf),W=a.fn[e]=a[e]=function(b,c){var f=this;b=b||{},bf();if(bg()){if(!f[0]){if(f.selector)return f;f=a(""),b.open=!0}c&&(b.onComplete=c),f.each(function(){a.data(this,e,a.extend({},a.data(this,e)||d,b))}).addClass(g),(a.isFunction(b.open)&&b.open.call(f)||b.open)&&be(f[0])}return f},W.position=function(a,b){function i(a){u[0].style.width=x[0].style.width=t[0].style.width=a.style.width,t[0].style.height=v[0].style.height=w[0].style.height=a.style.height}var c=0,d=0,e=r.offset(),g=z.scrollTop(),h=z.scrollLeft();z.unbind("resize."+f),r.css({top:-9e4,left:-9e4}),K.fixed&&!o?(e.top-=g,e.left-=h,r.css({position:"fixed"})):(c=g,d=h,r.css({position:"absolute"})),K.right!==!1?d+=Math.max(z.width()-K.w-O-M-_(K.right,"x"),0):K.left!==!1?d+=_(K.left,"x"):d+=Math.round(Math.max(z.width()-K.w-O-M,0)/2),K.bottom!==!1?c+=Math.max(z.height()-K.h-N-L-_(K.bottom,"y"),0):K.top!==!1?c+=_(K.top,"y"):c+=Math.round(Math.max(z.height()-K.h-N-L,0)/2),r.css({top:e.top,left:e.left}),a=r.width()===K.w+O&&r.height()===K.h+N?0:a||0,s[0].style.width=s[0].style.height="9999px",r.dequeue().animate({width:K.w+O,height:K.h+N,top:c,left:d},{duration:a,complete:function(){i(this),T=!1,s[0].style.width=K.w+O+M+"px",s[0].style.height=K.h+N+L+"px",K.reposition&&setTimeout(function(){z.bind("resize."+f,W.position)},1),b&&b()},step:function(){i(this)}})},W.resize=function(a){S&&(a=a||{},a.width&&(K.w=_(a.width,"x")-O-M),a.innerWidth&&(K.w=_(a.innerWidth,"x")),A.css({width:K.w}),a.height&&(K.h=_(a.height,"y")-N-L),a.innerHeight&&(K.h=_(a.innerHeight,"y")),!a.innerHeight&&!a.height&&(A.css({height:"auto"}),K.h=A.height()),A.css({height:K.h}),W.position(K.transition==="none"?0:K.speed))},W.prep=function(b){function g(){return K.w=K.w||A.width(),K.w=K.mw&&K.mw1){typeof K.current=="string"&&E.html(K.current.replace("{current}",Q+1).replace("{total}",g)).show(),G[K.loop||QK.mw&&(a=(R.width-K.mw)/R.width,d()),K.mh&&R.height>K.mh&&(a=(R.height-K.mh)/R.height,d())),K.h&&(R.style.marginTop=Math.max(K.h-R.height,0)/2+"px"),y[1]&&(K.loop||y[Q+1])&&(R.style.cursor="pointer",R.onclick=function(){W.next()}),n&&(R.style.msInterpolationMode="bicubic"),setTimeout(function(){e(R)},1)}),setTimeout(function(){R.src=c},1)):c&&B.load(c,K.data,function(b,c,d){e(c==="error"?Z(X,"Error").text("Request unsuccessful: "+d.statusText):a(this).contents())})},W.next=function(){!T&&y[1]&&(K.loop||y[Q+1])&&(Q=$(1),W.load())},W.prev=function(){!T&&y[1]&&(K.loop||Q)&&(Q=$(-1),W.load())},W.close=function(){S&&!U&&(U=!0,S=!1,bc(k,K.onCleanup),z.unbind("."+f+" ."+p),q.fadeTo(200,0),r.stop().fadeTo(300,0,function(){r.add(q).css({opacity:1,cursor:"auto"}).hide(),bc(m),A.remove(),setTimeout(function(){U=!1,bc(l,K.onClosed)},1)}))},W.remove=function(){a([]).add(r).add(q).remove(),r=null,a("."+g).removeData(e).removeClass(g).die()},W.element=function(){return a(P)},W.settings=d})(jQuery,document,this); -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "automattic/developer", 3 | "type": "wordpress-plugin", 4 | "license": "GPL-2.0+", 5 | "description": "A plugin, which helps WordPress developers develop.", 6 | "homepage": "https://wordpress.org/plugins/developer/", 7 | "keywords": [ 8 | "develop", "wordpress", "wp" 9 | ], 10 | "support": { 11 | "issues": "https://github.com/Automattic/developer/issues" 12 | }, 13 | "require": { 14 | "composer/installers": "~1.0" 15 | }, 16 | "extra": { 17 | "branch-alias": { 18 | "dev-master": "1.x-dev" 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /developer.css: -------------------------------------------------------------------------------- 1 | .a8c-developer-dialog { 2 | margin: 25px; 3 | } 4 | 5 | .a8c-developer-dialog .recommended-plugins td { 6 | vertical-align: top; 7 | padding-bottom: 10px; 8 | } 9 | 10 | .a8c-developer-active { 11 | font-weight: bold; 12 | color: green; 13 | } 14 | 15 | .a8c-developer-notactive { 16 | font-weight: bold; 17 | color: maroon; 18 | } 19 | 20 | .a8c-developer-action-result.error { 21 | color: red; 22 | font-style: italic; 23 | padding-left: 5px; 24 | } -------------------------------------------------------------------------------- /developer.js: -------------------------------------------------------------------------------- 1 | function a8c_developer_lightbox() { 2 | (function($){ 3 | function make_colorbox( href, transition ) { 4 | $.colorbox({ 5 | inline: true, 6 | href: href, 7 | title: a8c_developer_i18n.lightbox_title, 8 | innerWidth: 650, 9 | maxHeight: '100%', 10 | transition: transition 11 | }); 12 | } 13 | 14 | make_colorbox( '#a8c-developer-setup-dialog-step-1', 'none' ); 15 | 16 | $('#a8c-developer-setup-dialog-step-1-form').submit( function(e) { 17 | var form = this; 18 | 19 | $('#a8c-developer-setup-dialog-step-1-submit').val( a8c_developer_i18n.saving ); 20 | 21 | if ( 'yes' != a8c_developer_i18n.go_to_step_2 ) 22 | return; 23 | 24 | e.preventDefault(); 25 | 26 | $.post( ajaxurl, $(form).serialize() ) 27 | .success( function( result ) { 28 | // If there was an error with the AJAX save, then do a normal POST 29 | if ( '-1' == result ) { 30 | location.href = 'options-general.php?page=' + a8c_developer_i18n.settings_slug + '&a8cdev_errorsaving=1'; 31 | return; 32 | } 33 | 34 | // AJAX says no step 2 needed, so head to the settings page 35 | if ( 'redirect' == result ) { 36 | location.href = 'options-general.php?page=' + a8c_developer_i18n.settings_slug + '&updated=1'; 37 | return; 38 | } 39 | 40 | // Display the AJAX reponse 41 | $('#a8c-developer-setup-dialog-step-2').html( result ); 42 | make_colorbox( '#a8c-developer-setup-dialog-step-2' ); 43 | }) 44 | ; 45 | }); 46 | })(jQuery); 47 | } 48 | 49 | function a8c_developer_bind_events() { 50 | (function($){ 51 | $('.a8c-developer-button-install').click( function() { 52 | var button = this; 53 | 54 | $(button).html( a8c_developer_i18n.installing ); 55 | 56 | $.post( ajaxurl, { 57 | 'action': 'a8c_developer_install_plugin', 58 | '_ajax_nonce': $(button).attr('data-nonce'), 59 | 'plugin_slug': $(button).attr('data-pluginslug') 60 | } ) 61 | .success( function( result ) { 62 | if ( '1' === result ) { 63 | $( button ) 64 | .html( a8c_developer_i18n.installed ) 65 | .nextAll( '.a8c-developer-action-result' ) 66 | .remove(); 67 | 68 | $(button).unbind('click').prop('disabled', true); 69 | } else { 70 | $( button ) 71 | .html( a8c_developer_i18n.ERROR ) 72 | .nextAll( '.a8c-developer-action-result' ) 73 | .remove(); 74 | 75 | $( button ).after( '' + result + '' ); 76 | } 77 | }) 78 | .error( function( response ) { 79 | $( button ) 80 | .html( a8c_developer_i18n.ERROR ) 81 | .nextAll( '.a8c-developer-action-result' ) 82 | .remove(); 83 | 84 | $( button ).after( '' + response.statusText + ': ' + response.responseText + '' ); 85 | }) 86 | ; 87 | }); 88 | 89 | $('.a8c-developer-button-activate').click( function() { 90 | var button = this; 91 | 92 | $(button).html( a8c_developer_i18n.activating ); 93 | 94 | $.post( ajaxurl, { 95 | 'action': 'a8c_developer_activate_plugin', 96 | '_ajax_nonce': $(button).attr('data-nonce'), 97 | 'path': $(button).attr('data-path') 98 | } ) 99 | .success( function( result ) { 100 | if ( '1' === result ) { 101 | $( button ) 102 | .html( a8c_developer_i18n.activated ) 103 | .nextAll( '.a8c-developer-action-result' ) 104 | .remove(); 105 | 106 | $(button).unbind('click').prop('disabled', true); 107 | } else { 108 | $( button ) 109 | .html( a8c_developer_i18n.ERROR ) 110 | .nextAll( '.a8c-developer-action-result' ) 111 | .remove(); 112 | 113 | $( button ).after( '' + result + '' ); 114 | } 115 | }) 116 | .error( function( response ) { 117 | $( button ) 118 | .html( a8c_developer_i18n.ERROR ) 119 | .nextAll( '.a8c-developer-action-result' ) 120 | .remove(); 121 | 122 | $( button ).after( '' + response.statusText + ': ' + response.responseText + '' ); 123 | }) 124 | ; 125 | }); 126 | 127 | $( '.a8c-developer-button-close' ).on( 'click', function() { 128 | $.colorbox.close(); 129 | }); 130 | })(jQuery); 131 | } 132 | 133 | function a8c_developer_bind_settings_events() { 134 | (function($){ 135 | $('.a8c-developer-button-install').click( function() { 136 | var button = this; 137 | 138 | $(button).html( a8c_developer_i18n.installing ); 139 | 140 | $.post( ajaxurl, { 141 | 'action': 'a8c_developer_install_plugin', 142 | '_ajax_nonce': $(button).attr('data-nonce'), 143 | 'plugin_slug': $(button).attr('data-pluginslug') 144 | } ) 145 | .success( function( result ) { 146 | if ( '1' == result ) { 147 | $( button ) 148 | .nextAll( '.a8c-developer-action-result' ) 149 | .remove(); 150 | 151 | $( button ).replaceWith( "" + a8c_developer_i18n.ACTIVE + "" ); 152 | } else { 153 | $( button ) 154 | .html( a8c_developer_i18n.ERROR ) 155 | .nextAll( '.a8c-developer-action-result' ) 156 | .remove(); 157 | 158 | $( button ).after( '' + result + '' ); 159 | } 160 | }) 161 | .error( function( response ) { 162 | $( button ) 163 | .html( a8c_developer_i18n.ERROR ) 164 | .nextAll( '.a8c-developer-action-result' ) 165 | .remove(); 166 | 167 | $( button ).after( '' + response.statusText + ': ' + response.responseText + '' ); 168 | }) 169 | ; 170 | 171 | return false; 172 | }); 173 | 174 | $('.a8c-developer-button-activate').click( function() { 175 | var button = this; 176 | 177 | $(button).html( a8c_developer_i18n.activating ); 178 | 179 | $.post( ajaxurl, { 180 | 'action': 'a8c_developer_activate_plugin', 181 | '_ajax_nonce': $(button).attr('data-nonce'), 182 | 'path': $(button).attr('data-path') 183 | } ) 184 | .success( function( result ) { 185 | if ( '1' == result ) { 186 | $( button ) 187 | .nextAll( '.a8c-developer-action-result' ) 188 | .remove(); 189 | 190 | $( button ).replaceWith( "" + a8c_developer_i18n.ACTIVE + "" ); 191 | } else { 192 | $( button ) 193 | .html( a8c_developer_i18n.ERROR ) 194 | .nextAll( '.a8c-developer-action-result' ) 195 | .remove(); 196 | 197 | $( button ).after( '' + result + '' ); 198 | } 199 | }) 200 | .error( function( response ) { 201 | $( button ) 202 | .html( a8c_developer_i18n.ERROR ) 203 | .nextAll( '.a8c-developer-action-result' ) 204 | .remove(); 205 | 206 | $( button ).after( '' + response.statusText + ': ' + response.responseText + '' ); 207 | 208 | }) 209 | ; 210 | 211 | return false; 212 | }); 213 | })(jQuery); 214 | } -------------------------------------------------------------------------------- /developer.php: -------------------------------------------------------------------------------- 1 | $var ) ) ? $this->$var : null; 61 | } 62 | 63 | public function init() { 64 | 65 | $this->default_settings = array( 66 | 'project_type' => false, 67 | ); 68 | 69 | $this->settings = wp_parse_args( (array) get_option( self::OPTION ), $this->default_settings ); 70 | } 71 | 72 | public function admin_init() { 73 | if ( ! empty( $_GET['developer_plugin_reset'] ) && current_user_can( 'manage_options' ) ) { 74 | delete_option( self::OPTION ); 75 | } 76 | 77 | $this->recommended_plugins = array( 78 | 'debug-bar' => array( 79 | 'project_type' => 'all', 80 | 'name' => esc_html__( 'Debug Bar', 'a8c-developer' ), 81 | 'active' => class_exists( 'Debug_Bar' ), 82 | ), 83 | 'debug-bar-console' => array( 84 | 'project_type' => 'all', 85 | 'name' => esc_html__( 'Debug Bar Console', 'a8c-developer' ), 86 | 'active' => function_exists( 'debug_bar_console_panel' ), 87 | ), 88 | 'debug-bar-cron' => array( 89 | 'project_type' => 'all', 90 | 'name' => esc_html__( 'Debug Bar Cron', 'a8c-developer' ), 91 | 'active' => function_exists( 'zt_add_debug_bar_cron_panel' ), 92 | ), 93 | 'debug-bar-extender' => array( 94 | 'project_type' => 'all', 95 | 'name' => esc_html__( 'Debug Bar Extender', 'a8c-developer' ), 96 | 'active' => class_exists( 'Debug_Bar_Extender' ), 97 | ), 98 | 'rewrite-rules-inspector' => array( 99 | 'project_type' => 'all', 100 | 'name' => esc_html__( 'Rewrite Rules Inspector', 'a8c-developer' ), 101 | 'active' => class_exists( 'Rewrite_Rules_Inspector' ), 102 | ), 103 | 'log-deprecated-notices' => array( 104 | 'project_type' => 'all', 105 | 'name' => esc_html__( 'Log Deprecated Notices', 'a8c-developer' ), 106 | 'active' => class_exists( 'Deprecated_Log' ), 107 | ), 108 | 'log-viewer' => array( 109 | 'project_type' => 'all', 110 | 'name' => esc_html__( 'Log Viewer', 'a8c-developer' ), 111 | 'active' => class_exists( 'ciLogViewer' ), 112 | ), 113 | 'vip-scanner' => array( 114 | 'project_type' => 'wpcom-vip', 115 | 'name' => esc_html__( 'VIP Scanner', 'a8c-developer' ), 116 | 'active' => class_exists( 'VIP_Scanner' ), 117 | ), 118 | 'jetpack' => array( 119 | 'project_type' => 'wpcom-vip', 120 | 'name' => esc_html__( 'Jetpack', 'a8c-developer' ), 121 | 'active' => class_exists( 'Jetpack' ), 122 | ), 123 | 'polldaddy' => array( 124 | 'project_type' => 'wpcom-vip', 125 | 'name' => esc_html__( 'Polldaddy Polls & Ratings', 'a8c-developer' ), 126 | 'active' => class_exists( 'WP_Polldaddy' ), 127 | ), 128 | 'monster-widget' => array( 129 | 'project_type' => 'all', 130 | 'name' => esc_html__( 'Monster Widget', 'a8c-developer' ), 131 | 'active' => class_exists( 'Monster_Widget' ), 132 | ), 133 | 'user-switching' => array( 134 | 'project_type' => 'all', 135 | 'name' => esc_html__( 'User Switching', 'a8c-developer' ), 136 | 'active' => class_exists( 'user_switching' ), 137 | ), 138 | 'piglatin' => array( 139 | 'project_type' => array( 'wporg-theme', 'wporg' ), 140 | 'name' => esc_html__( 'Pig Latin', 'a8c-developer' ), 141 | 'active' => class_exists( 'PigLatin' ), 142 | ), 143 | 144 | // Theme Developer 145 | 'rtl-tester' => array( 146 | 'project_type' => 'wporg-theme', 147 | 'name' => esc_html__( 'RTL Tester', 'a8c-developer' ), 148 | 'active' => class_exists( 'RTLTester' ), 149 | ), 150 | 'regenerate-thumbnails' => array( 151 | 'project_type' => 'wporg-theme', 152 | 'name' => esc_html__( 'Regenerate Thumbnails', 'a8c-developer' ), 153 | 'active' => class_exists( 'RegenerateThumbnails' ), 154 | ), 155 | 'simply-show-ids' => array( 156 | 'project_type' => 'wporg-theme', 157 | 'name' => esc_html__( 'Simply Show IDs', 'a8c-developer' ), 158 | 'active' => function_exists( 'ssid_add' ), 159 | ), 160 | 'theme-test-drive' => array( 161 | 'project_type' => 'wporg-theme', 162 | 'name' => esc_html__( 'Theme Test Drive', 'a8c-developer' ), 163 | 'active' => function_exists( 'TTD_filters' ), 164 | 'filename' => 'themedrive.php', 165 | ), 166 | 'theme-check' => array( 167 | 'project_type' => 'wporg-theme', 168 | 'name' => esc_html__( 'Theme Check', 'a8c-developer' ), 169 | 'active' => class_exists( 'ThemeCheckMain' ), 170 | ), 171 | ); 172 | 173 | if ( ! self::is_dev_version() ) { 174 | $this->recommended_plugins['wordpress-beta-tester'] = array( 175 | 'project_type' => 'all', 176 | 'name' => esc_html__( 'Beta Tester', 'a8c-developer' ), 177 | 'active' => class_exists( 'wp_beta_tester' ), 178 | 'filename' => 'wp-beta-tester.php', 179 | ); 180 | } 181 | 182 | $this->recommended_constants = array( 183 | 'WP_DEBUG' => array( 184 | 'project_type' => 'all', 185 | 'description' => __( 'Enables debug mode which helps identify and resolve issues', 'a8c-developer' ) 186 | ), 187 | 'SAVEQUERIES' => array( 188 | 'project_type' => 'all', 189 | 'description' => esc_html__( 'Logs database queries to an array so you can review them. The Debug Bar plugin will list out database queries if you set this constant.', 'a8c-developer' ) 190 | ), 191 | 'JETPACK_DEV_DEBUG' => array( 192 | 'project_type' => 'wpcom-vip', 193 | 'description' => __( 'Enables Development Mode in Jetpack for testing features without a connection to WordPress.com.', 'a8c-developer' ) 194 | ) 195 | ); 196 | 197 | register_setting( self::OPTION, self::OPTION, array( $this, 'settings_validate' ) ); 198 | 199 | wp_register_script( 'a8c-developer', plugins_url( 'developer.js', __FILE__ ), array( 'jquery' ), self::VERSION ); 200 | $strings = array( 201 | 'settings_slug' => self::PAGE_SLUG, 202 | 'go_to_step_2' => ( current_user_can( 'install_plugins' ) && current_user_can( 'activate_plugins' ) && 'direct' == get_filesystem_method() ) ? 'yes' : 'no', 203 | 'lightbox_title' => __( 'Developer: Plugin Setup', 'a8c-developer' ), 204 | 'saving' => __( 'Saving...', 'a8c-developer' ), 205 | 'installing' => ' ' . esc_html__( 'Installing...', 'a8c-developer' ), 206 | 'installed' => __( 'Installed', 'a8c-developer' ), 207 | 'activating' => ' ' . esc_html__( 'Activating...', 'a8c-developer' ), 208 | 'activated' => __( 'Activated', 'a8c-developer' ), 209 | 'error' => __( 'Error!', 'a8c-developer' ), 210 | 'ACTIVE' => __( 'ACTIVE', 'a8c-developer' ), 211 | 'INSTALLED' => __( 'INSTALLED', 'a8c-developer' ), 212 | 'ERROR' => __( 'ERROR!', 'a8c-developer' ), 213 | ); 214 | wp_localize_script( 'a8c-developer', 'a8c_developer_i18n', $strings ); 215 | 216 | wp_register_style( 'a8c-developer', plugins_url( 'developer.css', __FILE__ ), array(), self::VERSION ); 217 | 218 | // Handle the submission of the lightbox form if step 2 won't be shown 219 | if ( ! empty( $_POST['action'] ) && 'a8c_developer_lightbox_step_1' == $_POST['action'] && ! empty( $_POST['a8c_developer_project_type'] ) && check_admin_referer( 'a8c_developer_lightbox_step_1' ) ) { 220 | $this->save_project_type( $_POST['a8c_developer_project_type'] ); 221 | add_settings_error( 'general', 'settings_updated', __( 'Settings saved.' ), 'updated' ); 222 | } 223 | 224 | if ( ! get_option( self::OPTION ) ) { 225 | if ( ! empty( $_GET['a8cdev_errorsaving'] ) ) { 226 | add_settings_error( self::PAGE_SLUG, self::PAGE_SLUG . '_error_saving', __( 'Error saving settings. Please try again.', 'a8c-developer' ) ); 227 | } elseif ( ! is_network_admin() && current_user_can( 'manage_options' ) ) { 228 | add_action( 'admin_enqueue_scripts', array( $this, 'load_lightbox_scripts_and_styles' ) ); 229 | add_action( 'admin_footer', array( $this, 'output_setup_box_html' ) ); 230 | } 231 | } 232 | } 233 | 234 | public function register_settings_page() { 235 | add_management_page( esc_html__( 'Developer Helper', 'a8c-developer' ), esc_html__( 'Developer', 'a8c-developer' ), 'manage_options', self::PAGE_SLUG, array( $this, 'settings_page' ) ); 236 | } 237 | 238 | public function add_node_to_admin_bar( $wp_admin_bar ) { 239 | 240 | if ( !current_user_can( 'manage_options' ) ) 241 | return; 242 | 243 | $wp_admin_bar->add_node( array( 244 | 'id' => self::PAGE_SLUG, 245 | 'title' => esc_html__( 'Developer', 'a8c-developer' ), 246 | 'parent' => 'top-secondary', // Off on the right side 247 | 'href' => admin_url( 'tools.php?page=' . self::PAGE_SLUG ), 248 | 'meta' => array( 249 | 'title' => esc_html__( 'View the Developer Helper settings and status page', 'a8c-developer' ), 250 | ), 251 | ) ); 252 | } 253 | 254 | public function load_settings_page_script_and_style( $hook_suffix ) { 255 | if ( 'tools_page_' . self::PAGE_SLUG != $hook_suffix ) 256 | return; 257 | 258 | wp_enqueue_script( 'a8c-developer' ); 259 | wp_enqueue_style( 'a8c-developer' ); 260 | } 261 | 262 | public function load_lightbox_scripts_and_styles() { 263 | wp_enqueue_script( 'colorbox', plugins_url( 'colorbox/jquery.colorbox-min.js', __FILE__ ), array( 'jquery' ), '1.3.19' ); 264 | wp_enqueue_style( 'a8c-developer-colorbox', plugins_url( 'colorbox/colorbox.css', __FILE__ ), array(), '1.3.19' ); 265 | 266 | wp_enqueue_script( 'a8c-developer' ); 267 | wp_enqueue_style( 'a8c-developer' ); 268 | } 269 | 270 | public function output_setup_box_html() { 271 | ?> 272 | 273 |
274 |
275 | 276 | 277 |

278 | 279 |
280 | 281 | 282 | 283 | 284 | get_project_types() as $project_slug => $project_description ) : ?> 285 | 286 |

287 | 291 |

292 | 293 | 294 | 295 |
296 |
297 |
298 | 299 |
300 |
301 | 302 | 303 | save_project_type( $_POST['a8c_developer_project_type'] ); 317 | 318 | $to_install_or_enable = 0; 319 | 320 | $recommended_plugins = $this->get_recommended_plugins(); 321 | 322 | foreach ( $recommended_plugins as $plugin_slug => $plugin_details ) { 323 | if ( ! $plugin_details['active'] ) { 324 | $to_install_or_enable++; 325 | } 326 | } 327 | 328 | // If no plugins to take action on, head to the settings page 329 | if ( ! $to_install_or_enable ) 330 | die( 'redirect' ); 331 | 332 | echo '' . esc_html__( 'Plugins', 'a8c-developer' ) . ''; 333 | 334 | echo '

' . esc_html__( 'We recommend that you also install and activate the following plugins:', 'a8c-developer' ) . '

'; 335 | 336 | echo ''; 337 | 338 | foreach ( $recommended_plugins as $plugin_slug => $plugin_details ) { 339 | if ( $plugin_details['active'] ) 340 | continue; 341 | 342 | echo ''; 343 | 344 | $details = $this->get_plugin_details( $plugin_slug ); 345 | 346 | if ( is_wp_error( $details ) ) 347 | $details = array(); 348 | 349 | $plugin_details = array_merge( (array) $details, array( 'slug' => $plugin_slug ), $plugin_details ); 350 | 351 | echo ''; 352 | 353 | echo ''; 367 | 368 | echo ''; 369 | } 370 | 371 | echo ''; 372 | 373 | echo ''; 374 | 375 | echo ''; 376 | 377 | exit(); 378 | 379 | case 'a8c_developer_install_plugin': 380 | if ( empty( $_POST['plugin_slug'] ) ) 381 | die( __( 'ERROR: No slug was passed to the AJAX callback.', 'a8c-developer' ) ); 382 | 383 | check_ajax_referer( 'a8c_developer_install_plugin_' . $_POST['plugin_slug'] ); 384 | 385 | if ( ! current_user_can( 'install_plugins' ) || ! current_user_can( 'activate_plugins' ) ) 386 | die( __( 'ERROR: You lack permissions to install and/or activate plugins.', 'a8c-developer' ) ); 387 | 388 | include_once ( ABSPATH . 'wp-admin/includes/plugin-install.php' ); 389 | 390 | $api = plugins_api( 'plugin_information', array( 'slug' => $_POST['plugin_slug'], 'fields' => array( 'sections' => false ) ) ); 391 | 392 | if ( is_wp_error( $api ) ) 393 | die( sprintf( __( 'ERROR: Error fetching plugin information: %s', 'a8c-developer' ), $api->get_error_message() ) ); 394 | 395 | $upgrader = new Plugin_Upgrader( new Automattic_Developer_Empty_Upgrader_Skin( array( 396 | 'nonce' => 'install-plugin_' . $_POST['plugin_slug'], 397 | 'plugin' => $_POST['plugin_slug'], 398 | 'api' => $api, 399 | ) ) ); 400 | 401 | $install_result = $upgrader->install( $api->download_link ); 402 | 403 | if ( ! $install_result || is_wp_error( $install_result ) ) { 404 | // $install_result can be false if the file system isn't writeable. 405 | $error_message = __( 'Please ensure the file system is writeable', 'a8c-developer' ); 406 | 407 | if ( is_wp_error( $install_result ) ) 408 | $error_message = $install_result->get_error_message(); 409 | 410 | die( sprintf( __( 'ERROR: Failed to install plugin: %s', 'a8c-developer' ), $error_message ) ); 411 | } 412 | 413 | $activate_result = activate_plugin( $this->get_path_for_recommended_plugin( $_POST['plugin_slug'] ) ); 414 | 415 | if ( is_wp_error( $activate_result ) ) 416 | die( sprintf( __( 'ERROR: Failed to activate plugin: %s', 'a8c-developer' ), $activate_result->get_error_message() ) ); 417 | 418 | exit( '1' ); 419 | 420 | case 'a8c_developer_activate_plugin': 421 | if ( empty( $_POST['path'] ) ) 422 | die( __( 'ERROR: No slug was passed to the AJAX callback.', 'a8c-developer' ) ); 423 | 424 | check_ajax_referer( 'a8c_developer_activate_plugin_' . $_POST['path'] ); 425 | 426 | if ( ! current_user_can( 'activate_plugins' ) ) 427 | die( __( 'ERROR: You lack permissions to activate plugins.', 'a8c-developer' ) ); 428 | 429 | $activate_result = activate_plugin( $_POST['path'] ); 430 | 431 | if ( is_wp_error( $activate_result ) ) 432 | die( sprintf( __( 'ERROR: Failed to activate plugin: %s', 'a8c-developer' ), $activate_result->get_error_message() ) ); 433 | 434 | exit( '1' ); 435 | } 436 | 437 | // Unknown action 438 | die( '-1' ); 439 | } 440 | 441 | public function settings_page() { 442 | add_settings_section( 'a8c_developer_main', esc_html__( 'Main Configuration', 'a8c-developer' ), '__return_false', self::PAGE_SLUG . '_settings' ); 443 | add_settings_field( 'a8c_developer_project_type', esc_html__( 'Project Type', 'a8c-developer' ), array( $this, 'settings_field_radio' ), self::PAGE_SLUG . '_settings', 'a8c_developer_main', array( 444 | 'name' => 'project_type', 445 | 'description' => '', 446 | 'options' => $this->get_project_types(), 447 | ) ); 448 | 449 | echo ''; 454 | 455 | // Plugins 456 | add_settings_section( 'a8c_developer_plugins', esc_html__( 'Plugins', 'a8c-developer' ), array( $this, 'settings_section_plugins' ), self::PAGE_SLUG . '_status' ); 457 | 458 | wp_enqueue_script( 'plugin-install' ); 459 | 460 | add_thickbox(); 461 | 462 | $recommended_plugins = $this->get_recommended_plugins(); 463 | 464 | foreach ( $recommended_plugins as $plugin_slug => $plugin_details ) { 465 | $details = $this->get_plugin_details( $plugin_slug ); 466 | 467 | if ( is_wp_error( $details ) ) 468 | $details = array(); 469 | 470 | $plugin_details = array_merge( (array) $details, array( 'slug' => $plugin_slug ), $plugin_details ); 471 | 472 | $label = '' . esc_html( $plugin_details['name'] ) . ''; 473 | 474 | $label .= '
' . __( 'Details' ) . ''; 477 | 478 | add_settings_field( 'a8c_developer_plugin_' . $plugin_slug, $label, array( $this, 'settings_field_plugin' ), self::PAGE_SLUG . '_status', 'a8c_developer_plugins', $plugin_details ); 479 | } 480 | 481 | // Constants 482 | add_settings_section( 'a8c_developer_constants', esc_html__( 'Constants', 'a8c-developer' ), array( $this, 'settings_section_constants' ), self::PAGE_SLUG . '_status' ); 483 | 484 | $recommended_constants = $this->get_recommended_constants(); 485 | 486 | foreach ( $recommended_constants as $constant => $constant_details ) { 487 | add_settings_field( 'a8c_developer_constant_' . $constant, $constant, array( $this, 'settings_field_constant' ), self::PAGE_SLUG . '_status', 'a8c_developer_constants', array( 488 | 'constant' => $constant, 489 | 'description' => $constant_details['description'], 490 | ) ); 491 | } 492 | 493 | // Settings 494 | add_settings_section( 'a8c_developer_settings', esc_html__( 'Settings', 'a8c-developer' ), array( $this, 'settings_section_settings' ), self::PAGE_SLUG . '_status' ); 495 | add_settings_field( 'a8c_developer_setting_permalink_structure', esc_html__( 'Pretty Permalinks', 'a8c-developer' ), array( $this, 'settings_field_setting_permalink_structure' ), self::PAGE_SLUG . '_status', 'a8c_developer_settings' ); 496 | if ( 'wpcom-vip' == $this->settings['project_type'] ) { 497 | add_settings_field( 'a8c_developer_setting_development_version', esc_html__( 'Development Version', 'a8c-developer' ), array( $this, 'settings_field_setting_development_version' ), self::PAGE_SLUG . '_status', 'a8c_developer_settings' ); 498 | add_settings_field( 'a8c_developer_setting_shared_plugins', esc_html__( 'Shared Plugins', 'a8c-developer' ), array( $this, 'settings_field_setting_shared_plugins' ), self::PAGE_SLUG . '_status', 'a8c_developer_settings' ); 499 | } 500 | 501 | // Resources 502 | add_settings_section( 'a8c_developer_resources', esc_html__( 'Resources', 'a8c-developer' ), array( $this, 'settings_section_resources' ), self::PAGE_SLUG . '_status' ); 503 | 504 | add_settings_field( 'a8c_developer_setting_codex', esc_html__( 'Codex', 'a8c-developer' ), array( $this, 'settings_field_setting_resource_codex' ), self::PAGE_SLUG . '_status', 'a8c_developer_resources' ); 505 | 506 | if ( 'wpcom-vip' == $this->settings['project_type'] ) 507 | add_settings_field( 'a8c_developer_setting_vip_docs', esc_html__( 'VIP Docs', 'a8c-developer' ), array( $this, 'settings_field_setting_resource_vip_docs' ), self::PAGE_SLUG . '_status', 'a8c_developer_resources' ); 508 | 509 | if ( in_array( $this->settings['project_type'], array( 'wporg-theme', 'wpcom-vip' ) ) ) 510 | add_settings_field( 'a8c_developer_setting_starter_themes', esc_html__( 'Starter Themes', 'a8c-developer' ), array( $this, 'settings_field_setting_resource_starter_themes' ), self::PAGE_SLUG . '_status', 'a8c_developer_resources' ); 511 | 512 | # Add more sections and fields here as needed 513 | ?> 514 | 515 |
516 | 517 | 518 | 519 |

520 | 521 |
522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 |
531 | 532 |
533 | settings[ $args['name'] ] ) ) ? $this->settings[ $args['name'] ] : ''; 541 | 542 | foreach ( (array) $args['options'] as $value => $label ) 543 | echo '

'; 544 | 545 | if ( ! empty( $args['description'] ) ) 546 | echo '

' . $args['description'] . '

'; 547 | } 548 | 549 | public function settings_field_select( $args ) { 550 | if ( empty( $args['name'] ) || ! is_array( $args['options'] ) ) 551 | return false; 552 | 553 | $selected = ( isset( $this->settings[ $args['name'] ] ) ) ? $this->settings[ $args['name'] ] : ''; 554 | 555 | echo ''; 561 | 562 | if ( ! empty( $args['description'] ) ) 563 | echo '

' . $args['description'] . '

'; 564 | } 565 | 566 | public function settings_section_plugins() { 567 | echo '

' . esc_html__( 'We recommend you have the following plugins installed:', 'a8c-developer' ) . '

'; 568 | } 569 | 570 | public function settings_field_plugin( $args ) { 571 | if ( $args['active'] ) { 572 | echo '' . esc_html__( 'ACTIVE', 'a8c-developer' ) . ''; 573 | } elseif ( $this->is_recommended_plugin_installed( $args['slug'] ) ) { 574 | // Needs to be activated 575 | if ( current_user_can('activate_plugins') ) { 576 | $path = $this->get_path_for_recommended_plugin( $args['slug'] ); 577 | echo '' . esc_html__( 'INACTIVE', 'a8c-developer' ) . ' - ' . esc_html__( 'Click to Activate', 'a8c-developer' ) . ''; 578 | } else { 579 | echo '' . esc_html__( 'INACTIVE', 'a8c-developer' ) . ''; 580 | } 581 | } else { 582 | // Needs to be installed 583 | if ( current_user_can('install_plugins') ) { 584 | echo '' . esc_html__( 'NOT INSTALLED', 'a8c-developer' ) . ' - ' . esc_html__( 'Click to Install', 'a8c-developer' ) . ''; 585 | } else { 586 | echo '' . esc_html__( 'NOT INSTALLED', 'a8c-developer' ) . ''; 587 | } 588 | } 589 | 590 | if ( ! empty( $args['short_description'] ) ) 591 | echo '
' . $args['short_description'] . ''; 592 | } 593 | 594 | public function settings_section_constants() { 595 | echo '

' . __( 'We recommend you set the following constants to true in your wp-config.php file. Need help?', 'a8c-developer' ) . '

'; 596 | } 597 | 598 | public function settings_field_constant( $args ) { 599 | if ( defined( $args['constant'] ) && constant( $args['constant'] ) ) { 600 | echo '' . esc_html__( 'SET', 'a8c-developer' ) . ''; 601 | } else { 602 | echo '' . esc_html__( 'NOT SET', 'a8c-developer' ) . ''; 603 | } 604 | 605 | if ( ! empty( $args['description'] ) ) 606 | echo '
' . $args['description'] . ''; 607 | } 608 | 609 | 610 | public function settings_section_settings() { 611 | echo '

' . esc_html__( 'We recommend the following settings and configurations.', 'a8c-developer' ) . '

'; 612 | } 613 | 614 | public function settings_field_setting_permalink_structure() { 615 | if ( get_option( 'permalink_structure' ) ) { 616 | echo '' . esc_html__( 'ENABLED', 'a8c-developer' ) . ''; 617 | } else { 618 | echo '' . esc_html__( 'DISABLED', 'a8c-developer' ) . ' ' . __( 'Need help?', 'a8c-developer' ); 619 | } 620 | } 621 | 622 | public function settings_field_setting_development_version() { 623 | if ( self::is_dev_version() ) { 624 | echo '' . esc_html__( 'ENABLED', 'a8c-developer' ) . ''; 625 | } else { 626 | echo '' . esc_html__( 'DISABLED', 'a8c-developer' ) . ''; 627 | } 628 | } 629 | 630 | public function settings_field_setting_shared_plugins() { 631 | if ( file_exists( WP_CONTENT_DIR . '/themes/vip' ) && file_exists( WP_CONTENT_DIR . '/themes/vip/plugins' ) ) { 632 | echo '' . esc_html__( 'ENABLED', 'a8c-developer' ) . ''; 633 | } else { 634 | echo '' . esc_html__( 'DISABLED', 'a8c-developer' ) . ''; 635 | } 636 | } 637 | 638 | public function settings_section_resources() {} 639 | 640 | public function settings_field_setting_resource_codex() { 641 | _e( "The Developer Documentation section of the Codex offers guidelines and references for anyone wishing to modify, extend, or contribute to WordPress.", 'a8c-developer' ); 642 | } 643 | 644 | public function settings_field_setting_resource_vip_docs() { 645 | _e( "The VIP Documentation is a technical resource for developing sites on WordPress.com including best practices and helpful tips to help you code better, faster, and stronger.", 'a8c-developer' ); 646 | } 647 | 648 | public function settings_field_setting_resource_starter_themes() { 649 | _e( "_s (or underscores): a starter theme meant for hacking that will give you a \"1000-Hour Head Start\". Use it to create the next, most awesome WordPress theme out there.", 'a8c-developer' ); 650 | } 651 | 652 | public function settings_validate( $raw_settings ) { 653 | $settings = array(); 654 | 655 | $project_type_slugs = array_keys( $this->get_project_types() ); 656 | if ( empty( $raw_settings['project_type'] ) || ! in_array( $raw_settings['project_type'], $project_type_slugs ) ) 657 | $settings['project_type'] = current( $project_type_slugs ); 658 | else 659 | $settings['project_type'] = $raw_settings['project_type']; 660 | 661 | return $settings; 662 | } 663 | 664 | public function save_project_type( $type ) { 665 | $settings = $this->settings; 666 | $settings['project_type'] = $type; 667 | 668 | $this->settings = $this->settings_validate( $settings ); 669 | 670 | update_option( self::OPTION, $this->settings ); 671 | } 672 | 673 | public function get_path_for_recommended_plugin( $slug ) { 674 | $filename = ( ! empty( $this->recommended_plugins[$slug]['filename'] ) ) ? $this->recommended_plugins[$slug]['filename'] : $slug . '.php'; 675 | 676 | return $slug . '/' . $filename; 677 | } 678 | 679 | public function is_recommended_plugin_active( $slug ) { 680 | if ( empty( $this->recommended_plugins[$slug] ) ) 681 | return false; 682 | 683 | return $this->recommended_plugins[$slug]['active']; 684 | } 685 | 686 | public function is_recommended_plugin_installed( $slug ) { 687 | if ( empty( $this->recommended_plugins[$slug] ) ) 688 | return false; 689 | 690 | if ( $this->is_recommended_plugin_active( $slug ) || file_exists( WP_PLUGIN_DIR . '/' . $this->get_path_for_recommended_plugin( $slug ) ) ) 691 | return true; 692 | 693 | return false; 694 | } 695 | 696 | /** 697 | * Retrieve plugin information for a given $slug 698 | * 699 | * Note that this does not use plugins_api(), as the .org api does not return 700 | * short descriptions in POST requests (that api endpoint is different from this one) 701 | * 702 | * @param string $slug The plugin slug 703 | * @return object The response object containing plugin details 704 | */ 705 | public function get_plugin_details( $slug ){ 706 | $cache_key = md5( 'a8c_developer_plugin_details_' . $slug ); 707 | 708 | if ( false === ( $details = get_transient( $cache_key ) ) ) { 709 | $request = wp_remote_get( 'http://api.wordpress.org/plugins/info/1.0/' . esc_url( $slug ), array( 'timeout' => 15 ) ); 710 | 711 | if ( is_wp_error( $request ) ) { 712 | $details = new WP_Error('a8c_developer_plugins_api_failed', __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ), $request->get_error_message() ); 713 | } else { 714 | $details = maybe_unserialize( wp_remote_retrieve_body( $request ) ); 715 | 716 | if ( ! is_object( $details ) && ! is_array( $details ) ) 717 | $details = new WP_Error('a8c_developer_plugins_api_failed', __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ), wp_remote_retrieve_body( $request ) ); 718 | else 719 | set_transient( $cache_key, $details, WEEK_IN_SECONDS ); 720 | } 721 | } 722 | 723 | return $details; 724 | } 725 | 726 | /** 727 | * Return an array of all plugins recommended for the current project type 728 | * 729 | * Only returns plugins that have been recommended for the project type defined 730 | * in $this->settings['project_type'] 731 | * 732 | * @return array An array of plugins recommended for the current project type 733 | */ 734 | public function get_recommended_plugins() { 735 | return $this->get_recommended_plugins_by_type( $this->settings['project_type'] ); 736 | } 737 | 738 | /** 739 | * Return an array of all plugins recommended for the given project type 740 | * 741 | * @param string $type The project type to return plugins for 742 | * @return array An associative array of plugins for the project type 743 | */ 744 | public function get_recommended_plugins_by_type( $type ) { 745 | $plugins_by_type = array(); 746 | 747 | foreach( $this->recommended_plugins as $plugin_slug => $plugin_details ) { 748 | if ( ! $this->plugin_is_recommended_for_project_type( $plugin_slug, $type ) ) 749 | continue; 750 | 751 | $plugins_by_type[ $plugin_slug ] = $plugin_details; 752 | } 753 | 754 | return $plugins_by_type; 755 | } 756 | 757 | /** 758 | * Should the given plugin be recommended for the given project type? 759 | * 760 | * Determines whether or not a given $plugin_slug is recommended for a given $project_type 761 | * by checking the project types defined for it 762 | * 763 | * @param string $plugin_slug The plugin slug to check 764 | * @param string $project_type The project type to check the plugin against 765 | * @return bool Boolean indicating if the plugin is recommended for the project type 766 | */ 767 | public function plugin_is_recommended_for_project_type( $plugin_slug, $project_type = null ) { 768 | if ( null == $project_type ) 769 | $project_type = $this->settings['project_type']; 770 | 771 | $plugin_details = $this->recommended_plugins[ $plugin_slug ]; 772 | 773 | if ( 'all' == $plugin_details['project_type'] ) 774 | return true; 775 | 776 | return self::is_project_type( $plugin_details, $project_type ); 777 | } 778 | 779 | /** 780 | * Return an array of all constants recommended for the current project type 781 | * 782 | * Only returns constants that have been recommended for the project type defined 783 | * in $this->settings['project_type'] 784 | * 785 | * @return array An array of constants recommended for the current project type 786 | */ 787 | public function get_recommended_constants() { 788 | return $this->get_recommended_constants_by_type( $this->settings['project_type'] ); 789 | } 790 | 791 | /** 792 | * Return an array of all constants recommended for the given project type 793 | * 794 | * @param string $type The project type to return constants for 795 | * @return array An associative array of constants for the project type 796 | */ 797 | public function get_recommended_constants_by_type( $type ) { 798 | $constants_by_type = array(); 799 | 800 | foreach( $this->recommended_constants as $constant => $constant_details ) { 801 | if ( ! $this->constant_is_recommended_for_project_type( $constant, $type ) ) 802 | continue; 803 | 804 | $constants_by_type[ $constant ] = $constant_details; 805 | } 806 | 807 | return $constants_by_type; 808 | } 809 | 810 | /** 811 | * Should the given constant be recommended for the given project type? 812 | * 813 | * Determines whether or not a given $constant is recommended for a given $project_type 814 | * by checking the project types defined for it 815 | * 816 | * @param string $constant The constant to check 817 | * @param string $project_type The project type to check the constant against 818 | * @return bool Boolean indicating if the constant is recommended for the project type 819 | */ 820 | public function constant_is_recommended_for_project_type( $constant, $project_type = null ) { 821 | if ( null == $project_type ) 822 | $project_type = $this->settings['project_type']; 823 | 824 | $constant_details = $this->recommended_constants[ $constant ]; 825 | 826 | if ( 'all' == $constant_details['project_type'] ) 827 | return true; 828 | 829 | return self::is_project_type( $constant_details, $project_type ); 830 | } 831 | 832 | public function get_project_types() { 833 | return array( 834 | 'wporg' => __( 'Plugin for a self-hosted WordPress installation', 'a8c-developer' ), 835 | 'wporg-theme' => __( 'Theme for a self-hosted WordPress installation', 'a8c-developer' ), 836 | 'wpcom-vip' => __( 'Theme for a WordPress.com VIP site', 'a8c-developer' ), 837 | ); 838 | } 839 | 840 | private static function is_dev_version() { 841 | $cur = get_preferred_from_update_core(); 842 | return isset( $cur->response ) && $cur->response == 'development'; 843 | } 844 | 845 | private static function is_project_type( $project, $type ) { 846 | $project_type = $project['project_type']; 847 | 848 | if ( is_array( $project_type ) ) 849 | return in_array( $type, $project_type ); 850 | 851 | return $project_type == $type; 852 | } 853 | } 854 | 855 | $automattic_developer = new Automattic_Developer(); 856 | -------------------------------------------------------------------------------- /includes/class-empty-upgrader-skin.php: -------------------------------------------------------------------------------- 1 | 'web', 'url' => '', 'plugin' => '', 'nonce' => '', 'title' => '' ); 8 | $args = wp_parse_args( $args, $defaults ); 9 | 10 | $this->type = $args['type']; 11 | $this->api = isset( $args['api'] ) ? $args['api'] : array(); 12 | 13 | parent::__construct( $args ); 14 | } 15 | 16 | public function request_filesystem_credentials( $error = false, $context = false, $allow_relaxed_file_ownership = false ) { 17 | return true; 18 | } 19 | 20 | public function error( $errors ) { 21 | die( '-1' ); 22 | } 23 | 24 | public function header() {} 25 | public function footer() {} 26 | public function feedback( $string ) {} 27 | } 28 | -------------------------------------------------------------------------------- /includes/class-wp-cli-commands.php: -------------------------------------------------------------------------------- 1 | [--activate] 12 | */ 13 | function install_plugins( $args, $assoc_args ) { 14 | global $automattic_developer; 15 | 16 | // wp-cli doesn't fire admin_init since 0.11.2 17 | if (!did_action('admin_init')) { 18 | $automattic_developer->admin_init(); 19 | } 20 | 21 | $type = $assoc_args['type']; 22 | $activate = isset( $assoc_args['activate'] ) && $assoc_args['activate'] == "true"; 23 | 24 | $reco_plugins = $automattic_developer->recommended_plugins; 25 | $installed_plugins = array_keys( get_plugins() ); 26 | $types = array_keys( $automattic_developer->get_project_types() ); 27 | 28 | if ( in_array( $type, $types ) ) { 29 | $automattic_developer->save_project_type($type); 30 | 31 | foreach ( $reco_plugins as $slug => $plugin ) { 32 | $path = $automattic_developer->get_path_for_recommended_plugin( $slug ); 33 | $activate_plugin = $activate && ( 'all' == $plugin['project_type'] || $type == $plugin['project_type'] ); 34 | 35 | // Download the plugin if we don't already have it 36 | if ( ! in_array( $path, $installed_plugins ) ) 37 | WP_CLI::run_command( explode( " ", "plugin install $slug" ) ); 38 | 39 | // Install the plugin if --activate and it's the right type 40 | if ( is_plugin_inactive( $path ) && $activate_plugin ) { 41 | if ( NULL == activate_plugin( $path ) ) 42 | WP_CLI::success( "Activated " . $plugin['name'] ); 43 | } 44 | } 45 | } else { 46 | WP_CLI::error( "Specify a valid type to install: <" . implode( "|", $types ) . ">" ); 47 | } 48 | } 49 | 50 | } 51 | 52 | WP_CLI::add_command( 'developer', 'Developer_WP_CLI_Command' ); 53 | -------------------------------------------------------------------------------- /languages/a8c-developer-fr_FR.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automattic/developer/cff96e8acb44684db0fc167487314787de6a5098/languages/a8c-developer-fr_FR.mo -------------------------------------------------------------------------------- /languages/a8c-developer-fr_FR.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: Developer\n" 4 | "Report-Msgid-Bugs-To: http://wordpress.org/tag/developer\n" 5 | "POT-Creation-Date: 2013-01-13 22:21:53+00:00\n" 6 | "PO-Revision-Date: 2013-02-04 15:14+0100\n" 7 | "Last-Translator: FxB \n" 8 | "Language-Team: FxB \n" 9 | "Language: fr_FR\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "X-Poedit-KeywordsList: __;_e;esc_attr__;esc_attr_e;esc_html__;esc_html_e;_n;" 14 | "_x;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2\n" 15 | "X-Poedit-Basepath: ../\n" 16 | "X-Poedit-SourceCharset: UTF-8\n" 17 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 18 | "X-Generator: Poedit 1.5.4\n" 19 | "X-Poedit-SearchPath-0: .\n" 20 | 21 | #: developer.php:70 22 | msgid "Debug Bar" 23 | msgstr "Debug Bar" 24 | 25 | #: developer.php:75 26 | msgid "Debug Bar Cron" 27 | msgstr "Debug Bar Cron" 28 | 29 | #: developer.php:80 30 | msgid "Rewrite Rules Inspector" 31 | msgstr "Rewrite Rules Inspector" 32 | 33 | #: developer.php:85 34 | msgid "Log Deprecated Notices" 35 | msgstr "Log Deprecated Notices" 36 | 37 | #: developer.php:90 38 | msgid "VIP Scanner" 39 | msgstr "VIP Scanner" 40 | 41 | #: developer.php:102 42 | msgid "Grunion Contact Form" 43 | msgstr "Grunion Contact Form" 44 | 45 | #: developer.php:107 46 | msgid "Polldaddy Polls & Ratings" 47 | msgstr "Polldaddy Polls & Ratings" 48 | 49 | #: developer.php:112 50 | msgid "Monster Widget" 51 | msgstr "Monster Widget" 52 | 53 | #: developer.php:117 54 | msgid "User Switching" 55 | msgstr "User Switching" 56 | 57 | #: developer.php:122 58 | msgid "Pig Latin" 59 | msgstr "Pig Latin" 60 | 61 | #: developer.php:127 62 | msgid "Beta Tester" 63 | msgstr "Beta Tester" 64 | 65 | #: developer.php:135 66 | msgid "RTL Tester" 67 | msgstr "RTL Tester" 68 | 69 | #: developer.php:140 70 | msgid "Regenerate Thumbnails" 71 | msgstr "Regenerate Thumbnails" 72 | 73 | #: developer.php:145 74 | msgid "Reveal IDs" 75 | msgstr "Reveal IDs" 76 | 77 | #: developer.php:150 78 | msgid "Theme Test Drive" 79 | msgstr "Theme Test Drive" 80 | 81 | #: developer.php:155 82 | msgid "Theme Check" 83 | msgstr "Theme Check" 84 | 85 | #: developer.php:161 86 | msgid "" 87 | "Enables debug mode which helps identify and resolve issues" 89 | msgstr "" 90 | "Activer le debug mode qui permet d'identifier et de résoudre les " 92 | "problèmes" 93 | 94 | #: developer.php:162 95 | msgid "" 96 | "Logs database queries to an array so you can review them. The Debug Bar " 97 | "plugin will list out database queries if you set this constant." 98 | msgstr "" 99 | "Journaux des requêtes de bases de données dans un tableau afin que vous " 100 | "puissiez les consulter. L'extension Debug Bar donnera la liste de requêtes " 101 | "de bases de données si vous définissez cette constante." 102 | 103 | #: developer.php:172 104 | msgid "Developer: Plugin Setup" 105 | msgstr "Developer : Réglages de l'extension" 106 | 107 | #: developer.php:173 108 | msgid "Saving..." 109 | msgstr "Enregistrement en cours..." 110 | 111 | #: developer.php:174 112 | msgid "Installing..." 113 | msgstr "Installation..." 114 | 115 | #: developer.php:175 116 | msgid "Installed" 117 | msgstr "Installé" 118 | 119 | #: developer.php:176 120 | msgid "Activating..." 121 | msgstr "Activation..." 122 | 123 | #: developer.php:177 124 | msgid "Activated" 125 | msgstr "Activé" 126 | 127 | #: developer.php:178 128 | msgid "Error!" 129 | msgstr "Erreur !" 130 | 131 | #: developer.php:179 developer.php:500 132 | msgid "ACTIVE" 133 | msgstr "ACTIVÉ" 134 | 135 | #: developer.php:180 136 | msgid "INSTALLED" 137 | msgstr "INSTALLÉ" 138 | 139 | #: developer.php:181 140 | msgid "ERROR!" 141 | msgstr "ERREUR !" 142 | 143 | #: developer.php:193 144 | msgid "Settings saved." 145 | msgstr "Réglages enregistrés." 146 | 147 | #: developer.php:199 148 | msgid "Error saving settings. Please try again." 149 | msgstr "" 150 | "Une erreur est survenue lors de la sauvegarde des réglages. Veuillez " 151 | "réessayer plus tard." 152 | 153 | #: developer.php:208 developer.php:447 154 | msgid "Developer Helper" 155 | msgstr "Developer Helper" 156 | 157 | #. #-#-#-#-# plugin.pot (Developer 1.1.1) #-#-#-#-# 158 | #. Plugin Name of the plugin/theme 159 | #: developer.php:208 developer.php:218 160 | msgid "Developer" 161 | msgstr "Developer" 162 | 163 | #: developer.php:222 164 | msgid "View the Developer Helper settings and status page" 165 | msgstr "Afficher les réglages et la page d'état de Developer Helper" 166 | 167 | #: developer.php:248 168 | msgid "Thanks for installing the Developer Helper plugin!" 169 | msgstr "Merci d'avoir installé l'extension Developer Helper !" 170 | 171 | #: developer.php:250 172 | msgid "Before we begin, what type of website are you developing?" 173 | msgstr "Avant de commencer, quel type de site web developpez-vous ?" 174 | 175 | #: developer.php:306 developer.php:403 176 | msgid "Plugins" 177 | msgstr "Extensions" 178 | 179 | #: developer.php:308 180 | msgid "We recommend that you also install and activate the following plugins:" 181 | msgstr "" 182 | "Nous vous recommandons également d'installer et d'activer les extensions " 183 | "suivantes :" 184 | 185 | #: developer.php:321 186 | msgid "Activate" 187 | msgstr "Activer" 188 | 189 | #: developer.php:323 190 | msgid "Install" 191 | msgstr "Installer" 192 | 193 | #: developer.php:335 developer.php:369 194 | msgid "ERROR: No slug was passed to the AJAX callback." 195 | msgstr "ERREUR : Aucun identifiant n'a été passé au rappel AJAX." 196 | 197 | #: developer.php:340 198 | msgid "ERROR: You lack permissions to install and/or activate plugins." 199 | msgstr "" 200 | "ERREUR : Vous n'avez pas d'autorisation pour installer et/ou activer des " 201 | "extensions." 202 | 203 | #: developer.php:347 204 | msgid "ERROR: Error fetching plugin information: %s" 205 | msgstr "ERREUR : Erreur de récupération des informations de l'extension :%s" 206 | 207 | #: developer.php:358 208 | msgid "ERROR: Failed to install plugin: %s" 209 | msgstr "ERREUR : Impossible d'installer l'extension : %s" 210 | 211 | #: developer.php:363 developer.php:379 212 | msgid "ERROR: Failed to activate plugin: %s" 213 | msgstr "ERREUR : Impossible d'activer l'extension : %s" 214 | 215 | #: developer.php:374 216 | msgid "ERROR: You lack permissions to activate plugins." 217 | msgstr "ERREUR : Vous n'avez pas d'autorisation pour installer des extensions." 218 | 219 | #: developer.php:389 220 | msgid "Main Configuration" 221 | msgstr "Configuration principale" 222 | 223 | #: developer.php:390 224 | msgid "Project Type" 225 | msgstr "Type de projet" 226 | 227 | #: developer.php:413 228 | msgid "Constants" 229 | msgstr "Constantes" 230 | 231 | #: developer.php:422 232 | msgid "Settings" 233 | msgstr "Réglages" 234 | 235 | #: developer.php:423 236 | msgid "Pretty Permalinks" 237 | msgstr "Pretty Permalinks" 238 | 239 | #: developer.php:425 240 | msgid "Development Version" 241 | msgstr "Version de Développement" 242 | 243 | #: developer.php:426 244 | msgid "Shared Plugins" 245 | msgstr "Extensions partagées" 246 | 247 | #: developer.php:430 248 | msgid "Resources" 249 | msgstr "Ressources" 250 | 251 | #: developer.php:432 252 | msgid "Codex" 253 | msgstr "Codex" 254 | 255 | #: developer.php:435 256 | msgid "VIP Lobby" 257 | msgstr "VIP Lobby" 258 | 259 | #: developer.php:438 260 | msgid "Starter Themes" 261 | msgstr "Starter Themes" 262 | 263 | #: developer.php:495 264 | msgid "We recommend you have the following plugins installed:" 265 | msgstr "Nous vous recommandons d'avoir installé les extensions suivantes :" 266 | 267 | #: developer.php:505 268 | msgid "Click here to activate" 269 | msgstr "Cliquez ici pour activer." 270 | 271 | #: developer.php:505 developer.php:507 272 | msgid "INACTIVE" 273 | msgstr "INACTIF" 274 | 275 | #: developer.php:512 276 | msgid "Click here to install" 277 | msgstr "Cliquez ici pour installer." 278 | 279 | #: developer.php:512 developer.php:514 280 | msgid "NOT INSTALLED" 281 | msgstr "NON INSTALLÉ" 282 | 283 | #: developer.php:520 284 | msgid "" 285 | "We recommend you set the following constants to true in your " 286 | "wp-config.php file. Need help?" 288 | msgstr "" 289 | "Nous vous recommandons de régler les constantes suivantes sur true dans votre fichier wp-config.php. Besoin d'aide ?" 292 | 293 | #: developer.php:525 294 | msgid "SET" 295 | msgstr "DÉFINI" 296 | 297 | #: developer.php:527 298 | msgid "NOT SET" 299 | msgstr "NON CONFIGURÉ" 300 | 301 | #: developer.php:536 302 | msgid "We recommend the following settings and configurations." 303 | msgstr "Nous vous recommandons les réglages et configurations suivantes :" 304 | 305 | #: developer.php:541 developer.php:551 developer.php:559 306 | msgid "ENABLED" 307 | msgstr "ACTIVÉ" 308 | 309 | #: developer.php:543 developer.php:553 developer.php:561 310 | msgid "DISABLED" 311 | msgstr "DÉSACTIVÉ" 312 | 313 | #: developer.php:543 314 | msgid "" 315 | "Need help?" 317 | msgstr "" 318 | "Besoin d'aide ?" 320 | 321 | #: developer.php:568 322 | msgid "" 323 | "The Developer " 324 | "Documentation section of the Codex offers guidelines and references for " 325 | "anyone wishing to modify, extend, or contribute to WordPress." 326 | msgstr "" 327 | "La section " 328 | "Documentation pour les Développeurs du Codex propose des lignes " 329 | "directrices et des références pour tous ceux qui souhaitent modifier, " 330 | "étendre ou contribuer à WordPress." 331 | 332 | #: developer.php:572 333 | msgid "" 334 | "The VIP Lobby is a technical " 335 | "documentation resource for developing sites on WordPress.com including best " 336 | "practices and helpful tips to help you code better, faster, and stronger." 337 | msgstr "" 338 | "Le Lobby VIP est une ressource " 339 | "de documentation technique pour développer des sites sur WordPress.com " 340 | "incluant les meilleures pratiques et des conseils utiles pour vous aider à " 341 | "coder mieux et plus vite." 342 | 343 | #: developer.php:576 344 | msgid "" 345 | "_s (or underscores): a starter theme " 346 | "meant for hacking that will give you a \"1000-Hour Head Start\". Use it to " 347 | "create the next, most awesome WordPress theme out there." 348 | msgstr "" 349 | "_s (or underscores): un starteur thème " 350 | "fait pour être hacké qui vous donnera \"1000 Heures d'avance \". Utilisez-le " 351 | "pour créer le plus impressionnant prochain thème pour WordPress." 352 | 353 | #: developer.php:625 354 | msgid "Plugin for a self-hosted WordPress installation" 355 | msgstr "Extension pour une installation auto-hébergé de WordPress" 356 | 357 | #: developer.php:626 358 | msgid "Theme for a self-hosted WordPress installation" 359 | msgstr "Thème pour une installation auto-hébergé de WordPress" 360 | 361 | #: developer.php:627 362 | msgid "" 363 | "Theme for a WordPress." 364 | "com VIP site" 365 | msgstr "" 366 | "Theme pour un site WordPress.com VIP" 368 | 369 | #. Plugin URI of the plugin/theme 370 | msgid "http://wordpress.org/extend/plugins/developer/" 371 | msgstr "http://wordpress.org/extend/plugins/developer/" 372 | 373 | #. Description of the plugin/theme 374 | msgid "The first stop for every WordPress developer" 375 | msgstr "La première étape pour tous les développeurs WordPress" 376 | 377 | #. Author of the plugin/theme 378 | msgid "Automattic" 379 | msgstr "Automattic" 380 | 381 | #. Author URI of the plugin/theme 382 | msgid "http://automattic.com" 383 | msgstr "http://automattic.com" 384 | -------------------------------------------------------------------------------- /languages/developer.pot: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2013 Developer 2 | # This file is distributed under the same license as the Developer package. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: Developer 1.1.1\n" 6 | "Report-Msgid-Bugs-To: http://wordpress.org/tag/developer\n" 7 | "POT-Creation-Date: 2013-01-13 22:21:53+00:00\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n" 12 | "Last-Translator: FULL NAME \n" 13 | "Language-Team: LANGUAGE \n" 14 | 15 | #: developer.php:70 16 | msgid "Debug Bar" 17 | msgstr "" 18 | 19 | #: developer.php:75 20 | msgid "Debug Bar Cron" 21 | msgstr "" 22 | 23 | #: developer.php:80 24 | msgid "Rewrite Rules Inspector" 25 | msgstr "" 26 | 27 | #: developer.php:85 28 | msgid "Log Deprecated Notices" 29 | msgstr "" 30 | 31 | #: developer.php:90 32 | msgid "VIP Scanner" 33 | msgstr "" 34 | 35 | #: developer.php:102 36 | msgid "Grunion Contact Form" 37 | msgstr "" 38 | 39 | #: developer.php:107 40 | msgid "Polldaddy Polls & Ratings" 41 | msgstr "" 42 | 43 | #: developer.php:112 44 | msgid "Monster Widget" 45 | msgstr "" 46 | 47 | #: developer.php:117 48 | msgid "User Switching" 49 | msgstr "" 50 | 51 | #: developer.php:122 52 | msgid "Pig Latin" 53 | msgstr "" 54 | 55 | #: developer.php:127 56 | msgid "Beta Tester" 57 | msgstr "" 58 | 59 | #: developer.php:135 60 | msgid "RTL Tester" 61 | msgstr "" 62 | 63 | #: developer.php:140 64 | msgid "Regenerate Thumbnails" 65 | msgstr "" 66 | 67 | #: developer.php:145 68 | msgid "Reveal IDs" 69 | msgstr "" 70 | 71 | #: developer.php:150 72 | msgid "Theme Test Drive" 73 | msgstr "" 74 | 75 | #: developer.php:155 76 | msgid "Theme Check" 77 | msgstr "" 78 | 79 | #: developer.php:161 80 | msgid "" 81 | "Enables debug mode which helps identify and resolve issues" 83 | msgstr "" 84 | 85 | #: developer.php:162 86 | msgid "" 87 | "Logs database queries to an array so you can review them. The Debug Bar " 88 | "plugin will list out database queries if you set this constant." 89 | msgstr "" 90 | 91 | #: developer.php:172 92 | msgid "Developer: Plugin Setup" 93 | msgstr "" 94 | 95 | #: developer.php:173 96 | msgid "Saving..." 97 | msgstr "" 98 | 99 | #: developer.php:174 100 | msgid "Installing..." 101 | msgstr "" 102 | 103 | #: developer.php:175 104 | msgid "Installed" 105 | msgstr "" 106 | 107 | #: developer.php:176 108 | msgid "Activating..." 109 | msgstr "" 110 | 111 | #: developer.php:177 112 | msgid "Activated" 113 | msgstr "" 114 | 115 | #: developer.php:178 116 | msgid "Error!" 117 | msgstr "" 118 | 119 | #: developer.php:179 developer.php:500 120 | msgid "ACTIVE" 121 | msgstr "" 122 | 123 | #: developer.php:180 124 | msgid "INSTALLED" 125 | msgstr "" 126 | 127 | #: developer.php:181 128 | msgid "ERROR!" 129 | msgstr "" 130 | 131 | #: developer.php:193 132 | msgid "Settings saved." 133 | msgstr "" 134 | 135 | #: developer.php:199 136 | msgid "Error saving settings. Please try again." 137 | msgstr "" 138 | 139 | #: developer.php:208 developer.php:447 140 | msgid "Developer Helper" 141 | msgstr "" 142 | 143 | #. #-#-#-#-# plugin.pot (Developer 1.1.1) #-#-#-#-# 144 | #. Plugin Name of the plugin/theme 145 | #: developer.php:208 developer.php:218 146 | msgid "Developer" 147 | msgstr "" 148 | 149 | #: developer.php:222 150 | msgid "View the Developer Helper settings and status page" 151 | msgstr "" 152 | 153 | #: developer.php:248 154 | msgid "Thanks for installing the Developer Helper plugin!" 155 | msgstr "" 156 | 157 | #: developer.php:250 158 | msgid "Before we begin, what type of website are you developing?" 159 | msgstr "" 160 | 161 | #: developer.php:306 developer.php:403 162 | msgid "Plugins" 163 | msgstr "" 164 | 165 | #: developer.php:308 166 | msgid "We recommend that you also install and activate the following plugins:" 167 | msgstr "" 168 | 169 | #: developer.php:321 170 | msgid "Activate" 171 | msgstr "" 172 | 173 | #: developer.php:323 174 | msgid "Install" 175 | msgstr "" 176 | 177 | #: developer.php:335 developer.php:369 178 | msgid "ERROR: No slug was passed to the AJAX callback." 179 | msgstr "" 180 | 181 | #: developer.php:340 182 | msgid "ERROR: You lack permissions to install and/or activate plugins." 183 | msgstr "" 184 | 185 | #: developer.php:347 186 | msgid "ERROR: Error fetching plugin information: %s" 187 | msgstr "" 188 | 189 | #: developer.php:358 190 | msgid "ERROR: Failed to install plugin: %s" 191 | msgstr "" 192 | 193 | #: developer.php:363 developer.php:379 194 | msgid "ERROR: Failed to activate plugin: %s" 195 | msgstr "" 196 | 197 | #: developer.php:374 198 | msgid "ERROR: You lack permissions to activate plugins." 199 | msgstr "" 200 | 201 | #: developer.php:389 202 | msgid "Main Configuration" 203 | msgstr "" 204 | 205 | #: developer.php:390 206 | msgid "Project Type" 207 | msgstr "" 208 | 209 | #: developer.php:413 210 | msgid "Constants" 211 | msgstr "" 212 | 213 | #: developer.php:422 214 | msgid "Settings" 215 | msgstr "" 216 | 217 | #: developer.php:423 218 | msgid "Pretty Permalinks" 219 | msgstr "" 220 | 221 | #: developer.php:425 222 | msgid "Development Version" 223 | msgstr "" 224 | 225 | #: developer.php:426 226 | msgid "Shared Plugins" 227 | msgstr "" 228 | 229 | #: developer.php:430 230 | msgid "Resources" 231 | msgstr "" 232 | 233 | #: developer.php:432 234 | msgid "Codex" 235 | msgstr "" 236 | 237 | #: developer.php:435 238 | msgid "VIP Lobby" 239 | msgstr "" 240 | 241 | #: developer.php:438 242 | msgid "Starter Themes" 243 | msgstr "" 244 | 245 | #: developer.php:495 246 | msgid "We recommend you have the following plugins installed:" 247 | msgstr "" 248 | 249 | #: developer.php:505 250 | msgid "Click here to activate" 251 | msgstr "" 252 | 253 | #: developer.php:505 developer.php:507 254 | msgid "INACTIVE" 255 | msgstr "" 256 | 257 | #: developer.php:512 258 | msgid "Click here to install" 259 | msgstr "" 260 | 261 | #: developer.php:512 developer.php:514 262 | msgid "NOT INSTALLED" 263 | msgstr "" 264 | 265 | #: developer.php:520 266 | msgid "" 267 | "We recommend you set the following constants to true in your " 268 | "wp-config.php file. Need help?" 270 | msgstr "" 271 | 272 | #: developer.php:525 273 | msgid "SET" 274 | msgstr "" 275 | 276 | #: developer.php:527 277 | msgid "NOT SET" 278 | msgstr "" 279 | 280 | #: developer.php:536 281 | msgid "We recommend the following settings and configurations." 282 | msgstr "" 283 | 284 | #: developer.php:541 developer.php:551 developer.php:559 285 | msgid "ENABLED" 286 | msgstr "" 287 | 288 | #: developer.php:543 developer.php:553 developer.php:561 289 | msgid "DISABLED" 290 | msgstr "" 291 | 292 | #: developer.php:543 293 | msgid "" 294 | "Need help?" 296 | msgstr "" 297 | 298 | #: developer.php:568 299 | msgid "" 300 | "The Developer " 301 | "Documentation section of the Codex offers guidelines and references for " 302 | "anyone wishing to modify, extend, or contribute to WordPress." 303 | msgstr "" 304 | 305 | #: developer.php:572 306 | msgid "" 307 | "The VIP Lobby is a technical " 308 | "documentation resource for developing sites on WordPress.com including best " 309 | "practices and helpful tips to help you code better, faster, and stronger." 310 | msgstr "" 311 | 312 | #: developer.php:576 313 | msgid "" 314 | "_s (or underscores): a starter theme " 315 | "meant for hacking that will give you a \"1000-Hour Head Start\". Use it to " 316 | "create the next, most awesome WordPress theme out there." 317 | msgstr "" 318 | 319 | #: developer.php:625 320 | msgid "Plugin for a self-hosted WordPress installation" 321 | msgstr "" 322 | 323 | #: developer.php:626 324 | msgid "Theme for a self-hosted WordPress installation" 325 | msgstr "" 326 | 327 | #: developer.php:627 328 | msgid "" 329 | "Theme for a WordPress." 330 | "com VIP site" 331 | msgstr "" 332 | 333 | #. Plugin URI of the plugin/theme 334 | msgid "http://wordpress.org/extend/plugins/developer/" 335 | msgstr "" 336 | 337 | #. Description of the plugin/theme 338 | msgid "The first stop for every WordPress developer" 339 | msgstr "" 340 | 341 | #. Author of the plugin/theme 342 | msgid "Automattic" 343 | msgstr "" 344 | 345 | #. Author URI of the plugin/theme 346 | msgid "http://automattic.com" 347 | msgstr "" 348 | -------------------------------------------------------------------------------- /readme.txt: -------------------------------------------------------------------------------- 1 | === Developer === 2 | Contributors: automattic, batmoo, Viper007Bond, nbachiyski, tott, danielbachhuber, betzster, nprasath002, nickdaugherty 3 | Tags: developer, development, local 4 | Requires at least: 3.4 5 | Tested up to: 4.3 6 | Stable tag: 1.2.6 7 | License: GPLv2 or later 8 | License URI: http://www.gnu.org/licenses/gpl-2.0.html 9 | 10 | A plugin, which helps WordPress developers develop. 11 | 12 | == Description == 13 | 14 | A plugin, which helps WordPress developers develop. 15 | 16 | This plugin will help you optimize your development environment by making sure that you have all the essential tools and plugins installed. 17 | 18 | If you'd like to check out the code and contribute, [join us on GitHub](https://github.com/Automattic/developer). Pull requests, issues, and plugin recommendations are more than welcome! 19 | 20 | We would like to thank Ejner Galaz for letting us use the `developer` slug in the WordPress.org plugin repository. 21 | 22 | == Installation == 23 | 24 | 1. Upload the `developer` folder to your plugins directory (e.g. `/wp-content/plugins/`) 25 | 2. Activate the plugin through the 'Plugins' menu in WordPress 26 | 3. Follow the instructions 27 | 28 | == Frequently Asked Questions == 29 | 30 | = Why are there no FAQs besides this one? = 31 | 32 | Because you haven't asked one yet. 33 | 34 | == Screenshots == 35 | 36 | 1. On activation, the plugin prompts you to specify what type of developer you are. This is used to configure the plugins checks. 37 | 2. On activation, the plugin does a quick check to see if you have essential developer plugins installed. 38 | 3. With one click you can install and activate the plugin. 39 | 4. The plugin's settings page (Tools > Developer) will check to make sure your environment is correctly configured, including plugins, constants, and other settings. 40 | 41 | == Changelog == 42 | 43 | = 1.2.6 (2015-11-14) = 44 | * Remove MP6 45 | * Fix strict standards notice 46 | * Fix PHP Notice in `is_dev_version()` 47 | 48 | = 1.2.5 (2013-10-18) = 49 | * Don't recommend Pig Latin for VIP 50 | * Fix cache key length by hashing relevant data 51 | 52 | = 1.2.4 (2013-10-08) = 53 | * Don't recommend Beta Tester if we have a dev version of WordPress 54 | * Fix cache key length 55 | 56 | = 1.2.3 (2013-09-17) = 57 | * Add WP-CLI 0.11.2 compatibility 58 | * WP-CLI: Mark selected type as active 59 | * Fix strict errors in upgrader 60 | 61 | = 1.2.2 (2013-08-09) = 62 | * Added WP-CLI command 63 | * Removed Grunion Contact Form because it's part of Jetpack 64 | 65 | = 1.2.1 (2013-06-18) = 66 | * Added MP6 to recommended plugins 67 | * Added Koop's Debug Bar Console to recommended plugins 68 | 69 | = 1.1.6 (2013-04-08) = 70 | * Made purpose of activate/install links on Settings page more obvious 71 | * Added link to full plugin details on Settings page (opens in Thickbox) 72 | 73 | = 1.1.5 (2013-04-05) = 74 | * Added ability to define multiple project types for plugins 75 | * Added ability to define project types for constants 76 | * Added Jetpack to recommended plugins and constants 77 | 78 | = 1.1.4 (2013-04-03) = 79 | * Added plugin descriptions to installation and settings pages 80 | 81 | = 1.1.3 (2013-04-02) = 82 | * Added improved error reporting 83 | * Added [Log Viewer](http://wordpress.org/extend/plugins/log-viewer/) to recommended plugins. Props to @rockaut for the suggestion 84 | 85 | = 1.1.2 (2013-01-29) = 86 | * French localization. Props [fxbenard](https://github.com/fxbenard) 87 | * Replaced Reveal IDs with Simply Show IDs. The former never installed. 88 | * Bug fix: Show a few plugins as active when they're actually active. 89 | 90 | = 1.1.1 (2012-08-30) = 91 | 92 | * Fix piglatin slug, props bobbingwide 93 | 94 | = 1.1 (2012-08-30) = 95 | * New "WP.org Theme" project type for developers building themes for self-hosted installs with a number of sweet plugins recommended by the WordPress.com Theme Team. 96 | * Simplify some of the wording across the plugin. 97 | * Added John Blackbourn's [User Switching](http://wordpress.org/extend/plugins/user-switching/) is now a recommended plugin for all projects. 98 | * Added [Pig Latin](http://wordpress.org/extend/plugins/pig-latin) plugin to help developer i18n their code. 99 | * Added resources for all projects. 100 | * Bug fix: don't show installation prompt in network admin. 101 | 102 | = 1.0 = 103 | * Initial Release 104 | -------------------------------------------------------------------------------- /screenshot-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automattic/developer/cff96e8acb44684db0fc167487314787de6a5098/screenshot-1.png -------------------------------------------------------------------------------- /screenshot-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automattic/developer/cff96e8acb44684db0fc167487314787de6a5098/screenshot-2.png -------------------------------------------------------------------------------- /screenshot-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automattic/developer/cff96e8acb44684db0fc167487314787de6a5098/screenshot-3.png -------------------------------------------------------------------------------- /screenshot-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automattic/developer/cff96e8acb44684db0fc167487314787de6a5098/screenshot-4.png --------------------------------------------------------------------------------