<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[12952] sites/trunk/wordpress.org/public_html/wp-content/plugins/tour: Tour: initial version</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://meta.trac.wordpress.org/changeset/12952">12952</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://meta.trac.wordpress.org/changeset/12952","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>akirk</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2023-10-28 06:07:10 +0000 (Sat, 28 Oct 2023)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Tour: initial version</pre>
<h3>Added Paths</h3>
<ul>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginstourLICENSE">sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/LICENSE</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginstourREADMEmd">sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/README.md</a></li>
<li>sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/</li>
<li>sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/css/</li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginstourassetscssdriverjscss">sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/css/driver-js.css</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginstourassetscssstylecss">sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/css/style.css</a></li>
<li>sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/images/</li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginstourassetsimagesselecttourstepgif">sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/images/select-tour-step.gif</a></li>
<li>sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/js/</li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginstourassetsjsdriverjsjs">sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/js/driver-js.js</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginstourassetsjstouradminjs">sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/js/tour-admin.js</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginstourassetsjstourjs">sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/js/tour.js</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginstourtourphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/tour.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginstourLICENSE"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/LICENSE</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/LICENSE (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/LICENSE 2023-10-28 06:07:10 UTC (rev 12952)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,339 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
</ins></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginstourREADMEmd"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/README.md</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/README.md (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/README.md 2023-10-28 06:07:10 UTC (rev 12952)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,30 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+# Tour
+
+- Contributors: akirk, amieiro, psrpinto, spiraltee
+- Tags: tour
+- Requires at least: 5.0
+- Tested up to: 6.3
+- Requires PHP: 5.6
+- License: [GPLv2 or later](http://www.gnu.org/licenses/gpl-2.0.html)
+- Stable tag: 1.0.0
+
+## Description
+
+Tour is a plugin that allows you to create a tours for your site. They can be activated by the user through colored, glowing buttons.
+
+Creating the tour is done by entering a creation mode where the HTML tag to be used is highlighted. You can then enter the text for the step, and create a new step by clicking on the next tag to be highlighted.
+
+## Installation
+
+1. Upload the `tour` directory to the `/wp-content/plugins/` directory
+1. Activate the plugin through the 'Plugins' menu in WordPress
+
+## Frequently Asked Questions
+
+
+## Screenshots
+
+## Changelog
+
+### 1.0.0
+Initial Release
</ins></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginstourassetscssdriverjscss"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/css/driver-js.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/css/driver-js.css (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/css/driver-js.css 2023-10-28 06:07:10 UTC (rev 12952)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,8 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/*
+ * Driver.js - v1.3.0
+ * https://github.com/kamranahmedse/driver.js
+ *
+ * Made by Kamran Ahmed
+ * Under MIT License
+ */
+.driver-active .driver-overlay,.driver-active *{pointer-events:none}.driver-active .driver-active-element,.driver-active .driver-active-element *,.driver-popover,.driver-popover *{pointer-events:auto}@keyframes animate-fade-in{0%{opacity:0}to{opacity:1}}.driver-fade .driver-overlay{animation:animate-fade-in .2s ease-in-out}.driver-fade .driver-popover{animation:animate-fade-in .2s}.driver-popover{all:unset;box-sizing:border-box;color:#2d2d2d;margin:0;padding:15px;border-radius:5px;min-width:250px;max-width:300px;box-shadow:0 1px 10px #0006;z-index:1000000000;position:fixed;top:0;right:0;background-color:#fff}.driver-popover *{font-family:Helvetica Neue,Inter,ui-sans-serif,"Apple Color Emoji",Helvetica,Arial,sans-serif}.driver-popover-title{font:19px/normal sans-serif;font-weight:700;display:block;position:relative;line-height:1.5;zoom:1;margin:0}.driver-popover-close-btn{all:unset;position:absolute;top:0;right:0;width:32px;height:28px;cursor:pointer;font-size:18px;font-wei
ght:500;color:#d2d2d2;z-index:1;text-align:center;transition:color;transition-duration:.2s}.driver-popover-close-btn:hover,.driver-popover-close-btn:focus{color:#2d2d2d}.driver-popover-title[style*=block]+.driver-popover-description{margin-top:5px}.driver-popover-description{margin-bottom:0;font:14px/normal sans-serif;line-height:1.5;font-weight:400;zoom:1}.driver-popover-footer{margin-top:15px;text-align:right;zoom:1;display:flex;align-items:center;justify-content:space-between}.driver-popover-progress-text{font-size:13px;font-weight:400;color:#727272;zoom:1}.driver-popover-footer button{all:unset;display:inline-block;box-sizing:border-box;padding:3px 7px;text-decoration:none;text-shadow:1px 1px 0 #fff;background-color:#fff;color:#2d2d2d;font:12px/normal sans-serif;cursor:pointer;outline:0;zoom:1;line-height:1.3;border:1px solid #ccc;border-radius:3px}.driver-popover-footer .driver-popover-btn-disabled{opacity:.5;pointer-events:none}:not(body):has(>.driver-active-element){overfl
ow:hidden!important}.driver-no-interaction,.driver-no-interaction *{pointer-events:none!important}.driver-popover-footer button:hover,.driver-popover-footer button:focus{background-color:#f7f7f7}.driver-popover-navigation-btns{display:flex;flex-grow:1;justify-content:flex-end}.driver-popover-navigation-btns button+button{margin-left:4px}.driver-popover-arrow{content:"";position:absolute;border:5px solid #fff}.driver-popover-arrow-side-over{display:none}.driver-popover-arrow-side-left{left:100%;border-right-color:transparent;border-bottom-color:transparent;border-top-color:transparent}.driver-popover-arrow-side-right{right:100%;border-left-color:transparent;border-bottom-color:transparent;border-top-color:transparent}.driver-popover-arrow-side-top{top:100%;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}.driver-popover-arrow-side-bottom{bottom:100%;border-left-color:transparent;border-top-color:transparent;border-right-color:tran
sparent}.driver-popover-arrow-side-center{display:none}.driver-popover-arrow-side-left.driver-popover-arrow-align-start,.driver-popover-arrow-side-right.driver-popover-arrow-align-start{top:15px}.driver-popover-arrow-side-top.driver-popover-arrow-align-start,.driver-popover-arrow-side-bottom.driver-popover-arrow-align-start{left:15px}.driver-popover-arrow-align-end.driver-popover-arrow-side-left,.driver-popover-arrow-align-end.driver-popover-arrow-side-right{bottom:15px}.driver-popover-arrow-side-top.driver-popover-arrow-align-end,.driver-popover-arrow-side-bottom.driver-popover-arrow-align-end{right:15px}.driver-popover-arrow-side-left.driver-popover-arrow-align-center,.driver-popover-arrow-side-right.driver-popover-arrow-align-center{top:50%;margin-top:-5px}.driver-popover-arrow-side-top.driver-popover-arrow-align-center,.driver-popover-arrow-side-bottom.driver-popover-arrow-align-center{left:50%;margin-left:-5px}.driver-popover-arrow-none{display:none}
</ins><span class="cx" style="display: block; padding: 0 10px">Property changes on: sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/css/driver-js.css
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:eol-style</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+native
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginstourassetscssstylecss"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/css/style.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/css/style.css (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/css/style.css 2023-10-28 06:07:10 UTC (rev 12952)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,10 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.pulse {
+ border-radius: 50%;
+ position: relative;
+ cursor: pointer;
+ top: 0em;
+ left: -0.4em;
+ width: 12px;
+ height: 12px;
+ margin: -6px;
+}
</ins><span class="cx" style="display: block; padding: 0 10px">Property changes on: sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/css/style.css
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:eol-style</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+native
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginstourassetsimagesselecttourstepgif"></a>
<div class="binary"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/images/select-tour-step.gif</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx" style="display: block; padding: 0 10px">Index: sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/images/select-tour-step.gif
</span><span class="cx" style="display: block; padding: 0 10px">===================================================================
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/images/select-tour-step.gif 2023-10-26 15:51:46 UTC (rev 12951)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/images/select-tour-step.gif 2023-10-28 06:07:10 UTC (rev 12952)
</ins><span class="cx" style="display: block; padding: 0 10px">Property changes on: sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/images/select-tour-step.gif
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:mime-type</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+application/octet-stream
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginstourassetsjsdriverjsjs"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/js/driver-js.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/js/driver-js.js (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/js/driver-js.js 2023-10-28 06:07:10 UTC (rev 12952)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,10 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/*
+ * https://github.com/kamranahmedse/driver.js
+ *
+ * Made by Kamran Ahmed
+ * Under MIT License
+ *
+ * Build source: https://github.com/trymebytes/driver.js/tree/select-visible-elements
+ */
+this.driver=this.driver||{};this.driver.js=function(D){"use strict";let F={};function z(e={}){F={animate:!0,allowClose:!0,overlayOpacity:.7,smoothScroll:!1,disableActiveInteraction:!1,showProgress:!1,stagePadding:10,stageRadius:5,popoverOffset:10,showButtons:["next","previous","close"],disableButtons:[],overlayColor:"#000",...e}}function a(e){return e?F[e]:F}function W(e,o,t,i){return(e/=i/2)<1?t/2*e*e+o:-t/2*(--e*(e-2)-1)+o}function q(e){const o='a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])';return e.flatMap(t=>{const i=t.matches(o),d=Array.from(t.querySelectorAll(o));return[...i?[t]:[],...d]}).filter(t=>getComputedStyle(t).pointerEvents!=="none"&&ae(t))}function V(e){if(!e||se(e))return;const o=a("smoothScro
ll");e.scrollIntoView({behavior:!o||re(e)?"auto":"smooth",inline:"center",block:"center"})}function re(e){if(!e||!e.parentElement)return;const o=e.parentElement;return o.scrollHeight>o.clientHeight}function se(e){const o=e.getBoundingClientRect();return o.top>=0&&o.left>=0&&o.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&o.right<=(window.innerWidth||document.documentElement.clientWidth)}function ae(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}let N={};function b(e,o){N[e]=o}function l(e){return e?N[e]:N}function K(){N={}}let T={};function O(e,o){T[e]=o}function _(e){var o;(o=T[e])==null||o.call(T)}function ce(){T={}}function le(e,o,t,i){let d=l("__activeStagePosition");const n=d||t.getBoundingClientRect(),f=i.getBoundingClientRect(),w=W(e,n.x,f.x-n.x,o),r=W(e,n.y,f.y-n.y,o),v=W(e,n.width,f.width-n.width,o),s=W(e,n.height,f.height-n.height,o);d
={x:w,y:r,width:v,height:s},Y(d),b("__activeStagePosition",d)}function X(e){if(!e)return;const o=e.getBoundingClientRect(),t={x:o.x,y:o.y,width:o.width,height:o.height};b("__activeStagePosition",t),Y(t)}function de(){const e=l("__activeStagePosition"),o=l("__overlaySvg");if(!e)return;if(!o){console.warn("No stage svg found.");return}const t=window.innerWidth,i=window.innerHeight;o.setAttribute("viewBox",`0 0 ${t} ${i}`)}function pe(e){const o=ue(e);document.body.appendChild(o),G(o,t=>{t.target.tagName==="path"&&_("overlayClick")}),b("__overlaySvg",o)}function Y(e){const o=l("__overlaySvg");if(!o){pe(e);return}const t=o.firstElementChild;if((t==null?void 0:t.tagName)!=="path")throw new Error("no path element found in stage svg");t.setAttribute("d",j(e))}function ue(e){const o=window.innerWidth,t=window.innerHeight,i=document.createElementNS(&quo
t;http://www.w3.org/2000/svg","svg");i.classList.add("driver-overlay","driver-overlay-animated"),i.setAttribute("viewBox",`0 0 ${o} ${t}`),i.setAttribute("xmlSpace","preserve"),i.setAttribute("xmlnsXlink","http://www.w3.org/1999/xlink"),i.setAttribute("version","1.1"),i.setAttribute("preserveAspectRatio","xMinYMin slice"),i.style.fillRule="evenodd",i.style.clipRule="evenodd",i.style.strokeLinejoin="round",i.style.strokeMiterlimit="2",i.style.zIndex="10000",i.style.position="fixed",i.style.top="0",i.style.left="0",i.style.width="100%",i.style.height="100%";const d=document.createElementNS("http://www.w3.org/2000/svg","path");return d.setAttribute("d",j(e)),d.style.fill=a("overlayColor")||"rgb(0,0,0)",d.style.opaci
ty=`${a("overlayOpacity")}`,d.style.pointerEvents="auto",d.style.cursor="auto",i.appendChild(d),i}function j(e){const o=window.innerWidth,t=window.innerHeight,i=a("stagePadding")||0,d=a("stageRadius")||0,n=e.width+i*2,f=e.height+i*2,w=Math.min(d,n/2,f/2),r=Math.floor(Math.max(w,0)),v=e.x-i+r,s=e.y-i,c=n-r*2,p=f-r*2;return`M${o},0L0,0L0,${t}L${o},${t}L${o},0Z
+ M${v},${s} h${c} a${r},${r} 0 0 1 ${r},${r} v${p} a${r},${r} 0 0 1 -${r},${r} h-${c} a${r},${r} 0 0 1 -${r},-${r} v-${p} a${r},${r} 0 0 1 ${r},-${r} z`}function ve(){const e=l("__overlaySvg");e&&e.remove()}function fe(){const e=document.getElementById("driver-dummy-element");if(e)return e;let o=document.createElement("div");return o.id="driver-dummy-element",o.style.width="0",o.style.height="0",o.style.pointerEvents="none",o.style.opacity="0",o.style.position="fixed",o.style.top="50%",o.style.left="50%",document.body.appendChild(o),o}function Q(e){const{element:o}=e;let t=null;typeof o=="string"?(t=document.querySelector(o),(!t||t.getBoundingClientRect().width===0)&&(t=null,document.querySelectorAll(o).forEach(function(i){var d=i.getBoundingClientRect();if(!t&&d.width>0&&d.height>0){t=i;return}}))):o instanceof Element&
&(t=o),t||(t=fe()),ge(t,e)}function he(){const e=l("__activeElement"),o=l("__activeStep");e&&(X(e),de(),oe(e,o))}function ge(e,o){const i=Date.now(),d=l("__activeStep"),n=l("__activeElement")||e,f=!n||n===e,w=e.id==="driver-dummy-element",r=n.id==="driver-dummy-element",v=a("animate"),s=o.onHighlightStarted||a("onHighlightStarted"),c=(o==null?void 0:o.onHighlighted)||a("onHighlighted"),p=(d==null?void 0:d.onDeselected)||a("onDeselected"),m=a(),g=l();!f&&p&&p(r?void 0:n,d,{config:m,state:g}),s&&s(w?void 0:e,o,{config:m,state:g});const u=!f&&v;let h=!1;xe(),b("previousStep",d),b("previousElement",n),b("activeStep",o),b("activeElement",e);const P=()=>{if(l("__transitionCallback")!==P)return;const x=Date.now()-i,y=400-x<=400/2;o.popover&&y&&!h&&u&&(J(e,o),h=!
0),a("animate")&&x<400?le(x,400,n,e):(X(e),c&&c(w?void 0:e,o,{config:a(),state:l()}),b("__transitionCallback",void 0),b("__previousStep",d),b("__previousElement",n),b("__activeStep",o),b("__activeElement",e)),window.requestAnimationFrame(P)};b("__transitionCallback",P),window.requestAnimationFrame(P),V(e),!u&&o.popover&&J(e,o),n.classList.remove("driver-active-element","driver-no-interaction"),n.removeAttribute("aria-haspopup"),n.removeAttribute("aria-expanded"),n.removeAttribute("aria-controls"),a("disableActiveInteraction")&&e.classList.add("driver-no-interaction"),e.classList.add("driver-active-element"),e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-expanded","true"),e.setAttribute("aria-controls","driver-popover-content
")}function we(){var e;(e=document.getElementById("driver-dummy-element"))==null||e.remove(),document.querySelectorAll(".driver-active-element").forEach(o=>{o.classList.remove("driver-active-element","driver-no-interaction"),o.removeAttribute("aria-haspopup"),o.removeAttribute("aria-expanded"),o.removeAttribute("aria-controls")})}function A(){const e=l("__resizeTimeout");e&&window.cancelAnimationFrame(e),b("__resizeTimeout",window.requestAnimationFrame(he))}function me(e){var r;if(!l("isInitialized")||!(e.key==="Tab"||e.keyCode===9))return;const i=l("__activeElement"),d=(r=l("popover"))==null?void 0:r.wrapper,n=q([...d?[d]:[],...i?[i]:[]]),f=n[0],w=n[n.length-1];if(e.preventDefault(),e.shiftKey){const v=n[n.indexOf(document.activeElement)-1]||w;v==null||v.focus()}else{const v=n[n.indexOf(document.activeElement)+1]||f;v==null||v.focus()}}fu
nction Z(e){var t;((t=a("allowKeyboardControl"))==null||t)&&(e.key==="Escape"?_("escapePress"):e.key==="ArrowRight"?_("arrowRightPress"):e.key==="ArrowLeft"&&_("arrowLeftPress"))}function G(e,o,t){const i=(n,f)=>{const w=n.target;e.contains(w)&&((!t||t(w))&&(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation()),f==null||f(n))};document.addEventListener("pointerdown",i,!0),document.addEventListener("mousedown",i,!0),document.addEventListener("pointerup",i,!0),document.addEventListener("mouseup",i,!0),document.addEventListener("click",n=>{i(n,o)},!0)}function ye(){window.addEventListener("keyup",Z,!1),window.addEventListener("keydown",me,!1),window.addEventListener("resize",A),window.addEventListener("scroll",A)}function be(){window.removeEventListener("keyup",Z),wi
ndow.removeEventListener("resize",A),window.removeEventListener("scroll",A)}function xe(){const e=l("popover");e&&(e.wrapper.style.display="none")}function J(e,o){var C,y;let t=l("popover");t&&document.body.removeChild(t.wrapper),t=Pe(),document.body.appendChild(t.wrapper);const{title:i,description:d,showButtons:n,disableButtons:f,showProgress:w,nextBtnText:r=a("nextBtnText")||"Next →",prevBtnText:v=a("prevBtnText")||"← Previous",progressText:s=a("progressText")||"{current} of {total}"}=o.popover||{};t.nextButton.innerHTML=r,t.previousButton.innerHTML=v,t.progress.innerHTML=s,i?(t.title.innerHTML=i,t.title.style.display="block"):t.title.style.display="none",d?(t.description.innerHTML=d,t.description.style.display="block"):t.description.style.display="none";const c=n||a("showButtons"),p=w||a(&
quot;showProgress")||!1,m=(c==null?void 0:c.includes("next"))||(c==null?void 0:c.includes("previous"))||p;t.closeButton.style.display=c.includes("close")?"block":"none",m?(t.footer.style.display="flex",t.progress.style.display=p?"block":"none",t.nextButton.style.display=c.includes("next")?"block":"none",t.previousButton.style.display=c.includes("previous")?"block":"none"):t.footer.style.display="none";const g=f||a("disableButtons")||[];g!=null&&g.includes("next")&&(t.nextButton.disabled=!0,t.nextButton.classList.add("driver-popover-btn-disabled")),g!=null&&g.includes("previous")&&(t.previousButton.disabled=!0,t.previousButton.classList.add("driver-popover-btn-disabled")),g!=null&&g.includes("close")&&(t.closeButton.disabled=
!0,t.closeButton.classList.add("driver-popover-btn-disabled"));const u=t.wrapper;u.style.display="block",u.style.left="",u.style.top="",u.style.bottom="",u.style.right="",u.id="driver-popover-content",u.setAttribute("role","dialog"),u.setAttribute("aria-labelledby","driver-popover-title"),u.setAttribute("aria-describedby","driver-popover-description");const h=t.arrow;h.className="driver-popover-arrow";const P=((C=o.popover)==null?void 0:C.popoverClass)||a("popoverClass")||"";u.className=`driver-popover ${P}`.trim(),G(t.wrapper,k=>{var R,M,I;const E=k.target,H=((R=o.popover)==null?void 0:R.onNextClick)||a("onNextClick"),$=((M=o.popover)==null?void 0:M.onPrevClick)||a("onPrevClick"),B=((I=o.popover)==null?void 0:I.onCloseClick)||a("onCloseClick");if(E.classList.contains("driver-popover-next
-btn"))return H?H(e,o,{config:a(),state:l()}):_("nextClick");if(E.classList.contains("driver-popover-prev-btn"))return $?$(e,o,{config:a(),state:l()}):_("prevClick");if(E.classList.contains("driver-popover-close-btn"))return B?B(e,o,{config:a(),state:l()}):_("closeClick")},k=>!(t!=null&&t.description.contains(k))&&!(t!=null&&t.title.contains(k))&&typeof k.className=="string"&&k.className.includes("driver-popover")),b("popover",t);const S=((y=o.popover)==null?void 0:y.onPopoverRender)||a("onPopoverRender");S&&S(t,{config:a(),state:l()}),oe(e,o),V(u);const L=e.classList.contains("driver-dummy-element"),x=q([u,...L?[]:[e]]);x.length>0&&x[0].focus()}function U(){const e=l("popover");if(!(e!=null&&e.wrapper))return;const o=e.wrapper.getBoundingClientRect(),t=a("stagePadding")||0,i=a("popover
Offset")||0;return{width:o.width+t+i,height:o.height+t+i,realWidth:o.width,realHeight:o.height}}function ee(e,o){const{elementDimensions:t,popoverDimensions:i,popoverPadding:d,popoverArrowDimensions:n}=o;return e==="start"?Math.max(Math.min(t.top-d,window.innerHeight-i.realHeight-n.width),n.width):e==="end"?Math.max(Math.min(t.top-(i==null?void 0:i.realHeight)+t.height+d,window.innerHeight-(i==null?void 0:i.realHeight)-n.width),n.width):e==="center"?Math.max(Math.min(t.top+t.height/2-(i==null?void 0:i.realHeight)/2,window.innerHeight-(i==null?void 0:i.realHeight)-n.width),n.width):0}function te(e,o){const{elementDimensions:t,popoverDimensions:i,popoverPadding:d,popoverArrowDimensions:n}=o;return e==="start"?Math.max(Math.min(t.left-d,window.innerWidth-i.realWidth-n.width),n.width):e==="end"?Math.max(Math.min(t.left-(i==null?void 0:i.realWidth)+t.width+d,window.innerWidth-(i==null?void 0:i.realWidth)-n.width),n.width):e==="c
enter"?Math.max(Math.min(t.left+t.width/2-(i==null?void 0:i.realWidth)/2,window.innerWidth-(i==null?void 0:i.realWidth)-n.width),n.width):0}function oe(e,o){const t=l("popover");if(!t)return;const{align:i="start",side:d="left"}=(o==null?void 0:o.popover)||{},n=i,f=e.id==="driver-dummy-element"?"over":d,w=a("stagePadding")||0,r=U(),v=t.arrow.getBoundingClientRect(),s=e.getBoundingClientRect(),c=s.top-r.height;let p=c>=0;const m=window.innerHeight-(s.bottom+r.height);let g=m>=0;const u=s.left-r.width;let h=u>=0;const P=window.innerWidth-(s.right+r.width);let S=P>=0;const L=!p&&!g&&!h&&!S;let x=f;if(f==="top"&&p?S=h=g=!1:f==="bottom"&&g?S=h=p=!1:f==="left"&&h?S=p=g=!1:f==="right"&&S&&(h=p=g=!1),f==="over"){const C=window.innerWidth/2-r.realWidth/2,y=window.innerHeight/2-r.realHeight/2;t.wrapper.sty
le.left=`${C}px`,t.wrapper.style.right="auto",t.wrapper.style.top=`${y}px`,t.wrapper.style.bottom="auto"}else if(L){const C=window.innerWidth/2-(r==null?void 0:r.realWidth)/2,y=10;t.wrapper.style.left=`${C}px`,t.wrapper.style.right="auto",t.wrapper.style.bottom=`${y}px`,t.wrapper.style.top="auto"}else if(h){const C=Math.min(u,window.innerWidth-(r==null?void 0:r.realWidth)-v.width),y=ee(n,{elementDimensions:s,popoverDimensions:r,popoverPadding:w,popoverArrowDimensions:v});t.wrapper.style.left=`${C}px`,t.wrapper.style.top=`${y}px`,t.wrapper.style.bottom="auto",t.wrapper.style.right="auto",x="left"}else if(S){const C=Math.min(P,window.innerWidth-(r==null?void 0:r.realWidth)-v.width),y=ee(n,{elementDimensions:s,popoverDimensions:r,popoverPadding:w,popoverArrowDimensions:v});t.wrapper.style.right=`${C}px`,t.wrapper.style.top=`${y}px`,t.wrapper.style.bottom="auto",t.wrapper.style.left="auto",x="
right"}else if(p){const C=Math.min(c,window.innerHeight-r.realHeight-v.width);let y=te(n,{elementDimensions:s,popoverDimensions:r,popoverPadding:w,popoverArrowDimensions:v});t.wrapper.style.top=`${C}px`,t.wrapper.style.left=`${y}px`,t.wrapper.style.bottom="auto",t.wrapper.style.right="auto",x="top"}else if(g){const C=Math.min(m,window.innerHeight-(r==null?void 0:r.realHeight)-v.width);let y=te(n,{elementDimensions:s,popoverDimensions:r,popoverPadding:w,popoverArrowDimensions:v});t.wrapper.style.left=`${y}px`,t.wrapper.style.bottom=`${C}px`,t.wrapper.style.top="auto",t.wrapper.style.right="auto",x="bottom"}L?t.arrow.classList.add("driver-popover-arrow-none"):Ce(n,x,e)}function Ce(e,o,t){const i=l("popover");if(!i)return;const d=t.getBoundingClientRect(),n=U(),f=i.arrow,w=n.width,r=window.innerWidth,v=d.width,s=d.left,c=n.height,p=window.innerHeight,m=d.top,g=d.height;f.className="driver-popover-
arrow";let u=o,h=e;o==="top"?(s+v<=0?(u="right",h="end"):s+v-w<=0&&(u="top",h="start"),s>=r?(u="left",h="end"):s+w>=r&&(u="top",h="end")):o==="bottom"?(s+v<=0?(u="right",h="start"):s+v-w<=0&&(u="bottom",h="start"),s>=r?(u="left",h="start"):s+w>=r&&(u="bottom",h="end")):o==="left"?(m+g<=0?(u="bottom",h="end"):m+g-c<=0&&(u="left",h="start"),m>=p?(u="top",h="end"):m+c>=p&&(u="left",h="end")):o==="right"&&(m+g<=0?(u="bottom",h="start"):m+g-c<=0&&(u="right",h="start"),m>=p?(u="top",h="start"):m+c>=p&&(u="right",h="en
d")),u?(f.classList.add(`driver-popover-arrow-side-${u}`),f.classList.add(`driver-popover-arrow-align-${h}`)):f.classList.add("driver-popover-arrow-none")}function Pe(){const e=document.createElement("div");e.classList.add("driver-popover");const o=document.createElement("div");o.classList.add("driver-popover-arrow");const t=document.createElement("header");t.id="driver-popover-title",t.classList.add("driver-popover-title"),t.style.display="none",t.innerText="Popover Title";const i=document.createElement("div");i.id="driver-popover-description",i.classList.add("driver-popover-description"),i.style.display="none",i.innerText="Popover description is here";const d=document.createElement("button");d.type="button",d.classList.add("driver-popover-close-btn"),d.setAttribute("aria-label","Close
"),d.innerHTML="×";const n=document.createElement("footer");n.classList.add("driver-popover-footer");const f=document.createElement("span");f.classList.add("driver-popover-progress-text"),f.innerText="";const w=document.createElement("span");w.classList.add("driver-popover-navigation-btns");const r=document.createElement("button");r.type="button",r.classList.add("driver-popover-prev-btn"),r.innerHTML="← Previous";const v=document.createElement("button");return v.type="button",v.classList.add("driver-popover-next-btn"),v.innerHTML="Next →",w.appendChild(r),w.appendChild(v),n.appendChild(f),n.appendChild(w),e.appendChild(d),e.appendChild(o),e.appendChild(t),e.appendChild(i),e.appendChild(n),{wrapper:e,arrow:o,title:t,description:i,footer:n,previousButton:r,nextButton:v,closeButton:d,footerButton
s:w,progress:f}}function Se(){var o;const e=l("popover");e&&((o=e.wrapper.parentElement)==null||o.removeChild(e.wrapper))}const Le="";function ke(e={}){z(e);function o(){a("allowClose")&&v()}function t(){const s=l("activeIndex"),c=a("steps")||[];if(typeof s=="undefined")return;const p=s+1;c[p]?r(p):v()}function i(){const s=l("activeIndex"),c=a("steps")||[];if(typeof s=="undefined")return;const p=s-1;c[p]?r(p):v()}function d(s){(a("steps")||[])[s]?r(s):v()}function n(){var h;if(l("__transitionCallback"))return;const c=l("activeIndex"),p=l("__activeStep"),m=l("__activeElement");if(typeof c=="undefined"||typeof p=="undefined"||typeof l("activeIndex")=="undefined")return;const u=((h=p.popover)==null?void 0:h.onPrevClick)||a("onPrevClick");if(u)return u(m,p,{config:a(),state:l()});i()}
function f(){var u;if(l("__transitionCallback"))return;const c=l("activeIndex"),p=l("__activeStep"),m=l("__activeElement");if(typeof c=="undefined"||typeof p=="undefined")return;const g=((u=p.popover)==null?void 0:u.onNextClick)||a("onNextClick");if(g)return g(m,p,{config:a(),state:l()});t()}function w(){l("isInitialized")||(b("isInitialized",!0),document.body.classList.add("driver-active",a("animate")?"driver-fade":"driver-simple"),ye(),O("overlayClick",o),O("escapePress",o),O("arrowLeftPress",n),O("arrowRightPress",f))}function r(s=0){var H,$,B,R,M,I,ie,ne;const c=a("steps");if(!c){console.error("No steps to drive through"),v();return}if(!c[s]){v();return}b("__activeOnDestroyed",document.activeElement),b("activeIndex",s);const p=c[s],m=c[s+1],g=c[s-1],u=((H=p.popover)==null?
void 0:H.doneBtnText)||a("doneBtnText")||"Done",h=a("allowClose"),P=typeof(($=p.popover)==null?void 0:$.showProgress)!="undefined"?(B=p.popover)==null?void 0:B.showProgress:a("showProgress"),L=(((R=p.popover)==null?void 0:R.progressText)||a("progressText")||"{{current}} of {{total}}").replace("{{current}}",`${s+1}`).replace("{{total}}",`${c.length}`),x=((M=p.popover)==null?void 0:M.showButtons)||a("showButtons"),C=["next","previous",...h?["close"]:[]].filter(_e=>!(x!=null&&x.length)||x.includes(_e)),y=((I=p.popover)==null?void 0:I.onNextClick)||a("onNextClick"),k=((ie=p.popover)==null?void 0:ie.onPrevClick)||a("onPrevClick"),E=((ne=p.popover)==null?void 0:ne.onCloseClick)||a("onCloseClick");Q({...p,popover:{showButtons:C,nextBtnText:m?void 0:u,disableButtons:[...g?[]:["previous"]],showProgress:P,progressT
ext:L,onNextClick:y||(()=>{m?r(s+1):v()}),onPrevClick:k||(()=>{r(s-1)}),onCloseClick:E||(()=>{v()}),...(p==null?void 0:p.popover)||{}}})}function v(s=!0){const c=l("__activeElement"),p=l("__activeStep"),m=l("__activeOnDestroyed"),g=a("onDestroyStarted");if(s&&g){const P=!c||(c==null?void 0:c.id)==="driver-dummy-element";g(P?void 0:c,p,{config:a(),state:l()});return}const u=(p==null?void 0:p.onDeselected)||a("onDeselected"),h=a("onDestroyed");if(document.body.classList.remove("driver-active","driver-fade","driver-simple"),be(),Se(),we(),ve(),ce(),K(),c&&p){const P=c.id==="driver-dummy-element";u&&u(P?void 0:c,p,{config:a(),state:l()}),h&&h(P?void 0:c,p,{config:a(),state:l()})}m&&m.focus()}return{isActive:()=>l("isInitialized")||!1,refresh:A,drive:(s=0)=>{w(),r(s)},setConfig:z,setSteps:s=>{K(),z({...a(),steps:
s})},getConfig:a,getState:l,getActiveIndex:()=>l("activeIndex"),isFirstStep:()=>l("activeIndex")===0,isLastStep:()=>{const s=a("steps")||[],c=l("activeIndex");return c!==void 0&&c===s.length-1},getActiveStep:()=>l("activeStep"),getActiveElement:()=>l("activeElement"),getPreviousElement:()=>l("previousElement"),getPreviousStep:()=>l("previousStep"),moveNext:t,movePrevious:i,moveTo:d,hasNextStep:()=>{const s=a("steps")||[],c=l("activeIndex");return c!==void 0&&s[c+1]},hasPreviousStep:()=>{const s=a("steps")||[],c=l("activeIndex");return c!==void 0&&s[c-1]},highlight:s=>{w(),Q({...s,popover:s.popover?{showButtons:[],showProgress:!1,progressText:"",...s.popover}:void 0})},destroy:()=>{v(!1)}}}return D.driver=ke,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"}),D}({});
</ins></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginstourassetsjstouradminjs"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/js/tour-admin.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/js/tour-admin.js (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/js/tour-admin.js 2023-10-28 06:07:10 UTC (rev 12952)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,208 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+if ( typeof wp_tour !== 'undefined' ) {
+ window.tour = wp_tour;
+}
+var tourSelectorActive = false;
+var tourId;
+var dialogOpen = false;
+
+var setTourCookie = function( tourId ) {
+ document.cookie = 'tour=' + escape( tourId ) + ';path=/';
+ enableTourCreation();
+}
+
+var deleteTourCookie = function() {
+ document.cookie = 'tour=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;';
+ enableTourCreation();
+}
+
+document.addEventListener('click', function( event ) {
+ if ( ! event.target.dataset.addMoreStepsText || ! event.target.dataset.tourId ) {
+ return;
+ }
+
+ event.preventDefault();
+ if ( event.target.textContent === event.target.dataset.finishTourCreationText ) {
+ event.target.textContent = event.target.dataset.addMoreStepsText;
+ deleteTourCookie();
+ return;
+ }
+ setTourCookie( event.target.dataset.tourId );
+ event.target.textContent = event.target.dataset.finishTourCreationText;
+} );
+
+function enableTourCreation() {
+ tourId = document.cookie.indexOf('tour=') > -1 ? unescape(document.cookie.split('tour=')[1].split(';')[0]) : '';
+ if ( tourId && document.getElementById('tour-launcher') ) {
+ if ( typeof tour_plugin !== 'undefined' && typeof tour_plugin.tours[ tourId ] !== 'undefined' ) {
+ document.getElementById('tour-launcher').style.display = 'block';
+ document.getElementById('tour-title').textContent = tour_plugin.tours[ tourId ][0].title;
+ document.getElementById('tour-steps').textContent = (tour_plugin.tours[ tourId ].length - 1) + ' step' + (tour_plugin.tours[ tourId ].length > 2 ? 's' : '');
+ for ( var i = 1; i < tour_plugin.tours[ tourId ].length; i++ ) {
+ el = document.querySelector(tour_plugin.tours[ tourId ][i].selector);
+ if ( el ) {
+ el.style.outline = '1px dashed ' + tour_plugin.tours[ tourId ][0].color;
+ } else {
+ reportMissingSelector( tour_plugin.tours[ tourId ][0].title, i, tour_plugin.tours[ tourId ][i].selector );
+ }
+ }
+ }
+ } else if ( document.getElementById('tour-launcher') ) {
+ document.getElementById('tour-launcher').style.display = 'none';
+ }
+}
+enableTourCreation();
+
+function reportMissingSelector( tourTitle, step, selector ) {
+ var xhr = new XMLHttpRequest();
+ xhr.open('POST', tour_plugin.rest_url + 'tour/v1/report-missing');
+ xhr.setRequestHeader('Content-Type', 'application/json');
+ xhr.setRequestHeader('X-WP-Nonce', tour_plugin.nonce);
+ xhr.send(JSON.stringify({
+ tour: tourId,
+ selector: selector,
+ step: step,
+ url: location.href,
+ }));
+}
+
+function toggleTourSelector( event ) {
+ event.stopPropagation();
+ if ( event.target.tagName.toLowerCase() === 'a' ) {
+ deleteTourCookie();
+ return false;
+ }
+
+ tourSelectorActive = ! tourSelectorActive;
+
+ document.getElementById('tour-launcher').style.color = tourSelectorActive ? tour_plugin.tours[ tourId ][0].color : '';
+ return false;
+}
+
+document.getElementById('tour-launcher').addEventListener('click', toggleTourSelector);
+var clearHighlight = function( event ) {
+ if ( typeof tour_plugin.tours[ tourId ] !== 'undefined' ) {
+ for ( var i = 1; i < tour_plugin.tours[ tourId ].length; i++ ) {
+ if ( event.target.matches(tour_plugin.tours[ tourId ][i].selector) ) {
+ document.querySelector(tour_plugin.tours[ tourId ][i].selector).style.outline = '1px dashed ' + tour_plugin.tours[ tourId ][0].color;
+ return;
+ }
+ }
+ }
+ event.target.style.outline = '';
+ event.target.style.cursor = '';
+}
+
+var tourStepHighlighter = function(event) {
+ var target = event.target;
+ if ( ! tourSelectorActive || target.closest('#tour-launcher') ) {
+ clearHighlight( event );
+ return;
+ }
+ // Highlight the element on hover
+ target.style.outline = '2px solid ' + tour_plugin.tours[ tourId ][0].color;
+ target.style.cursor = 'pointer';
+};
+
+var filter_selectors = function( c ) {
+ return c.indexOf( 'wp-' ) > -1
+ || c.indexOf( 'page' ) > -1
+ || c.indexOf( 'post' ) > -1
+ || c.indexOf( 'column' ) > -1;
+}
+
+var tourStepSelector = function(event) {
+ if ( ! tourSelectorActive ) {
+ return;
+ }
+
+ function getSelectors(elem) {
+ var selectors = [];
+
+ while ( elem.parentElement ) {
+ var currentElement = elem.parentElement;
+ var tagName = elem.tagName.toLowerCase();
+ var classes = [];
+
+ if ( elem.id ) {
+ selectors.push( tagName + '#' + elem.id );
+ break;
+ }
+
+ elem.classList.forEach( function( c ) {
+ if ( ! filter_selectors( c ) ) {
+ return;
+ }
+ classes.push( c );
+ })
+
+ if ( classes.length ) {
+ selectors.push( tagName + '.' + classes.join( '.') );
+ } else {
+ var index = Array.prototype.indexOf.call(currentElement.children, elem) + 1;
+ selectors.push(tagName + ':nth-child(' + index + ')');
+ }
+
+ elem = currentElement;
+ }
+
+ return selectors.reverse();
+ }
+
+
+ event.preventDefault();
+
+ var selectors = getSelectors(event.target);
+
+ dialogOpen = true;
+ var stepName = prompt( 'Enter description for step ' + tour_plugin.tours[ tourId ].length );
+ if ( ! stepName ) {
+ event.target.style.outline = '';
+ return false;
+ }
+
+ tour_plugin.tours[ tourId ].push({
+ element: selectors.join(' '),
+ popover: {
+ title: tour_plugin.tours[ tourId ][0].title,
+ description: stepName,
+ },
+ });
+
+ event.target.style.outline = '1px dashed ' + tour_plugin.tours[ tourId ][0].color;
+
+ if ( tour_plugin.tours[ tourId ].length > 1 ) {
+ var xhr = new XMLHttpRequest();
+ xhr.open('POST', tour_plugin.rest_url + 'tour/v1/save');
+ xhr.setRequestHeader('Content-Type', 'application/json');
+ xhr.setRequestHeader('X-WP-Nonce', tour_plugin.nonce);
+ xhr.send(JSON.stringify({
+ tour: tourId,
+ steps: JSON.stringify(tour_plugin.tours[ tourId ]),
+ }));
+
+ document.getElementById('tour-steps').textContent = (tour_plugin.tours[ tourId ].length - 1) + ' step' + (tour_plugin.tours[ tourId ].length > 2 ? 's' : '');
+ document.getElementById('tour-title').textContent = 'Saved!';
+
+ window.loadTour();
+ setTimeout(function() {
+ document.getElementById('tour-title').textContent = tour_plugin.tours[ tourId ][0].title;
+ }, 1000);
+ return false;
+ }
+
+ return false;
+};
+
+document.addEventListener('keyup', function(event) {
+ if ( event.keyCode === 27 ) {
+ if ( dialogOpen ) {
+ dialogOpen = false;
+ return;
+ }
+ tourSelectorActive = false;
+ document.getElementById('tour-launcher').style.color = '';
+ }
+});
+document.addEventListener('mouseover', tourStepHighlighter);
+document.addEventListener('mouseout', clearHighlight);
+document.addEventListener('click', tourStepSelector);
</ins></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginstourassetsjstourjs"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/js/tour.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/js/tour.js (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/assets/js/tour.js 2023-10-28 06:07:10 UTC (rev 12952)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,174 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/* global , document, window, wp_tour */
+/* eslint camelcase: "off" */
+
+document.addEventListener('DOMContentLoaded', function() {
+ var dismissTour;
+ document.addEventListener('click', function( event ) {
+ if ( ! event.target.matches( '.pulse' ) ) {
+ return;
+ }
+ event.preventDefault();
+ const driver = window.driver.js.driver;
+ const tourId = event.target.dataset.tourId;
+ var startStep = 0;
+ if ( typeof tour_plugin.progress[ tourId ] !== 'undefined' ) {
+ startStep = tour_plugin.progress[ tourId ] - 1;
+ }
+ if ( startStep <= 0 ) {
+ startStep = 0;
+ }
+ var tourSteps = tour_plugin.tours[ tourId ].slice(1);
+ if ( ! tourSteps.length ) {
+ return;
+ }
+
+ dismissTour = function() {
+ var xhr = new XMLHttpRequest();
+ xhr.open('POST', tour_plugin.rest_url + 'tour/v1/save-progress');
+ xhr.setRequestHeader('Content-Type', 'application/json');
+ xhr.setRequestHeader('X-WP-Nonce', tour_plugin.nonce);
+ xhr.send(JSON.stringify({
+ tour: tourId,
+ step: tour_plugin.tours[ tourId ].length
+ }));
+
+ driverObj.destroy();
+ }
+ tourSteps[startStep].element = event.target.closest('.pulse-wrapper');
+ var driverObj = driver( {
+ showProgress: true,
+ steps: tourSteps,
+ onHighlightStarted: function( element, step, options ) {
+ step.popover.description += '<br><a href="" class="dismiss-tour">Dismiss the tour';
+ },
+ onHighlighted: function( element, step, options ) {
+ var xhr = new XMLHttpRequest();
+ xhr.open('POST', tour_plugin.rest_url + 'tour/v1/save-progress');
+ xhr.setRequestHeader('Content-Type', 'application/json');
+ xhr.setRequestHeader('X-WP-Nonce', tour_plugin.nonce);
+ xhr.send(JSON.stringify({
+ tour: tourId,
+ step: options.state.activeIndex + 1
+ }));
+ },
+ onDestroyStarted: function( element, step, options ) {
+ if ( driverObj.hasNextStep() ) {
+ addPulse( tourId, options.state.activeIndex + 1 );
+ } else {
+ var xhr = new XMLHttpRequest();
+ xhr.open('POST', tour_plugin.rest_url + 'tour/v1/save-progress');
+ xhr.setRequestHeader('Content-Type', 'application/json');
+ xhr.setRequestHeader('X-WP-Nonce', tour_plugin.nonce);
+ xhr.send(JSON.stringify({
+ tour: tourId,
+ step: tour_plugin.tours[ tourId ].length
+ }));
+ }
+ driverObj.destroy();
+ }
+ } );
+ driverObj.drive( startStep );
+ const pulse = tourSteps[startStep].element.querySelector('.pulse');
+ pulse.parentNode.removeChild( pulse );
+ } );
+
+ document.addEventListener('click', function( event ) {
+ if ( ! event.target.matches( '.dismiss-tour' ) ) {
+ return;
+ }
+ event.preventDefault();
+ if ( dismissTour ) {
+ dismissTour();
+ }
+ } );
+
+
+ function addPulse( tourId, startStep ) {
+ let fields;
+ if ( startStep === 0 ) {
+ startStep = 1;
+ }
+ if ( tour_plugin.tours[ tourId ].length <= startStep ) {
+ return;
+ }
+ const selector = tour_plugin.tours[ tourId ][ startStep ].element;
+ if ( typeof selector === 'string' ) {
+ try {
+ fields = document.querySelectorAll( selector );
+ } catch {
+ fields = [];
+ }
+ } else {
+ fields = [ selector ];
+ }
+
+ for (let i = 0; i < fields.length; i++) {
+ let field = fields[i];
+ let wrapper = field.closest('.pulse-wrapper');
+ if (!wrapper) {
+ if ( field.hasChildNodes() ) {
+ wrapper = field;
+ } else {
+ wrapper = document.createElement('div');
+ field.parentNode.insertBefore(wrapper, field);
+ wrapper.appendChild(field);
+ }
+ wrapper.classList.add("pulse-wrapper");
+ }
+ if ( ! wrapper.querySelector('.pulse') ) {
+ const pulse = document.createElement('div');
+ pulse.classList.add("pulse");
+ pulse.classList.add("tour-" + tourId);
+ pulse.dataset.tourId = tourId;
+ pulse.dataset.tourId = tourId;
+ if ( field.hasChildNodes() ) {
+ wrapper.insertBefore(pulse,wrapper.firstChild);
+ } else {
+ wrapper.insertBefore(pulse,field);
+ }
+ }
+ }
+ }
+
+ const loadTour = function() {
+ var color1 = '';
+ var color2 = '';
+ var styleElement = document.createElement( 'style' );
+ var style;
+ var startStep;
+
+ document.head.appendChild( styleElement );
+ style = styleElement.sheet;
+
+ for ( const tourId in tour_plugin.tours ) {
+ color1 = tour_plugin.tours[ tourId ][ 0 ].color;
+ color2 = tour_plugin.tours[ tourId ][ 0 ].color + 'a0';
+ style.insertRule( '@keyframes animation-' + tourId + ' {' +
+ '0% {' +
+ 'box-shadow: 0 0 0 0 ' + color2 + ';' +
+ '}' +
+ '70% {' +
+ 'box-shadow: 0 0 0 10px ' + color1 + '00' + ';' +
+ '}' +
+ '100% {' +
+ 'box-shadow: 0 0 0 0 ' + color1 + '00' + ';' +
+ '}' +
+ '}',
+ style.cssRules.length );
+
+ style.insertRule( '.tour-' + tourId + '{' +
+ 'box-shadow: 0 0 0 ' + color2 + ';' +
+ 'background: ' + color1 + '80' + ';' +
+ '-webkit-animation: animation-' + tourId + ' 2s infinite;' +
+ 'animation: animation-' + tourId + ' 2s infinite; }',
+ style.cssRules.length );
+ startStep = 0;
+ if ( typeof tour_plugin.progress[ tourId ] !== 'undefined' ) {
+ startStep = tour_plugin.progress[ tourId ];
+ }
+ addPulse( tourId, startStep );
+ }
+ };
+ loadTour();
+}
+);
</ins></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginstourtourphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/tour.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/tour.php (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/tour.php 2023-10-28 06:07:10 UTC (rev 12952)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,618 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+/**
+ * Plugin Name: Tour
+ * Plugin URI: http://wordpress.org/plugins/tour/
+ * Description: A WordPress plugin for creating tours for your site.
+ * Version: 1.0
+ * Author: Automattic
+ * Author URI: http://automattic.com/
+ * Text Domain: tour
+ * License: GPLv2 or later
+ */
+
+defined( 'ABSPATH' ) || die();
+
+function tour_enqueue_scripts() {
+ static $once = false;
+ if ( $once ) {
+ return;
+ }
+ $once = true;
+
+ wp_register_style( 'driver-js', plugins_url( 'assets/css/driver-js.css', __FILE__ ), array(), filemtime( __DIR__ . '/assets/css/driver-js.css' ) );
+ wp_register_style( 'tour-css', plugins_url( 'assets/css/style.css', __FILE__ ), array(), filemtime( __DIR__ . '/assets/css/style.css' ) );
+ wp_enqueue_style( 'driver-js' );
+ wp_enqueue_style( 'tour-css' );
+ wp_enqueue_script( 'driver-js', plugins_url( 'assets/js/driver-js.js', __FILE__ ), array(), filemtime( __DIR__ . '/assets/js/driver-js.js' ), array( 'in_footer' => true ) );
+ wp_register_script( 'tour', plugins_url( 'assets/js/tour.js', __FILE__ ), array( 'driver-js' ), filemtime( __DIR__ . '/assets/js/tour.js' ), false );
+ wp_enqueue_script( 'tour' );
+ wp_localize_script(
+ 'tour',
+ 'tour_plugin', array(
+ 'tours' => apply_filters( 'tour_list', array() ),
+ 'nonce' => wp_create_nonce( 'wp_rest' ),
+ 'rest_url' => rest_url(),
+ 'progress' => get_user_option( 'tour-progress', get_current_user_id() ),
+ )
+ );
+
+ if ( current_user_can( 'edit_posts' ) ) {
+ wp_register_script( 'tour-admin', plugins_url( 'assets/js/tour-admin.js', __FILE__ ), array( 'driver-js' ), filemtime( __DIR__ . '/assets/js/tour-admin.js' ), true );
+ wp_enqueue_script( 'tour-admin' );
+ }
+}
+
+add_action( 'admin_enqueue_scripts', 'tour_enqueue_scripts' );
+add_action( 'wp_enqueue_scripts', 'tour_enqueue_scripts' );
+add_action( 'gp_head', 'wp_enqueue_scripts' );
+
+function tour_register_post_type() {
+ register_post_type(
+ 'tour',
+ array(
+ 'labels' => array(
+ 'name' => __( 'Tours', 'tour' ),
+ 'singular_name' => __( 'Tour', 'tour' ),
+ 'add_new' => __( 'Create New', 'tour' ),
+ 'add_new_item' => __( 'Create New Tour', 'tour' ),
+ 'edit_item' => __( 'Edit Tour', 'tour' ),
+ 'new_item' => __( 'New Tour', 'tour' ),
+ 'all_items' => __( 'All Tours', 'tour' ),
+ 'view_item' => __( 'View Tour', 'tour' ),
+ 'search_items' => __( 'Search Tours', 'tour' ),
+ 'not_found' => __( 'No tours found.', 'tour' ),
+
+ ),
+
+ 'public' => false,
+ 'show_ui' => true,
+ 'show_in_nav_menus' => true,
+ 'show_in_menu' => 'tour',
+ 'supports' => array( 'title', 'revisions' ),
+ )
+ );
+}
+add_action( 'init', 'tour_register_post_type' );
+
+add_action(
+ 'rest_api_init',
+ function() {
+ register_rest_route(
+ 'tour/v1',
+ 'save-progress',
+ array(
+ 'methods' => 'POST',
+ 'callback' => function( WP_REST_Request $request ) {
+ if ( ! is_user_logged_in() ) {
+ return array( 'success' => 'logged-out' );
+ }
+ $step = $request->get_param( 'step' );
+ $tour_id = $request->get_param( 'tour' );
+
+ $tour = get_post( $tour_id );
+ if ( ! $tour || is_wp_error( $tour ) || $tour->post_type !== 'tour' ) {
+ return array(
+ 'success' => false,
+ );
+ }
+
+ $tour_progress = get_user_option( 'tour-progress', get_current_user_id() );
+ if ( ! $tour_progress ) {
+ $tour_progress = array();
+ }
+ if ( $step < 0 || ! is_numeric( $step ) ) {
+ unset( $tour_progress[ $tour_id ] );
+ } else {
+ $tour_progress[ $tour_id ] = $step;
+ }
+ update_user_option( get_current_user_id(), 'tour-progress', $tour_progress );
+ return array(
+ 'success' => true,
+ );
+ },
+ )
+ );
+
+ register_rest_route(
+ 'tour/v1',
+ 'report-missing',
+ array(
+ 'methods' => 'POST',
+ 'callback' => function( WP_REST_Request $request ) {
+ $step = $request->get_param( 'step' );
+ $tour_id = $request->get_param( 'tour' );
+ $selector = $request->get_param( 'selector' );
+ $url = $request->get_param( 'url' );
+
+ $tour = get_post( $tour_id );
+ if ( ! $tour || is_wp_error( $tour ) || $tour->post_type !== 'tour' ) {
+ return array(
+ 'success' => false,
+ );
+ }
+
+ if ( $tour ) {
+ $missing_steps = get_post_meta( $tour, 'missing_steps', true );
+ if ( ! $missing_steps ) {
+ $missing_steps = array();
+ }
+ if ( ! isset( $missing_steps[ $step ] ) ) {
+ $missing_steps[ $step ] = array();
+ }
+ if ( ! isset( $missing_steps[ $step ][ $url ] ) ) {
+ $missing_steps[ $step ][ $url ] = array();
+ }
+ if ( ! isset( $missing_steps[ $step ][ $url ][ $selector ] ) ) {
+ $missing_steps[ $step ][ $url ][ $selector ] = 0;
+ }
+ $missing_steps[ $step ][ $url ][ $selector ] += 1;
+ update_post_meta( $tour, 'missing_steps', $missing_steps );
+ return array(
+ 'success' => true,
+ );
+ }
+ return array(
+ 'success' => false,
+ );
+ },
+ )
+ );
+
+ register_rest_route(
+ 'tour/v1',
+ 'save',
+ array(
+ 'methods' => 'POST',
+ 'callback' => function( WP_REST_Request $request ) {
+ if ( ! current_user_can( 'edit_posts' ) ) {
+ return array(
+ 'success' => false,
+ );
+ }
+ $steps = json_decode( $request->get_param( 'steps' ), true );
+ if ( ! isset( $steps[0]['title'] ) ) {
+ return array(
+ 'success' => false,
+ );
+ }
+ if ( ! isset( $steps[1]['popover'] ) ) {
+ return array(
+ 'success' => false,
+ );
+ }
+ $tour_id = $request->get_param( 'tour' );
+
+ $tour = get_post( $tour_id );
+ if ( ! $tour || is_wp_error( $tour ) || $tour->post_type !== 'tour' ) {
+ return array(
+ 'success' => false,
+ );
+ }
+
+ if ( $tour ) {
+ wp_update_post(
+ array(
+ 'ID' => $tour_id,
+ 'post_content' => json_encode( $steps ),
+ 'post_status' => 'publish',
+ ),
+ true
+ );
+ }
+
+ return $tour_id;
+ },
+ )
+ );
+ }
+);
+
+add_filter(
+ 'post_row_actions',
+ function( $actions, $post ) {
+ if ( $post->post_type !== 'tour' || $post->post_status === 'trash' ) {
+ return $actions;
+ }
+
+ $tour_steps = json_decode( wp_unslash( $post->post_content ), true );
+ if ( empty( $tour_steps[0]['title'] ) ) {
+ return $actions;
+ }
+
+ $caption = __( 'Add more steps', 'tour' );
+
+ $actions['add-more-steps'] = '<a href="' . get_permalink( $post->ID ) . '" data-tour-id="' . esc_attr( $post->ID ) . '" data-add-more-steps-text="' . esc_attr( $caption ) . '" data-finish-tour-creation-text="' . esc_attr( __( 'Finish tour creating the tour',' tour' ) ) . '" title="' . esc_attr( $caption ) . '">' . esc_html( $caption ) . '</a>';
+ return $actions;
+ }, 10, 2
+);
+
+add_filter(
+ 'tour_row_actions',
+ function ( $actions, $tag ) {
+ $actions[] = 'Add more steps';
+ return $actions;
+ }, 10, 2
+);
+
+add_filter(
+ 'wp_insert_post_data',
+ function ( $data, $postarr ) {
+ if ( ! isset( $_POST['_wpnonce'] ) || ! wp_verify_nonce( $_POST['_wpnonce'], 'update-post_' . $postarr['ID'] ) ) {
+ return $data;
+ }
+
+ if ( ! isset( $_POST['tour'] ) || ! isset( $_POST['color'] ) || 'tour' !== $data['post_type'] ) {
+ return $data;
+ }
+
+ $data['post_title'] = sanitize_text_field( $_POST['post_title'] );
+
+ $tour = array(
+ array(
+ 'color' => sanitize_text_field( $_POST['color'] ),
+ 'title' => $data['post_title'],
+ )
+ );
+
+ if ( isset( $_POST['override_json'] ) ) {
+ $data['post_content'] = sanitize_text_field( $_POST['json'] );
+ return $data;
+ }
+
+ if ( isset( $_POST['order'] ) ) {
+ foreach ( $_POST['order'] as $i ) {
+ $step = $_POST['tour'][$i];
+
+ if ( '' === trim( $step['element'] ) ) {
+ continue;
+ }
+
+ if ( ! isset( $step['popover'] ) ) {
+ continue;
+ }
+
+ $step['element'] = sanitize_text_field( $step['element'] );
+ foreach ( $step['popover'] as $k => $v ) {
+ if ( ! in_array( $k, array( 'title', 'description'))) {
+ unset($step['popover'][$k]);
+ }
+ }
+ $tour[] = $step;
+ }
+ }
+
+ $data['post_content'] = wp_json_encode( $tour );
+ return $data;
+ },
+ 10,
+ 2
+);
+
+add_action( 'postbox_classes_tour_tour-json', function( $classes ) {
+ $classes[] = 'closed';
+ return $classes;
+});
+add_action( 'admin_init', function() {
+ add_meta_box(
+ 'tour-json',
+ 'JSON',
+ function( $post ) {
+ $tour = json_decode( wp_unslash( $post->post_content ), true );
+ if ( $tour ) {
+ $json = json_encode( $tour, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT );
+ ?><textarea name="json" style="font-family: monospace; width: 100%" rows="<?php echo esc_attr( min( 50, 2 + count( explode( PHP_EOL, $json ) ) ) ); ?>"><?php echo esc_html( $json ); ?></textarea><br/>
+ <label><input type="checkbox" name="override_json" value="1"> <?php esc_html_e( 'Override when saving', 'tour' ); ?></label>
+ <?php
+ }
+ },
+ 'tour',
+ 'side',
+ 'low'
+ );
+} );
+
+add_action( 'edit_form_after_editor', function( $post ) {
+ if ( 'tour' !== get_post_type( $post ) ) {
+ return;
+ }
+
+ $tour = json_decode( wp_unslash( $post->post_content ), true );
+ if ( ! $tour ) {
+ $color = '#3939c7';
+ $tour = array();
+ } else {
+ $color = $tour[0]['color'];
+ array_shift( $tour );
+ }
+
+ ?>
+ <div style="border: 1px solid #ccc; border-radius: 4px; padding: .5em; margin-top: 2em">
+ <table class="form-table">
+ <tr>
+ <th scope="row"><?php esc_html_e( 'Color', 'tour' ); ?></th>
+ <td>
+ <input type="color" name="color" id="tour_color" value="<?php echo esc_attr( $color ); ?>" />
+ </td>
+ </tr>
+ </table>
+ </div>
+ <div id="steps">
+ <?php
+ foreach ( $tour as $k => $step ) {
+ ?>
+ <div class="step" style="border: 1px solid #ccc; border-radius: 4px; padding: .5em; margin-top: 2em">
+ <input type="hidden" name="order[]" value="<?php echo esc_attr( $k ); ?>"/>
+ <table class="form-table">
+ <tbody>
+ <tr>
+ <th scope="row"><label for="tour-title-<?php echo esc_attr( $k ); ?>"><?php esc_html_e( 'Title', 'tour' ); ?></label><br>
+ </th>
+ <td>
+ <input name="tour[<?php echo esc_attr( $k ); ?>][popover][title]" rows="7" id="tour-step-title-<?php echo esc_attr( $k ); ?>" class="regular-text" value="<?php echo esc_attr( $step['popover']['title'] ); ?>"/>
+ </td>
+ </tr>
+ <tr>
+ <th scope="row"><label for="tour-step-description-<?php echo esc_attr( $k ); ?>"><?php esc_html_e( 'Description', 'tour' ); ?></label></th>
+ <td>
+ <textarea name="tour[<?php echo esc_attr( $k ); ?>][popover][description]" rows="7" id="tour-step-description-<?php echo esc_attr( $k ); ?>" class="large-text"><?php echo esc_html( $step['popover']['description'] ); ?></textarea>
+ </td>
+ </tr>
+ <tr>
+ <th scope="row"><label for="tour-step-element-<?php echo esc_attr( $k ); ?>"><?php esc_html_e( 'CSS Selector', 'tour' ); ?></label></th>
+ <td>
+ <textarea name="tour[<?php echo esc_attr( $k ); ?>][element]" rows="7" id="tour-step-element-<?php echo esc_attr( $k ); ?>" class="large-text code tour-step-css"><?php echo esc_html( is_array( $step['element'] ) ? reset( $step['element'] ) : $step['element'] ); ?></textarea>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <a href="#" class="delete-tour-step" data-delete-text="<?php esc_attr_e( 'Delete', 'tour' ); ?>" data-undo-text="<?php esc_attr_e( 'Undo Delete', 'tour' ); ?>"><?php esc_html_e( 'Delete', 'tour' ); ?></a>
+ <a href="#" class="tour-move-up"><?php esc_html_e( 'Move Up', 'tour' ); ?></a>
+ <a href="#" class="tour-move-down"><?php esc_html_e( 'Move Down', 'tour' ); ?></a>
+
+ </div>
+ <?php
+ }
+ ?>
+ </div>
+ <?php if ( $post->post_title ) : ?>
+ <br/><button id="add-more-steps" class="button"><?php esc_html_e( 'Add Steps', 'tour' ); ?></button>
+ <?php else : ?>
+ <p class="description">
+ Set a title to add tour steps.
+ </p>
+ <?php endif; ?>
+ <style>
+ #driver-popover-content {
+ max-width: none;
+ }
+ </style>
+ <script>
+ document.getElementById('post').addEventListener('submit', function ( event ) {
+ setTourCookie( document.getElementById('post_ID').value );
+ } );
+
+ <?php if ( $post->post_title ) : ?>
+ document.getElementById('add-more-steps').addEventListener('click', function ( event ) {
+ event.preventDefault();
+ setTourCookie( document.getElementById('post_ID').value );
+ const driver = window.driver.js.driver;
+ var driverObj = driver( {
+ showProgress: false,
+ steps: [
+ {
+ element: '#tour-launcher',
+ popover: {
+ title: 'Add your first step',
+ description: 'Click this to enable and disable.',
+ side: 'top'
+ }
+ },
+ {
+ popover: {
+ title: 'Select the element to highlight',
+ description: '<img src="<?php echo esc_url( plugins_url( 'assets/images/select-tour-step.gif', __FILE__ ) ); ?>" alt="<?php esc_attr_e( 'Tour creation mode', 'tour' ); ?>" width="525" height="166" />',
+ side: 'top'
+ }
+ }
+ ]
+ } );
+ driverObj.drive();
+ } );
+ <?php endif; ?>
+ var updateArrows = function() {
+ document.querySelectorAll('.step').forEach( function( element ) {
+ element.querySelector('.tour-move-up').style.display = element.previousElementSibling ? 'inline' : 'none';
+ element.querySelector('.tour-move-down').style.display = element.nextElementSibling ? 'inline' : 'none';
+ });
+ }
+
+ document.addEventListener('click', function( event ) {
+ if ( ! event.target.matches('.tour-move-up') ) {
+ return;
+ }
+ event.preventDefault();
+ var element = event.target.closest('div');
+ var parent = element.parentNode;
+ var prev = element.previousElementSibling;
+ if ( prev ) {
+ parent.insertBefore( element, prev );
+ }
+ updateArrows();
+ });
+
+ document.addEventListener('click', function( event ) {
+ if ( ! event.target.matches('.tour-move-down') ) {
+ return;
+ }
+ event.preventDefault();
+ var element = event.target.closest('div');
+ var parent = element.parentNode;
+ var next = element.nextElementSibling;
+ if ( next ) {
+ parent.insertBefore( next, element );
+ }
+ updateArrows();
+ });
+ updateArrows();
+
+ document.addEventListener('click', function( event ) {
+ if ( ! event.target.matches('.delete-tour-step') ) {
+ return;
+ }
+ event.preventDefault();
+ var t = event.target.closest('div').querySelector('table');
+ var css = t.querySelector('.tour-step-css');
+ if ( t.style.display === 'none' ) {
+ t.style.display = 'table';
+ css.value = css.dataset.oldValue;
+ event.target.textContent = event.target.dataset.deleteText;
+ return;
+ }
+ t.style.display = 'none';
+ css.dataset.oldValue = css.value;
+ css.value = '';
+ event.target.textContent = event.target.dataset.undoText;
+ });
+
+ </script>
+ <?php
+}
+);
+
+add_filter(
+ 'tour_list',
+ function( $tour ) {
+ $args = array(
+ 'post_type' => 'tour',
+ 'posts_per_page' => -1,
+ );
+ if ( current_user_can( 'edit_posts' ) ) {
+ $args['post_status'] = array( 'publish', 'draft' );
+ }
+ $tours = get_posts( $args );
+
+ foreach ( $tours as $_tour ) {
+ $tour_steps = json_decode( wp_unslash( $_tour->post_content ), true );
+ if ( ! $tour_steps ) {
+ $tour_steps = array(
+ array(
+ 'title' => $_tour->post_title,
+ 'color' => '#3939c7',
+ )
+ );
+ }
+ $tour[ $_tour->ID ] = $tour_steps;
+ }
+
+ return $tour;
+ }
+);
+
+function tour_add_admin_menu() {
+ add_menu_page( 'Tour', 'Tour', 'edit_posts', 'tour', 'tour', 'dashicons-admin-site-alt3', 6 );
+ add_submenu_page( 'tour', 'Settings', 'Settings', 'edit_posts', 'tour-settings', 'tour_admin_settings' );
+}
+
+add_action( 'admin_menu', 'tour_add_admin_menu' );
+
+function tour_admin_settings() {}
+
+function output_tour_button() {
+ if ( ! current_user_can( 'edit_posts' ) ) {
+ return;
+ }
+ ?>
+ <style>
+ #tour-launcher {
+ position: fixed;
+ bottom: 76px;
+ right: 24px;
+ font-size: 13px;
+ border: 1px solid #ccc;
+ border-radius: 10px;
+ background: #fff;
+ padding: .5em;
+ line-height: 1;
+ box-shadow: 0 0 3px #999;
+ z-index: 999999;
+ }
+ #tour-launcher span#tour-title {
+ cursor: pointer;
+ line-height: 1.3em;
+ }
+ #tour-launcher span#tour-title:hover {
+ text-shadow: 0 0 1px #999;
+ }
+ </style>
+ <div id="tour-launcher" style="display: none;">
+ <span class="dashicons dashicons-admin-site-alt3"></span>
+ <span id="tour-title"></span>
+ <br>
+ <span style="float: right">
+ <span id="tour-steps"></span>
+ <a href="">close</a>
+ </span>
+ </div>
+ <?php
+}
+
+add_action( 'wp_footer', 'output_tour_button' );
+add_action( 'admin_footer', 'output_tour_button' );
+
+add_action('show_user_profile', function() {
+ ?>
+ <h2>Tour</h2>
+ <p>Reset your tour progress:</p>
+ <table class="">
+ <thead>
+ <tr>
+ <td>Name</td>
+ <td>Progress</td>
+ <td>Action</td>
+ </tr>
+ </thead>
+ <?php
+ $progress = get_user_option( 'tour-progress', get_current_user_id() );
+ foreach ( apply_filters( 'tour_list', array() ) as $tour_id => $tour ) {
+ $tour_title = $tour[0]['title'];
+ ?>
+ <tr>
+ <td><?php echo esc_html( $tour_title ); ?>:</td>
+ <td class="tour-progress" data-not-started-text="<?php esc_attr_e( 'Not started.', 'tour' ); ?>"><?php
+ if ( isset( $progress[$tour_id] ) && $progress[$tour_id] ) {
+ echo esc_html( $progress[$tour_id] );
+ } else {
+ esc_html_e( 'Not started.', 'tour' );
+ }
+ ?></td>
+ <td><a href="" class="reset-tour" data-reset-tour-id="<?php echo esc_html( $tour_id ); ?>">Reset</td>
+ </tr>
+ <?php
+ }
+
+ ?>
+ </table>
+ <script>
+document.addEventListener('click', function( event ) {
+ if ( ! event.target.dataset.resetTourId ) {
+ return;
+ }
+
+ event.preventDefault();
+
+ var xhr = new XMLHttpRequest();
+ xhr.open('POST', tour_plugin.rest_url + 'tour/v1/save-progress');
+ xhr.setRequestHeader('Content-Type', 'application/json');
+ xhr.setRequestHeader('X-WP-Nonce', tour_plugin.nonce);
+ xhr.send(JSON.stringify({
+ tour: event.target.dataset.resetTourId,
+ step: -1
+ }));
+ var p = event.target.closest('tr').querySelector('.tour-progress');
+
+ p.textContent = p.dataset.notStartedText;
+
+} );
+ </script>
+ <?php
+} );
</ins><span class="cx" style="display: block; padding: 0 10px">Property changes on: sites/trunk/wordpress.org/public_html/wp-content/plugins/tour/tour.php
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:eol-style</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+native
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span></div>
</body>
</html>