Commit inicial - WordPress Análisis de Precios Unitarios

- WordPress core y plugins
- Tema Twenty Twenty-Four configurado
- Plugin allow-unfiltered-html.php simplificado
- .gitignore configurado para excluir wp-config.php y uploads

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-11-03 21:04:30 -06:00
commit a22573bf0b
24068 changed files with 4993111 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
<?php
// Silence is golden.

View File

@@ -0,0 +1,433 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$slug = $VARS['slug'];
$licenses = apply_filters( 'woofunnels_plugins_license_needed', array() );
$confirmation_message = '';
$reasons = $VARS['reasons']['default'];
$reasons_list_items_html = '';
$plugin_customized_reasons = array();
$incr = 0;
foreach ( $reasons as $reason ) {
$list_item_classes = 'reason';
$reason_html = '';
if ( ! empty( $reason['input_type'] ) ) {
$list_item_classes .= ' has-input';
}
if ( isset( $reason['html'] ) ) {
$list_item_classes .= ' has_html';
}
if ( ( isset( $reason['html'] ) && ( ! empty( $reason['html'] ) ) ) ) {
$reason_html .= '<div class="reason_html">' . $reason['html'] . '</div>';
}
$reasons_list_items_html .= sprintf( '<li class="%s" data-input-type="%s" data-input-placeholder="%s"><label><span><input type="radio" name="selected-reason" value="%s"/></span><span>%s</span></label>%s</li>', $list_item_classes, $reason['input_type'], $reason['input_placeholder'], $reason['id'], $reason['text'], $reason_html );
$incr ++;
}
?>
<style>
.woofunnels-modal {
position: fixed;
overflow: auto;
height: 100%;
width: 100%;
top: 0;
z-index: 100000;
display: none;
background: rgba(0, 0, 0, 0.6)
}
.woofunnels-modal .woofunnels-modal-dialog {
background: transparent;
position: absolute;
left: 50%;
margin-left: -298px;
top: -100%;
z-index: 100001;
width: 596px
}
.woofunnels-modal li.reason.has_html .reason_html {
display: none;
border: 1px solid #ddd;
padding: 4px 6px;
margin: 6px 0 0 20px;
}
.woofunnels-modal li.reason.has_html.li-active .reason_html {
display: block;
}
@media (max-width: 650px) {
.woofunnels-modal .woofunnels-modal-dialog {
margin-left: -50%;
box-sizing: border-box;
padding-left: 10px;
padding-right: 10px;
width: 100%
}
.woofunnels-modal .woofunnels-modal-dialog .woofunnels-modal-panel > h3 > strong {
font-size: 1.3em
}
.woofunnels-modal .woofunnels-modal-dialog li.reason {
margin-bottom: 10px
}
.woofunnels-modal .woofunnels-modal-dialog li.reason .reason-input {
margin-left: 29px
}
.woofunnels-modal .woofunnels-modal-dialog li.reason label {
display: table
}
.woofunnels-modal .woofunnels-modal-dialog li.reason label > span {
display: table-cell;
font-size: 1.3em
}
}
.woofunnels-modal.active {
display: block
}
.woofunnels-modal.active:before {
display: block
}
.woofunnels-modal.active .woofunnels-modal-dialog {
top: 10%;
background: #fff;
}
.woofunnels-modal .woofunnels-modal-body, .woofunnels-modal .woofunnels-modal-footer {
border: 0;
background: #fefefe;
padding: 25px
}
.woofunnels-modal .woofunnels-modal-body {
border-bottom: 0;
padding: 0px 23px;
}
.woofunnels-modal .woofunnels-modal-body h2 {
font-size: 20px
}
.woofunnels-modal .woofunnels-modal-body > div {
margin-top: 10px
}
.woofunnels-modal .woofunnels-modal-body > div h2 {
font-weight: bold;
font-size: 20px;
margin-top: 0
}
.woofunnels-modal .woofunnels-modal-footer {
border-top: #eeeeee solid 1px;
text-align: right
}
.woofunnels-modal .woofunnels-modal-footer > .button {
margin: 0 7px
}
.woofunnels-modal .woofunnels-modal-footer > .button:first-child {
margin: 0
}
.woofunnels-modal .woofunnels-modal-footer .button-deactivate {
float: left;
}
.woofunnels-modal .woofunnels-modal-panel:not(.active) {
display: none
}
.woofunnels-modal .reason-input {
margin: 3px 0 3px 22px
}
.woofunnels-modal .reason-input input, .woofunnels-modal .reason-input textarea {
width: 100%
}
body.has-woofunnels-modal {
overflow: hidden
}
#the-list .deactivate > .woofunnels-slug {
display: none
}
.woofunnels-modal li.reason-hide {
display: none;
}
</style>
<script type="text/javascript">
var currentPluginName = "";
var WooFunnelsCustomReasons = {};
var WooFunnelsDefaultReason = {};
var WooFunnelsallLicenses = '<?php echo wp_json_encode( $licenses, JSON_UNESCAPED_SLASHES ); ?>';
(function ($) {
<?php
foreach($VARS['reasons'] as $plugin_key => $plugin_reasons) {
$threshold = apply_filters( 'woofunnels_uninstall_reason_threshold_' . $plugin_key, 2 );
?>
WooFunnelsDefaultReason['<?php echo $plugin_key; ?>'] = '';
<?php
if ( $plugin_key === "default" ) {
continue;
}
$reasons_list_items_html_custom = "";
foreach ( $plugin_reasons as $key => $reason ) {
$list_item_classes = 'reason';
$reason_html = '';
if ( ! empty( $reason['input_type'] ) ) {
$list_item_classes .= ' has-input';
}
if ( isset( $reason['html'] ) ) {
$list_item_classes .= ' has_html';
}
if ( ( isset( $reason['html'] ) && ( ! empty( $reason['html'] ) ) ) ) {
$reason_html .= '<div class="reason_html">' . $reason['html'] . '</div>';
}
$threshold = apply_filters( 'woofunnels_uninstall_reason_threshold_' . $plugin_key, 2 );
if ( $key < $threshold ) {
$reasons_list_items_html_custom = sprintf( '<li class="%s" data-input-type="%s" data-input-placeholder="%s"><label><span><input type="radio" name="selected-reason" value="%s"/></span><span>%s</span></label>%s</li>', $list_item_classes, $reason['input_type'], $reason['input_placeholder'], $reason['id'], $reason['text'], $reason_html );
} else {
if ( $key == $threshold ) {
$reasons_list_items_html_custom .= '<li class="advanced show_m_reason" data-input-type="" data-input-placeholder="">
<a href="javascript:void(0)">I have more specific reason</a>
</li>';
}
$reasons_list_items_html_custom .= sprintf( '<li class="%s" data-input-type="%s" data-input-placeholder="%s"><label><span><input type="radio" name="selected-reason" value="%s"/></span><span>%s</span></label>%s</li>', $list_item_classes, $reason['input_type'], $reason['input_placeholder'], $reason['id'], $reason['text'], $reason_html );
}
}
?> WooFunnelsCustomReasons['<?php echo $plugin_key; ?>'] = <?php echo json_encode( $reasons_list_items_html_custom ); ?>;
<?php } ?>
var $deactivateLinks = {};
var reasonsHtml = <?php echo json_encode( $reasons_list_items_html ); ?>,
modalHtml =
'<div class="woofunnels-modal<?php echo ( $confirmation_message === "" ) ? ' no-confirmation-message' : ''; ?>">'
+ ' <div class="woofunnels-modal-dialog">'
+ '<div class="woofunnels-modal-header" style="position: relative;display: block;height: 70px;background: #fff;border-bottom: #eeeeee solid 1px;">'
+ '<div style="padding: 25px 15px;"><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 233.1 147.2" style="enable-background:new 0 0 233.1 147.2;height: 32px;width: 33px;float: left;/* background: black; *//* fill: bisque; */" xml:space="preserve">'
+ '<polygon class="st0" points="232,3.8 150.4,143.1 117.9,143.1 198.9,3.8 " style="fill: #1daafc;"></polygon>'
+ '<polygon class="st0" points="167.4,3.8 86.8,143.1 5.2,3.8 102.8,3.8 88.2,32.4 86.3,32.4 54.7,32.4 86.3,88.2 134.4,3.8 "></polygon>'
+ '</svg><span style="float: left; font-size: 19px; font-weight: 600; margin-top: 5px; margin-left: 8px;">Quick Feedback</span></div></div>'
+ ' <div class="woofunnels-modal-body">'
+ ' <div class="woofunnels-modal-panel" data-panel-id="confirm"><p><?php echo $confirmation_message; ?></p></div>'
+ ' <div class="woofunnels-modal-panel active" data-panel-id="reasons"><h3><strong><?php printf( WooFunnels_deactivate::load_str( 'deactivation-share-reason' ) ); ?>:</strong></h3><ul id="reasons-list">' + reasonsHtml + '</ul></div>'
+ ' </div>'
+ ' <div class="woofunnels-modal-footer">'
+ ' <a href="#" class="button button-primary button-deactivate"><?php printf( WooFunnels_deactivate::load_str( 'deactivation-modal-button-submit' ) ); ?></a>'
+ ' <a href="#" class="button button-secondary"><?php printf( __( 'Skip & Deactivate', 'funnel-builder' ) ); ?></a>' // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch
+ ' </div>'
+ ' </div>'
+ '</div>',
$modal = $(modalHtml),
$deactivateLink = $('#the-list .deactivate > .woofunnels-slug').prev();
for (var i = 0; i < $deactivateLink.length; i++) {
$deactivateLinks[$($deactivateLink[i]).siblings(".woofunnels-slug").attr('data-slug')] = $deactivateLink[i].href;
}
$modal.appendTo($('body'));
registerEventHandlers();
function registerEventHandlers() {
$deactivateLink.on("click", function (evt) {
evt.preventDefault();
try {
currentPluginName = $(this).siblings(".woofunnels-slug").attr('data-slug');
// Assuming showModal() is a function that might throw an error
showModal();
} catch (error) {
console.error("An error occurred:", error);
// Redirect to the href of the clicked link if an error occurs
const linkHref = $(this).attr('href');
if (linkHref) {
window.location.href = linkHref;
}
}
});
$modal.on('click', '.show_m_reason a', function (evt) {
evt.preventDefault();
$modal.find(".reason-hide").show();
$(this).parent().remove();
return false;
});
$modal.on('click', '.button', function (evt) {
evt.preventDefault();
if ($(this).hasClass('disabled')) {
return;
}
var _parent = $(this).parents('.woofunnels-modal:first');
var _this = $(this);
var $radio = $('input[type="radio"]:checked');
var $selected_reason = $radio.parents('li:first'),
$input = $selected_reason.find('textarea, input[type="text"]');
$.ajax({
url: ajaxurl,
method: 'POST',
data: {
'action': 'woofunnels_submit_uninstall_reason',
'reason_id': (0 !== $radio.length) ? $radio.val() : '',
'reason_info': (0 !== $input.length) ? $input.val().trim() : '',
'plugin_basename': currentPluginName,
'licenses': WooFunnelsallLicenses,
'_nonce': bwf_secure.nonce
},
beforeSend: function () {
_parent.find('.button').addClass('disabled');
},
complete: function () {
// Do not show the dialog box, deactivate the plugin.
window.location.href = $deactivateLinks[currentPluginName];
}
});
});
$modal.on('click', 'input[type="radio"]', function () {
var _parent = $(this).parents('li:first');
var _parent_ul = $(this).parents('ul#reasons-list');
_parent_ul.children("li.li-active").removeClass("li-active");
$modal.find('.reason-input').remove();
if (_parent.hasClass('has_html')) {
_parent.addClass('li-active');
}
if (_parent.hasClass('has-input')) {
var inputType = _parent.data('input-type'),
inputPlaceholder = _parent.data('input-placeholder'),
reasonInputHtml = '<div class="reason-input">' + (('textfield' === inputType) ? '<input type="text" />' : '<textarea rows="5"></textarea>') + '</div>';
_parent.append($(reasonInputHtml));
_parent.find('input, textarea').attr('placeholder', inputPlaceholder).focus();
}
});
// If the user has clicked outside the window, cancel it.
$modal.on('click', function (evt) {
var $target = $(evt.target);
// If the user has clicked anywhere in the modal dialog, just return.
if ($target.hasClass('woofunnels-modal-body') || $target.hasClass('woofunnels-modal-footer')) {
return;
}
// If the user has not clicked the close button and the clicked element is inside the modal dialog, just return.
if (!$target.hasClass('button-close') && ($target.parents('.woofunnels-modal-body').length > 0 || $target.parents('.woofunnels-modal-footer').length > 0)) {
return;
}
closeModal();
});
}
function showModal() {
resetModal();
// Display the dialog box.
$modal.addClass('active');
$('body').addClass('has-woofunnels-modal');
}
function closeModal() {
$modal.removeClass('active');
$('body').removeClass('has-woofunnels-modal');
}
function resetModal() {
if (WooFunnelsCustomReasons.hasOwnProperty(currentPluginName) === true) {
$modal.find("ul#reasons-list").html(WooFunnelsCustomReasons[currentPluginName]);
} else {
$modal.find("ul#reasons-list").html(reasonsHtml);
}
var defaultSelect = WooFunnelsDefaultReason[currentPluginName] || WooFunnelsDefaultReason['default'];
$modal.find('.button').removeClass('disabled');
// Uncheck all radio buttons.
$modal.find('input[type="radio"]').prop('checked', false);
if (defaultSelect !== "") {
$modal.find('input[type="radio"][value="' + defaultSelect + '"]').prop('checked', true);
$modal.find('input[type="radio"][value="' + defaultSelect + '"]').parents('li.reason').addClass('li-active');
}
// Remove all input fields ( textfield, textarea ).
$modal.find('.reason-input').remove();
$modal.find(".reason-hide").hide();
/*
* If the modal dialog has no confirmation message, that is, it has only one panel, then ensure
* that clicking the deactivate button will actually deactivate the plugin.
*/
if ($modal.hasClass('no-confirmation-message')) {
showPanel('reasons');
} else {
showPanel('confirm');
}
}
function showPanel(panelType) {
$modal.find('.woofunnels-modal-panel').removeClass('active ');
$modal.find('[data-panel-id="' + panelType + '"]').addClass('active');
}
function getCurrentPanel() {
return $modal.find('.woofunnels-modal-panel.active').attr('data-panel-id');
}
})(jQuery);
</script>

View File

@@ -0,0 +1,66 @@
<?php
if ( ! is_array( $notifications_list ) || count( $notifications_list ) === 0 ) {
return;
}
?>
<div class="wf_notification_wrap">
<div class="inside">
<?php
foreach ( $notifications_list as $nkey => $nvalue ) {
foreach ( $nvalue as $key => $value ) {
$combined_class = [ $key, 'wf_notification_content_sec' ];
if ( isset( $value['type'] ) && $value['type'] !== '' ) {
$combined_class[] = $value['type'];
}
if ( isset( $value['class'] ) && ! empty( $value['class'] ) ) {
$value['class'] = is_array( $value['class'] ) ? $value['class'] : explode( ' ', (string) $value['class'] );
$value['class'] = array_filter( $value['class'] );
$value['class'] = array_map( 'trim', $value['class'] );
$combined_class = array_merge( $combined_class, $value['class'] );
}
?>
<div class="<?php echo esc_attr( implode( ' ', $combined_class ) ); ?>" wf-noti-key="wf-<?php echo esc_attr( $key ); ?>" wf-noti-group="<?php echo esc_attr( $nkey ); ?>">
<div class="wf_overlay_active "></div>
<?php
echo '<div class="wf_notification_html"><p>' . $value['html'] . '</p></div>'; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
if ( isset( $value['buttons'] ) && ( is_array( $value['buttons'] ) && count( $value['buttons'] ) > 0 ) ) {
printf( '<div class="wf_notification_btn_wrap">' );
foreach ( $value['buttons'] as $btn_key => $btn_val ) {
$btn_class = [];
if ( isset( $btn_val['class'] ) && ! empty( $btn_val['class'] ) ) {
$btn_val['class'] = is_array( $btn_val['class'] ) ? $btn_val['class'] : explode( ' ', (string) $btn_val['class'] );
$btn_val['class'] = array_filter( $btn_val['class'] );
$btn_val['class'] = array_map( 'trim', $btn_val['class'] );
$btn_class = $btn_val['class'];
}
if ( ! isset( $btn_val['name'] ) || $btn_val['name'] === '' ) {
continue;
}
printf( ' <a href="%s" target="%s" class="%s">%s</a>', isset( $btn_val['url'] ) ? esc_url( $btn_val['url'] ) : '#', isset( $btn_val['target'] ) ? esc_attr( $btn_val['target'] ) : '_blank', esc_attr( implode( ' ', $btn_class ) ), esc_html( $btn_val['name'] ) );
}
printf( '</div>' );
}
?>
<div class="wf_notice_dismiss_link_wrap">
<a class="notice-dismiss" href="javascript:void(0)">
<?php esc_html_e( 'Dismiss', 'woofunnels' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?>
</a>
</div>
<div class="clearfix"></div>
</div>
<?php
}
}
?>
</div>
</div>

View File

@@ -0,0 +1,74 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$current_page = 'woofunnels';
// Exit if accessed directly
?>
<div class="woofunnels_plugins_wrap">
<h1><?php esc_html_e( 'Manage Licenses', 'woofunnels' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?></h1>
<?php
if ( is_object( $model ) ) {
?>
<div class="wp-filter">
<ul class="filter-links woofunnels_plugins_license_links">
<?php $licenses = WooFunnels_licenses::get_instance();
$licenses->get_plugins_list();
if ( ! empty( $licenses->plugins_list ) ) { ?>
<li class="plugin-install-featured <?php echo ( isset( $model->current_tab ) && $model->current_tab === "licenses" ) ? "current" : "" ?>">
<a href="<?php echo admin_url( 'admin.php?page=' . $current_page . "&tab=licenses" ); ?>"><?php esc_html_e( 'Licenses', 'woofunnels' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?></a>
</li>
<?php } ?>
<li class="plugin-install-popular <?php echo ( isset( $model->current_tab ) && $model->current_tab === "services" ) ? "current" : "" ?>">
<a href="<?php echo admin_url( 'admin.php?page=' . $current_page . "&tab=support" ); ?>" class=""><?php esc_html_e( 'Support', 'woofunnels' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?></a>
</li>
<?php
if ( isset( $model->additional_tabs ) && is_array( $model->additional_tabs ) && count( $model->additional_tabs ) > 0 ): ?>
<?php foreach ( $model->additional_tabs as $tab ): ?>
<li class="<?php echo ( isset( $model->current_tab ) && $model->current_tab === $tab['slug'] ) ? "current" : "" ?>">
<a href="<?php echo admin_url( 'admin.php?page=' . $current_page . '&tab=' . $tab['slug'] ); ?>"><?php echo esc_html( $tab['label'] ); ?></a>
</li>
<?php endforeach; ?>
<?php endif; ?>
</ul>
</div>
<br class="clear"/>
<div id="col-container" class="about-wrap">
<div class="col-wrap woofunnels_dashboard_license_content" style="width:100%">
<form id="woofunnels_activate-products" method="post" action="" class="validate">
<input type="hidden" name="action" value="woofunnels_activate-products"/>
<?php
require_once( WooFunnels_dashboard::$loader_url . 'includes/class-woofunnels-updater-licenses-table.php' );
$table = new WooFunnels_Updater_Licenses_Table();
$table->data = $model->licenses;
$table->prepare_items();
$table->display();
?>
<p class="submit woothemes-helper-submit-wrapper">
<?php
submit_button( __( 'Activate License', 'woofunnels' ), 'button-primary', null, false ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch
?>
</p><!--/.submit-->
<?php wp_nonce_field( 'woofunnels-activate-license' ); ?>
</form>
<div class="col-wrap">
<?php
$notice_text_raw = __( 'Note: You need to have valid licenses to receive updates and support for these plugins.', 'woofunnels' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch
$notice_text_raw .= ' <a target="_blank" href="https://myaccount.funnelkit.com/">';
$notice_text_raw .= __( 'Click Here', 'woofunnels' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch
$notice_text_raw .= '</a> ' . __( 'to get your license key(s).', 'woofunnels' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch
$notice_text = apply_filters( 'woofunnels_after_license_table_notice', $notice_text_raw );
?>
<p style="font-size: 12px;"><?php echo $notice_text; ?></p>
</div>
<?php do_action( 'woofunnels_license_after_notice_wrap' ); ?>
</div><!--/.col-wrap-->
<div class="woofunnels-area-right"> <?php do_action( 'woofunnels_licenses_right_content' ); ?> </div>
</div><!--/#col-container-->
<?php do_action( 'woofunnels_licenses_after_area' ); ?>
<?php } else { ?>
<div class="woofunnels_cannot_connect"> <?php echo apply_filters( 'woofunnels_no_data_license', esc_html__( 'Could not connect to server.', 'woofunnels' ) ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?></div>
<?php } ?>
</div>

View File

@@ -0,0 +1,104 @@
<?php if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$current_page = 'woofunnels';
// Exit if accessed directly
?>
<style type="text/css">
.woofunnels_dashboard_tab_content #support-request {
margin-left: 10px;
}
</style>
<div class="woofunnels_plugins_wrap">
<h1><?php esc_html_e( 'Logs', 'woofunnels' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?></h1>
<?php if ( $model ) { ?>
<div class="wp-filter">
<ul class="filter-links woofunnels_plugins_license_links">
<?php
$licenses = WooFunnels_licenses::get_instance();
$licenses->get_plugins_list();
if ( ! empty( $licenses->plugins_list ) ) {
?>
<li class="plugin-install-featured <?php echo ( isset( $model->current_tab ) && $model->current_tab === 'licenses' ) ? 'current' : ''; ?>">
<a href="<?php echo admin_url( 'admin.php?page=' . $current_page . '&tab=licenses' ); ?>"><?php esc_html_e( 'Licenses', 'woofunnels' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?></a>
</li>
<?php } ?>
<li class="plugin-install-popular <?php echo ( isset( $model->current_tab ) && $model->current_tab === 'support' ) ? 'current' : ''; ?>">
<a href="<?php echo admin_url( 'admin.php?page=' . $current_page . '&tab=support' ); ?>"
class=""><?php esc_html_e( 'Support', 'woofunnels' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?></a>
</li>
<?php if ( isset( $model->additional_tabs ) && is_array( $model->additional_tabs ) && count( $model->additional_tabs ) > 0 ): ?>
<?php foreach ( $model->additional_tabs as $tab ): ?>
<li class="<?php echo ( isset( $model->current_tab ) && $model->current_tab === $tab['slug'] ) ? "current" : "" ?>">
<a href="<?php echo admin_url( 'admin.php?page=' . $current_page . '&tab=' . $tab['slug'] ); ?>"><?php echo esc_html( $tab['label'] ); ?></a>
</li>
<?php endforeach; ?>
<?php endif; ?>
</ul>
</div>
<br class="clear">
<div id="col-container" class="about-wrap">
<?php
$file_content = '';
$selected_log_file = '';
// Handle the post submission and create the fileapi object
if ( is_array( $_POST ) && isset( $_POST['log_selected'] ) && ! empty( $_POST['log_selected'] ) ) {
$selected_log_file = $_POST['log_selected'];
$folder_prefix = explode( '/', $selected_log_file );
$folder_file_name = $folder_prefix[1];
$folder_prefix = $folder_prefix[0];
$file_api = new WooFunnels_File_Api( $folder_prefix );
}
// View log submit is clicked, get the content from the selected file
if ( isset( $_POST['view_log'] ) && ! empty( $_POST['view_log'] ) ) {
$file_content = $file_api->get_contents( $folder_file_name );
}
// Delete log submit is clicked, delete the selected file
if ( isset( $_POST['delete_log'] ) && ! empty( $_POST['delete_log'] ) ) {
$file_api->delete_file( $folder_file_name );
}
$wp_dir = wp_upload_dir();
$logger_obj = BWF_Logger::get_instance();
$final_logs_result = $logger_obj->get_log_options();
?>
<form method="post">
<div class="woofunnels_row">
<select name="log_selected" required>
<option value=""><?php echo esc_html__( 'Select log file', 'woofunnels' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?></option>
<?php
foreach ( $final_logs_result as $plugin_folder => $plugin_log_files ) {
$optgroup_head = str_replace( '-', ' ', $plugin_folder );
$optgroup_head = ucfirst( $optgroup_head );
?>
<optgroup label="<?php echo $optgroup_head; ?>">
<?php
foreach ( $plugin_log_files as $file_slug => $file_name ) {
$option_value = $plugin_folder . '/' . $file_slug;
$selected = ( $selected_log_file === $option_value ) ? 'selected' : '';
echo '<option value="' . $option_value . '" ' . $selected . '>' . $file_name . '</option>';
}
?>
</optgroup>
<?php
}
?>
</select>
<input type="submit" value="<?php echo esc_attr__( 'View log', 'woofunnels' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?>" name="view_log" class="button"/>
<input type="submit" onclick="return confirm('Are you sure you want to permanently delete this file?')" value="<?php echo esc_attr__( 'Delete log', 'woofunnels' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?>" name="delete_log" class="button" style="float: right;"/>
</div>
<div class="woofunnels_row">
<div style="padding: 10px; min-height: 400px;background: white;border: 1px solid #d3cdcd;margin-top: 5px;">
<pre style="font-family: monospace;white-space: pre-wrap;word-wrap: break-word; font-size: 13px;"><?php echo trim( $file_content ); ?></pre>
</div>
</div>
</form>
<?php } ?>
</div>

View File

@@ -0,0 +1,187 @@
<?php
$current_page = 'woofunnels';
?>
<div class="woofunnels_plugins_wrap">
<h1><?php esc_html_e( 'View Plugins ', 'woofunnels' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?></h1>
<?php if ( $model ) { ?>
<div class="wp-filter">
<?php
if ( $model->tabs && count( $model->tabs ) > 0 ):
?>
<ul class="filter-links js_filters filter-primary"><?php
foreach ( $model->tabs as $key => $tabs ):
?>
<li class="plugin-install-<?php echo $tabs['data-name']; ?> <?php echo ( $key == 0 ) ? "current" : ""; ?>"
data-type="<?php echo $tabs['data-type']; ?>" data-name="<?php echo $tabs['data-name']; ?>">
<a href="#<?php echo ( $tabs['data-name'] !== "" ) ? $tabs['data-name'] : 'all'; ?>"
data-dd="ddddd" class=""><?php echo $tabs['title']; ?></a>
</li>
<?php
endforeach;
?></ul><?php
endif;
?>
</ul>
<ul class="filter-links woofunnels_plugins_license_links">
<?php $licenses = WooFunnels_licenses::get_instance();
$licenses->get_plugins_list();
if ( ! empty( $licenses->plugins_list ) ) { ?>
<li class="plugin-install-featured <?php echo ( isset( $model->current_tab ) && $model->current_tab === "licenses" ) ? "current" : "" ?>">
<a href="<?php echo admin_url( 'admin.php?page=' . $current_page . "&tab=licenses" ); ?>"><?php esc_html_e( 'Licenses', 'woofunnels' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?></a>
</li>
<?php } ?>
<li class="plugin-install-popular">
<a href="<?php echo admin_url( 'admin.php?page=' . $current_page . "&tab=support" ); ?>"
class=""><?php esc_html_e( 'Support', 'woofunnels' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?></a>
</li>
<?php if ( isset( $model->additional_tabs ) && is_array( $modal->additional_tabs ) && count( $modal->additional_tabs ) > 0 ): ?>
<?php foreach ( $model->additional_tabs as $tab ): ?>
<li class="<?php echo ( isset( $model->current_tab ) && $model->current_tab === $tab['slug'] ) ? "current" : "" ?>">
<a href="<?php echo admin_url( 'admin.php?page=' . $current_page . '&tab=' . $tab['slug'] ); ?>"><?php $tab['label']; ?></a>
</li>
<?php endforeach; ?>
<?php endif; ?>
</ul>
</div>
<br class="clear">
<?php echo $model->welcome_text; ?>
<form id="plugin-filter" method="post">
<div class="wp-list-table widefat plugin-install">
<div id="the-list">
<?php if ( $model->data && count( $model->data ) > 0 ):$incr = 0;
foreach ( $model->data as $key => $addons ): ?>
<div class="plugin-card plugin-card-<?php echo $key; ?>" data-index="<?php echo $incr; ?>"
data-terms='<?php echo json_encode( $addons->term ); ?>'>
<div class="plugin-card-top">
<div class="name column-name">
<h3>
<a target="_blank" href="<?php echo $addons->title_link; ?>"
class="">
<?php echo $addons->title; ?>
<img src="<?php echo trim( $addons->icon_full_url ); ?>"
class="plugin-icon" alt="">
</a>
</h3>
</div>
<div class="action-links">
<ul class="plugin-action-buttons">
<?php if ( isset( $addons->button_config['state'] ) ): ?>
<li><a target="_blank" class="<?php echo $addons->button_config['state']; ?> button"
data-slug="<?php echo $key; ?>"
data-plugin="<?php echo $addons->pluginbasename; ?>"
data-name="<?php echo $key; ?>"
href="<?php echo $addons->button_config['url']; ?>"
aria-label="Install BuddyPress 2.5.3 now"
data-name="BuddyPress 2.5.3"><?php echo $addons->button_config['text']; ?></a>
</li>
<?php else: ?>
<li><span
class="button button-disabled"><?php _e( 'Installed', 'woofunnels' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?></span>
</li>
<?php endif; ?>
<li><a target="_blank" href="<?php echo $addons->more_details_link ?>"
class="open-plugin-details-modal" aria-label=""
data-title=""><?php _e( 'More Details', 'woofunnels' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?></a></li>
</ul>
</div>
<div class="desc column-description">
<?php echo mb_strimwidth( $addons->description, 0, 150, "..." ); ?> </div>
</div>
<div class="plugin-card-bottom woofunnels_plugins_status_div">
<p class="woofunnels_plugins_status"><span
class="woofunnels_status_text"><strong><?php _e( 'Status:', 'woofunnels' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?></strong> <span
class="woofunnels_current_status woofunnels_available"><?php echo implode( " but ", $addons->status_config ); ?></span></span>
</p>
</div>
<div class="plugin-card-bottom woofunnels_plugins_features_div">
<div class="woofunnels_plugins_features">
<?php if ( $addons->additional_rows && count( $addons->additional_rows ) > 0 ): foreach ( $addons->additional_rows as $add_rows ): ?>
<div class="woofunnels_plugins_half_col">
<?php echo mb_strimwidth( $add_rows, 0, 70, "..." ); ?> </div> <?php
endforeach;
endif;
?>
</div>
</div>
<div class="plugin-card-bottom woofunnels_plugins_features_links_div">
<div class="woofunnels_plugins_features_links woofunnels_plugins_deactivate_add clearfix ">
<ul class="subsubsub">
<?php
if ( $addons->additional_links && count( $addons->additional_links ) > 0 ): $i = 0;
foreach ( $addons->additional_links as $lable => $add_link ):
?>
<li class="<?php echo $lable; ?>">
<?php
if ( $i > 0 ) {
echo "|";
}
?>
<a target="_blank" href="<?php echo $add_link; ?>"><?php echo $lable; ?></a>
</li> <?php
$i ++;
endforeach;
endif;
?>
</ul>
<?php
if ( $addons->plugin_state_config && count( $addons->plugin_state_config ) > 0 ):
?>
<ul class="woofunnels_plugins_options">
<?php
$i = 0;
foreach ( $addons->plugin_state_config as $lable => $add_link ):
?>
<li class="<?php echo $add_link['wrapperClass']; ?>"> <?php
if ( $i > 0 ) {
echo "|";
}
?> <a target="_blank" href="<?php echo $add_link['url']; ?>"
class="<?php echo $add_link['class'] ?>"><?php echo $add_link['text']; ?></a>
<?php echo $add_link['after_link']; ?>
</li>
<?php
$i ++;
endforeach;
?></ul><?php
endif;
?>
</div>
</div>
</div>
<?php
$incr ++;
endforeach;
endif;
?>
</div>
</div>
</form>
<br class="clear">
<?php } else { ?>
<div class="woofunnels_cannot_connect"> <?php esc_html_e( 'Could not connect to server.', 'woofunnels' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?></div><?php } ?>
</div>

View File

@@ -0,0 +1,62 @@
<?php if ( ! defined( 'ABSPATH' ) ) {
exit;
} // Exit if accessed directly
$current_page = 'woofunnels';
?>
<style type="text/css">
.woofunnels_dashboard_tab_content #support-request {
margin-left: 10px;
}
</style>
<div class="woofunnels_plugins_wrap">
<h1><?php esc_html_e( 'Request Support', 'woofunnels' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?></h1>
<?php if ( $model ) { ?>
<div class="wp-filter">
<ul class="filter-links woofunnels_plugins_license_links">
<?php
$licenses = WooFunnels_licenses::get_instance();
$licenses->get_plugins_list();
if ( ! empty( $licenses->plugins_list ) ) {
?>
<li class="plugin-install-featured <?php echo ( isset( $model->current_tab ) && $model->current_tab === 'licenses' ) ? 'current' : ''; ?>">
<a href="<?php echo admin_url( 'admin.php?page=' . $current_page . '&tab=licenses' ); ?>"><?php esc_html_e( 'Licenses', 'woofunnels' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?></a>
</li>
<?php } ?>
<li class="plugin-install-popular <?php echo ( isset( $model->current_tab ) && $model->current_tab === 'support' ) ? 'current' : ''; ?>">
<a href="<?php echo admin_url( 'admin.php?page=' . $current_page . '&tab=support' ); ?>"
class=""><?php esc_html_e( 'Support', 'woofunnels' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?></a></li>
<?php if ( isset( $model->additional_tabs ) && is_array( $model->additional_tabs ) && count( $model->additional_tabs ) > 0 ): ?>
<?php foreach ( $model->additional_tabs as $tab ): ?>
<li class="<?php echo ( isset( $model->current_tab ) && $model->current_tab === $tab['slug'] ) ? "current" : "" ?>">
<a href="<?php echo admin_url( 'admin.php?page=' . $current_page . '&tab=' . $tab['slug'] ); ?>"><?php echo esc_html( $tab['label'] ); ?></a>
</li>
<?php endforeach; ?>
<?php endif; ?>
</ul>
</div>
<br class="clear">
<div id="col-container" class="about-wrap">
<div class="woofunnels_dashboard_tab_content" id="support">
<div id="support-request">
<?php
_e( '
<p>
Do you need support? We are happy to help :) </p>
<p>
Please go through extensive documentation https://funnelkit.com/docs/</p>
<p>
If you are still unable to find answers feel free to <a target="_blank" href="https://funnelkit.com/support/">raise the ticket</a>.
</p><p>
For any pre-sales questions please fill out the Contact Form.</p>', 'woofunnels' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch
?>
</div>
<?php do_action( 'woofunnels_support_after_content' ); ?>
</div>
<div class="woofunnels-area-right"> <?php do_action( 'woofunnels_support_right_area' ); ?> </div>
<?php } else { ?>
<div class="woofunnels_cannot_connect"> <?php echo apply_filters( 'woofunnels_no_data_support', esc_html__( 'Could not connect to server.', 'woofunnels' ) ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?></div><?php } ?>
</div>

View File

@@ -0,0 +1,50 @@
<?php if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$current_page = 'woofunnels';
// Exit if accessed directly
?>
<style type="text/css">
.woofunnels_dashboard_tab_content #support-request {
margin-left: 10px;
}
</style>
<div class="woofunnels_plugins_wrap">
<h1><?php esc_html_e( 'Tools', 'woofunnels' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?></h1>
<?php if ( $model ) { ?>
<div class="wp-filter">
<ul class="filter-links woofunnels_plugins_license_links">
<?php
$licenses = WooFunnels_licenses::get_instance();
$licenses->get_plugins_list();
if ( ! empty( $licenses->plugins_list ) ) {
?>
<li class="plugin-install-featured <?php echo ( isset( $model->current_tab ) && $model->current_tab === 'licenses' ) ? 'current' : ''; ?>">
<a href="<?php echo admin_url( 'admin.php?page=' . $current_page . '&tab=licenses' ); ?>"><?php esc_html_e( 'Licenses', 'woofunnels' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?></a>
</li>
<?php } ?>
<li class="plugin-install-popular <?php echo ( isset( $model->current_tab ) && $model->current_tab === 'support' ) ? 'current' : ''; ?>">
<a href="<?php echo admin_url( 'admin.php?page=' . $current_page . '&tab=support' ); ?>"
class=""><?php esc_html_e( 'Support', 'woofunnels' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?></a>
</li>
<?php if ( isset( $model->additional_tabs ) && is_array( $model->additional_tabs ) && count( $model->additional_tabs ) > 0 ): ?>
<?php foreach ( $model->additional_tabs as $tab ): ?>
<li class="<?php echo ( isset( $model->current_tab ) && $model->current_tab === $tab['slug'] ) ? "current" : "" ?>">
<a href="<?php echo admin_url( 'admin.php?page=' . $current_page . '&tab=' . $tab['slug'] ); ?>"><?php echo esc_html( $tab['label'] ); ?></a>
</li>
<?php endforeach; ?>
<?php endif; ?>
</ul>
</div>
<br class="clear">
<div id="col-container" class="about-wrap">
<div class="woofunnels_dashboard_tab_content" id="tools">
<?php do_action( 'woofunnels_tools_after_content' ); ?>
</div>
<div class="woofunnels-area-right" style="width: 100%">
<?php do_action( 'woofunnels_tools_right_area' ); ?>
</div>
<?php } ?>
</div>