Файловый менеджер - Редактировать - /home/tuudkjt/globeasy/wp-includes/ID3/widget-importer-exporter.tar
Назад
js/main.js 0000777 00000000322 15251156635 0006457 0 ustar 00 jQuery(document).ready(function ($) { // Show textarea when click "copy and paste" $('#wie-content-toggle').on('click', function () { $('#wie-import-data').fadeIn('fast').focus(); }); }); css/style.css 0000777 00000002105 15251156635 0007224 0 ustar 00 /* Cell padding */ #wie-import-results td { padding: 2px 30px 2px 0; } /* Sidebar name */ .wie-import-results-sidebar-name { font-weight: bold; } /* Widget instance title */ .wie-import-results-widget-title { font-style: italic; } /* Message (sidebar and widget) */ .wie-import-results-sidebar .wie-import-results-message { font-weight: bold; } .wie-import-results-message-success { color: #1c8a1f; } .wie-import-results-message-warning { color: #eb860f; } .wie-import-results-message-error { color: #cc2626; } /* Empty row after each sidebar/widget set */ .wie-import-results-space { height: 8px; } /* Notices */ #wie-notice-message { display: inline-block; width: calc( 100% - 125px ); } #wie-notice-message a { white-space: nowrap; } #wie-notice-remind { display: inline-block; float: right; } @media only screen and (max-width: 400px) { #wie-notice-message { width: auto; padding-right: 4px; } #wie-notice-remind { float: none; } } /* Forms */ textarea { max-width: 100%; } #wie-import-data { display: none; } license.txt 0000777 00000043254 15251156635 0006757 0 ustar 00 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. includes/widgets.php 0000777 00000002214 15251156635 0010550 0 ustar 00 <?php /** * Widget Functions * * @package Widget_Importer_Exporter * @subpackage Functions * @copyright Copyright (c) 2013 - 2020, ChurchThemes.com, LLC * @link https://churchthemes.com/plugins/widget-importer-exporter/ * @license https://www.gnu.org/licenses/gpl-2.0.html GPL-2.0-or-later * @since 0.4 */ defined('ABSPATH') || exit; // No direct access. /** * Available widgets * * Gather site's widgets into array with ID base, name, etc. * Used by export and import functions. * * @since 0.4 * @global array $wp_registered_widget_updates * @return array Widget information */ function wie_available_widgets() { global $wp_registered_widget_controls; $widget_controls = $wp_registered_widget_controls; $available_widgets = array(); foreach ($widget_controls as $widget) { // No duplicates. if (! empty( $widget['id_base'] ) && ! isset( $available_widgets[ $widget['id_base'] ] )) { $available_widgets[ $widget['id_base'] ]['id_base'] = $widget['id_base']; $available_widgets[ $widget['id_base'] ]['name'] = $widget['name']; } } return apply_filters( 'wie_available_widgets', $available_widgets ); } includes/import.php 0000777 00000032610 15251156635 0010417 0 ustar 00 <?php /** * Import Functions * * @package Widget_Importer_Exporter * @subpackage Functions * @copyright Copyright (c) 2013 - 2020, ChurchThemes.com, LLC * @link https://churchthemes.com/plugins/widget-importer-exporter/ * @license https://www.gnu.org/licenses/gpl-2.0.html GPL-2.0-or-later * @since 0.3 */ defined('ABSPATH') || exit; // No direct access. /** * Process submit * * Process uploaded file or pasted contents. If both, use pasted content. * If neither, show an error telling to use one or the other method. * * @since 1.6 */ function wie_process_submit() { // Form not posted if (empty($_POST)) { return; } // Check nonce check_admin_referer('wie_import', 'wie_import_nonce'); // Content pasted if (! empty($_POST['wie_import_data'])) { wie_submit_import_data(); } // File uploaded (but not content pasted) else if (! empty($_FILES['wie_import_file']['name'])) { wie_upload_import_file(); } // Nothing provided else { wp_die( wp_kses( __("You must choose a <b>.wie</b> file to upload or paste its contents.", 'widget-importer-exporter'), array( 'b' => array(), ) ), '', array( 'back_link' => true, ) ); } } add_action('load-tools_page_widget-importer-exporter', 'wie_process_submit'); /** * Submit import data (copy and paste from file) * * If file and content both provided, uses content. * * @since 1.6 * @global string $wie_import_results */ function wie_submit_import_data() { global $wie_import_results; check_admin_referer('wie_import', 'wie_import_nonce'); if (! empty($_POST['wie_import_data'])) { $content = ''; // Get content pasted $content = filter_var(wp_unslash($_POST['wie_import_data']), FILTER_DEFAULT); $content = trim($content); // Import the widget data // Make results available for display on import/export page. $data = json_decode($content); // Decode file contents to JSON data. $wie_import_results = wie_import_data($data); } } /** * Upload import file * * If file and content provided, uses content. * * @since 0.3 */ function wie_upload_import_file() { check_admin_referer('wie_import', 'wie_import_nonce'); if (! empty($_FILES['wie_import_file']['name'])) { // Workaround for .wie upload issue introduced by WordPress 4.9.9 / 5.0.1. add_filter('wp_check_filetype_and_ext', 'wie_allow_multiple_mime_types', 10, 4); // Workaround for upload bug in WordPress 4.7.1. // This will only be applied for WordPress 4.7.1. Other versions are not affected. add_filter('wp_check_filetype_and_ext', 'wie_disable_real_mime_check', 10, 4); // Uploaded file. $uploaded_file = wp_unslash($_FILES['wie_import_file']); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized $uploaded_file_name = isset($uploaded_file['name']) ? sanitize_file_name($uploaded_file['name']) : ''; $uploaded_file_tmp_name = isset($uploaded_file['tmp_name']) ? sanitize_file_name($uploaded_file['tmp_name']) : ''; // Check file type. // This will also fire if no file uploaded. $wp_filetype = wp_check_filetype_and_ext($uploaded_file_tmp_name, $uploaded_file_name, false); if ('wie' !== $wp_filetype['ext'] && ! wp_match_mime_types( 'wie', $wp_filetype['type'] )) { wp_die( wp_kses( sprintf( /* translators: %1$s is link to resource to help with error */ __('You must upload a <b>.wie</b> file generated by this plugin (<a href="%1$s" target="_blank">help</a>).', 'widget-importer-exporter'), 'https://churchthemes.com/go/wie-import-sticky' ), array( 'b' => array(), 'a' => array( 'href' => array(), 'target' => array(), ) ) ), '', array( 'back_link' => true, ) ); } // Check and move file to uploads dir, get file data // Will show die with WP errors if necessary (file too large, quota exceeded, etc.). $file_data = wp_handle_upload($uploaded_file, array( 'test_form' => false, )); if (isset($file_data['error'])) { wp_die( esc_html($file_data['error']), '', array( 'back_link' => true, ) ); } // Process import file. wie_process_import_file($file_data['file']); } } /** * Process import file * * This parses a file and triggers importation of its widgets. * * @since 0.3 * @param string $file Path to .wie file uploaded. * @global string $wie_import_results */ function wie_process_import_file($file) { global $wie_import_results; // File exists? if (! file_exists($file)) { wp_die( esc_html__('Import file could not be found. Please try again.', 'widget-importer-exporter'), '', array( 'back_link' => true, ) ); } // Get file contents and decode. $data = implode('', file($file)); $data = json_decode($data); // Delete import file. unlink($file); // Import the widget data // Make results available for display on import/export page. $wie_import_results = wie_import_data($data); } /** * Import widget JSON data * * @since 0.4 * @global array $wp_registered_sidebars * @param object $data JSON widget data from .wie file. * @return array Results array */ function wie_import_data($data) { global $wp_registered_sidebars; // Have valid data? // If no data or could not decode. if (empty($data) || ! is_object($data)) { wp_die( esc_html__('Import data is invalid.', 'widget-importer-exporter'), '', array( 'back_link' => true, ) ); } // Hook before import. do_action('wie_before_import'); $data = apply_filters('wie_import_data', $data); // Get all available widgets site supports. $available_widgets = wie_available_widgets(); // Get all existing widget instances. $widget_instances = array(); foreach ($available_widgets as $widget_data) { $widget_instances[$widget_data['id_base']] = get_option('widget_' . $widget_data['id_base']); } // Begin results. $results = array(); // Loop import data's sidebars. foreach ($data as $sidebar_id => $widgets) { // Skip inactive widgets (should not be in export file). if ('wp_inactive_widgets' === $sidebar_id) { continue; } // Check if sidebar is available on this site. // Otherwise add widgets to inactive, and say so. if (isset($wp_registered_sidebars[$sidebar_id])) { $sidebar_available = true; $use_sidebar_id = $sidebar_id; $sidebar_message_type = 'success'; $sidebar_message = ''; } else { $sidebar_available = false; $use_sidebar_id = 'wp_inactive_widgets'; // Add to inactive if sidebar does not exist in theme. $sidebar_message_type = 'error'; $sidebar_message = esc_html__('Widget area does not exist in theme (using Inactive)', 'widget-importer-exporter'); } // Result for sidebar // Sidebar name if theme supports it; otherwise ID. $results[$sidebar_id]['name'] = ! empty($wp_registered_sidebars[$sidebar_id]['name']) ? $wp_registered_sidebars[$sidebar_id]['name'] : $sidebar_id; $results[$sidebar_id]['message_type'] = $sidebar_message_type; $results[$sidebar_id]['message'] = $sidebar_message; $results[$sidebar_id]['widgets'] = array(); // Loop widgets. foreach ($widgets as $widget_instance_id => $widget) { $fail = false; // Get id_base (remove -# from end) and instance ID number. $id_base = preg_replace('/-[0-9]+$/', '', $widget_instance_id); $instance_id_number = str_replace($id_base . '-', '', $widget_instance_id); // Does site support this widget? if (! $fail && ! isset($available_widgets[$id_base])) { $fail = true; $widget_message_type = 'error'; $widget_message = esc_html__('Site does not support widget', 'widget-importer-exporter'); // Explain why widget not imported. } // Filter to modify settings object before conversion to array and import // Leave this filter here for backwards compatibility with manipulating objects (before conversion to array below) // Ideally the newer wie_widget_settings_array below will be used instead of this. $widget = apply_filters('wie_widget_settings', $widget); // Convert multidimensional objects to multidimensional arrays // Some plugins like Jetpack Widget Visibility store settings as multidimensional arrays // Without this, they are imported as objects and cause fatal error on Widgets page // If this creates problems for plugins that do actually intend settings in objects then may need to consider other approach: https://wordpress.org/support/topic/problem-with-array-of-arrays // It is probably much more likely that arrays are used than objects, however. $widget = json_decode(wp_json_encode($widget), true); // Filter to modify settings array // This is preferred over the older wie_widget_settings filter above // Do before identical check because changes may make it identical to end result (such as URL replacements). $widget = apply_filters('wie_widget_settings_array', $widget); // Does widget with identical settings already exist in same sidebar? if (! $fail && isset($widget_instances[$id_base])) { // Get existing widgets in this sidebar. $sidebars_widgets = get_option('sidebars_widgets'); $sidebar_widgets = isset($sidebars_widgets[$use_sidebar_id]) ? $sidebars_widgets[$use_sidebar_id] : array(); // Check Inactive if that's where will go. // Loop widgets with ID base. $single_widget_instances = ! empty($widget_instances[$id_base]) ? $widget_instances[$id_base] : array(); foreach ($single_widget_instances as $check_id => $check_widget) { // Is widget in same sidebar and has identical settings? if (in_array("$id_base-$check_id", $sidebar_widgets, true) && (array) $widget === $check_widget) { $fail = true; $widget_message_type = 'warning'; // Explain why widget not imported. $widget_message = esc_html__('Widget already exists', 'widget-importer-exporter'); break; } } } // No failure. if (! $fail) { // Add widget instance $single_widget_instances = get_option('widget_' . $id_base); // All instances for that widget ID base, get fresh every time. $single_widget_instances = ! empty($single_widget_instances) ? $single_widget_instances : array( '_multiwidget' => 1, // Start fresh if have to. ); $single_widget_instances[] = $widget; // Add it. // Get the key it was given. end($single_widget_instances); $new_instance_id_number = key($single_widget_instances); // If key is 0, make it 1 // When 0, an issue can occur where adding a widget causes data from other widget to load, // and the widget doesn't stick (reload wipes it). if ('0' === strval($new_instance_id_number)) { $new_instance_id_number = 1; $single_widget_instances[$new_instance_id_number] = $single_widget_instances[0]; unset($single_widget_instances[0]); } // Move _multiwidget to end of array for uniformity. if (isset($single_widget_instances['_multiwidget'])) { $multiwidget = $single_widget_instances['_multiwidget']; unset($single_widget_instances['_multiwidget']); $single_widget_instances['_multiwidget'] = $multiwidget; } // Update option with new widget. update_option('widget_' . $id_base, $single_widget_instances); // Assign widget instance to sidebar. // Which sidebars have which widgets, get fresh every time. $sidebars_widgets = get_option('sidebars_widgets'); // Avoid rarely fatal error when the option is an empty string // https://github.com/churchthemes/widget-importer-exporter/pull/11. if (! $sidebars_widgets) { $sidebars_widgets = array(); } // Use ID number from new widget instance. $new_instance_id = $id_base . '-' . $new_instance_id_number; // Add new instance to sidebar. $sidebars_widgets[$use_sidebar_id][] = $new_instance_id; // Save the amended data. update_option('sidebars_widgets', $sidebars_widgets); // After widget import action. $after_widget_import = array( 'sidebar' => $use_sidebar_id, 'sidebar_old' => $sidebar_id, 'widget' => $widget, 'widget_type' => $id_base, 'widget_id' => $new_instance_id, 'widget_id_old' => $widget_instance_id, 'widget_id_num' => $new_instance_id_number, 'widget_id_num_old' => $instance_id_number, ); do_action('wie_after_widget_import', $after_widget_import); // Success message. if ($sidebar_available) { $widget_message_type = 'success'; $widget_message = esc_html__('Imported', 'widget-importer-exporter'); } else { $widget_message_type = 'warning'; $widget_message = esc_html__('Imported to Inactive', 'widget-importer-exporter'); } } // Result for widget instance $results[$sidebar_id]['widgets'][$widget_instance_id]['name'] = isset($available_widgets[$id_base]['name']) ? $available_widgets[$id_base]['name'] : $id_base; // Widget name or ID if name not available (not supported by site). $results[$sidebar_id]['widgets'][$widget_instance_id]['title'] = ! empty($widget['title']) ? $widget['title'] : esc_html__('No Title', 'widget-importer-exporter'); // Show "No Title" if widget instance is untitled. $results[$sidebar_id]['widgets'][$widget_instance_id]['message_type'] = $widget_message_type; $results[$sidebar_id]['widgets'][$widget_instance_id]['message'] = $widget_message; } } // Hook after import. do_action('wie_after_import'); // Return results. return apply_filters('wie_import_results', $results); } includes/admin.php 0000777 00000006375 15251156635 0010206 0 ustar 00 <?php /** * Admin Functions * * General admin area functions. Also see page.php. * * @package Widget_Importer_Exporter * @subpackage Functions * @copyright Copyright (c) 2017 - 2020, ChurchThemes.com, LLC * @link https://churchthemes.com/plugins/widget-importer-exporter/ * @license https://www.gnu.org/licenses/gpl-2.0.html GPL-2.0-or-later * @since 1.4 */ defined('ABSPATH') || exit; // No direct access. /** * Enqueue admin styles. * * @since 1.5 */ function wie_enqueue_styles() { // Get current screen. $screen = get_current_screen(); // Only on WIE and Dashboard screens. if (! in_array($screen->base, array('dashboard', 'tools_page_widget-importer-exporter'), true)) { return; } // Enqueue styles wp_enqueue_style('wie-main', WIE_URL . '/' . WIE_CSS_DIR . '/style.css', false, WIE_VERSION); // Bust cache on update. } add_action('admin_enqueue_scripts', 'wie_enqueue_styles'); // admin-end only. /** * Enqueue admin scripts. * * @since 1.6 */ function wie_enqueue_scripts() { // Get current screen. $screen = get_current_screen(); // Only on WIE screen. if (! in_array($screen->base, array('dashboard', 'tools_page_widget-importer-exporter'), true)) { return; } // Enqueue script wp_enqueue_script('wie-main', WIE_URL . '/' . WIE_JS_DIR . '/main.js', array('jquery'), WIE_VERSION, false); // bust cache on update. } add_action('admin_enqueue_scripts', 'wie_enqueue_scripts'); // admin-end only. /** * Add plugin action link. * * Insert an "Import/Export" link into the plugin's action links (Plugin page's list) * * @since 1.4 * @param array $links Existing action links. * @return array Modified action links */ function wie_add_plugin_action_link($links) { // If has permission. if (! current_user_can('edit_theme_options')) { return array(); } // Have links array? if (is_array($links)) { // Append "Settings" link. $links[] = sprintf( '<a href="%1$s">%2$s</a>', esc_url(admin_url('tools.php?page=widget-importer-exporter')), esc_html__('Import/Export', 'widget-importer-exporter') ); } return $links; } add_filter('plugin_action_links_' . plugin_basename(WIE_FILE), 'wie_add_plugin_action_link'); /** * Add link on Widgets page * * Insert an "Import/Export" link on the Widgets screen after 'Manage with Live Preview'. * This is done with JavaScript since there is no hook for this area. * * @since 1.4 */ function wie_add_widgets_screen_link() { // Build link with same style as 'Manage with Live Preview'. $link_html = sprintf( wp_kses( ' <a href="%1$s" class="page-title-action">%2$s</a>', array( // Link tag only. 'a' => array( 'href' => array(), 'class' => array(), ), ) ), esc_url(admin_url('tools.php?page=widget-importer-exporter')), esc_html__('Import/Export', 'widget-importer-exporter') ); // Output JavaScript to insert link after 'Manage with Live Preview'. ?> <script type="text/javascript"> jQuery(document).ready(function ($) { // Encode string for security var link_html = <?php echo wp_json_encode($link_html); ?>; // Insert after last button by title $('.page-title-action').last().after(link_html); }); </script> <?php } // WP 4.6+. add_action('admin_print_footer_scripts-widgets.php', 'wie_add_widgets_screen_link'); includes/mime-types.php 0000777 00000007572 15251156635 0011207 0 ustar 00 <?php /** * Mime Types * * @package Widget_Importer_Exporter * @subpackage Functions * @copyright Copyright (c) 2013 - 2020, ChurchThemes.com, LLC * @link https://churchthemes.com/plugins/widget-importer-exporter/ * @license https://www.gnu.org/licenses/gpl-2.0.html GPL-2.0-or-later * @since 0.1 */ defined('ABSPATH') || exit; // No direct access. /** * Add mime type for upload * * Make sure the WordPress install will accept .wie uploads. * * @since 0.1 * @param array $mime_types Currently uploadable mime types. * @return array Mime types with additions */ function wie_add_mime_types($mime_types) { //$mime_types['wie'] = 'application/json'; // 5.0.1 breaking change: https://make.wordpress.org/core/2018/12/13/backwards-compatibility-breaks-in-5-0-1/ $mime_types['wie'] = 'text/plain'; return $mime_types; } add_filter('upload_mimes', 'wie_add_mime_types'); /** * Allow .wie as text/html for 4.9.9 / 5.0.1 * * This is a workaround for a WordPress 4.9.9 / 5.0.1 update forcing upload mime type to match extension. * .wie is usually detected as text/plain but sometimes text/html, so text/html uploads fail. * * https://make.wordpress.org/core/2018/12/13/backwards-compatibility-breaks-in-5-0-1/ * * The same occurs with .csv uploads in core being text/csv or text/plain: * https://core.trac.wordpress.org/ticket/45615 * * This workaround is based on a CSV workaround for core by rmpel: * https://gist.github.com/rmpel/e1e2452ca06ab621fe061e0fde7ae150 * * This is called in includes/import.php by wie_upload_import_file() so that it only happens during upload via this * plugin. add_filter('wp_check_filetype_and_ext', 'wie_allow_multiple_mime_types', 10, 4); */ //@phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed function wie_allow_multiple_mime_types($values, $file, $filename, $mimes) { if (extension_loaded('fileinfo')) { // @codingStandardsIgnoreLine $finfo = finfo_open(FILEINFO_MIME_TYPE); // @codingStandardsIgnoreLine $real_mime = finfo_file($finfo, $file); // @codingStandardsIgnoreLine finfo_close($finfo); if ('text/html' === $real_mime && preg_match('/\.(wie)$/i', $filename)) { $values['ext'] = 'wie'; $values['type'] = 'text/plain'; } elseif ('application/json' === $real_mime && preg_match('/\.(wie)$/i', $filename)) { $values['ext'] = 'wie'; $values['type'] = 'application/json'; } } else { if (preg_match('/\.(wie)$/i', $filename)) { $values['ext'] = 'wie'; $values['type'] = 'text/plain'; } } return $values; } /** * Disable real MIME check on WordPress 4.7.1 and 4.7.2 * * This is a workaround for a WordPress 4.7.1 bug affecting uploads. Other versions not affected. * This workaround will only take effect on installs of 4.7.1 and only during import. * * This is called in includes/import.php by wie_upload_import_file() so that it only happens during upload via this * plugin. add_filter('wp_check_filetype_and_ext', 'wie_disable_real_mime_check', 10, 4); * * Based on the Disable Real MIME Check plugin by Sergey Biryukov: * https://wordpress.org/plugins/disable-real-mime-check/ More information: * https://wordpress.org/support/topic/solution-for-wp-4-7-1-bug-causing-you-must-upload-a-wie-file-generated-by/ */ //@phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundBeforeLastUsed function wie_disable_real_mime_check($data, $file, $filename, $mimes) { $wp_version = get_bloginfo('version'); // WordPress 4.7.1 - 4.7.3 are affected only. // 4.7.2 and 4.7.3 were rushed out as security updates without the upload bug being fixed. if (! in_array($wp_version, array('4.7.1', '4.7.2', '4.7.3'), true)) { return $data; } $wp_filetype = wp_check_filetype($filename, $mimes); $ext = $wp_filetype['ext']; $type = $wp_filetype['type']; $proper_filename = $data['proper_filename']; return compact('ext', 'type', 'proper_filename'); } includes/export.php 0000777 00000007501 15251156635 0010427 0 ustar 00 <?php /** * Export Functions * * @package Widget_Importer_Exporter * @subpackage Functions * @copyright Copyright (c) 2013 - 2020, ChurchThemes.com, LLC * @link https://churchthemes.com/plugins/widget-importer-exporter/ * @license https://www.gnu.org/licenses/gpl-2.0.html GPL-2.0-or-later * @since 0.1 */ defined('ABSPATH') || exit; // No direct access. /** * Generate export data * * @since 0.1 * @return string Export file contents */ function wie_generate_export_data() { // Get all available widgets site supports. $available_widgets = wie_available_widgets(); // Get all widget instances for each widget. $widget_instances = array(); // Loop widgets. foreach ($available_widgets as $widget_data) { // Get all instances for this ID base. $instances = get_option('widget_' . $widget_data['id_base']); // Have instances. if (! empty($instances)) { // Loop instances. foreach ($instances as $instance_id => $instance_data) { // Key is ID (not _multiwidget). if (is_numeric($instance_id)) { $unique_instance_id = $widget_data['id_base'] . '-' . $instance_id; $widget_instances[$unique_instance_id] = $instance_data; } } } } // Gather sidebars with their widget instances. $sidebars_widgets = get_option('sidebars_widgets'); $sidebars_widget_instances = array(); foreach ($sidebars_widgets as $sidebar_id => $widget_ids) { // Skip inactive widgets. if ('wp_inactive_widgets' === $sidebar_id) { continue; } // Skip if no data or not an array (array_version). if (! is_array($widget_ids) || empty($widget_ids)) { continue; } // Loop widget IDs for this sidebar. foreach ($widget_ids as $widget_id) { // Is there an instance for this widget ID? if (isset($widget_instances[$widget_id])) { // Add to array. $sidebars_widget_instances[$sidebar_id][$widget_id] = $widget_instances[$widget_id]; } } } // Filter pre-encoded data. $data = apply_filters('wie_unencoded_export_data', $sidebars_widget_instances); // Encode the data for file contents. $encoded_data = wp_json_encode($data); // Return contents. return apply_filters('wie_generate_export_data', $encoded_data); } /** * Send export file to user * * Triggered by URL like /wp-admin/tools.php?page=widget-importer-exporter&export=1 * * The data is JSON with .wie extension in order not to confuse export files with other plugins. * * @since 0.1 */ function wie_send_export_file() { // Export requested. if (! empty($_GET['export'])) { // Check referer before doing anything else. check_admin_referer('wie_export', 'wie_export_nonce'); // Build filename // Single Site: yoursite.com-widgets.wie // Multisite: site.multisite.com-widgets.wie or multisite.com-site-widgets.wie. $site_url = site_url('', 'http'); $site_url = trim($site_url, '/\\'); // Remove trailing slash. $filename = str_replace('http://', '', $site_url); // Remove http://. $filename = str_replace(array('/', '\\'), '-', $filename); // Replace slashes with - . $filename .= '-widgets.wie'; // Append. $filename = apply_filters('wie_export_filename', $filename); // Generate export file contents. $file_contents = wie_generate_export_data(); $filesize = strlen($file_contents); // Headers to prompt "Save As". header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename=' . $filename); header('Expires: 0'); header('Cache-Control: must-revalidate'); header('Pragma: public'); header('Content-Length: ' . $filesize); // Clear buffering just in case. // @codingStandardsIgnoreLine @ob_end_clean(); flush(); // Output file contents. // @codingStandardsIgnoreLine echo $file_contents; // Stop execution. exit; } } add_action('load-tools_page_widget-importer-exporter', 'wie_send_export_file'); includes/page.php 0000777 00000014574 15251156635 0010032 0 ustar 00 <?php /** * Admin Page Functions * * @package Widget_Importer_Exporter * @subpackage Functions * @copyright Copyright (c) 2013 - 2020, ChurchThemes.com, LLC * @link https://churchthemes.com/plugins/widget-importer-exporter/ * @license https://www.gnu.org/licenses/gpl-2.0.html GPL-2.0-or-later * @since 0.1 */ defined('ABSPATH') || exit; // No direct access. /** * Add import/export page under Tools * * @since 0.1 */ function wie_add_import_export_page() { // Add page. $page_hook = add_management_page( esc_html__('Widget Importer & Exporter', 'widget-importer-exporter'), // Page title. esc_html__('Widget Importer & Exporter', 'widget-importer-exporter'), // Menu title. 'edit_theme_options', // Capability (can manage Appearance > Widgets). 'widget-importer-exporter', // Menu Slug. 'wie_import_export_page_content' // Callback for displaying page content. ); } add_action('admin_menu', 'wie_add_import_export_page'); /** * Import/export page content * * @since 0.1 */ function wie_import_export_page_content() { global $wie_import_results; ?> <div class="wrap"> <h2><?php esc_html_e('Widget Importer & Exporter', 'widget-importer-exporter'); ?></h2> <?php // Show import results if have them. if (wie_have_import_results()) { wie_show_import_results(); // Don't show content below. return; } $self = isset($_SERVER['PHP_SELF']) ? wp_unslash(filter_input(INPUT_SERVER, 'PHP_SELF', FILTER_SANITIZE_URL)) : ''; //phpcs:ignore WordPress.Security.NonceVerification.Recommended $page = isset($_GET['page']) ? wp_unslash(filter_input(INPUT_GET, 'page', FILTER_SANITIZE_URL)) : ''; //phpcs:ignore WordPress.Security.NonceVerification.Recommended ?> <h3 class="title"><?php echo esc_html_x('Import Widgets', 'heading', 'widget-importer-exporter'); ?></h3> <form method="post" enctype="multipart/form-data"> <?php wp_nonce_field('wie_import', 'wie_import_nonce'); ?> <p> <?php echo wp_kses( __('Please select a <b>.wie</b> file generated by this plugin.', 'widget-importer-exporter'), array( 'b' => array(), ) ); ?> </p> <input type="file" name="wie_import_file" id="wie-import-file"/> <p> <?php echo wp_kses( __('Or, <a href="#" id="wie-content-toggle">copy and paste</a> the contents of your <b>.wie</b> file.', 'widget-importer-exporter'), array( 'b' => array(), 'a' => array( 'href' => array(), 'id' => array(), ), ) ); ?> </p> <textarea name="wie_import_data" id="wie-import-data" cols="80" rows="6"></textarea> <?php submit_button(esc_html_x('Import Widgets', 'button', 'widget-importer-exporter')); ?> </form> <?php if (! empty($wie_import_results)) : ?> <p id="wie-import-results"> <?php echo wp_kses_post($wie_import_results); ?> </p> <br/> <?php endif; ?> <h3 class="title"><?php echo esc_html_x('Export Widgets', 'heading', 'widget-importer-exporter'); ?></h3> <p> <?php echo wp_kses( __('Click below to generate a <b>.wie</b> file for all active widgets.', 'widget-importer-exporter'), array( 'b' => array(), ) ); ?> </p> <p class="submit"> <a href="<?php echo esc_url(admin_url(basename($self) . '?page=' . $page . '&export=1&wie_export_nonce=' . wp_create_nonce('wie_export'))); ?>" id="wie-export-button" class="button button-primary"> <?php echo esc_html_x('Export Widgets', 'button', 'widget-importer-exporter'); ?> </a> </p> </div> <?php } /** * Have import results to show? * * @since 0.3 * @global string $wie_import_results * @return bool True if have import results to show */ function wie_have_import_results() { global $wie_import_results; if (! empty($wie_import_results)) { return true; } return false; } /** * Show import results * * This is shown in place of import/export page's regular content. * * @since 0.3 * @global string $wie_import_results */ function wie_show_import_results() { global $wie_import_results; $self = isset($_SERVER['PHP_SELF']) ? wp_unslash(filter_input(INPUT_SERVER, 'PHP_SELF', FILTER_SANITIZE_URL)) : ''; //phpcs:ignore WordPress.Security.NonceVerification.Recommended $page = isset($_GET['page']) ? wp_unslash(filter_input(INPUT_GET, 'page', FILTER_SANITIZE_URL)) : ''; //phpcs:ignore WordPress.Security.NonceVerification.Recommended ?> <h3 class="title"><?php echo esc_html_x('Import Results', 'heading', 'widget-importer-exporter'); ?></h3> <p> <?php printf( wp_kses( /* translators: %1$s is URL for widgets screen, %2$s is URL to go back */ __('You can manage your <a href="%1$s">Widgets</a> or <a href="%2$s">Go Back</a>.', 'widget-importer-exporter'), array( 'a' => array( 'href' => array(), ), ) ), esc_url(admin_url('widgets.php')), esc_url(admin_url(basename($self) . '?page=' . $page)) ); ?> </p> <table id="wie-import-results"> <?php // Loop sidebars. $results = $wie_import_results; foreach ($results as $sidebar) : ?> <tr class="wie-import-results-sidebar"> <td colspan="2" class="wie-import-results-sidebar-name"> <?php // Sidebar name if theme supports it; otherwise ID. echo esc_html($sidebar['name']); ?> </td> <td class="wie-import-results-sidebar-message wie-import-results-message wie-import-results-message-<?php echo esc_attr($sidebar['message_type']); ?>"> <?php // Sidebar may not exist in theme. echo esc_html($sidebar['message']); ?> </td> </tr> <?php // Loop widgets. foreach ($sidebar['widgets'] as $widget) : ?> <tr class="wie-import-results-widget"> <td class="wie-import-results-widget-name"> <?php // Widget name or ID if name not available (not supported by site). echo esc_html($widget['name']); ?> </td> <td class="wie-import-results-widget-title"> <?php // Shows "No Title" if widget instance is untitled. echo esc_html($widget['title']); ?> </td> <td class="wie-import-results-widget-message wie-import-results-message wie-import-results-message-<?php echo esc_attr($widget['message_type']); ?>"> <?php // Sidebar may not exist in theme. echo esc_html($widget['message']); ?> </td> </tr> <?php endforeach; ?> <tr class="wie-import-results-space"> <td colspan="100%"></td> </tr> <?php endforeach; ?> </table> <?php } widget-importer-exporter.php 0000777 00000013267 15251156635 0012276 0 ustar 00 <?php /** * Plugin Name: Widget Importer & Exporter * Plugin URI: https://churchthemes.com/plugins/widget-importer-exporter/ * Description: Imports and exports widgets. * Version: 1.6.1 * Author: ChurchThemes.com * Author URI: https://churchthemes.com * License: GPLv2 or later * Text Domain: widget-importer-exporter * Domain Path: /languages * * @package Widget_Importer_Exporter * @copyright Copyright (c) 2013 - 2023, ChurchThemes.com, LLC * @link https://churchthemes.com/plugins/widget-importer-exporter/ * @license https://www.gnu.org/licenses/gpl-2.0.html GPL-2.0-or-later * * TODO: Move from procedural to OOP and require same minimum PHP as WordPress. */ defined('ABSPATH') || exit; // No direct access. /** * Main class * * @since 0.1 */ class Widget_Importer_Exporter { /** * Plugin data from get_plugins() * * @since 0.1 * @var object */ public $plugin_data; /** * Includes to load * * @since 0.1 * @var array */ public $includes; /** * Constructor * * Add actions for methods that define constants, load translation and load includes. * * @since 0.1 * @access public */ public function __construct() { // Set plugin data. add_action('plugins_loaded', array(&$this, 'setPluginData'), 1); // Define constants. add_action('plugins_loaded', array(&$this, 'defineConstants'), 1); // Load language file. add_action('plugins_loaded', array(&$this, 'loadTextdomain'), 1); // Set includes. add_action('plugins_loaded', array(&$this, 'setIncludes'), 1); // Load includes. add_action('plugins_loaded', array(&$this, 'loadIncludes'), 1); } /** * Set plugin data * * This data is used by constants. * * @since 0.1 * @access public */ public function setPluginData() { // Load plugin.php if get_plugins() not available. if (! function_exists('get_plugins')) { // @codingStandardsIgnoreLine require_once ABSPATH . 'wp-admin/includes/plugin.php'; } // Get path to plugin's directory. $plugin_dir = plugin_basename(dirname(__FILE__)); // Get plugin data. $plugin_data = current(get_plugins('/' . $plugin_dir)); // Set plugin data. $this->plugin_data = apply_filters('wie_plugin_data', $plugin_data); } /** * Define constants * * @since 0.1 * @access public */ public function defineConstants() { // Plugin version. define('WIE_VERSION', $this->plugin_data['Version']); // Plugin's main file path. define('WIE_FILE', __FILE__); // Plugin's directory. define('WIE_DIR', dirname(plugin_basename(WIE_FILE))); // Plugin's directory path. define('WIE_PATH', untrailingslashit(plugin_dir_path(WIE_FILE))); // Plugin's directory URL. define('WIE_URL', untrailingslashit(plugin_dir_url(WIE_FILE))); // Includes directory. define('WIE_INC_DIR', 'includes'); // Stylesheets directory. define('WIE_CSS_DIR', 'css'); // JavaScript directory. define('WIE_JS_DIR', 'js'); // Image directory. define('WIE_IMG_DIR', 'img'); // Languages directory. define('WIE_LANG_DIR', 'languages'); } /** * Load language file * * This will load the MO file for the current locale. * The translation file must be named widget-importer-exporter-$locale.mo. * * First it will check to see if the MO file exists in wp-content/languages/plugins. * If not, then the 'languages' directory inside the plugin will be used. * It is ideal to keep translation files outside of the plugin to avoid loss during updates.\ * * @since 0.1 * @access public */ public function loadTextdomain() { // Text-domain. $domain = 'widget-importer-exporter'; // WordPress core locale filter. $locale = apply_filters('plugin_locale', get_locale(), $domain); // WordPress 3.6 and earlier don't auto-load from wp-content/languages, so check and load manually // http://core.trac.wordpress.org/changeset/22346. $external_mofile = WP_LANG_DIR . '/plugins/' . $domain . '-' . $locale . '.mo'; // External translation exists. if (get_bloginfo('version') <= 3.6 && file_exists($external_mofile)) { load_textdomain($domain, $external_mofile); } else { // Load normally. Either using WordPress 3.7+ or older version with external translation. $languages_dir = WIE_DIR . '/' . trailingslashit(WIE_LANG_DIR); // ensure trailing slash. load_plugin_textdomain($domain, false, $languages_dir); } } /** * Set includes * * @since 0.1 * @access public */ public function setIncludes() { $this->includes = apply_filters('wie_includes', array( // Admin only. 'admin' => array( WIE_INC_DIR . '/admin.php', WIE_INC_DIR . '/export.php', WIE_INC_DIR . '/import.php', WIE_INC_DIR . '/mime-types.php', WIE_INC_DIR . '/page.php', WIE_INC_DIR . '/widgets.php', ), )); } /** * Load includes * * Include files based on whether or not condition is met. * * @since 0.1 * @access public */ public function loadIncludes() { // Get includes. $includes = $this->includes; // Loop conditions. foreach ($includes as $condition => $files) { $do_includes = false; // Check condition. // Change this to for statement so can use new lines without warning from wpcs - more readable. switch ($condition) { // Admin Only. case 'admin': if (is_admin()) { $do_includes = true; } break; // Frontend Only. case 'frontend': if (! is_admin()) { $do_includes = true; } break; // Admin or Frontend (always). default: $do_includes = true; break; } // Loop files if condition met. if ($do_includes) { foreach ($files as $file) { require_once trailingslashit(WIE_PATH) . $file; } } } } } // Instantiate the main class. new Widget_Importer_Exporter(); languages/widget-importer-exporter-sr_RS.mo 0000777 00000003400 15251156635 0015102 0 ustar 00 �� � h B i 1 � � � � : @ ] x � � � � � i � P i = � � � I i � � � � � � � Click below to generate a <b>.wie</b> file for all active widgets. Import file could not be found. Please try again. Imported Imported to Inactive No Title Please select a <b>.wie</b> file generated by this plugin. Site does not support widget Widget Importer & Exporter Widget already exists buttonExport Widgets buttonImport Widgets headingExport Widgets headingImport Results headingImport Widgets Project-Id-Version: Widget Importer & Exporter PO-Revision-Date: 2020-05-18 11:35-0500 Last-Translator: churchthemes.com <contact@churchthemes.com> Language-Team: PNTE <blogs@educacion.navarra.es> Language: sr_RS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: Poedit 2.3.1 X-Poedit-KeywordsList: __;_e;_n:1,2;_nx:1,2;_x:1,2c;_ex:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:1,2,3c;_c X-Poedit-Basepath: .. Plural-Forms: nplurals=2; plural=(n != 1); X-Poedit-SourceCharset: UTF-8 X-Poedit-SearchPath-0: . Kliknite ispod da biste generisali <b>.wie</b> datoteku za sve aktivne widget-e. Datoteka za uvoz nije nađena. Molimo vas, pokušajte ponovo. Uvezen Uvezen u Neaktivne Nema naslova Molimo vas, odaberite <b>.wie</b> datoteku koju je generisao ovaj plugin. Site ne podržava widget Widget Importer & Exporter Widget već postoji Izvezi widget-e. Uvezi widget-e Izvezi widget-e Uvezi rezultate Uvezi widget-e languages/widget-importer-exporter-de_DE.po 0000777 00000007644 15251156635 0015033 0 ustar 00 msgid "" msgstr "" "Project-Id-Version: Widget Importer & Exporter\n" "POT-Creation-Date: 2020-05-18 11:35-0500\n" "PO-Revision-Date: 2020-05-18 11:36-0500\n" "Last-Translator: churchthemes.com <contact@churchthemes.com>\n" "Language-Team: \n" "Language: de_DE\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 2.3.1\n" "X-Poedit-KeywordsList: __;_e;_n:1,2;_nx:1,2;_x:1,2c;_ex:1,2c;esc_attr__;" "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;" "_nx_noop:1,2,3c\n" "X-Poedit-Basepath: .\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-SearchPath-0: ..\n" #: ../includes/admin.php:78 ../includes/admin.php:109 msgid "Import/Export" msgstr "" #: ../includes/import.php:45 #, fuzzy, php-format #| msgid "You must upload a <b>.wie</b> file generated by this plugin." msgid "" "You must upload a <b>.wie</b> file generated by this plugin (<a href=\"%1$s" "\" target=\"_blank\">help</a>)." msgstr "" "Eine von diesem Plugin erstellte <b>.wie</b>-Datei muss hochgeladen werden." #: ../includes/import.php:114 #, fuzzy #| msgid "You must upload a <b>.wie</b> file generated by this plugin." msgid "You must choose a <b>.wie</b> file to upload or paste its contents." msgstr "" "Eine von diesem Plugin erstellte <b>.wie</b>-Datei muss hochgeladen werden." #: ../includes/import.php:152 msgid "Import file could not be found. Please try again." msgstr "" "Importierte Datei konnte nicht gefunden werden. Bitte nochmals versuchen." #: ../includes/import.php:187 msgid "Import data is invalid." msgstr "" #: ../includes/import.php:229 msgid "Widget area does not exist in theme (using Inactive)" msgstr "" #: ../includes/import.php:251 msgid "Site does not support widget" msgstr "Seite unterstützt Widgets nicht" #: ../includes/import.php:286 msgid "Widget already exists" msgstr "Widget existiert schon" #: ../includes/import.php:360 msgid "Imported" msgstr "Importiert" #: ../includes/import.php:363 msgid "Imported to Inactive" msgstr "Nach \"inaktiv\" importiert" #: ../includes/import.php:369 msgid "No Title" msgstr "Kein Titel" #: ../includes/page.php:23 ../includes/page.php:24 ../includes/page.php:44 msgid "Widget Importer & Exporter" msgstr "Widget Importer & Exporter" #: ../includes/page.php:61 msgctxt "heading" msgid "Import Widgets" msgstr "Importiere Widgets" #: ../includes/page.php:72 msgid "Please select a <b>.wie</b> file generated by this plugin." msgstr "Bitte eine von diesem Plugin erstellte <b>.wie</b>-Datei auswählen." #: ../includes/page.php:89 msgid "" "Or, <a href=\"#\" id=\"wie-content-toggle\">copy and paste</a> the contents " "of your <b>.wie</b> file." msgstr "" #: ../includes/page.php:105 msgctxt "button" msgid "Import Widgets" msgstr "Importiere Widgets" #: ../includes/page.php:116 msgctxt "heading" msgid "Export Widgets" msgstr "Exportiere Widgets" #: ../includes/page.php:121 msgid "Click below to generate a <b>.wie</b> file for all active widgets." msgstr "" "Unten klicken um eine <b>.wie</b>-Datei für alle aktiven Widgets zu " "erstellen." #: ../includes/page.php:131 msgctxt "button" msgid "Export Widgets" msgstr "Exportiere Widgets" #: ../includes/page.php:174 msgctxt "heading" msgid "Import Results" msgstr "Import-Ergebnis" #: ../includes/page.php:181 #, php-format msgid "" "You can manage your <a href=\"%1$s\">Widgets</a> or <a href=\"%2$s\">Go " "Back</a>." msgstr "" #~ msgid "Import data could not be read. Please try a different file." #~ msgstr "" #~ "Importierte Datei konnte nicht gelesen werden. Bitte eine andere Datei " #~ "versuchen." #~ msgid "Sidebar does not exist in theme (using Inactive)" #~ msgstr "Seitenleiste existiert nicht in diesem Theme (nutze \"inaktiv\")" #~ msgid "" #~ "You can manage your <a href=\"%s\">Widgets</a> or <a href=\"%s\">Go Back</" #~ "a>." #~ msgstr "" #~ "Zur <a href=\"%s\">Widget-Verwaltung</a> oder <a href=\"%s\">Zurück</a>." languages/widget-importer-exporter-nl_NL.po 0000777 00000007625 15251156635 0015074 0 ustar 00 msgid "" msgstr "" "Project-Id-Version: Widget Importer & Exporter\n" "POT-Creation-Date: 2020-05-18 11:35-0500\n" "PO-Revision-Date: 2020-05-18 11:35-0500\n" "Last-Translator: churchthemes.com <contact@churchthemes.com>\n" "Language-Team: \n" "Language: nl_NL\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 2.3.1\n" "X-Poedit-KeywordsList: __;_e;_n:1,2;_nx:1,2;_x:1,2c;_ex:1,2c;esc_attr__;" "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;" "_nx_noop:1,2,3c\n" "X-Poedit-Basepath: .\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-SearchPath-0: ..\n" #: ../includes/admin.php:78 ../includes/admin.php:109 msgid "Import/Export" msgstr "" #: ../includes/import.php:45 #, fuzzy, php-format #| msgid "You must upload a <b>.wie</b> file generated by this plugin." msgid "" "You must upload a <b>.wie</b> file generated by this plugin (<a href=\"%1$s" "\" target=\"_blank\">help</a>)." msgstr "" "U dient een <b>.wie</b> bestand te uploaden dat is gegenereerd door deze " "plugin." #: ../includes/import.php:114 #, fuzzy #| msgid "You must upload a <b>.wie</b> file generated by this plugin." msgid "You must choose a <b>.wie</b> file to upload or paste its contents." msgstr "" "U dient een <b>.wie</b> bestand te uploaden dat is gegenereerd door deze " "plugin." #: ../includes/import.php:152 msgid "Import file could not be found. Please try again." msgstr "Importbestand niet gevonden. Probeer het opnieuw." #: ../includes/import.php:187 msgid "Import data is invalid." msgstr "" #: ../includes/import.php:229 msgid "Widget area does not exist in theme (using Inactive)" msgstr "" #: ../includes/import.php:251 msgid "Site does not support widget" msgstr "Website ondersteund geen widgets" #: ../includes/import.php:286 msgid "Widget already exists" msgstr "Widget bestaat reeds" #: ../includes/import.php:360 msgid "Imported" msgstr "Geïmporteerd" #: ../includes/import.php:363 msgid "Imported to Inactive" msgstr "Geïmporteerd naar inactief" #: ../includes/import.php:369 msgid "No Title" msgstr "Geen titel" #: ../includes/page.php:23 ../includes/page.php:24 ../includes/page.php:44 msgid "Widget Importer & Exporter" msgstr "Widget Importeer & Exporteer" #: ../includes/page.php:61 msgctxt "heading" msgid "Import Widgets" msgstr "Importeer Widgets" #: ../includes/page.php:72 msgid "Please select a <b>.wie</b> file generated by this plugin." msgstr "Selecteer aub een <b>.wie</b> bestand gegenereerd door deze plugin." #: ../includes/page.php:89 msgid "" "Or, <a href=\"#\" id=\"wie-content-toggle\">copy and paste</a> the contents " "of your <b>.wie</b> file." msgstr "" #: ../includes/page.php:105 msgctxt "button" msgid "Import Widgets" msgstr "Importeer Widgets" #: ../includes/page.php:116 msgctxt "heading" msgid "Export Widgets" msgstr "Exporteer Widgets" #: ../includes/page.php:121 msgid "Click below to generate a <b>.wie</b> file for all active widgets." msgstr "" "Click hier beneden om een <b>.wie</b> te genereren voor alle actieve widgets." #: ../includes/page.php:131 msgctxt "button" msgid "Export Widgets" msgstr "Exporteer Widgets" #: ../includes/page.php:174 msgctxt "heading" msgid "Import Results" msgstr "Import Resultaten" #: ../includes/page.php:181 #, php-format msgid "" "You can manage your <a href=\"%1$s\">Widgets</a> or <a href=\"%2$s\">Go " "Back</a>." msgstr "" #~ msgid "Import data could not be read. Please try a different file." #~ msgstr "" #~ "Importgegevens kunnen niet gelezen worden. Probeer een ander bestand." #~ msgid "Sidebar does not exist in theme (using Inactive)" #~ msgstr "Zijbalk container bestaat niet in deze Template (gebruik inactief)" #~ msgid "" #~ "You can manage your <a href=\"%s\">Widgets</a> or <a href=\"%s\">Go Back</" #~ "a>." #~ msgstr "" #~ "U kunt uw widgets beheren <a href=\"%s\">Widgets</a> of <a href=\"%s\">Ga " #~ "Terug</a>." languages/important.txt 0000777 00000001050 15251156635 0011304 0 ustar 00 Do not add your own translations to this directory. They will be lost during plugin updates. The only .mo files that should be loaded from here are pre-made translations that come with the plugin. Store your translations at: wp-content/languages/plugins/widget-importer-exporter-$locale.mo (e.g. widget-importer-exporter-en_US.mo) to keep them safe from loss during updates. Please feel free to contribute your translation to this project with these instructions: https://make.wordpress.org/polyglots/handbook/tools/glotpress-translate-wordpress-org/ languages/widget-importer-exporter-es_ES.mo 0000777 00000003537 15251156635 0015063 0 ustar 00 �� � h B i 1 � � � � : @ ] x � � � � � i � v i W � 8 B Z G f � � � � 0 N Click below to generate a <b>.wie</b> file for all active widgets. Import file could not be found. Please try again. Imported Imported to Inactive No Title Please select a <b>.wie</b> file generated by this plugin. Site does not support widget Widget Importer & Exporter Widget already exists buttonExport Widgets buttonImport Widgets headingExport Widgets headingImport Results headingImport Widgets Project-Id-Version: Widget Importer & Exporter PO-Revision-Date: 2020-05-18 11:35-0500 Last-Translator: churchthemes.com <contact@churchthemes.com> Language-Team: PNTE <blogs@educacion.navarra.es> Language: es_ES MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: Poedit 2.3.1 X-Poedit-KeywordsList: __;_e;_n:1,2;_nx:1,2;_x:1,2c;_ex:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:1,2,3c;_c X-Poedit-Basepath: .. Plural-Forms: nplurals=2; plural=(n != 1); X-Poedit-SourceCharset: UTF-8 X-Poedit-SearchPath-0: . Haz clic el el botón que tienes a continuación, para generar un fichero <b>.wie</b>, para todos los widgets activos. El fichero de importación no ha podido ser encontrado. Por favor, inténtalo de nuevo. Importado Importado como inactivo Sin título Por favor, selecciona un fichero <b>.wie</b>, generado por este plugin. El sitio no soporta este widget Widget Importer & Exporter El widget ya existe Exportar widgets Importar widgets Exportar widgets Resultados de la exportación Importar widgets languages/widget-importer-exporter-de_DE.mo 0000777 00000003403 15251156635 0015015 0 ustar 00 �� � h B i 1 � � � � : @ ] x � � � � � E � O E I � � � D T u � � � � � � Click below to generate a <b>.wie</b> file for all active widgets. Import file could not be found. Please try again. Imported Imported to Inactive No Title Please select a <b>.wie</b> file generated by this plugin. Site does not support widget Widget Importer & Exporter Widget already exists buttonExport Widgets buttonImport Widgets headingExport Widgets headingImport Results headingImport Widgets Project-Id-Version: Widget Importer & Exporter PO-Revision-Date: 2020-05-18 11:36-0500 Last-Translator: churchthemes.com <contact@churchthemes.com> Language-Team: Language: de_DE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: Poedit 2.3.1 X-Poedit-KeywordsList: __;_e;_n:1,2;_nx:1,2;_x:1,2c;_ex:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:1,2,3c X-Poedit-Basepath: . Plural-Forms: nplurals=2; plural=(n != 1); X-Poedit-SourceCharset: UTF-8 X-Poedit-SearchPath-0: .. Unten klicken um eine <b>.wie</b>-Datei für alle aktiven Widgets zu erstellen. Importierte Datei konnte nicht gefunden werden. Bitte nochmals versuchen. Importiert Nach "inaktiv" importiert Kein Titel Bitte eine von diesem Plugin erstellte <b>.wie</b>-Datei auswählen. Seite unterstützt Widgets nicht Widget Importer & Exporter Widget existiert schon Exportiere Widgets Importiere Widgets Exportiere Widgets Import-Ergebnis Importiere Widgets languages/widget-importer-exporter-nl_NL.mo 0000777 00000003353 15251156635 0015063 0 ustar 00 �� � h B i 1 � � � � : @ ] x � � � � � E � M E 1 � � � � C � > _ | � � � � � Click below to generate a <b>.wie</b> file for all active widgets. Import file could not be found. Please try again. Imported Imported to Inactive No Title Please select a <b>.wie</b> file generated by this plugin. Site does not support widget Widget Importer & Exporter Widget already exists buttonExport Widgets buttonImport Widgets headingExport Widgets headingImport Results headingImport Widgets Project-Id-Version: Widget Importer & Exporter PO-Revision-Date: 2020-05-18 11:35-0500 Last-Translator: churchthemes.com <contact@churchthemes.com> Language-Team: Language: nl_NL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: Poedit 2.3.1 X-Poedit-KeywordsList: __;_e;_n:1,2;_nx:1,2;_x:1,2c;_ex:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:1,2,3c X-Poedit-Basepath: . Plural-Forms: nplurals=2; plural=(n != 1); X-Poedit-SourceCharset: UTF-8 X-Poedit-SearchPath-0: .. Click hier beneden om een <b>.wie</b> te genereren voor alle actieve widgets. Importbestand niet gevonden. Probeer het opnieuw. Geïmporteerd Geïmporteerd naar inactief Geen titel Selecteer aub een <b>.wie</b> bestand gegenereerd door deze plugin. Website ondersteund geen widgets Widget Importeer & Exporteer Widget bestaat reeds Exporteer Widgets Importeer Widgets Exporteer Widgets Import Resultaten Importeer Widgets languages/widget-importer-exporter-sr_RS.po 0000777 00000007615 15251156635 0015121 0 ustar 00 msgid "" msgstr "" "Project-Id-Version: Widget Importer & Exporter\n" "POT-Creation-Date: 2020-05-18 11:35-0500\n" "PO-Revision-Date: 2020-05-18 11:35-0500\n" "Last-Translator: churchthemes.com <contact@churchthemes.com>\n" "Language-Team: PNTE <blogs@educacion.navarra.es>\n" "Language: sr_RS\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 2.3.1\n" "X-Poedit-KeywordsList: __;_e;_n:1,2;_nx:1,2;_x:1,2c;_ex:1,2c;esc_attr__;" "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;" "_nx_noop:1,2,3c;_c\n" "X-Poedit-Basepath: ..\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-SearchPath-0: .\n" #: includes/admin.php:78 includes/admin.php:109 msgid "Import/Export" msgstr "" #: includes/import.php:45 #, fuzzy, php-format #| msgid "You must upload a <b>.wie</b> file generated by this plugin." msgid "" "You must upload a <b>.wie</b> file generated by this plugin (<a href=\"%1$s" "\" target=\"_blank\">help</a>)." msgstr "Morate otpremiti <b>.wie</b> datoteku koju je generisao ovaj plugin." #: includes/import.php:114 #, fuzzy #| msgid "You must upload a <b>.wie</b> file generated by this plugin." msgid "You must choose a <b>.wie</b> file to upload or paste its contents." msgstr "Morate otpremiti <b>.wie</b> datoteku koju je generisao ovaj plugin." #: includes/import.php:152 msgid "Import file could not be found. Please try again." msgstr "Datoteka za uvoz nije nađena. Molimo vas, pokušajte ponovo." #: includes/import.php:187 msgid "Import data is invalid." msgstr "" #: includes/import.php:229 msgid "Widget area does not exist in theme (using Inactive)" msgstr "" #: includes/import.php:251 msgid "Site does not support widget" msgstr "Site ne podržava widget" #: includes/import.php:286 msgid "Widget already exists" msgstr "Widget već postoji" #: includes/import.php:360 msgid "Imported" msgstr "Uvezen" #: includes/import.php:363 msgid "Imported to Inactive" msgstr "Uvezen u Neaktivne" #: includes/import.php:369 msgid "No Title" msgstr "Nema naslova" #: includes/page.php:23 includes/page.php:24 includes/page.php:44 msgid "Widget Importer & Exporter" msgstr "Widget Importer & Exporter" #: includes/page.php:61 msgctxt "heading" msgid "Import Widgets" msgstr "Uvezi widget-e" #: includes/page.php:72 msgid "Please select a <b>.wie</b> file generated by this plugin." msgstr "" "Molimo vas, odaberite <b>.wie</b> datoteku koju je generisao ovaj plugin." #: includes/page.php:89 msgid "" "Or, <a href=\"#\" id=\"wie-content-toggle\">copy and paste</a> the contents " "of your <b>.wie</b> file." msgstr "" #: includes/page.php:105 msgctxt "button" msgid "Import Widgets" msgstr "Uvezi widget-e" #: includes/page.php:116 msgctxt "heading" msgid "Export Widgets" msgstr "Izvezi widget-e" #: includes/page.php:121 msgid "Click below to generate a <b>.wie</b> file for all active widgets." msgstr "" "Kliknite ispod da biste generisali <b>.wie</b> datoteku za sve aktivne " "widget-e." #: includes/page.php:131 msgctxt "button" msgid "Export Widgets" msgstr "Izvezi widget-e." #: includes/page.php:174 msgctxt "heading" msgid "Import Results" msgstr "Uvezi rezultate" #: includes/page.php:181 #, php-format msgid "" "You can manage your <a href=\"%1$s\">Widgets</a> or <a href=\"%2$s\">Go " "Back</a>." msgstr "" #~ msgid "Import data could not be read. Please try a different file." #~ msgstr "" #~ "Podaci za uvoz ne mogu da se pročitaju. Molimo vas da isprobate drugu " #~ "datoteku." #~ msgid "Sidebar does not exist in theme (using Inactive)" #~ msgstr "Bočni meni ne postoji u temi (nije aktiviran)" #~ msgid "" #~ "You can manage your <a href=\"%s\">Widgets</a> or <a href=\"%s\">Go Back</" #~ "a>." #~ msgstr "" #~ "Možete upravljati svojim<a href=\"%s\">widget-ima</a> ili se<a href=\"%s" #~ "\">vratiti nazad</a>." #~ msgid "Widget Import/Export" #~ msgstr "Widget Import/Export" languages/widget-importer-exporter.pot 0000777 00000005232 15251156635 0014250 0 ustar 00 #, fuzzy msgid "" msgstr "" "Project-Id-Version: Widget Importer & Exporter\n" "POT-Creation-Date: 2020-05-18 11:35-0500\n" "PO-Revision-Date: 2015-02-23 09:31-0600\n" "Last-Translator: churchthemes.com\n" "Language-Team: \n" "Language: en\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 2.3.1\n" "X-Poedit-KeywordsList: __;_e;_n:1,2;_nx:1,2;_x:1,2c;_ex:1,2c;esc_attr__;" "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;" "_nx_noop:1,2,3c\n" "X-Poedit-Basepath: .\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-SearchPath-0: ..\n" #: ../includes/admin.php:78 ../includes/admin.php:109 msgid "Import/Export" msgstr "" #: ../includes/import.php:45 #, php-format msgid "" "You must upload a <b>.wie</b> file generated by this plugin (<a href=\"%1$s\" " "target=\"_blank\">help</a>)." msgstr "" #: ../includes/import.php:114 msgid "You must choose a <b>.wie</b> file to upload or paste its contents." msgstr "" #: ../includes/import.php:152 msgid "Import file could not be found. Please try again." msgstr "" #: ../includes/import.php:187 msgid "Import data is invalid." msgstr "" #: ../includes/import.php:229 msgid "Widget area does not exist in theme (using Inactive)" msgstr "" #: ../includes/import.php:251 msgid "Site does not support widget" msgstr "" #: ../includes/import.php:286 msgid "Widget already exists" msgstr "" #: ../includes/import.php:360 msgid "Imported" msgstr "" #: ../includes/import.php:363 msgid "Imported to Inactive" msgstr "" #: ../includes/import.php:369 msgid "No Title" msgstr "" #: ../includes/page.php:23 ../includes/page.php:24 ../includes/page.php:44 msgid "Widget Importer & Exporter" msgstr "" #: ../includes/page.php:61 msgctxt "heading" msgid "Import Widgets" msgstr "" #: ../includes/page.php:72 msgid "Please select a <b>.wie</b> file generated by this plugin." msgstr "" #: ../includes/page.php:89 msgid "" "Or, <a href=\"#\" id=\"wie-content-toggle\">copy and paste</a> the contents " "of your <b>.wie</b> file." msgstr "" #: ../includes/page.php:105 msgctxt "button" msgid "Import Widgets" msgstr "" #: ../includes/page.php:116 msgctxt "heading" msgid "Export Widgets" msgstr "" #: ../includes/page.php:121 msgid "Click below to generate a <b>.wie</b> file for all active widgets." msgstr "" #: ../includes/page.php:131 msgctxt "button" msgid "Export Widgets" msgstr "" #: ../includes/page.php:174 msgctxt "heading" msgid "Import Results" msgstr "" #: ../includes/page.php:181 #, php-format msgid "" "You can manage your <a href=\"%1$s\">Widgets</a> or <a href=\"%2$s\">Go Back</" "a>." msgstr "" languages/widget-importer-exporter-es_ES.po 0000777 00000010053 15251156635 0015055 0 ustar 00 msgid "" msgstr "" "Project-Id-Version: Widget Importer & Exporter\n" "POT-Creation-Date: 2020-05-18 11:35-0500\n" "PO-Revision-Date: 2020-05-18 11:35-0500\n" "Last-Translator: churchthemes.com <contact@churchthemes.com>\n" "Language-Team: PNTE <blogs@educacion.navarra.es>\n" "Language: es_ES\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 2.3.1\n" "X-Poedit-KeywordsList: __;_e;_n:1,2;_nx:1,2;_x:1,2c;_ex:1,2c;esc_attr__;" "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;" "_nx_noop:1,2,3c;_c\n" "X-Poedit-Basepath: ..\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-SearchPath-0: .\n" #: includes/admin.php:78 includes/admin.php:109 msgid "Import/Export" msgstr "" #: includes/import.php:45 #, fuzzy, php-format #| msgid "You must upload a <b>.wie</b> file generated by this plugin." msgid "" "You must upload a <b>.wie</b> file generated by this plugin (<a href=\"%1$s" "\" target=\"_blank\">help</a>)." msgstr "Debes subir un fichero <b>.wie</b>, generado por este plugin." #: includes/import.php:114 #, fuzzy #| msgid "You must upload a <b>.wie</b> file generated by this plugin." msgid "You must choose a <b>.wie</b> file to upload or paste its contents." msgstr "Debes subir un fichero <b>.wie</b>, generado por este plugin." #: includes/import.php:152 msgid "Import file could not be found. Please try again." msgstr "" "El fichero de importación no ha podido ser encontrado. Por favor, inténtalo " "de nuevo." #: includes/import.php:187 msgid "Import data is invalid." msgstr "" #: includes/import.php:229 msgid "Widget area does not exist in theme (using Inactive)" msgstr "" #: includes/import.php:251 msgid "Site does not support widget" msgstr "El sitio no soporta este widget" #: includes/import.php:286 msgid "Widget already exists" msgstr "El widget ya existe" #: includes/import.php:360 msgid "Imported" msgstr "Importado" #: includes/import.php:363 msgid "Imported to Inactive" msgstr "Importado como inactivo" #: includes/import.php:369 msgid "No Title" msgstr "Sin título" #: includes/page.php:23 includes/page.php:24 includes/page.php:44 msgid "Widget Importer & Exporter" msgstr "Widget Importer & Exporter" #: includes/page.php:61 msgctxt "heading" msgid "Import Widgets" msgstr "Importar widgets" #: includes/page.php:72 msgid "Please select a <b>.wie</b> file generated by this plugin." msgstr "" "Por favor, selecciona un fichero <b>.wie</b>, generado por este plugin." #: includes/page.php:89 msgid "" "Or, <a href=\"#\" id=\"wie-content-toggle\">copy and paste</a> the contents " "of your <b>.wie</b> file." msgstr "" #: includes/page.php:105 msgctxt "button" msgid "Import Widgets" msgstr "Importar widgets" #: includes/page.php:116 msgctxt "heading" msgid "Export Widgets" msgstr "Exportar widgets" #: includes/page.php:121 msgid "Click below to generate a <b>.wie</b> file for all active widgets." msgstr "" "Haz clic el el botón que tienes a continuación, para generar un fichero <b>." "wie</b>, para todos los widgets activos." #: includes/page.php:131 msgctxt "button" msgid "Export Widgets" msgstr "Exportar widgets" #: includes/page.php:174 msgctxt "heading" msgid "Import Results" msgstr "Resultados de la exportación" #: includes/page.php:181 #, php-format msgid "" "You can manage your <a href=\"%1$s\">Widgets</a> or <a href=\"%2$s\">Go " "Back</a>." msgstr "" #~ msgid "Import data could not be read. Please try a different file." #~ msgstr "" #~ "El fichero de importación no ha podido ser leído. Por favor, inténtalo de " #~ "nuevo con un fichero diferente." #~ msgid "Sidebar does not exist in theme (using Inactive)" #~ msgstr "" #~ "La barra lateral no existe en el tema (sus widgets se importarán como " #~ "inactivos)" #~ msgid "" #~ "You can manage your <a href=\"%s\">Widgets</a> or <a href=\"%s\">Go Back</" #~ "a>." #~ msgstr "" #~ "Puedes gestionar tus <a href=\"%s\">widgets</a> o <a href=\"%s\">volver " #~ "atrás</a>." #~ msgid "Widget Import/Export" #~ msgstr "Importar y exportar widgets" readme.txt 0000777 00000005074 15251156635 0006570 0 ustar 00 === Widget Importer & Exporter === Contributors: churchthemes, stevengliebe, mauryaratan, wido, zodiac1978 Tags: widgets, widget, importer, exporter, import, export, widget import, widget export, widget importer, widget exporter, backup, migration Requires at least: 3.5 Tested up to: 6.6 Requires PHP: 5.2.4 Stable tag: 1.6.1 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Import and export your widgets. == Description == Widget Importer & Exporter is useful for moving widgets from one WordPress site to another, backing up widgets and for theme developers to give users sample widgets. See the [details](https://churchthemes.com/plugins/widget-importer-exporter/) on ChurchThemes.com. = Importing = Importing is done by uploading an export file created by the plugin. The results of an import are shown in a nicely formatted table with an explanation of what happened with each widget area and widget. Importation takes into consideration widget areas not existing in the current theme (widgets imported as *Inactive*), widgets that already exist in the same widget area (widgets not duplicated) and widgets that are not supported by the site (widgets not imported). = Exporting = Widget Importer & Exporter can create an export file (in JSON format with .wie extension) out of currently active widgets. This file can be imported into other sites using this plugin or used to restore widgets to the same site later. = Developers = The ``wie_before_import`` action fires after a file is uploaded but before the data is imported. ``wie_after_import`` fires after the data is imported. The ``wie_import_data`` filter can be used to filter data before it is imported. Other filters are used throughout. Make a pull request on GitHub if you need another hook. Please jump on [GitHub](https://github.com/churchthemes/widget-importer-exporter) to report issues and follow development. == Installation == Please see [Installing Plugins](http://codex.wordpress.org/Managing_Plugins#Installing_Plugins) in the WordPress Codex. After activation, go to *Tools > Widget Importer & Exporter* == Frequently Asked Questions == = Why does the JSON export file use a .wie extension? = The export file contains JSON data that is not compatible with any other plugin. Therefore it has a proprietary file extension. This keeps people from confusing export files from other widget import/export plugins. == Screenshots == 1. Main import/export screen 2. Results from an import == Changelog == See [releases](https://github.com/churchthemes/widget-importer-exporter/releases) on GitHub.
| ver. 1.6 |
Github
|
.
| PHP 8.1.34 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка