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,331 @@
/**
* CSS for the metabox "Connect Options"
*
* @author Paul Kashtanoff <paul@byonepress.com>
* @copyright (c) 2015, OnePress Ltd
*
* @package optinpanda
* @since 1.0.0
*/
#OPanda_ConnectOptionsMetaBox {
display: block;
}
#OPanda_ConnectOptionsMetaBox .inside,
#OPanda_ConnectOptionsMetaBox .factory-form-metabox {
padding-bottom: 0px;
}
.opanda-connect-buttons .opanda-button input {
outline: none !important;
}
#OPanda_ConnectOptionsMetaBox select {
width: auto;
}
.opanda-connect-buttons .opanda-button input:disabled {
cursor: default;
}
#OPanda_ConnectOptionsMetaBox .factory-separator {
border: 0px;
border-top: 1px solid #f1f1f1;
}
/* connect buttons */
#OPanda_ConnectOptionsMetaBox .opanda-connect-buttons {
padding: 0 0 10px 0;
overflow: auto;
background: #f7f7f7;
margin: 0 0 0 -22px;
padding: 30px 22px 32px 22px;
position: relative;
width: 100%;
-moz-box-sizing: content-box;
box-sizing: content-box;
white-space: nowrap;
}
.opanda-connect-buttons .opanda-button {
width: 178px;
display: inline-block;
vertical-align: top;
padding: 3px 0 0 0;
-moz-box-sizing: border-box;
box-sizing: border-box;
border-left: 1px solid #f1f1f1;
border-right: 1px solid #f1f1f1;
box-shadow: 0 2px 3px rgba(0,0,0,0.03);
background-color: #e1e1e1;
color: #111;
}
.opanda-connect-buttons .opanda-button + .opanda-button {
border-left: 0px;
margin-left: 15px;
}
.opanda-connect-buttons .opanda-inner-wrap {
background-color: #fff;
}
.opanda-connect-buttons .opanda-button-facebook {
background: #989de1;
}
.opanda-connect-buttons .opanda-button-twitter {
background: #55acee;
}
.opanda-connect-buttons .opanda-button-google {
background: #f47665;
}
.opanda-connect-buttons .opanda-button-linkedin {
background: #286b8d;
}
.opanda-connect-buttons .opanda-button-email {
background: #9faeae;
}
.opanda-connect-buttons .opanda-button-title {
display: block;
font-size: 14px;
line-height: 16px;
border-bottom: 1px solid #f5f5f5;
padding: 14px 15px;
}
.opanda-connect-buttons .opanda-button-title > * {
display: inline-block;
vertical-align: bottom;
}
.opanda-connect-buttons .opanda-button-title span + span {
margin-left: 5px;
}
.opanda-connect-buttons .opanda-button-title {
position: relative;
}
/* erorrs */
.opanda-connect-buttons .opanda-error {
display: none;
position: relative;
}
.opanda-connect-buttons .opanda-error i {
cursor: help;
color: #f47665;
}
.opanda-connect-buttons .opanda-error .opanda-error-text,
.opanda-connect-buttons .opanda-actions-disabled .opanda-error-text {
display: none;
position: absolute;
width: 300px;
background-color: rgba(0,0,0,0.8);
white-space: normal;
z-index: 10;
padding: 10px 12px 12px 12px;
font-weight: normal;
line-height: 150%;
border-radius: 4px;
color: #fff;
font-size: 13px;
margin-top: 5px;
}
.opanda-connect-buttons .opanda-error-text a {
color: #fff !important;
font-weight: bold;
}
.opanda-connect-buttons .opanda-button-title:hover .opanda-error-text {
display: block;
}
.opanda-connect-buttons .opanda-has-error .opanda-checkbox {
display: none;
}
.opanda-connect-buttons .opanda-has-error .opanda-button-title {
cursor: default;
}
.opanda-connect-buttons .opanda-has-error .opanda-error {
display: inline-block;
}
.opanda-connect-buttons .opanda-actions,
.opanda-connect-buttons .opanda-actions-disabled {
padding: 8px 15px 12px 15px;
margin: 0px;
}
.opanda-connect-buttons .opanda-actions-disabled {
border-top: 1px solid #f5f5f5;
background-color: #fafafa;
padding-top: 10px;
position: relative;
}
.opanda-connect-buttons .opanda-actions-disabled input {
cursor: no-drop !important;
}
.opanda-connect-buttons .opanda-actions-disabled .opanda-error-text {
display: none;
left: 100%;
margin-left: -2px;
top: -30px;
}
.opanda-connect-buttons .opanda-actions-disabled .opanda-error-wrap {
position: relative;
padding-right: 20px;
}
.opanda-connect-buttons .opanda-actions-disabled .opanda-error-wrap:hover .opanda-error-text {
display: block;
}
.opanda-connect-buttons .opanda-actions-disabled .opanda-error-wrap input {
margin-top: 0px;
}
.opanda-connect-buttons .opanda-action {
margin-bottom: 0px;
padding-bottom: 6px;
}
.opanda-connect-buttons .opanda-action > * {
display: inline-block;
vertical-align: bottom;
}
.opanda-connect-buttons .opanda-action .opanda-action-link {
text-decoration: none;
color: #111;
margin-left: 5px;
text-transform: capitalize;
border-bottom: 1px dashed #aaa;
outline: none;
box-shadow: none;
}
.opanda-connect-buttons .opanda-action.opanda-hover .opanda-action-link {
border-bottom: 1px dashed #dfdfbd;
background-color: #ffffdd;
}
.opanda-connect-buttons .opanda-action.opanda-on .opanda-action-link {
font-weight: bold;
color: #0074a2;
border-bottom: 1px dotted #0074a2;
}
.opanda-connect-buttons .opanda-button.opanda-off {
background-color: #e1e1e1;
color: #999;
}
.opanda-connect-buttons .opanda-button.opanda-off .opanda-inner-wrap {
background-color: #f9f9f9;
}
.opanda-connect-buttons .opanda-button.opanda-off .opanda-action-link,
.opanda-connect-buttons .opanda-button.opanda-off input[type=checkbox]:checked:before {
color: #999;
}
.opanda-connect-buttons .opanda-button.opanda-off input:focus {
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
.opanda-connect-buttons .opanda-button.opanda-off .opanda-button-title input {
border-color: #aaa;
}
.opanda-connect-buttons .opanda-button.opanda-off .opanda-action .opanda-action-link {
color: #bbb;
border-bottom: 1px dashed #eee;
cursor: default;
}
.opanda-connect-buttons .opanda-button.opanda-off .opanda-action.opanda-hover .opanda-action-link {
background-color: transparent;
border-bottom: 1px dashed #eee;
}
/* premium errors */
.opanda-connect-buttons .opanda-error-premium .opanda-error-text {
width: 270px;
padding: 0px;
background-color: transparent;
}
.opanda-connect-buttons .opanda-error-premium i {
position: relative;
top: 1px;
font-size: 16px;
color: #777;
}
.opanda-connect-buttons .opanda-premium-note {
margin: 0px;
position: static;
width: 100%;
border: 0px;
}
.opanda-connect-buttons .opanda-premium-note .fa {
color: #fff;
}
/* connect buttons options */
#OPanda_ConnectOptionsMetaBox .opanda-connect-buttons-options {
background-color: #fff;
margin: 0 -22px 0 -22px;
padding: 38px 22px 26px 22px;
position: relative;
width: 100%;
-moz-box-sizing: content-box;
box-sizing: content-box;
border-top: 1px solid #eaeaea;
}
.opanda-connect-buttons-options.opanda-off {
display: none;
}
.opanda-connect-buttons-options .control-label {
max-width: 184px !important;
}
.opanda-connect-buttons-options .control-group {
max-width: 800px !important;
}
.opanda-connect-buttons-options .opanda-header {
margin-bottom: 20px;
}
.opanda-connect-buttons-options .opanda-header .opanda-inner-wrap {
background-color: #f8f8f8;
padding: 9px 9px 7px 9px;
position: relative;
border-left: 4px solid #f1f1f1;
}
.opanda-connect-buttons-options .opanda-header strong {
display: block;
font-size: 16px;
}
.opanda-connect-buttons-options .opanda-header p {
margin: 0px;
}
.opanda-connect-buttons-options .opanda-header strong + p {
margin-top: 5px;
}
.factory-control-subscribe_mode .factory-hints,
.factory-control-subscribe_delivery .factory-hints {
vertical-align: top;
color: #737373;
width: auto;
max-width: 500px;
position: relative;
top: -1px;
border-left: 1px solid #999;
padding: 0 0 0 9px;
margin: 10px 0 0 5px;
background: transparent;
}
.factory-control-subscribe_mode .factory-hints .factory-hint,
.factory-control-subscribe_delivery .factory-hints .factory-hint {
background: transparent;
padding: 0px;
margin-top: 0px;
}

View File

@@ -0,0 +1,452 @@
if ( !window.bizpanda ) window.bizpanda = {};
if ( !window.bizpanda.connectOptions ) window.bizpanda.connectOptions = {};
(function($){
window.bizpanda.connectOptions = {
init: function( item ) {
var self = this;
this.item = $('#opanda_item').val();
this.$control = $(".opanda-connect-buttons");
this.$buttons = this.$control.find(".opanda-button");
this.$actions = this.$control.find(".opanda-action");
this.$result = $("#opanda_connect_buttons");
$(window).resize(function(){ self.adjustHeights(); });
self.adjustHeights();
self.hideEmptyDisabledActions();
this.initButtons();
this.setupEvents();
$.bizpanda.filters.add('opanda-preview-options', function( options ){
var extraOptions = self.getConnectOptions();
return $.extend(true, options, extraOptions);
});
var hasDeliveryChoice = $("#opanda_subscribe_delivery").length;
var $deliveryOptions = $("#opanda-delivery-options");
var $confirmationEmail = $("#opanda-confirmation-email");
var $deliverySelect = $("#opanda_subscribe_delivery");
$("#opanda_subscribe_mode").change(function(){
var value = $(this).val();
if ( value === 'double-optin' || value === 'quick-double-optin' ) {
if ( hasDeliveryChoice ) {
$deliveryOptions.fadeIn();
var delivery = $deliverySelect.val();
if ( delivery === 'wordpress' ) $confirmationEmail.fadeIn();
}
else $("#opanda-confirmation-email").fadeIn();
} else {
$("#opanda-delivery-options").hide();
$("#opanda-confirmation-email").hide();
}
}).change();
if ( hasDeliveryChoice ) {
$("#opanda_subscribe_delivery").change(function(){
var value = $(this).val();
if ( value === 'wordpress' && ($confirmationEmail.css('display') == 'block') ) {
$("#opanda-confirmation-email").fadeIn();
} else {
$("#opanda-confirmation-email").hide();
}
}).change();
}
},
getConnectOptions: function() {
var gerOrder = function( fieldId ) {
var actions = $(fieldId).val();
return actions ? actions.split(",") : [];
};
var order = gerOrder("#opanda_connect_buttons");
var emailIndex = $.inArray( 'email', order );
if ( emailIndex > -1 ) { order.splice(emailIndex, 1); }
var groups = ( emailIndex > -1 )
? ['connect-buttons', 'subscription']
: ['connect-buttons'];
var optinMode = $('#opanda_subscribe_mode').val();
var options = {
groups: {
order: groups
},
terms: window.opanda_terms,
privacyPolicy: window.opanda_privacy_policy,
connectButtons: {
order: order,
facebook: {
socialProxy: window.facebook_social_proxy,
actions: gerOrder('#opanda_facebook_actions'),
},
twitter: {
socialProxy: window.twitter_social_proxy,
actions: gerOrder('#opanda_twitter_actions'),
follow: {
user: $("#opanda_twitter_follow_user").val(),
notifications: $("#opanda_twitter_follow_notifications").is(':checked')
},
tweet: {
message: $("#opanda_twitter_tweet_message").val()
}
},
google: {
socialProxy: window.google_social_proxy,
actions: gerOrder('#opanda_google_actions'),
youtubeSubscribe: {
channelId: $("#opanda_google_youtube_channel_id").val()
}
},
linkedin: {
socialProxy: window.linkedin_social_proxy,
actions: gerOrder('#opanda_linkedin_actions'),
clientId: window.opanda_linkedin_client_id,
follow: {
company: $("#opanda_linkedin_follow_company").val()
}
}
},
subscription: {
text: {
message: $("#opanda_subscribe_before_form").val() || window.res_signin_email_form_text
},
form: {
buttonText: $("#opanda_subscribe_button_text").val() || window.res_signin_email_button,
noSpamText: $("#opanda_subscribe_after_button").val() || window.res_signin_after_email_button,
type: $("#opanda_subscribe_name").is(':checked') ? 'name-email-form' : 'email-form'
}
},
subscribeActionOptions: {
campaignId: $("#opanda_subscribe_list").length ? $("#opanda_subscribe_list").val() : null,
service: window.opanda_subscription_service_name,
doubleOptin: $.inArray( optinMode, ['quick-double-optin', 'double-optin'] > -1),
confirm: $.inArray( optinMode, ['double-optin'] > -1)
}
};
return options;
},
adjustHeights: function() {
var maxHeight = 0;
var $buttons = this.$buttons.find(".opanda-actions:not(.opanda-actions-disabled)").each(function(){
var height = $(this).css('height', 'auto').height();
if ( height > maxHeight ) maxHeight = height;
});
$buttons.height(maxHeight);
},
hideEmptyDisabledActions: function() {
$(".opanda-actions-disabled").each(function(){
if ( $(this).find(".opanda-action").length > 0 ) return;
$(this).hide();
});
},
initButtons: function() {
var self = this;
var stringResult = this.$result.val();
if (!stringResult) stringResult = null;
if ( stringResult ) {
var buttons = stringResult.split(',');
for( var index in buttons ) {
var buttonName = buttons[index];
this.activateButton( buttonName, true );
}
}
this.$buttons.each(function(){
self.initButtonActions( $(this).data('name') )
});
this.initActionSaveEmail();
this.updateResult();
},
initActionSaveEmail: function () {
$("input[data-action='lead']").change(function(){
$("#opanda_catch_leads").val( $(this).is(":checked") ? "1" : "0" );
});
if ( $("#opanda_catch_leads").val() == "1" ) {
$("input[data-action='lead']").attr('checked', 'checked');
} else {
$("input[data-action='lead']").removeAttr('checked');
}
},
initButtonActions: function( buttonName ) {
var stringResult = $("#opanda_" + buttonName + "_actions").val();
if (!stringResult) stringResult = null;
if ( stringResult ) {
var actions = stringResult.split(',');
for( var index in actions ) {
var actionName = actions[index];
this.activateButtonAction( buttonName, actionName, true );
}
}
},
setupEvents: function() {
var self = this;
this.$buttons.find(".opanda-button-title input").change(function(){
self.toogleButton( $(this).val() );
});
this.$buttons.find(".opanda-action input").change(function(){
var common = $(this).data('common') ? true : false;
var button = $(this).data('button');
var action = $(this).data('action');
if ( $(this).is(':checked') ) {
self.showOptions( common, button, action );
}
var $input = self.getOptionsLink( common, button, action ).find("input");
if ( $(this).is(':checked') ) {
$input.attr('checked', 'checked');
} else {
$input.removeAttr('checked', 'checked');
}
self.updateResult();
return false;
});
this.$buttons.find(".opanda-action .opanda-action-link").click(function(){
var common = $(this).data('common') ? true : false;
var button = $(this).data('button');
var action = $(this).data('action');
self.toogleOptions( common, button, action );
return false;
});
this.$buttons.find(".opanda-action .opanda-action-link").hover(function(){
var common = $(this).data('common') ? true : false;
var button = $(this).data('button');
var action = $(this).data('action');
var $link = self.getOptionsLink( common, button, action );
$link.addClass('opanda-hover');
}, function(){
var common = $(this).data('common') ? true : false;
var button = $(this).data('button');
var action = $(this).data('action');
var $link = self.getOptionsLink( common, button, action );
$link.removeClass('opanda-hover');
});
},
/**
* Gets the button $object.
*/
getButton: function( name ) {
return this.$control.find(".opanda-button-" + name);
},
/**
* Activates or deactivates the button.
*/
toogleButton: function( name ) {
var $button = this.getButton( name );
if ( $button.hasClass('opanda-on') ) this.deactivateButton( name );
else this.activateButton( name );
},
/**
* Activates the connect button.
*/
activateButton: function( name, setup ) {
var $button = this.getButton( name );
if ( $button.is(".opanda-has-error") ) return;
$button.removeClass('opanda-off').addClass('opanda-on');
$button.find(".opanda-actions .opanda-action:not(.opanda-action-disabled) input").removeAttr('disabled');
$button.find(".opanda-button-title input").attr('checked', 'checked');
if ( !setup ) this.updateResult();
},
/**
* Deactivates the button.
*/
deactivateButton: function( name, setup ) {
var $button = this.getButton( name );
$button.removeClass('opanda-on').addClass('opanda-off');
$button.find(".opanda-actions input").attr('disabled', 'disabled');
$button.find(".opanda-button-title input").removeAttr('checked');
if ( !setup ) this.updateResult();
},
/**
* Activates the button action.
*/
activateButtonAction: function( buttonName, actionName, setup) {
var $button = this.getButton( buttonName );
var $action = $button.find('.opanda-action-' + actionName);
if ( $action.is('.opanda-action-disabled') ) return;
$action.find('input').attr('checked', 'checked');
if ( !setup ) this.updateActionsResult( buttonName, actionName );
},
/**
* Deactivates the button action.
*/
deactivateButtonAction: function( buttonName, actionName, setup) {
var $button = this.getButton( buttonName );
$button.find('.opanda-action-' + actionName + ' inpput').removeAttr('checked');
if ( !setup ) this.updateActionsResult( buttonName, actionName );
},
/**
* Gets the options $object.
*/
getOptions: function( common, button, action ) {
if ( common ) {
return $( "#opanda-" + action + "-options" );
} else {
return $( "#opanda-" + button + "-" + action + "-options" );
}
},
/**
* Gets the options link $object.
*/
getOptionsLink: function( common, button, action ) {
if ( common ) {
return this.$control.find(".opanda-action-" + action);
} else {
return this.$control.find(".opanda-button-" + button + " .opanda-action-" + action);
}
},
/**
* Shows or hides the options.
*/
toogleOptions: function( common, button, action ) {
var $options = this.getOptions( common, button, action );
if ( !$options.is(":visible") ) this.showOptions( common, button, action );
else this.hideOptions( common, button, action );
},
/**
* Shows the action options.
*/
showOptions: function( common, button, action ) {
$(".opanda-connect-buttons-options").addClass('opanda-off');
this.$actions.removeClass('opanda-on');
var $options = this.getOptions( common, button, action );
$options.hide().removeClass('opanda-off').fadeIn(300);
var $link = this.getOptionsLink( common, button, action );
$link.addClass('opanda-on');
},
/**
* Hides the action options.
*/
hideOptions: function( common, button, action ) {
$(".opanda-connect-buttons-options").addClass('opanda-off');
this.$actions.removeClass('opanda-on');
},
/**
* Updates the hidden field where the available buttons are saved.
*/
updateResult: function() {
var buttons = [];
$(".opanda-connect-buttons .opanda-button.opanda-on").each(function(){
buttons.push( $(this).data('name') );
});
this.$result.val( buttons.join(',') );
for( var i in buttons ) {
this.updateActionsResult( buttons[i] );
}
},
/**
* Updates the hidden field where the button actions are saved.
*/
updateActionsResult: function( buttonName ) {
var actions = [];
$(".opanda-connect-buttons .opanda-button-" + buttonName + " .opanda-action input:checked").each(function(){
actions.push( $(this).data('action') );
});
$("#opanda_" + buttonName + "_actions").val( actions.join(',') );
}
};
$(function(){
window.bizpanda.connectOptions.init();
});
})(jQuery)

View File

@@ -0,0 +1,245 @@
<?php
/**
* Boots the code for the admin part of the Sign-In Locker
*
* @since 1.0.0
* @package core
*/
/**
* Registers metaboxes for Sign-In Locker.
*
* @see opanda_item_type_metaboxes
* @since 1.0.0
*/
function opanda_signin_locker_metaboxes( $metaboxes ) {
$metaboxes[] = array(
'class' => 'OPanda_ConnectOptionsMetaBox',
'path' => BIZPANDA_SIGNIN_LOCKER_DIR . '/admin/metaboxes/connect-options.php'
);
return $metaboxes;
}
add_filter('opanda_signin-locker_type_metaboxes', 'opanda_signin_locker_metaboxes', 10, 1);
/**
* Prepares the Sign-In Locker to use while activation.
*
* @since 1.0.0
*/
function opanda_signin_locker_activation( $plugin, $helper ) {
// default email locker
$helper->addPost(
'opanda_default_signin_locker_id',
array(
'post_type' => OPANDA_POST_TYPE,
'post_title' => __('Sign-In Locker (default)', 'signinlocker'),
'post_name' => 'opanda_default_signin_locker'
),
array(
'opanda_item' => 'signin-locker',
'opanda_header' => __('Sign In To Unlock This Content', 'signinlocker'),
'opanda_message' => __('Please sign in. It\'s free. Just click one of the buttons below to get instant access.', 'signinlocker'),
'opanda_style' => 'great-attractor',
'opanda_catch_leads' => 1,
'opanda_connect_buttons' => 'facebook,twitter,google',
'opanda_facebook_actions' => BizPanda::hasPlugin('optinpanda') ? 'signup' : 'signup',
'opanda_twitter_actions' => BizPanda::hasPlugin('optinpanda') ? 'signup' : 'signup',
'opanda_google_actions' => BizPanda::hasPlugin('optinpanda') ? 'signup' : 'signup',
'opanda_linkedin_actions' => BizPanda::hasPlugin('optinpanda') ? 'signup' : 'signup',
'opanda_email_actions' => BizPanda::hasPlugin('optinpanda') ? 'signup' : 'signup',
'opanda_mobile' => 1,
'opanda_highlight' => 1,
'opanda_is_system' => 1,
'opanda_is_default' => 1
)
);
}
add_action('after_bizpanda_activation', 'opanda_signin_locker_activation', 10, 2);
/**
* Registers default themes.
*
* We don't need to include the file containing the file OPanda_ThemeManager because this function will
* be called from the hook defined inside the class OPanda_ThemeManager.
*
* @see onp_sl_register_themes
* @see OPanda_ThemeManager
*
* @since 1.0.0
* @return void
*/
function opanda_register_signin_locker_themes( $item = 'signin-locker' ) {
OPanda_ThemeManager::registerTheme(array(
'name' => 'great-attractor',
'title' => 'Great Attractor',
'path' => OPANDA_BIZPANDA_DIR . '/themes/great-attractor',
'items' => array('social-locker', 'signin-locker', 'email-locker'),
'socialButtons' => [
'allowedDisplay' => ['native', 'covers'],
'defaultDisplay' => 'covers'
]
));
OPanda_ThemeManager::registerTheme(array(
'name' => 'friendly-giant',
'title' => 'Friendly Giant',
'path' => OPANDA_BIZPANDA_DIR . '/themes/friendly-giant',
'items' => array('social-locker', 'signin-locker', 'email-locker'),
'socialButtons' => [
'allowedDisplay' => ['native', 'covers'],
'defaultDisplay' => 'covers'
]
));
OPanda_ThemeManager::registerTheme(array(
'name' => 'dark-force',
'title' => 'Dark Force',
'path' => OPANDA_BIZPANDA_DIR . '/themes/dark-force',
'items' => array('social-locker', 'signin-locker', 'email-locker'),
'socialButtons' => [
'allowedDisplay' => ['native', 'covers'],
'defaultDisplay' => 'covers'
]
));
}
add_action('onp_sl_register_themes', 'opanda_register_signin_locker_themes');
/**
* Shows the help page 'What it it?' for the Sign-In Locker.
*
* @since 1.0.0
*/
function opanda_help_page_what_is_signin_locker( $manager ) {
require BIZPANDA_SIGNIN_LOCKER_DIR . '/admin/help/what-is-it.php';
}
add_action('opanda_help_page_what-is-signin-locker', 'opanda_help_page_what_is_signin_locker');
/**
* Shows the help page 'Usage Example' for the Sign-In Locker.
*
* @since 1.0.0
*/
function opanda_help_page_usage_example_signin_locker( $manager ) {
require BIZPANDA_SIGNIN_LOCKER_DIR . '/admin/help/usage-example.php';
}
add_action('opanda_help_page_usage-example-signin-locker', 'opanda_help_page_usage_example_signin_locker');
/**
* Shows the help page 'GDPR compatibility' for the Social Locker.
*
* @since 1.0.0
*/
function opanda_help_page_gdpr_signin_locker( $manager ) {
require BIZPANDA_SIGNIN_LOCKER_DIR . '/admin/help/gdpr.php';
}
add_action('opanda_help_page_gdpr-signin-locker', 'opanda_help_page_gdpr_signin_locker');
/**
* Registers the quick tags for the wp editors.
*
* @see admin_print_footer_scripts
* @since 1.0.0
*/
function opanda_quicktags_for_signin_locker()
{ ?>
<script type="text/javascript">
(function(){
if (!window.QTags) return;
window.QTags.addButton( 'signinlocker', 'signinlocker', '[signinlocker]', '[/signinlocker]' );
}());
</script>
<?php
}
add_action('admin_print_footer_scripts', 'opanda_quicktags_for_signin_locker');
/**
* Registers stats screens for Sign-In.
*
* @since 1.0.0
*/
function opanda_signin_locker_stats_screens( $screens ) {
$screens = array(
// The Summary Screen
'summary' => array (
'title' => __('<i class="fa fa-search"></i> Summary', 'signinlocker'),
'description' => __('The page shows the total number of unlocks for the current locker.', 'signinlocker'),
'chartClass' => 'OPanda_SignInLocker_Summary_StatsChart',
'tableClass' => 'OPanda_SignInLocker_Summary_StatsTable',
'path' => BIZPANDA_SIGNIN_LOCKER_DIR . '/admin/stats/summary.php'
),
// The Profits Screen
'profits' => array(
'title' => __('<i class="fa fa-usd"></i> Benefits', 'signinlocker'),
'description' => __('The page shows benefits the locker brought for your website.', 'signinlocker'),
'chartClass' => 'OPanda_SignInLocker_Profits_StatsChart',
'tableClass' => 'OPanda_SignInLocker_Profits_StatsTable',
'path' => BIZPANDA_SIGNIN_LOCKER_DIR . '/admin/stats/profits.php'
),
// The Channels Screen
'channels' => array(
'title' => __('<i class="fa fa-search-plus"></i> Channels', 'signinlocker'),
'description' => __('The page shows which ways visitors used to unlock the content.', 'signinlocker'),
'chartClass' => 'OPanda_SignInLocker_Channels_StatsChart',
'tableClass' => 'OPanda_SignInLocker_Channels_StatsTable',
'path' => BIZPANDA_SIGNIN_LOCKER_DIR . '/admin/stats/channels.php'
),
// The Bounces Screen
/*
'bounces' => array(
'title' => __('<i class="fa fa-sign-out"></i> Bounces', 'signinlocker'),
'description' => __('The page shows major weaknesses of the locker which lead to bounces. Hover your mouse pointer on [?] in the table, to know more about a particular metric.', 'signinlocker'),
'chartClass' => 'OPanda_SignInLocker_Bounces_StatsChart',
'tableClass' => 'OPanda_SignInLocker_Bounces_StatsTable',
'path' => BIZPANDA_SIGNIN_LOCKER_DIR . '/admin/stats/bounces.php'
)*/
);
// The Skips Screen
$screens['skips'] = array (
'title' => __('<i class="fa fa-tint"></i> Skips', 'signinlocker'),
'description' => __('The chart shows how many users skipped the locker by using the Timer or Close Icon, comparing to the users who unlocked the content.', 'signinlocker'),
'chartClass' => 'OPanda_SignInLocker_Skips_StatsChart',
'tableClass' => 'OPanda_SignInLocker_Skips_StatsTable',
'path' => BIZPANDA_SIGNIN_LOCKER_DIR . '/admin/stats/skips.php'
);
return $screens;
}
add_filter('opanda_signin-locker_stats_screens', 'opanda_signin_locker_stats_screens', 10, 1);

View File

@@ -0,0 +1,26 @@
<?php
global $bizpanda;
$lang = $bizpanda->options['lang'];
?>
<div class="onp-help-section">
<h1><?php _e('Sign-In Locker GDPR Compatibility', 'sociallocker'); ?></h1>
<p>
<?php _e('The General Data Protection Regulation (GDPR) is a new data protection law in the EU that takes effect on May 25, 2018.', 'sociallocker') ?>
<?php _e('GDPR covers processing personal data.') ?>
</p>
<p>
<strong><?php _e('Sign-In Locker is fully compatible with GDPR if the option Consent Checkbox is activated.</strong>', 'sociallocker') ?></strong>
</p>
<p>
<?php _e('Sign-In Locker collects and processes personal data covered by GDPR. So if your website interacts with EU citizens, you need to activate the option Consent Checkbox.') ?>
</p>
<p>
<?php _e('Please note, Sign-In Locker doesn\'t send any personal data to our servers (to servers of the plugin developer). All data are stored only on your website and 3d party services you configured by yourself to work with Sign-In Locker.') ?>
</p>
</div>

View File

@@ -0,0 +1,157 @@
<?php
global $bizpanda;
$lang = $bizpanda->options['lang'];
?>
<div class="onp-help-section">
<h1><?php _e('Quick Start Guide', 'signinlocker'); ?></h1>
<?php if ( BizPanda::hasPlugin('signinlocker') ) { ?>
<p>
<?php _e('Using the Sign-In Locker is similar to using the Social Locker but it require a bit more efforts for the initial configuration.') ?>
</p>
<?php } elseif( BizPanda::hasPlugin('optinpanda' ) ) { ?>
<p>
<?php _e('Using the Sign-In Locker is similar to using the Email Locker but it require a bit more efforts for the initial configuration.') ?>
</p>
<?php } ?>
<p>
<?php _e('To pick out the content which should be locked, you can use special shortcodes. During installation, the plugin created for you the shortcode <span class="onp-mark onp-mark-gray onp-mark-stricked onp-code">[signinlocker][/signinlocker]</span> named <strong>Sign-In Locker</strong>.', 'signinlocker'); ?>
</p>
<p class='onp-note'>
<?php _e('<strong>Note:</strong> You can create more shortcodes at any time for whatever you need them for. For instance, you could create one for locking video players or another one for locking download links.', 'signinlocker'); ?>
</p>
</div>
<div class="onp-help-section">
<h2>1. <?php _e('Open the editor', 'signinlocker'); ?></h2>
<p><?php printf( __('In admin menu, select Opt-In Panda -> <a href="%s">All Lockers</a>.', 'signinlocker'), admin_url('edit.php?post_type=opanda-item') ); ?></p>
<p><?php _e('Then click on the shortcode titled <strong>Sign-In Locker</strong> to open its editor:', 'signinlocker'); ?></p>
<p class='onp-img'>
<img src='<?php echo 'https://cconp.s3.amazonaws.com/bizpanda/signin-locker/help/panda-items.png' ?>' />
</p>
</div>
<div class="onp-help-section">
<h2>2. <?php _e('Configure the locker', 'signinlocker'); ?></h2>
<p>1) <?php _e('Set a clear title that attracts attention or creates a call to action (see the example below).', 'signinlocker'); ?></p>
<p>2) <?php _e('Describe what the visitor will get after they unlock the content. This is very important, as visitors need to be aware of what they are getting. And please, only promise things you can deliver.', 'signinlocker'); ?></p>
<p>3) <?php _e('Choose one of the available themes for your locker.', 'signinlocker'); ?></p>
<p>4) <?php _e('Set the Overlay Mode. We recommend to use the Blurring Mode as the most attention-grabbing mode.', 'signinlocker'); ?></p>
</p>
<p class='onp-img'>
<img src='<?php echo 'https://cconp.s3.amazonaws.com/bizpanda/signin-locker/help/basic-options.png' ?>' />
</p>
<p>
5) <?php _e('Make sure that the Facebook, Twitter and Google buttons are marked. That makes available for the users to sign in through the respective social networks.', 'signinlocker'); ?>
</p>
<p>
6) <?php _e('Select actions you would like to execute for each button when the user clicks it to sign in.', 'signinlocker'); ?>
</p>
<p>
7) <?php _e('Configure each action.', 'signinlocker'); ?>
</p>
<p class='onp-img'>
<img src='<?php echo 'https://cconp.s3.amazonaws.com/bizpanda/signin-locker/help/social-options.png' ?>' />
</p>
<p>
<?php _e('Check out the image below to learn how to configure the buttons and their actions:', 'signinlocker'); ?>
</p>
<p class='onp-img'>
<img src='<?php echo 'https://cconp.s3.amazonaws.com/bizpanda/signin-locker/help/social-options-explanation.png' ?>' />
</p>
<p>
<?php _e('Congratulations! The locker is ready to use.', 'signinlocker'); ?>
</p>
<p>
<?php printf( __('The page <a href="%s">Stats & Reports</a> will help you to correct your locker after collecting the first statistical data.', 'signinlocker'), admin_url( 'edit.php?post_type=opanda-item&page=stats-' . $bizpanda->pluginName ) ); ?>
</p>
<p class='onp-note'>
<?php _e('On the right sidebars, there are some additional options which can help you to adjust the locker to your site audience. Try to use them by yourself later.', 'signinlocker'); ?>
</p>
</div>
<div class="onp-help-section">
<h2>3. <?php _e('Place the locker', 'signinlocker'); ?></h2>
<p>
<?php _e('Decide what content you would like to lock. It might be:', 'signinlocker'); ?>
<ul>
<li><?php _e('A download link (for instance, a free graphic, an audio file, video resources, or a printable pdf of your article).', 'signinlocker'); ?></li>
<li><?php _e('A promo code (for instance, a 10% off discount, if the visitor shares your promo page).', 'signinlocker'); ?></li>
<li><?php _e('The end of your article (for instance, you might show the beginning of the article to gain interest, but hide the ending).', 'signinlocker'); ?></li>
</ul>
<?php _e('Basically, you can hide any content that would be important for visitors who are visiting your site.', 'signinlocker'); ?>
</p>
<p>
<?php _e('However, <strong>you should never</strong>:', 'signinlocker'); ?>
<ul>
<li>
<?php _e('Lock all of your content, posts or pages.', 'signinlocker'); ?>
</li>
<li>
<?php _e('Lock boring content or content that is not interesting.', 'signinlocker'); ?>
</li>
</ul>
</p>
<p>
<?php _e('In other words, dont try to trick your visitors.', 'signinlocker'); ?>
</p>
<p>
<?php _e('Open the post editor for the post where you want to put the locker. Add a block named «Sign-In Locker».', 'signinlocker') ?>
</p>
<p class='onp-img'>
<img src='<?php echo 'https://cconp.s3.amazonaws.com/bizpanda/signin-locker/help/block-widget.png' ?>' />
</p>
<p>
<?php _e('Put content you wish to lock into the added block.', 'signinlocker') ?>
</p>
<p class='onp-img'>
<img src='<?php echo 'https://cconp.s3.amazonaws.com/bizpanda/signin-locker/help/edit-block.png' ?>' />
</p>
<p>
<?php _e('If you have several lockers you can pick the concrete one by clicking on the block border.', 'signinlocker') ?>
</p>
<p class='onp-img'>
<img src='<?php echo 'https://cconp.s3.amazonaws.com/bizpanda/signin-locker/help/block-settings.png' ?>' />
</p>
<p>
<?php _e('Also you can use shortcodes to call the locker by wrapping the content you wish to lock. For instance: <span class="onp-mark onp-mark-gray onp-mark-stricked onp-code">[signinlocker] Locked Content Goes Here [/signinlocker]</span>', 'signinlocker') ?>
</p>
<p>
<?php _e('Thats it! Save your post and see the locker on your site! ', 'signinlocker'); ?>
</p>
<p class='onp-img'>
<img src='<?php echo'https://cconp.s3.amazonaws.com/bizpanda/signin-locker/help/signinlocker.png' ?>' />
</p>
</div>

View File

@@ -0,0 +1,134 @@
<?php
global $bizpanda;
$lang = $bizpanda->options['lang'];
require_once OPANDA_BIZPANDA_DIR . '/admin/includes/plugins.php';
$optinpandaUrl = OPanda_Plugins::getPremiumUrl('optinpanda');
$sociallockerUrl = OPanda_Plugins::getPremiumUrl('sociallocker');
?>
<div class="onp-help-section">
<h1><?php _e('Sign-In Locker', 'signinlocker'); ?></h1>
<?php if ( BizPanda::hasPlugin('sociallocker') ) { ?>
<p>
<?php printf( __('Sign-In Locker works the same way as the <a href="%s">Social Locker</a> but instead of liking/sharing it asks the user to sign in through social networks. Concurrently it can perform some social actions.', 'signinlocker'), opanda_get_help_url('what-is-social-locker') ) ?>
</p>
<?php } elseif( BizPanda::hasPlugin('optinpanda' ) ) { ?>
<p>
<?php printf( __('Sign-In Locker works the same way as the <a href="%s">Email Locker</a> but instead of entering an email it asks the user to sign in through social networks. Concurrently it can perform some social actions.', 'signinlocker'), opanda_get_help_url('what-is-email-locker') ) ?>
</p>
<?php } ?>
<p><strong><?php _e('What can you do with the Sign-In Locker', 'signinlocker') ?></strong></p>
<p>
<?php _e('When the user signs in, the social network grants access to the user\'s contact data and allow additionally perform the following actions:', 'signinlocker') ?>
</p>
<ul style="margin-bottom: 20px;">
<li><?php _e('Register the user on our website (create an account)', 'signinlocker') ?></li>
<?php if ( !BizPanda::hasPlugin('optinpanda') ) { ?>
<li><?php printf( __('Subscribe the user to your mailing list (<a href="%s" target="_blank">Opt-In Panda</a> required)', 'signinlocker'), $optinpandaUrl ) ?></li>
<?php } else { ?>
<li><?php _e('Subscribe the user to your mailing list.', 'signinlocker') ?></li>
<?php } ?>
<?php if ( !BizPanda::hasPlugin('sociallocker') ) { ?>
<li><?php printf( __('Publish a tweet from behalf of the user (<a href="%s" target="_blank">Social Locker</a> required)', 'signinlocker'), $sociallockerUrl ) ?></li>
<li><?php printf( __('Subscribe the user to your account on Twitter (<a href="%s" target="_blank">Social Locker</a> required)', 'signinlocker'), $sociallockerUrl ) ?></li>
<li><?php printf( __('Subscribe the user to your Youtube channel (<a href="%s" target="_blank">Social Locker</a> required)', 'signinlocker'), $sociallockerUrl ) ?></li>
<?php } else { ?>
<li><?php _e('Publish a tweet from behalf of the user', 'signinlocker') ?></li>
<li><?php _e('Subscribe the user to your account on Twitter (make the user a follower)', 'signinlocker') ?></li>
<li><?php _e('Subscribe the user to your Youtube channel', 'signinlocker') ?></li>
<?php } ?>
</ul>
<p><strong><?php _e('Know your audience') ?></strong></p>
<p><?php _e('Except the user\'s contact data, the Sign-In Locker also receives some personal data (name, profile url).') ?></p>
<p><?php _e('That allows you to know better your audinece and understand who is these people who visits your website. Also you can go and engage with them personally on their social pages on Facebook, Twitter, Google or LinkedIn.') ?></p>
<?php if ( BizPanda::hasPlugin('sociallocker') ) { ?>
<p><strong><?php _e('Comparing Sign-In Locker and Social Locker', 'signinlocker') ?></strong></p>
<p>
<?php _e('Although the Sign-In Locker brings more benefits per unlock, it has more lower conversion than Social Locker. Please check out the table below to learn more:', 'signinlocker') ?>
</p>
<table class="table">
<thead>
<tr>
<th>Paramters</th>
<th>Sing-In Locker</th>
<th>Social Locker</th>
</tr>
</thead>
<tbody>
<tr>
<td><?php _e('Benefits', 'signinlocker') ?></td>
<td><?php _e('More benefits per unlock. Can be configured to execute several actions per unlock.', 'signinlocker') ?></td>
<td><?php _e('Only one action has to be perfomed to unlock the content.', 'signinlocker') ?></td>
</tr>
<tr>
<td><?php _e('Conversion', 'signinlocker') ?></td>
<td><?php _e('More lower conversion due to the locker asks the user to authorize your social app and grant extra permissions.', 'signinlocker') ?></td>
<td><?php _e('Extremely high conversion which may reach up to 50%. All what the user has to make is to click on the social button.', 'signinlocker') ?></td>
</tr>
<tr>
<td><?php _e('Content', 'signinlocker') ?></td>
<td><?php _e('As asks the user to authorize your social app to read one\'s personal data, the content you provide should have more value.', 'signinlocker') ?></td>
<td><?php _e('You can lock practically any content. Giving a like is not hard.', 'signinlocker') ?></td>
</tr>
</tbody>
</table>
<?php } elseif( BizPanda::hasPlugin('optinpanda' ) ) { ?>
<p><strong><?php _e('Comparing Sign-In Locker and Email Locker', 'signinlocker') ?></strong></p>
<p>
<?php _e('Although the Sign-In Locker brings more benefits per unlock, it has more lower conversion than Email Locker. Please check out the table below to learn more:', 'signinlocker') ?>
</p>
<table class="table">
<thead>
<tr>
<th>Paramters</th>
<th>Sing-In Locker</th>
<th>Email Locker</th>
</tr>
</thead>
<tbody>
<tr>
<td><?php _e('Benefits', 'signinlocker') ?></td>
<td><?php _e('More benefits per unlock. Can be configured to execute several actions per unlock.', 'signinlocker') ?></td>
<td><?php _e('The user has to opt-in only to unlock the content.', 'signinlocker') ?></td>
</tr>
<tr>
<td><?php _e('Conversion', 'signinlocker') ?></td>
<td><?php _e('More lower conversion due to the locker asks the user to authorize your social app and grant extra permissions.', 'signinlocker') ?></td>
<td><?php _e('High conversion which may reach up to 40%.', 'signinlocker') ?></td>
</tr>
<tr>
<td><?php _e('Content', 'signinlocker') ?></td>
<td><?php _e('As asks the user to authorize your social app to read one\'s personal data, the content you provide should have more value.', 'signinlocker') ?></td>
<td><?php _e('You can lock practically any content.', 'signinlocker') ?></td>
</tr>
</tbody>
</table>
<?php } ?>
<p style="margin-top: 25px;">
<a href="<?php $manager->actionUrl('index', array( 'onp_sl_page' => 'usage-example-signin-locker' )) ?>" class="btn btn-default"><?php _e('Learn how to configure and use Sign-In Locker', 'signinlocker') ?><i class="fa fa-long-arrow-right"></i></a>
</p>
</div>

View File

@@ -0,0 +1,989 @@
<?php
/**
* The file contains a class to configure the metabox Social Options.
*
* Created via the Factory Metaboxes.
*
* @author Paul Kashtanoff <paul@byonepress.com>
* @copyright (c) 2013, OnePress Ltd
*
* @package core
* @since 1.0.0
*/
/**
* The class configure the metabox Social Options.
*
* @since 1.0.0
*/
class OPanda_ConnectOptionsMetaBox extends FactoryMetaboxes321_FormMetabox
{
/**
* A visible title of the metabox.
*
* Inherited from the class FactoryMetabox.
* @link http://codex.wordpress.org/Function_Reference/add_meta_box
*
* @since 1.0.0
* @var string
*/
public $title;
/**
* A prefix that will be used for names of input fields in the form.
*
* Inherited from the class FactoryFormMetabox.
*
* @since 1.0.0
* @var string
*/
public $scope = 'opanda';
/**
* The priority within the context where the boxes should show ('high', 'core', 'default' or 'low').
*
* @link http://codex.wordpress.org/Function_Reference/add_meta_box
* Inherited from the class FactoryMetabox.
*
* @since 1.0.0
* @var string
*/
public $priority = 'core';
public $cssClass = 'factory-bootstrap-331';
public function __construct( $plugin ) {
parent::__construct( $plugin );
$this->title = __('Connect Options', 'signinlocker');
}
/**
* Configures a metabox.
*/
public function configure( $scripts, $styles) {
$styles->add( BIZPANDA_SIGNIN_LOCKER_URL . '/admin/assets/css/connect-options.050600.css');
$scripts->add( BIZPANDA_SIGNIN_LOCKER_URL . '/admin/assets/js/connect-options.050601.js');
do_action( 'opanda_connect_options_assets', $scripts, $styles );
}
/**
* Configures the connect buttons options.
*/
public function form( $form ) {
require_once OPANDA_BIZPANDA_DIR . '/admin/includes/plugins.php';
$options = array();
$options[] = array(
'type' => 'html',
'html' => '<div class="opanda-fullwidth opanda-hint">
<strong>'.__('How to setup', 'signinlocker').'</strong>: ' .
'<ol>' .
'<li>' . __('Select social networks which will be available to sign in.', 'signinlocker') .
'<li>' . __('For each social network, select actions which have to be performed to sign in.', 'signinlocker') .
'<li>' . __('Configure each selected action by clicking on its title.', 'signinlocker') .
'</ol>' .
'</div>'
);
$options[] = array(
'type' => 'html',
'html' => array( $this, 'showConnectButtonsControl' )
);
// leads options
$options[] = array(
'type' => 'div',
'id' => 'opanda-lead-options',
'cssClass' => 'opanda-connect-buttons-options opanda-off factory-fontawesome-320',
'items' => array(
array(
'type' => 'html',
'html' => $this->getOptionsHeaderHtml(
__('Action: Save Email', 'signinlocker'),
__('This action retrieves an email and some other personal data of the user and saves it in the database.', 'signinlocker')
)
),
array(
'type' => 'html',
'html' => array($this,'getLeadExplanationOption')
)
)
);
// subscription options
$subscription = array();
$subscription[] = array(
'type' => 'html',
'html' => $this->getOptionsHeaderHtml(
__('Action: Subscribe', 'signinlocker'),
__('This action allows to subscribe the user to the specified mailing list when one clicks on the Sign In button.', 'signinlocker')
)
);
require_once OPANDA_BIZPANDA_DIR . '/admin/includes/subscriptions.php';
if ( BizPanda::hasPlugin('optinpanda') ) {
$subscription[] = array(
'type' => 'html',
'html' => array($this, 'showSubscriptionService')
);
$serviceName = OPanda_SubscriptionServices::getCurrentName();
$serviceInfo = OPanda_SubscriptionServices::getCurrentServiceInfo();
if ( 'database' !== $serviceName && 'none' !== $serviceName ) {
$serviceName = OPanda_SubscriptionServices::getCurrentServiceInfo();
$manualList = isset( $serviceName['manualList'] ) ? $serviceName['manualList'] : false;
if ( $manualList ) {
$subscription[] = array(
'type' => 'textbox',
'name' => 'subscribe_list',
'title' => __('List', 'signinlocker'),
'hint' => __( 'Specify the list ID to add subscribers.', 'signinlocker' )
);
} else {
$subscription[] = array(
'type' => 'dropdown',
'name' => 'subscribe_list',
'data' => array(
'ajax' => true,
'url' => admin_url('admin-ajax.php'),
'data' => array(
'action' => 'opanda_get_subscrtiption_lists',
'opanda_service' => $serviceName
)
),
'empty' => __( '- empty -', 'signinlocker' ),
'title' => __('List', 'signinlocker'),
'hint' => __( 'Select the list to add subscribers.', 'signinlocker' )
);
}
}
$subscription[] = array(
'type' => 'dropdown',
'name' => 'subscribe_mode',
'hasGroups' => false,
'hasHints' => true,
'data' => OPanda_SubscriptionServices::getCurrentOptinModes( true ),
'title' => __('Opt-In Mode', 'signinlocker')
);
$subscription[] = array(
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'subscribe_name',
'title' => __('Require Name', 'signinlocker'),
'hint' => 'If On, requires to specify the name to unlock (only for the Email Form).'
);
$modes = OPanda_SubscriptionServices::getCurrentOptinModes();
if ( !isset( $serviceInfo['transactional'] ) || !$serviceInfo['transactional'] ) {
$choices = array(
'service' => array(
'value' => 'service',
'title' => sprintf( __('Through %s', 'emaillocker'), $serviceInfo['title'] ),
'hint' => sprintf( __('%s takes care about sending confirmation emails.', 'emaillocker'), $serviceInfo['title'] )
),
'wordpress' => array(
'value' => 'wordpress',
'title' => __('Through Wordpress', 'emaillocker'),
'hint' => 'Wordpress and installed plugins take care about sending confirmation emails. By default Wordpress utilizes an email delivery service of your web host (usually not reliable). Fortunately there is plenty of reliable services you can integrate easily (<a href="https://wordpress.org/plugins/sendgrid-email-delivery-simplified/" target="_blank">SendGrid</a>, <a href="https://wordpress.org/plugins/mailin/" target="_blank">SendinBlue</a>, <a href="https://wordpress.org/plugins/wpmandrill/" target="_blank">Mandrill</a>, <a href="https://wordpress.org/plugins/postmark-approved-wordpress-plugin/" target="_blank">Postmark</a>, <a href="https://wordpress.org/plugins/mailjet-for-wordpress/" target="_blank">Mailjet</a>, <a href="https://wordpress.org/plugins/wp-ses/" target="_blank">Amazon SES</a> and others).'
)
);
if ( !isset( $modes['quick'] ) ) {
unset( $choices['wordpress'] );
}
if ( !isset( $modes['double-optin'] ) && !isset( $modes['quick-double-optin'] ) ) {
unset( $choices['service'] );
}
$selectItems = array();
foreach ($choices as $choice) $selectItems[] = $choice;
$deliveryOption = array(
'type' => 'dropdown',
'name' => 'subscribe_delivery',
'hasGroups' => false,
'hasHints' => true,
'data' => $selectItems,
'title' => __('Send Confirmation', 'emaillocker')
);
$subscription[] = array(
'type' => 'div',
'id' => 'opanda-delivery-options',
'items' => array(
array( 'type' => 'separator' ),
$deliveryOption
)
);
}
$siteTitle = get_bloginfo('name');
$siteDescription = get_bloginfo('description');
$emailSubject = array(
'type' => 'textbox',
'name' => 'confirm_email_subject',
'title' => 'Subject',
'default' => __('Please confirm your email address', 'emaillocker')
);
$emailBody = array(
'type' => 'wp-editor',
'name' => 'confirm_email_body',
'title' => 'Text',
'default' => __('', 'emaillocker'),
'hint' => __('Use the shortcode <strong>[link]</strong> to insert the confirmation link.', 'emaillocker'),
'tinymce' => array(
'height' => 120
),
'layout' => array(
'hint-position' => 'left'
),
'default' => sprintf( __('To confirm your email address and unlock the content, please click the link below:<br />[link]<br/><br/>-<br/>%s<br/>%s', 'emaillocker'), $siteTitle, $siteDescription )
);
$subscription[] = array(
'type' => 'div',
'id' => 'opanda-confirmation-email',
'items' => array(
array( 'type' => 'separator' ),
array( 'type' => 'html', 'html' => array($this, 'showConfirmationMessageHeader') ),
$emailSubject,
$emailBody
)
);
$subscription[] = array(
'type' => 'separator'
);
$subscription[] = array(
'type' => 'textbox',
'name' => 'subscribe_before_form',
'title' => __('Before Form', 'signinlocker'),
'hint' => __('The text before the form.', 'signinlocker'),
'default' => __('Cannot sign in via social networks? Enter your email manually.', 'signinlocker')
);
$subscription[] = array(
'type' => 'textbox',
'name' => 'subscribe_button_text',
'title' => __('Buttton Text', 'signinlocker'),
'hint' => __('The text on the button.', 'signinlocker'),
'default' => __('sign in to unlock', 'signinlocker')
);
$subscription[] = array(
'type' => 'textbox',
'name' => 'subscribe_after_button',
'title' => __('After Buttton', 'signinlocker'),
'hint' => __('The text below the button. Guarantee something.', 'signinlocker'),
'default' => __('Your email address is 100% safe from spam!', 'signinlocker')
);
} else {
$subscription[] = array(
'type' => 'html',
'html' => array($this, 'getSubscriptionExplanationOption')
);
}
$options[] = array(
'type' => 'div',
'id' => 'opanda-subscribe-options',
'cssClass' => 'opanda-connect-buttons-options opanda-off factory-fontawesome-320',
'items' => $subscription
);
// signup options
$rolesItems = array();
foreach (get_editable_roles() as $roleName => $roleInfo) {
$rolesItems[] = array($roleName, $roleName);
}
$options[] = array(
'type' => 'div',
'id' => 'opanda-signup-options',
'cssClass' => 'opanda-connect-buttons-options opanda-off factory-fontawesome-320',
'items' => array(
array(
'type' => 'html',
'html' => $this->getOptionsHeaderHtml(
__('Action: Create Account', 'signinlocker'),
__('This action creates an account for a user on your website and makes one logged in.', 'signinlocker')
)
),
array(
'type' => 'html',
'html' => array($this,'getSignupRoleOption')
),
array(
'type' => 'html',
'html' => array($this,'getSignupWelcomeOption')
),
)
);
// twitter follow options
$options[] = array(
'type' => 'div',
'id' => 'opanda-twitter-follow-options',
'cssClass' => 'opanda-connect-buttons-options opanda-off',
'items' => array(
array(
'type' => 'html',
'html' => $this->getOptionsHeaderHtml(
__('Twitter Action: Follow', 'signinlocker'),
__('This action makes the user following you on Twitter after clicking the Sign In button.', 'signinlocker')
)
),
array(
'type' => 'textbox',
'title' => __('User to follow', 'signinlocker'),
'hint' => __('Set a user screen name to follow (for example, <a href="http://twitter.com/byonepress" target="_blank">byonepress</a>)', 'signinlocker'),
'name' => 'twitter_follow_user'
),
array(
'type' => 'checkbox',
'way' => 'buttons',
'title' => __('Notifications', 'signinlocker'),
'hint' => __('If On, the follower will get notifications about new tweets (usually via sms).', 'signinlocker'),
'name' => 'twitter_follow_notifications',
'default' => false
)
)
);
// twitter tweet options
$options[] = array(
'type' => 'div',
'id' => 'opanda-twitter-tweet-options',
'cssClass' => 'opanda-connect-buttons-options opanda-off',
'items' => array(
array(
'type' => 'html',
'html' => $this->getOptionsHeaderHtml(
__('Twitter Action: Tweet', 'signinlocker'),
__('Sends the specified tweet below from behalf of the user after signing in.', 'signinlocker')
)
),
array(
'type' => 'textarea',
'title' => __('Tweet', 'signinlocker'),
'hint' => __('Type a message to tweet. It may include any URL.', 'signinlocker'),
'name' => 'twitter_tweet_message'
),
)
);
// youtube subscribe options
$options[] = array(
'type' => 'div',
'id' => 'opanda-google-youtube-subscribe-options',
'cssClass' => 'opanda-connect-buttons-options opanda-off',
'items' => array(
array(
'type' => 'html',
'html' => $this->getOptionsHeaderHtml(
__('Google Action: Subscribe To Youtube Channel', 'signinlocker'),
__('This action subscribers the user to the specified Youtube channel.', 'signinlocker')
)
),
array(
'type' => 'textbox',
'title' => __('Youtube Channel ID', 'signinlocker'),
'hint' => __('Set a channel ID to subscribe (for example, <a href="http://www.youtube.com/channel/UCANLZYMidaCbLQFWXBC95Jg" target="_blank">UCANLZYMidaCbLQFWXBC95Jg</a>).', 'signinlocker'),
'name' => 'google_youtube_channel_id'
)
)
);
// hidden files to save active buttons and their actions
$options[] = array(
'type' => 'hidden',
'name' => 'connect_buttons',
'default' => 'facebook,twitter,google,email'
);
$options[] = array(
'type' => 'hidden',
'name' => 'facebook_actions',
'default' => 'lead'
);
$options[] = array(
'type' => 'hidden',
'name' => 'twitter_actions',
'default' => 'lead'
);
$options[] = array(
'type' => 'hidden',
'name' => 'google_actions',
'default' => 'lead'
);
$options[] = array(
'type' => 'hidden',
'name' => 'linkedin_actions',
'default' => 'lead'
);
$options[] = array(
'type' => 'hidden',
'name' => 'email_actions',
'default' => 'lead'
);
$options[] = array(
'type' => 'hidden',
'name' => 'catch_leads',
'default' => true
);
$options = apply_filters('opanda_connect_options', $options);
$form->add( $options );
}
public function getOptionsHeaderHtml( $title, $description = null ) {
$title = '<strong>' . $title . '</strong>';
$description = empty( $description ) ? '' : '<p>' . $description . '</p>';
return '<div class="form-group opanda-header"><label class="col-sm-2 control-label"></label><div class="control-group col-sm-10"><div class="opanda-inner-wrap">' . $title . $description . '</div></div></div>';
}
public function getLeadExplanationOption() {
$url = OPanda_Plugins::getPremiumUrl('optinpanda');
?>
<div class="form-group" style="margin-bottom: 10px;">
<label class="col-sm-2 control-label">
<?php _e('How to use', 'signinlocker') ?>
</label>
<div class="control-group col-sm-10">
<p style="padding-top: 3px;">
<?php printf( __('<a href="%s" class="button" target="_blank">See emails</a> of users who already signed-up or <a href="%s" class="button" target="_blank">export emails</a> in the CSV format.', 'signinlocker'), admin_url('edit.php?post_type=opanda-item&page=leads-bizpanda'), admin_url('admin.php?page=leads-bizpanda&action=export') ) ?>
</p>
<?php ?>
<?php if ( !BizPanda::hasPlugin('optinpanda') ) { ?>
<p>
<?php printf( __('Install the plugin <a href="%s" target="_blank">Opt-In Panda</a> to subscribe automatically all the signed-up users to your mailing list. Supports the most services and plugins: Aweber, MailChimp, GetResponse, MyMail, MailPoet, K-news and more.'), $url ) ?>
</p>
<?php } ?>
<?php
?>
</div>
</div>
<?php
}
public function getSubscriptionExplanationOption() {
$url = OPanda_Plugins::getPremiumUrl('optinpanda', 'co-subscribe-action');
?>
<div class="form-group" style="margin-bottom: 10px;">
<label class="col-sm-2 control-label">
<?php _e('How to use', 'signinlocker') ?>
</label>
<div class="control-group col-sm-10">
<p>
<?php printf( __('Install the plugin <a href="%s" target="_blank">Opt-In Panda</a> to subscribe automatically all the signed-up users to your mailing list. Supports the most services and plugins: Aweber, MailChimp, GetResponse, MyMail, MailPoet, K-news and more.'), $url ) ?>
</p>
</div>
</div>
<?php
}
public function getSignupRoleOption() {
$defaultRole = get_option('default_role');
?>
<div class="form-group" style="margin-bottom: 10px;">
<label class="col-sm-2 control-label">
<?php _e('New User Role', 'signinlocker') ?>
</label>
<div class="control-group col-sm-10">
<p style="padding-top: 7px;">
<?php printf( __('All new users will be assigned to the role <strong>%s</strong> (<a href="%s" target="_blank">change</a>).', 'signinlocker' ), $defaultRole, admin_url('options-general.php') ) ?>
</p>
</div>
</div>
<?php
}
public function getSignupWelcomeOption() {
$defaultRole = get_option('default_role');
?>
<div class="form-group">
<label class="col-sm-2 control-label">
<?php _e('Welcome Email', 'signinlocker') ?>
</label>
<div class="control-group col-sm-10">
<p style="padding-top: 7px;">
<?php printf( __('By default new users receive the standard wordpress welcome message. You can change it if you want.<br /><a href="https://wordpress.org/plugins/search.php?q=Welcome+Email" target="_blank">Click here</a> to select a free plugin to customize the welcome email.', 'signinlocker' ), $defaultRole, admin_url('options-general.php') ) ?>
</p>
</div>
</div>
<?php
}
// ------------------------------------------------------------------------------
// Shows the control to manage the Connect Buttons
// ------------------------------------------------------------------------------
public function showConfirmationMessageHeader(){
?>
<div class="form-group">
<label class="col-sm-2 control-label"></label>
<div class="control-group controls col-sm-10">
<?php _e('The confirmation email to send:', 'emaillocker' ) ?>
</div>
</div>
<?php
}
/**
* Shows the control to manage the connect buttons.
*
* @since 1.0.0
* @return string
*/
public function showConnectButtonsControl() {
$buttons = array(
'facebook' => array(
'title' => __('Facebook', 'signinlocker'),
'errors' => array($this, 'getFacebookErrors'),
'actions' => array(
'lead' => array(
'on' => true,
'title' => __('Save Email', 'signinlocker'),
'always' => true
),
'subscribe' => array(
'title' => __('Subscribe', 'signinlocker')
),
'signup' => array(
'on' => true,
'title' => __('Create Account', 'signinlocker')
)
)
),
'twitter' => array(
'title' => __('Twitter', 'signinlocker'),
'errors' => array($this, 'getTwitterErrors'),
'actions' => array(
'lead' => array(
'on' => true,
'title' => __('Save Email', 'signinlocker'),
'always' => true
),
'subscribe' => array(
'title' => __('Subscribe', 'signinlocker')
),
'signup' => array(
'on' => true,
'title' => __('Create Account', 'signinlocker')
),
'follow' => array(
'title' => __('Follow', 'signinlocker'),
'type' => 'social'
),
'tweet' => array(
'title' => __('Tweet', 'signinlocker'),
'type' => 'social'
)
)
),
'google' => array(
'title' => __('Google', 'signinlocker'),
'errors' => array($this, 'getGoogleErrors'),
'actions' => array(
'lead' => array(
'on' => true,
'title' => __('Save Email', 'signinlocker'),
'always' => true
),
'subscribe' => array(
'title' => __('Subscribe', 'signinlocker')
),
'signup' => array(
'on' => true,
'title' => __('Create Account', 'signinlocker')
),
'youtube-subscribe' => array(
'title' => __('Subscribe (YouTube)', 'signinlocker'),
'type' => 'social'
)
)
),
'linkedin' => array(
'title' => __('LinkedIn', 'signinlocker'),
'errors' => array($this, 'getLinkedInErrors'),
'actions' => array(
'lead' => array(
'on' => true,
'title' => __('Save Email', 'signinlocker'),
'always' => true
),
'subscribe' => array(
'title' => __('Subscribe', 'signinlocker')
),
'signup' => array(
'on' => true,
'title' => __('Create Account', 'signinlocker')
)
)
),
'email' => array(
'title' => __('Email Form', 'signinlocker'),
'errors' => array($this, 'getEmailFormErrors'),
'actions' => array(
'lead' => array(
'on' => true,
'title' => __('Save Email', 'signinlocker'),
'always' => true
),
'subscribe' => array(
'title' => __('Subscribe', 'signinlocker')
),
'signup' => array(
'on' => true,
'title' => __('Create Account', 'signinlocker')
)
)
)
);
if ( BizPanda::hasPlugin('optinpanda') ) {
foreach( $buttons as $buttonName => $buttonData ) {
$buttons[$buttonName]['actions']['subscribe']['on'] = true;
}
} else {
$url = OPanda_Plugins::getPremiumUrl('optinpanda', 'co-subscribe-action');
foreach( $buttons as $buttonName => $buttonData ) {
$buttons[$buttonName]['actions']['subscribe']['error'] = sprintf( __('To enable this action, please install the plugin Opt-In Panda which provides subscription features. <a href="%s" target="_blank">Click here to learn more</a>.', 'signinlocker'), $url );
}
}
if ( BizPanda::hasPlugin('sociallocker') ) {
foreach( $buttons as $buttonName => $buttonData ) {
foreach( $buttons[$buttonName]['actions'] as $actionName => $actionData ) {
if ( isset( $actionData['type'] ) && 'social' === $actionData['type'] ) {
$buttons[$buttonName]['actions'][$actionName]['on'] = true;
}
}
}
} else {
$url = OPanda_Plugins::getPremiumUrl('sociallocker', 'co-social-actions');
foreach( $buttons as $buttonName => $buttonData ) {
foreach( $buttons[$buttonName]['actions'] as $actionName => $actionData ) {
if ( isset( $actionData['type'] ) && 'social' === $actionData['type'] ) {
$buttons[$buttonName]['actions'][$actionName]['error'] = sprintf( __('To enable this action, please install the Social Locker plugin which provides social features. <a href="%s" target="_blank">Click here to learn more</a>.', 'signinlocker'), $url );
}
}
}
}
if ( BizPanda::isSinglePlugin() && BizPanda::hasPlugin('optinpanda') ) {
} else {
if ( !BizPanda::hasFeature('sociallocker-premium') ) {
unset( $buttons['twitter']['actions']['follow']['on'] );
$buttons['twitter']['actions']['follow']['error'] = opanda_get_premium_note( false, 'co-follow-action' );
unset( $buttons['twitter']['actions']['tweet']['on'] );
$buttons['twitter']['actions']['tweet']['error'] = opanda_get_premium_note( false, 'co-follow-action' );
unset( $buttons['google']['actions']['youtube-subscribe']['on'] );
$buttons['google']['actions']['youtube-subscribe']['error'] = opanda_get_premium_note( false, 'co-youtube-action' );
}
}
$buttons = apply_filters('opanda_connect_buttons_options', $buttons);
$commonActions = array('subscribe', 'signup', 'lead');
// prints social proxy urls for the buttons
$useOwnApps = opanda_get_option('own_apps_to_signin', false);
$socialProxyItems = [
'facebook' => [
'clientId' => opanda_get_option('facebook_app_id', false),
'clientSecret' => opanda_get_option('facebook_app_secret', false)
],
'google' => [
'clientId' => opanda_get_option('google_client_id', false),
'clientSecret' => opanda_get_option('google_client_secret', false)
],
'twitter' => [
'clientId' => opanda_get_option('twitter_signin_app_consumer_key', false),
'clientSecret' => opanda_get_option('twitter_signin_app_consumer_secret', false)
],
'linkedin' => [
'clientId' => opanda_get_option('linkedin_client_id', false),
'clientSecret' => opanda_get_option('linkedin_client_secret', false)
],
];
?>
<script>
<?php foreach( $socialProxyItems as $itemName => $itemValues ) { ?>
window.<?php echo $itemName ?>_social_proxy = <?php if ( $useOwnApps && !empty($itemValues['clientId'] ) && !empty( $itemValues['clientSecret']) ) { ?>{
'url': '<?php echo opanda_local_proxy_url() ?>',
'paramPrefix': 'opanda'
}<?php } else { ?>{
'endpoint': '<?php echo opanda_remote_social_proxy_url() ?>',
'paramPrefix': null
}<?php } ?>;
<?php } ?>
</script>
<script>
window.res_signin_email_form_text = "<?php echo addslashes( get_option('opanda_res_signin_email_form_text', '') ) ?>";
window.res_signin_email_button = "<?php echo addslashes( get_option('opanda_res_signin_email_button', '') ) ?>";
window.res_signin_after_email_button = "<?php echo addslashes( get_option('opanda_res_signin_after_email_button', '') ) ?>";
</script>
<div class="opanda-connect-buttons factory-fontawesome-320">
<?php foreach( $buttons as $name => $button ) { ?>
<?php
$errors = isset( $button['errors'] ) ? call_user_func( $button['errors'] ) : null;
$errorName = isset( $errors['name'] ) ? $errors['name'] : 'noname';
$errorIcon = isset( $errors['icon'] ) ? $errors['icon'] : 'fa-exclamation-triangle';
$errorText = isset( $errors['text'] ) ? $errors['text'] : $errors;
?>
<div class="opanda-button opanda-button-<?php echo $name ?> opanda-off <?php if ( $errors ) { echo 'opanda-has-error'; } ?>" data-name="<?php echo $name ?>">
<div class="opanda-inner-wrap">
<label class="opanda-button-title" for="opanda-button-<?php echo $name ?>-activated">
<?php if ( $errors ) { ?>
<span class="opanda-error opanda-error-<?php echo $errorName ?>">
<i class="fa <?php echo $errorIcon ?>"></i>
<div class='opanda-error-text'><?php echo $errorText ?></div>
</span>
<?php } else { ?>
<span class='opanda-checkbox'>
<input type="checkbox" value="<?php echo $name ?>" id="opanda-button-<?php echo $name ?>-activated" />
</span>
<?php } ?>
<span><?php echo $button['title'] ?></span>
</label>
<ul class='opanda-actions'>
<?php foreach( $button['actions'] as $actionName => $actionData ) { ?>
<?php if ( isset( $button['actions'][$actionName]['on'] ) ) { ?>
<?php
$actionTitle = $actionData['title'];
?>
<?php $isCommon = in_array( $actionName, $commonActions ); ?>
<li class='opanda-action opanda-action-<?php echo $actionName ?>'>
<span>
<input
type="checkbox"
value="1"
data-common="<?php echo ( $isCommon ? '1' : '0' ); ?>"
data-button="<?php echo $name ?>"
data-action="<?php echo $actionName ?>"
disabled="disabled" />
</span>
<a href="#" class="opanda-action-link" data-common="<?php echo ( $isCommon ? '1' : '0' ); ?>" data-button="<?php echo $name ?>" data-action="<?php echo $actionName ?>"><?php echo $actionTitle ?></a>
</li>
<?php } ?>
<?php } ?>
</ul>
<ul class='opanda-actions opanda-actions-disabled'>
<?php foreach( $button['actions'] as $actionName => $actionData ) { ?>
<?php if ( !isset( $button['actions'][$actionName]['on'] ) ) { ?>
<?php
$actionTitle = $actionData['title'];
?>
<?php $isCommon = in_array( $actionName, $commonActions ); ?>
<li class='opanda-action opanda-action-disabled opanda-action-<?php echo $actionName ?>'>
<span class="opanda-error-wrap">
<input type="checkbox" disabled="disabled" value="1" />
<span class='opanda-error-text'><?php echo $actionData['error'] ?></span>
<a href="#" class="opanda-action-link" data-common="<?php echo ( $isCommon ? '1' : '0' ); ?>" data-button="<?php echo $name ?>" data-action="<?php echo $actionName ?>"><?php echo $actionTitle ?></a>
</span>
</li>
<?php } ?>
<?php } ?>
</ul>
</div>
</div>
<?php } ?>
</div>
<?php
}
/**
* Returns errors of the Facebook Connect button.
*
* @since 1.0.0
* @return string
*/
public function getFacebookErrors() {
return false;
/*
return [
'text' => false
];
*/
}
/**
* Returns errors of the Twitter Connect button.
*
* @since 1.0.0
* @return string
*/
public function getTwitterErrors() {
return false;
}
/**
* Returns errors of the Facebook Connect button.
*
* @since 1.0.0
* @return string
*/
public function getGoogleErrors() {
return false;
}
/**
* Returns errors of the LinkedIn Connect button.
*
* @since 1.0.0
* @return string
*/
public function getLinkedInErrors() {
return false;
}
/**
* Returns errors for Email Form.
*
* @since 1.0.0
* @return string
*/
public function getEmailFormErrors() {
return false;
}
public function showSubscriptionService() {
$info = OPanda_SubscriptionServices::getCurrentServiceInfo();
$serviceName = ( empty( $info ) ) ? 'none' : $info['name'];
?>
<div class="form-group">
<label class="col-sm-2 control-label"></label>
<div class="control-group controls col-sm-10">
<?php if ( 'database' === $serviceName ) { ?>
<?php printf( __('The emails will be saved in the <a href="%s" target="_blank">local database</a> because you haven\'t selected a mailing service', 'signinlocker'), opanda_get_subscribers_url() ) ?>
<?php } else { ?>
<?php printf( __('You selected <strong>%s</strong> as your mailing service', 'signinlocker'), $info['title'] ) ?>
<?php } ?>
(<a href="<?php echo opanda_get_settings_url('subscription') ?>" target="_blank"><?php _e('change', 'signinlocker') ?></a>).
</div>
</div>
<?php
}
/**
* Removes the action 'lead' from options of the buttons because it's a virtual action.
*/
public function onSavingForm( $postId ) {
$buttons = array('facebook', 'twitter', 'google', 'linkedin', 'email');
foreach( $buttons as $buttonName ) {
$strActions = isset( $_POST['opanda_' . $buttonName . '_actions'] )
? $_POST['opanda_' . $buttonName . '_actions']
: '';
$rawActions = explode(',', $strActions);
$filteredActions = array();
foreach( $rawActions as $action ) {
if ( 'lead' == $action ) continue;
$filteredActions[] = $action;
}
$_POST['opanda_' . $buttonName . '_actions'] = implode(',', $filteredActions);
}
}
}
FactoryMetaboxes321::register('OPanda_ConnectOptionsMetaBox', $bizpanda);

View File

@@ -0,0 +1,134 @@
<?php
class OPanda_SignInLocker_Bounces_StatsTable extends OPanda_StatsTable {
public function getColumns() {
return array(
'index' => array(
'title' => ''
),
'title' => array(
'title' => __('Post Title', 'signinlocker')
),
'impress' => array(
'title' => __('Impressions', 'signinlocker'),
'highlight' => true,
'cssClass' => 'opanda-col-number'
),
'users' => array(
'title' => __('Visitors Who', 'signinlocker'),
'cssClass' => 'opanda-col-common',
'columns' => array(
/*
'ignored' => array(
'title' => __('Ignored Locker', 'signinlocker'),
'hint' => __('The number of visitors who viewed the locker but didn\'t try to interact with the one (no clicks on any buttons).', 'signinlocker'),
'cssClass' => 'opanda-col-number'
),*/
'errors' => array(
'title' => __('Faced Errors', 'signinlocker'),
'hint' => __('Visitors who faced with any errors and were not able to unlock the content. This value normally should be equal 0. If not, please check settings of your locker or contact OnePress support.', 'signinlocker'),
'cssClass' => 'opanda-col-number'
),
'social-fails' => array(
'title' => __('Declined Social Apps', 'signinlocker'),
'hint' => __('Visitors who refused to authorize of your social apps. If you think this value is too large, try to set less social actions to be performed on signing in through social networks.', 'signinlocker'),
'cssClass' => 'opanda-col-number'
)
)
)
);
}
public function columnIgnored( $row ) {
if ( !isset( $row['impress'] ) ) $row['impress'] = 0;
if ( !isset( $row['interaction'] ) ) $row['interaction'] = 0;
$diff = $row['impress'] - $row['interaction'];
if ( $diff < 0 ) $diff = 0;
echo $diff;
}
public function columnErrors( $row ) {
if ( !isset( $row['error'] ) ) $row['error'] = 0;
echo $row['error'];
}
public function columnNotConfirmed( $row ) {
if ( !isset( $row['email-received'] ) ) $row['email-received'] = 0;
if ( !isset( $row['email-confirmed'] ) ) $row['email-confirmed'] = 0;
$diff = $row['email-received'] - $row['email-confirmed'];
if ( $diff < 0 ) $diff = 0;
echo $diff;
}
public function columnSocialFails( $row ) {
if ( !isset( $row['social-app-declined'] ) ) $row['social-app-declined'] = 0;
echo $row['social-app-declined'];
}
}
class OPanda_SignInLocker_Bounces_StatsChart extends OPanda_StatsChart {
public $type = 'column';
public function getFields() {
return array(
'aggregate_date' => array(
'title' => __('Date')
),
/*
'ignored' => array(
'title' => __('Who Ignored Locker', 'signinlocker'),
'cssClass' => 'opanda-col-number',
'color' => '#cccccc'
),*/
'errors' => array(
'title' => __('Who Faced Errors', 'signinlocker'),
'cssClass' => 'opanda-col-number',
'color' => '#F97D81'
),
'social-fails' => array(
'title' => __('Who Declined Social Apps', 'signinlocker'),
'cssClass' => 'opanda-col-number',
'color' => '#29264E'
)
);
}
public function fieldIgnored( $row ) {
if ( !isset( $row['impress'] ) ) $row['impress'] = 0;
if ( !isset( $row['interaction'] ) ) $row['interaction'] = 0;
$diff = $row['impress'] - $row['interaction'];
if ( $diff < 0 ) $diff = 0;
return $diff;
}
public function fieldErrors( $row ) {
if ( !isset( $row['error'] ) ) $row['error'] = 0;
return $row['error'];
}
public function fieldNotConfirmed( $row ) {
if ( !isset( $row['email-received'] ) ) $row['email-received'] = 0;
if ( !isset( $row['email-confirmed'] ) ) $row['email-confirmed'] = 0;
$diff = $row['email-received'] - $row['email-confirmed'];
if ( $diff < 0 ) $diff = 0;
return $diff;
}
public function fieldSocialFails( $row ) {
if ( !isset( $row['social-app-declined'] ) ) $row['social-app-declined'] = 0;
return $row['social-app-declined'];
}
}

View File

@@ -0,0 +1,77 @@
<?php
class OPanda_SignInLocker_Channels_StatsTable extends OPanda_StatsTable {
public function getColumns() {
return array(
'index' => array(
'title' => ''
),
'title' => array(
'title' => __('Post Title', 'signinlocker')
),
'unlock' => array(
'title' => __('Number of Unlocks', 'signinlocker'),
'hint' => __('The number of unlocks made by visitors.', 'signinlocker'),
'highlight' => true,
'cssClass' => 'opanda-col-number'
),
'unlock-via-form' => array(
'title' => __('Via Opt-In Form'),
'cssClass' => 'opanda-col-number'
),
'unlock-via-facebook' => array(
'title' => __('Via Facebook'),
'cssClass' => 'opanda-col-number'
),
'unlock-via-twitter' => array(
'title' => __('Via Twitter'),
'cssClass' => 'opanda-col-number'
),
'unlock-via-google' => array(
'title' => __('Via Google'),
'cssClass' => 'opanda-col-number'
),
'unlock-via-linkedin' => array(
'title' => __('Via LinkedIn'),
'cssClass' => 'opanda-col-number'
)
);
}
}
class OPanda_SignInLocker_Channels_StatsChart extends OPanda_StatsChart {
public $type = 'line';
public function getFields() {
return array(
'aggregate_date' => array(
'title' => __('Date')
),
'unlock-via-form' => array(
'title' => __('Via Opt-In Form'),
'color' => '#31ccab'
),
'unlock-via-facebook' => array(
'title' => __('Via Facebook'),
'color' => '#7089be'
),
'unlock-via-twitter' => array(
'title' => __('Via Twitter'),
'color' => '#3ab9e9'
),
'unlock-via-google' => array(
'title' => __('Via Google'),
'color' => '#e26f61'
),
'unlock-via-linkedin' => array(
'title' => __('Via LinkedIn'),
'color' => '#006080'
)
);
}
}

View File

@@ -0,0 +1,134 @@
<?php
class OPanda_SignInLocker_Profits_StatsTable extends OPanda_StatsTable {
public function getColumns() {
$columns = array(
'index' => array(
'title' => ''
),
'title' => array(
'title' => __('Post Title', 'signinlocker')
),
'unlock' => array(
'title' => __('Unlocks', 'signinlocker'),
'hint' => __('The number of unlocks made by visitors.', 'signinlocker'),
'highlight' => true,
'cssClass' => 'opanda-col-number'
)
);
$columns['leads'] = array(
'title' => __('Leads', 'signinlocker'),
'hint' => __('The number of new leads collected via the locker.', 'signinlocker'),
'cssClass' => 'opanda-col-number'
);
$columns['account-registered'] = array(
'title' => __('Users Registered', 'signinlocker'),
'hint' => __('The number of new accounts created via the locker.', 'signinlocker'),
'cssClass' => 'opanda-col-number',
'prefix' => '+'
);
if ( BizPanda::hasPlugin('sociallocker') ) {
$columns['got-twitter-follower'] = array(
'title' => __('Twitter Followers', 'signinlocker'),
'hint' => __('The number of new followers attracted via the locker.', 'signinlocker'),
'cssClass' => 'opanda-col-number',
'prefix' => '+'
);
$columns['tweet-posted'] = array(
'title' => __('Tweets', 'signinlocker'),
'hint' => __('The number of new tweets posted via the locker.', 'signinlocker'),
'cssClass' => 'opanda-col-number',
'prefix' => '+'
);
$columns['got-youtube-subscriber'] = array(
'title' => __('Youtube Subscribers', 'signinlocker'),
'hint' => __('The number of new subscribers attracted via the locker.', 'signinlocker'),
'cssClass' => 'opanda-col-number',
'prefix' => '+'
);
/*
$columns['got-linkedin-follower'] = array(
'title' => __('LinkedIn Followers', 'signinlocker'),
'hint' => __('The number of new followers attracted via the locker.', 'signinlocker'),
'cssClass' => 'opanda-col-number',
'prefix' => '+'
);
*/
}
return $columns;
}
public function columnLeads( $row ) {
if ( !isset( $row['email-received'] ) ) $row['email-received'] = 0;
if ( $row['email-received'] > 0 ) echo '+';
echo $row['email-received'];
}
}
class OPanda_SignInLocker_Profits_StatsChart extends OPanda_StatsChart {
public $type = 'line';
public function getFields() {
$fields = array();
$fields['aggregate_date'] = array(
'title' => __('Date')
);
if ( BizPanda::hasPlugin('optinpanda') ) {
$fields['got-twitter-follower'] = array(
'title' => __('Emails', 'signinlocker'),
'color' => '#FFCC66'
);
}
$fields['leads'] = array(
'title' => __('Leads Collected', 'signinlocker'),
'color' => '#FFCC66'
);
$fields['account-registered'] = array(
'title' => __('Users Registered', 'signinlocker'),
'color' => '#336699'
);
if ( BizPanda::hasPlugin('sociallocker') ) {
$fields['tweet-posted'] = array(
'title' => __('Twitter Tweets', 'signinlocker'),
'color' => '#3bb4ea'
);
$fields['got-twitter-follower'] = array(
'title' => __('Twitter Followers', 'signinlocker'),
'color' => '#1e92c9'
);
$fields['got-youtube-subscriber'] = array(
'title' => __('Youtube Subscribers', 'signinlocker'),
'color' => '#ba5145'
);
/*
$fields['got-linkedin-follower'] = array(
'title' => __('LinkedIn Followers', 'signinlocker'),
'color' => '#006080'
);
*/
}
return $fields;
}
}

View File

@@ -0,0 +1,59 @@
<?php
class OPanda_SignInLocker_Skips_StatsTable extends OPanda_StatsTable {
public function getColumns() {
return array(
'index' => array(
'title' => ''
),
'title' => array(
'title' => __('Post Title', 'signinlocker')
),
'unlock' => array(
'title' => __('Number of Unlocks', 'signinlocker'),
'hint' => __('The number of unlocks made by visitors.', 'signinlocker'),
'highlight' => true,
'cssClass' => 'opanda-col-number'
),
'skip-via-timer' => array(
'title' => __('Skipped by Timer'),
'cssClass' => 'opanda-col-number'
),
'skip-via-cross' => array(
'title' => __('Skipped by Close Icon'),
'cssClass' => 'opanda-col-number'
)
);
}
}
class OPanda_SignInLocker_Skips_StatsChart extends OPanda_StatsChart {
public $type = 'column';
public function getFields() {
return array(
'aggregate_date' => array(
'title' => __('Date')
),
'unlock' => array(
'title' => __('Number of Unlocks', 'signinlocker'),
'color' => '#0074a2'
),
'skip-via-timer' => array(
'title' => __('Skipped by Timer'),
'color' => '#333333'
),
'skip-via-cross' => array(
'title' => __('Skipped by Close Icon'),
'color' => '#dddddd'
)
);
}
}

View File

@@ -0,0 +1,51 @@
<?php
class OPanda_SignInLocker_Summary_StatsTable extends OPanda_StatsTable {
public function getColumns() {
return array(
'index' => array(
'title' => ''
),
'title' => array(
'title' => __('Post Title', 'signinlocker')
),
'impress' => array(
'title' => __('Impressions', 'signinlocker'),
'cssClass' => 'opanda-col-number'
),
'unlock' => array(
'title' => __('Number of Unlocks', 'signinlocker'),
'hint' => __('The number of unlocks made by visitors.', 'signinlocker'),
'highlight' => true,
'cssClass' => 'opanda-col-number'
),
'conversion' => array(
'title' => __('Conversion', 'signinlocker'),
'hint' => __('The ratio of the number of unlocks to impressions, in percentage.', 'signinlocker'),
'cssClass' => 'opanda-col-number'
)
);
}
}
class OPanda_SignInLocker_Summary_StatsChart extends OPanda_StatsChart {
public function getSelectors() {
return null;
}
public function getFields() {
return array(
'aggregate_date' => array(
'title' => __('Date')
),
'unlock' => array(
'title' => __('Number of Unlocks'),
'color' => '#0074a2'
)
);
}
}