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,407 @@
<?php
/**
* The file contains a page that shows the common settings for the plugin.
*
* @author Paul Kashtanoff <paul@byonepress.com>
* @copyright (c) 2013, OnePress Ltd
*
* @package core
* @since 1.0.0
*/
/**
* The page Common Settings.
*
* @since 1.0.0
*/
class OPanda_AdvancedSettings extends OPanda_Settings {
public $id = 'advanced';
/**
* Shows the header html of the settings screen.
*
* @since 1.0.0
* @return void
*/
public function header() {
global $optinpanda;
?>
<p>
<?php _e('Options linked with the locking feature. Don\'t change the options here if you are not sure that you do.', 'bizpanda' )?>
</p>
<?php
}
/**
* A page to edit the Advanced Options.
*
* @since v3.7.2
* @return vod
*/
public function getOptions() {
global $optinpanda;
$forms = array();
$forms[] = array(
'type' => 'separator'
);
$forms[] = array(
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'debug',
'title' => __( 'Debug', 'bizpanda' ),
'hint' => __( 'If this option turned on, the plugin displays information about why the locker is not visible.', 'bizpanda' )
);
$forms[] = array(
'type' => 'separator'
);
$forms[] = array(
'type' => 'textbox',
'name' => 'passcode',
'title' => __( 'Pass Code', 'bizpanda' ),
'hint' => sprintf( __( 'Optional. When the pass code is contained in your website URL, the locked content gets automatically unlocked.<br/><div class="opanda-example"><strong>Usage example:</strong> <a href="#" class="opanda-url" target="_blank">%s<span class="opanda-passcode"></span></a></div>', 'bizpanda' ), site_url() ),
'default' => false
);
$forms[] = array(
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'permanent_passcode',
'title' => __( 'Permanent Unlock<br /> For Pass Code', 'bizpanda' ),
'hint' => __( 'Optional. If On, your lockers will be revealed forever if the user once opened the page URL with the Pass Code.<br />Otherwise your lockers will be unlocked only when the page URL contains the Pass Code.', 'bizpanda' ),
'default' => false
);
if ( BizPanda::hasPlugin('sociallocker') ) {
$forms[] = array(
'type' => 'separator'
);
$forms[] = array(
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'interrelation',
'title' => __( 'Interrelation', 'bizpanda' ),
'hint' => __( 'Set On to make lockers interrelated. When one of the interrelated lockers are unlocked on your site, the others will be unlocked too.<br /> Recommended to turn on, if you use the Batch Locking feature.', 'bizpanda' ),
'default' => false
);
}
if ( BizPanda::hasPlugin('optinpanda') ) {
if ( !BizPanda::hasPlugin('sociallocker') ) {
$forms[] = array(
'type' => 'separator'
);
}
$forms[] = array(
'type' => 'dropdown',
'data' => array(
array( 'byemail', __('Unlock all email lockers having the same list together.', 'bizpanda') ),
array( 'bypage', __('Unlock all email lockers located on the same page together.', 'bizpanda') )
),
'name' => 'emaillocker_mode',
'default' => 'byemail',
'title' => __( 'Email Lockers', 'bizpanda' ),
'hint' => __( 'Sets what parameter will be used to link and unlock email lockers.', 'bizpanda' )
);
$forms[] = array(
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'forbid_temp_emails',
'default' => false,
'title' => __( 'Forbid Temp Emails', 'bizpanda' ),
'hint' => __( 'If On, the locker will not accept temporary email address to unlock content.', 'bizpanda' )
);
$tempDomains = self::getTempEmailDomains();
$forms[] = array(
'type' => 'div',
'id' => 'temp_domains_list',
'items' => array(
array(
'type' => 'textarea',
'name' => 'temp_domains',
'default' => implode(', ', $tempDomains),
'title' => __( 'Forbid Email Domains', 'bizpanda' ),
'hint' => __( 'A list of domains (and their parts) used for creating temporary email addresses. You can edit it or leave it as is.', 'bizpanda' )
)
)
);
}
$forms[] = array(
'type' => 'separator'
);
$forms[] = array(
'type' => 'dropdown',
'data' => array(
array( 'visible_with_warning', __('Show Locker With Warning', 'bizpanda') ),
array( 'visible', __('Show Locker As Usual', 'bizpanda') ),
array( 'hidden', __('Hide Locker', 'bizpanda') ),
),
'name' => 'in_app_browsers',
'default' => 'visible_with_warning',
'title' => __( 'In-App Browsers', 'bizpanda' ),
'hint' => __( 'Optional. By default the locker appears when a page is opened in in-app mobile browsers like Facebook In-App Browser, Instagram In-App Browser (and others). For some users the locker may not work properly in in-app browsers, so you can hide it or show the locker with a warning offering to open a page in a standard browser.', 'bizpanda' )
);
$forms[] = array(
'type' => 'div',
'id' => 'in_app_browsers_warning',
'items' => array(
array(
'type' => 'textarea',
'name' => 'in_app_browsers_warning',
'title' => __( 'In-App Warning', 'bizpanda' ),
'default' => __( 'You are viewing this page in the {browser}. The locker may work incorrectly in this browser. Please open this page in a standard browser.', 'bizpanda' ),
'hint' => __( 'A warning message visible together with the locker when a user opens your page in an in-app browser.', 'bizpanda' )
)
)
);
if ( BizPanda::hasPlugin('sociallocker') ) {
$forms[] = array(
'type' => 'separator'
);
$forms[] = array(
'type' => 'dropdown',
'data' => array(
array( 'show_error', __('Show Locker With Error', 'bizpanda') ),
array( 'show_content', __('Hide Locker, Show Content', 'bizpanda') )
),
'name' => 'adblock',
'default' => 'show_error',
'title' => __( 'AdBlock', 'bizpanda' ),
'hint' => __( 'Optional. Setup how the locker should behave if AdBlock blocks social widgets.', 'bizpanda' )
);
$forms[] = array(
'type' => 'div',
'id' => 'adblock_error',
'items' => array(
array(
'type' => 'textarea',
'name' => 'adblock_error',
'title' => __( 'AdBlock Error', 'bizpanda' ),
'default' => __( 'Unable to create social buttons. Please make sure that nothing blocks loading of social scripts in your browser. Some browser extentions (Avast, PrivDog, AdBlock, Adguard etc.) or usage of private tabs in FireFox may cause this issue. Turn them off and try again.', 'bizpanda' ),
'hint' => __( 'An error displaying when AdBlock extensions block loading of social buttons.', 'bizpanda' )
)
)
);
}
$forms[] = array(
'type' => 'separator'
);
$forms[] = array(
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'rss',
'title' => __( 'Locked content<br /> is visible in RSS feeds', 'bizpanda' ),
'hint' => __( 'Set On to make locked content visible in RSS feed.', 'bizpanda' ),
'default' => false
);
if ( BizPanda::hasPlugin('sociallocker') ) {
$forms[] = array(
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'actual_urls',
'title' => __( 'Actual URLs by default', 'bizpanda' ),
'hint' => __( 'Optional. If you do not set explicitly URLs to like/share in the settings of social buttons, then by default the plugin will use an URL of the page where the locker is located. Turn on this option to extract URLs to like/share from an address bar of the user browser, saving all query arguments. By default permalinks are used.', 'bizpanda' ),
'default' => false
);
}
$forms[] = array(
'type' => 'separator'
);
$forms[] = array(
'type' => 'html',
'html' => '<div class="col-md-offset-2" style="padding: 30px 0 10px 0;">' .
'<strong style="font-size: 15px;">' . __('Advanced Options', 'bizpanda') . '</strong>' .
'<p>' . __('Please don\'t change these options if everything works properly.', 'bizpanda') . '</p>' .
'</div>'
);
$forms[] = array(
'type' => 'separator'
);
$forms[] = array(
'type' => 'textbox',
'name' => 'session_duration',
'title' => __( 'Session Duration<br />(in secs)', 'bizpanda' ),
'hint' => __( 'Optional. The session duration used in the advanced Visiblity Options. The default value 900 seconds (15 minutes).', 'bizpanda' ),
'default' => 900
);
$forms[] = array(
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'session_freezing',
'title' => __( 'Session Freezing', 'bizpanda' ),
'hint' => __( 'Optional. If On, the length of users\' sessions is fixed, by default the sessions are prolonged automatically every time when a user visits your website for a specified value of the session duration.', 'bizpanda' ),
'default' => false
);
$forms[] = array(
'type' => 'separator'
);
$forms[] = array(
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'normalize_markup',
'title' => __( 'Normalize Markup', 'bizpanda' ),
'hint' => __( 'Optional. If you use the Batch Lock and the locker appears incorrectly, probably HTML markup of your page is broken. Try to turn on this option and the plugin will try to normalize html markup before output.', 'bizpanda' )
);
$forms[] = array(
'type' => 'separator'
);
$forms[] = array(
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'dynamic_theme',
'title' => __( 'I use a dynamic theme', 'bizpanda' ),
'hint' => __( 'If your theme loads pages dynamically via ajax, set "On" to get the lockers working (if everything works properly, don\'t turn on this option).', 'bizpanda' )
);
$forms[] = array(
'type' => 'textbox',
'way' => 'buttons',
'name' => 'managed_hook',
'title' => __( 'Creater Trigger', 'bizpanda' ),
'hint' => __( 'Optional. Set any jQuery trigger bound to the root document to create lockers. By default lockers are created on loading a page.', 'bizpanda' )
);
$forms[] = array(
'type' => 'separator'
);
$forms[] = array(
'type' => 'dropdown',
'name' => 'alt_overlap_mode',
'data' => array(
array( 'full', __('Classic (full)', 'bizpanda') ),
array( 'transparence', __('Transparency', 'bizpanda') )
),
'default' => 'transparence',
'title' => __( 'Alt Overlap Mode', 'bizpanda' ),
'hint' => __( 'This overlap mode will be applied for browsers which don\'t support the blurring effect.', 'bizpanda' )
);
$forms[] = array(
'type' => 'dropdown',
'data' => array(
array( 'auto', __('Auto', 'bizpanda') ),
array( 'always_hidden', __('Hidden On Loading', 'bizpanda') ),
array( 'always_visible', __('Visible On Loading', 'bizpanda') )
),
'name' => 'content_visibility',
'default' => 'auto',
'title' => __( 'Content Visibility<br />On Loading', 'bizpanda' ),
'hint' => __( 'By default if the blurring or transparent mode is used, the content may be visible during a short time before the locker appears. On other side, if the classic mode is used, the locked content is hidden by default on loading. Change this option to manage content visibility when a page loads.', 'bizpanda' )
);
if ( BizPanda::hasPlugin('sociallocker') ) {
$forms[] = array(
'type' => 'separator'
);
$forms[] = array(
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'tumbler',
'title' => __( 'Anti-Cheating', 'bizpanda' ),
'default' => false,
'hint' => __( 'Turn it on to protect your locked content against cheating from visitors. Some special browser extensions allow to view the locked content without actual sharing. This option checks whether the user has really liked/shared your page.', 'bizpanda' )
);
$forms[] = array(
'type' => 'textbox',
'name' => 'timeout',
'title' => __( 'Timeout of waiting<br />loading the locker (in ms)', 'bizpanda' ),
'default' => '20000',
'hint' => __( 'A user can have browser extensions which block loading scripts of social networks. If the social buttons have not been loaded within the specified timeout interval, the locker shows the error (in the red container) alerting about that a browser blocks loading of the social buttons.<br />', 'bizpanda' )
);
}
$forms[] = array(
'type' => 'separator'
);
return $forms;
}
/**
* Returns a list of default temporary email domains.
*/
public static function getTempEmailDomains() {
return array(
'sharklasers',
'grr',
'guerrillamail',
'guerrillamailblock',
'pokemail',
'spam4',
'yk20.com',
'0hiolce.com',
'etoic.com',
'jklasdf.com',
'u.0u.ro',
'uacro.com',
'rblx.site',
'malove.site',
'harvard-ac-uk.tk',
'xing886',
'xww.ro',
'barryogorman.com',
'kozow.com',
'dmarc.ro',
'freemail.tweakly.net',
'ppetw.com',
'uu.gl',
'usa.cc',
'0v.ro',
'mailfs.com',
'apssdc.ml',
'0w.ro',
'laoho.com',
'wupics.com',
'xww.ro',
'getnada.com',
'amail.club',
'banit',
'cars2.club',
'cmail.club',
'duck2.club',
'nada.email',
'nada.ltd',
'wmail.club'
);
}
}

View File

@@ -0,0 +1,164 @@
<?php
/**
* A class for the page providing the basic settings.
*
* @author Alex Kovalev <alex.kovalevv@gmail.com>
* @copyright (c) 2016, OnePress Ltd
*
* @package core
* @since 1.0.0
*/
/**
* The page Basic Settings.
*
* @since 1.0.0
*/
class OPanda_NotificationsSettings extends OPanda_Settings {
public $id = 'notifications';
public function __construct($page) {
parent::__construct($page);
}
/**
* Shows the header html of the settings screen.
*
* @since 1.0.0
* @return void
*/
public function header() {
global $optinpanda;
?>
<p>
<?php _e('Mark events you wish to get notifications about.', 'bizpanda' )?>
</p>
<?php
}
/**
* Returns options for the Basic Settings screen.
*
* @since 1.0.0
* @return void
*/
public function getOptions() {
$options = array();
$wpEditorData = array();
$defaultLeadsEmail = file_get_contents( OPANDA_BIZPANDA_DIR . '/content/leads-notification.html' );
$defaultUnlocksEmail = file_get_contents( OPANDA_BIZPANDA_DIR . '/content/unlocks-notification.html' );
$options[] = array(
'type' => 'separator'
);
$options[] = array(
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'notify_leads',
'title' => __( 'New Lead Received', 'bizpanda' ),
'default' => false,
'hint' => __( 'Set On to recived notifications via email about new leads.', 'bizpanda' )
);
$options[] = array(
'type' => 'div',
'id' => 'opanda_notify_leads-options',
'items' => array(
array(
'type' => 'separator'
),
array(
'type' => 'textbox',
'name' => 'leads_email_receiver',
'default' => get_option('admin_email'),
'title' => __('Recipient', 'bizpanda'),
'hint' => __('An email address of the recipient to send notifications.', 'bizpanda')
),
array(
'type' => 'textbox',
'name' => 'leads_email_subject',
'default' => 'A new lead grabbed on {sitename}',
'title' => __('Subject', 'bizpanda'),
'hint' => __('A subject of the notification email. Supported tags: {sitename}.', 'bizpanda')
),
array(
'type' => 'wp-editor',
'name' => 'leads_email_body',
'data' => $wpEditorData,
'title' => __('Message', 'bizpanda'),
'hint' => __('A body of the notification email. Supported tags: {sitename}, {siteurl}, {details}, {context}.', 'bizpanda'),
'tinymce' => array(
'height' => 250,
'content_css' => OPANDA_BIZPANDA_URL . '/assets/admin/css/tinymce.010000.css'
),
'default' => $defaultLeadsEmail
),
array(
'type' => 'separator'
)
)
);
$options[] = array(
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'notify_unlocks',
'title' => __( 'Unlock Occurred', 'bizpanda' ),
'default' => false,
'hint' => __( 'Set On to recived notifications via email about unlocks.', 'bizpanda' )
);
$options[] = array(
'type' => 'div',
'id' => 'opanda_notify_unlocks-options',
'items' => array(
array(
'type' => 'separator'
),
array(
'type' => 'textbox',
'name' => 'unlocks_email_receiver',
'default' => get_option('admin_email'),
'title' => __('Recipient', 'bizpanda'),
'hint' => __('An email address of the recipient to send notifications.', 'bizpanda')
),
array(
'type' => 'textbox',
'name' => 'unlocks_email_subject',
'default' => 'A new unlock occurred on {sitename}',
'title' => __('Subject', 'bizpanda'),
'hint' => __('A subject of the notification email. Supported tags: {sitename}.', 'bizpanda')
),
array(
'type' => 'wp-editor',
'name' => 'unlocks_email_body',
'data' => $wpEditorData,
'title' => __('Message', 'bizpanda'),
'hint' => __('A body of the notification email. Supported tags: {sitename}, {siteurl}, {context}.', 'bizpanda'),
'tinymce' => array(
'height' => 250,
'content_css' => OPANDA_BIZPANDA_URL . '/assets/admin/css/tinymce.010000.css'
),
'default' => $defaultUnlocksEmail
)
)
);
$options[] = array(
'type' => 'separator'
);
return $options;
}
public function onSaving() {
}
}

View File

@@ -0,0 +1,189 @@
<?php
/**
* A class for the page providing the basic settings.
*
* @author Alex Kovalev <alex.kovalevv@gmail.com>
* @copyright (c) 2016, OnePress Ltd
*
* @package core
* @since 1.0.0
*/
/**
* The page Basic Settings.
*
* @since 1.0.0
*/
class OPanda_PermissionsSettings extends OPanda_Settings {
public $id = 'permissions';
public function __construct($page) {
parent::__construct($page);
global $wp_roles;
$this->wp_roles = $wp_roles;
if ( !isset( $wp_roles ) )
$this->wp_roles = new WP_Roles();
$this->roles = $this->wp_roles->get_names();
}
/**
* Shows the header html of the settings screen.
*
* @since 1.0.0
* @return void
*/
public function header() {
global $optinpanda;
?>
<p>
<?php _e('Configure roles and permissions for getting access to the plugin features.', 'bizpanda' )?>
</p>
<?php
}
/**
* Returns options for the Basic Settings screen.
*
* @since 1.0.0
* @return void
*/
public function getOptions() {
$options = array();
$options[] = array(
'type' => 'separator'
);
foreach ($this->roles as $role_value => $role_name) {
if( $role_value == 'administrator' )
continue;
$options[] = array(
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'user_role_' . $role_value,
'title' => sprintf(__( '%s Role', 'bizpanda' ), $role_name),
'default' => false,
'hint' => sprintf(__( 'Grants access for users with the %s role.', 'bizpanda' ), $role_name)
);
$options[] =array(
'type' => 'div',
'class' => 'opanda-user-role-options-group',
'id' => 'opanda_user_role_' . $role_value . '_options_group',
'items' => array(
array(
'type' => 'div',
'cssClass' => 'permissions-set',
'items' => array(
array(
'type' => 'checkbox',
'name' => 'allow_user_role_' . $role_value . '_edit',
'title' => __( 'Lockers', 'bizpanda' ),
'default' => false,
'hint' => sprintf(__( 'Allows to view and edit lockers.', 'bizpanda' ), $role_name)
),
array(
'type' => 'checkbox',
'name' => 'allow_user_role_' . $role_value . '_leads',
'title' => __( 'Leads', 'bizpanda' ),
'default' => false,
'hint' => sprintf(__( 'Grants access to the Leads page.', 'bizpanda' ), $role_name)
),
array(
'type' => 'checkbox',
'name' => 'allow_user_role_' . $role_value . '_stats',
'title' => __( 'Stats & Reports', 'bizpanda' ),
'default' => true,
'hint' => sprintf(__( 'Grants access to the Stats & Reports page.', 'bizpanda' ), $role_name)
),
array(
'type' => 'checkbox',
'name' => 'allow_user_role_' . $role_value . '_setting',
'title' => __( 'Settings', 'bizpanda' ),
'default' => false,
'hint' => sprintf(__( 'Grants access to the Global Settings page.', 'bizpanda' ), $role_name)
),
array(
'type' => 'checkbox',
'name' => 'allow_user_role_' . $role_value . '_licensing',
'title' => __( 'License Manager', 'bizpanda' ),
'default' => false,
'hint' => sprintf(__( 'Grants access to the License Manager page.', 'bizpanda' ), $role_name)
)
)
)
)
);
$options[] = array(
'type' => 'separator'
);
}
return $options;
}
public function onSaving() {
foreach ($this->roles as $role_value => $role_name) {
if( $role_value == 'administrator' )
continue;
$this->editCapabilityOption($role_value, 'edit');
$this->editCapabilityOption($role_value, 'leads');
$this->editCapabilityOption($role_value, 'stats');
$this->editCapabilityOption($role_value, 'setting');
$this->editCapabilityOption($role_value, 'licensing');
}
}
public function editCapabilityOption($role_name, $capabilityPrefix) {
$role = $GLOBALS [ 'wp_roles' ]->role_objects[$role_name];
if( isset($_POST['opanda_allow_user_role_' . $role_name . '_'. $capabilityPrefix]) && !empty($_POST['opanda_allow_user_role_' . $role_name . '_' . $capabilityPrefix]) ) {
if( $capabilityPrefix != 'edit' )
$this->wp_roles->add_cap( $role_name, 'manage_opanda_' . $capabilityPrefix );
else {
$this->wp_roles->add_cap( $role_name, 'read_opanda-item' );
$this->wp_roles->add_cap( $role_name, 'read_private_opanda-items' );
$this->wp_roles->add_cap( $role_name, 'delete_opanda-item' );
$this->wp_roles->add_cap( $role_name, 'delete_opanda-items' );
$this->wp_roles->add_cap( $role_name, 'edit_opanda-item' );
$this->wp_roles->add_cap( $role_name, 'edit_opanda-items' );
$this->wp_roles->add_cap( $role_name, 'edit_others_opanda-items' );
$this->wp_roles->add_cap( $role_name, 'publish_opanda-items' );
}
} else {
if( $role->has_cap( 'manage_opanda_' . $capabilityPrefix ) && $capabilityPrefix != 'edit' )
$role->remove_cap( 'manage_opanda_' . $capabilityPrefix );
else if( $capabilityPrefix == 'edit' ) {
if( $role->has_cap( 'read_opanda-item' ) )
$this->wp_roles->remove_cap( $role_name, 'read_opanda-item' );
if( $role->has_cap( 'read_private_opanda-items' ) )
$this->wp_roles->remove_cap( $role_name, 'read_private_opanda-items' );
if( $role->has_cap( 'delete_opanda-item' ) )
$this->wp_roles->remove_cap( $role_name, 'delete_opanda-item' );
if( $role->has_cap( 'delete_opanda-items' ) )
$this->wp_roles->remove_cap( $role_name, 'delete_opanda-items' );
if( $role->has_cap( 'edit_opanda-item' ) )
$this->wp_roles->remove_cap( $role_name, 'edit_opanda-item' );
if( $role->has_cap( 'edit_opanda-items' ) )
$this->wp_roles->remove_cap( $role_name, 'edit_opanda-items' );
if( $role->has_cap( 'edit_others_opanda-items' ) )
$this->wp_roles->remove_cap( $role_name, 'edit_others_opanda-items' );
if( $role->has_cap( 'publish_opanda-items' ) )
$this->wp_roles->remove_cap( $role_name, 'publish_opanda-items' );
}
}
}
}

View File

@@ -0,0 +1,157 @@
<?php
/**
* The base class for screens of settings.
*
* @author Paul Kashtanoff <paul@byonepress.com>
* @copyright (c) 2014, OnePress Ltd
*
* @since 1.0.0
*/
abstract class OPanda_Settings {
/**
* Saves the current page object to make available the URLs methods.
* And calls the init method to set notices.
*
* @since 1.0.0
*
* @param FactoryPages321_AdminPage $page
* @return OPanda_Settings
*/
public function __construct( $page ) {
$this->page = $page;
$this->plugin = $page->plugin;
add_action("opanda_{$this->id}_settings_saving", array($this, 'onSaving'));
add_action("opanda_{$this->id}_settings_saved", array($this, 'onSaved'));
add_filter("opanda_{$this->id}_settings_redirect_args", array( $this, 'addErrorsToRedirectArgs') );
$this->isSaving = isset( $_POST['save-action'] );
if ( isset( $_REQUEST['opanda_error'] ) ) {
$this->error = urldecode( $_REQUEST['opanda_error'] );
}
$this->init();
}
/**
* The success notice to display.
*
* @since 1.0.0
* @var string
*/
public $success = null;
/**
* The error notice to display.
*
* @since 1.0.0
* @var string
*/
public $error = null;
/**
* Inits the settings.
* Here you can set the notices to display.
*
* @since 1.0.0
* @return void
*/
public function init() {}
/**
* Shows the header html of the settings.
* Usually it's a concise description of the current screen of the settings.
*
* @since 1.0.0
* @return void
*/
public function header() {}
/**
* Shows the footer html of the settings. Currently it's not used.
*
* @since 1.0.0
* @return void
*/
public function footer() {}
/**
* Returns the array of the options to display.
*
* @since 1.0.0
* @return mixed[]
*/
abstract public function getOptions();
/**
* Builds an URL for the specified action with the set arguments.
*
* @since 1.0.0
* @param string $action An action of the current screen of settings.
* @param string[] $args A set of extra arguments.
* @return string The result URL.
*/
public function getActionUrl( $action = 'index', $args = array() ) {
$args['opanda_screen'] = $this->id;
if ( 'index' !== $action ) $args['opanda_action'] = $action;
return $this->page->getActionUrl('index', $args);
}
/**
* Prints an URL for the specified action with the set arguments.
*
* @since 1.0.0
* @param string $action An action of the current screen of settings.
* @param string[] $args A set of extra arguments.
* @return string The result URL.
*/
public function actionUrl( $action = 'index', $args = array() ) {
echo $this->getActionUrl( $action );
}
/**
* Redirects to the specified action with the set arguments.
*
* @since 1.0.0
* @param string $action An action of the current screen of settings.
* @param string[] $args A set of extra arguments.
* @return string The result URL.
*/
public function redirectToAction( $action = 'index', $args = array() ) {
wp_redirect( $this->getActionUrl( $action = 'index', $args) );
exit;
}
/**
* Calls before saving the settings.
*
* @since 1.0.0
* @return void
*/
public function onSaving() {}
/**
* Calls after the form is saved.
*
* @since 1.0.0
* @return void
*/
public function onSaved() {}
/**
* Shows an error.
*/
public function showError( $text ) {
$this->error = $text;
}
public function addErrorsToRedirectArgs( $args ) {
if ( empty( $this->error ) || !$this->isSaving ) return $args;
$args['opanda_error'] = urlencode($this->error);
return $args;
}
}

View File

@@ -0,0 +1,383 @@
<?php
/**
* A class for the page providing the social settings.
*
* @author Paul Kashtanoff <paul@byonepress.com>
* @copyright (c) 2014, OnePress Ltd
*
* @package core
* @since 1.0.0
*/
/**
* The Social Settings
*
* @since 1.0.0
*/
class OPanda_SocialSettings extends OPanda_Settings {
public $id = 'social';
/**
* Shows the header html of the settings screen.
*
* @since 1.0.0
* @return void
*/
public function header() {
?>
<p><?php _e('Set up here your social API keys and app IDs for social buttons.', 'optionpanda') ?></p>
<?php
}
/**
* Returns subscription options.
*
* @since 1.0.0
* @return mixed[]
*/
public function getOptions() {
$languages = array(
array('ca_ES', __('Catalan', 'bizpanda')),
array('cs_CZ', __('Czech', 'bizpanda')),
array('cy_GB', __('Welsh', 'bizpanda')),
array('da_DK', __('Danish', 'bizpanda')),
array('de_DE', __('German', 'bizpanda')),
array('eu_ES', __('Basque', 'bizpanda')),
array('en_US', __('English', 'bizpanda')),
array('es_ES', __('Spanish', 'bizpanda')),
array('fi_FI', __('Finnish', 'bizpanda')),
array('fr_FR', __('French', 'bizpanda')),
array('gl_ES', __('Galician', 'bizpanda')),
array('hu_HU', __('Hungarian', 'bizpanda')),
array('it_IT', __('Italian', 'bizpanda')),
array('ja_JP', __('Japanese', 'bizpanda')),
array('ko_KR', __('Korean', 'bizpanda')),
array('nb_NO', __('Norwegian', 'bizpanda')),
array('nl_NL', __('Dutch', 'bizpanda')),
array('pl_PL', __('Polish', 'bizpanda')),
array('pt_BR', __('Portuguese (Brazil)', 'bizpanda')),
array('pt_PT', __('Portuguese (Portugal)', 'bizpanda')),
array('ro_RO', __('Romanian', 'bizpanda')),
array('ru_RU', __('Russian', 'bizpanda')),
array('sk_SK', __('Slovak', 'bizpanda')),
array('sl_SI', __('Slovenian', 'bizpanda')),
array('sv_SE', __('Swedish', 'bizpanda')),
array('th_TH', __('Thai', 'bizpanda')),
array('tr_TR', __('Turkish', 'bizpanda')),
array('ku_TR', __('Kurdish', 'bizpanda')),
array('zh_CN', __('Simplified Chinese (China)', 'bizpanda')),
array('zh_HK', __('Traditional Chinese (Hong Kong)', 'bizpanda')),
array('zh_TW', __('Traditional Chinese (Taiwan)', 'bizpanda')),
array('af_ZA', __('Afrikaans', 'bizpanda')),
array('sq_AL', __('Albanian', 'bizpanda')),
array('hy_AM', __('Armenian', 'bizpanda')),
array('az_AZ', __('Azeri', 'bizpanda')),
array('be_BY', __('Belarusian', 'bizpanda')),
array('bn_IN', __('Bengali', 'bizpanda')),
array('bs_BA', __('Bosnian', 'bizpanda')),
array('bg_BG', __('Bulgarian', 'bizpanda')),
array('hr_HR', __('Croatian', 'bizpanda')),
array('nl_BE', __('Dutch (Belgie)', 'bizpanda')),
array('eo_EO', __('Esperanto', 'bizpanda')),
array('et_EE', __('Estonian', 'bizpanda')),
array('fo_FO', __('Faroese', 'bizpanda')),
array('ka_GE', __('Georgian', 'bizpanda')),
array('el_GR', __('Greek', 'bizpanda')),
array('gu_IN', __('Gujarati', 'bizpanda')),
array('hi_IN', __('Hindi', 'bizpanda')),
array('is_IS', __('Icelandic', 'bizpanda')),
array('id_ID', __('Indonesian', 'bizpanda')),
array('ga_IE', __('Irish', 'bizpanda')),
array('jv_ID', __('Javanese', 'bizpanda')),
array('kn_IN', __('Kannada', 'bizpanda')),
array('kk_KZ', __('Kazakh', 'bizpanda')),
array('la_VA', __('Latin', 'bizpanda')),
array('lv_LV', __('Latvian', 'bizpanda')),
array('li_NL', __('Limburgish', 'bizpanda')),
array('lt_LT', __('Lithuanian', 'bizpanda')),
array('mk_MK', __('Macedonian', 'bizpanda')),
array('mg_MG', __('Malagasy', 'bizpanda')),
array('ms_MY', __('Malay', 'bizpanda')),
array('mt_MT', __('Maltese', 'bizpanda')),
array('mr_IN', __('Marathi', 'bizpanda')),
array('mn_MN', __('Mongolian', 'bizpanda')),
array('ne_NP', __('Nepali', 'bizpanda')),
array('pa_IN', __('Punjabi', 'bizpanda')),
array('rm_CH', __('Romansh', 'bizpanda')),
array('sa_IN', __('Sanskrit', 'bizpanda')),
array('sr_RS', __('Serbian', 'bizpanda')),
array('so_SO', __('Somali', 'bizpanda')),
array('sw_KE', __('Swahili', 'bizpanda')),
array('tl_PH', __('Filipino', 'bizpanda')),
array('ta_IN', __('Tamil', 'bizpanda')),
array('tt_RU', __('Tatar', 'bizpanda')),
array('te_IN', __('Telugu', 'bizpanda')),
array('ml_IN', __('Malayalam', 'bizpanda')),
array('uk_UA', __('Ukrainian', 'bizpanda')),
array('uz_UZ', __('Uzbek', 'bizpanda')),
array('vi_VN', __('Vietnamese', 'bizpanda')),
array('xh_ZA', __('Xhosa', 'bizpanda')),
array('zu_ZA', __('Zulu', 'bizpanda')),
array('km_KH', __('Khmer', 'bizpanda')),
array('tg_TJ', __('Tajik', 'bizpanda')),
array('ar_AR', __('Arabic', 'bizpanda')),
array('he_IL', __('Hebrew', 'bizpanda')),
array('ur_PK', __('Urdu', 'bizpanda')),
array('fa_IR', __('Persian', 'bizpanda')),
array('sy_SY', __('Syriac', 'bizpanda')),
array('yi_DE', __('Yiddish', 'bizpanda')),
array('gn_PY', __('Guarani', 'bizpanda')),
array('qu_PE', __('Quechua', 'bizpanda')),
array('ay_BO', __('Aymara', 'bizpanda')),
array('se_NO', __('Northern Sami', 'bizpanda')),
array('ps_AF', __('Pashto', 'bizpanda'))
);
$options = array();
$options[] = array(
'type' => 'separator'
);
$options[] = array(
'type' => 'html',
'html' => '<div class="col-md-offset-2" style="padding: 10px 0 10px 0;">' .
'<strong style="font-size: 15px;">' . __('Social Buttons', 'bizpanda') . '</strong>' .
'<p>' . __('Options to configure native social buttons (Like, Share, Tweet, Subscribe).', 'bizpanda') . '</p>' .
'</div>'
);
$options[] = array(
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'lazy',
'title' => __( 'Lazy Loading', 'bizpanda' ),
'hint' => __( 'If on, start loading resources needed for the buttons only when the locker gets visible on the screen on scrolling. Speeds up loading the website.', 'bizpanda' )
);
$options[] = array(
'type' => 'separator'
);
$options[] = array(
'type' => 'dropdown',
'name' => 'lang',
'title' => __( 'Language of Buttons', 'bizpanda' ),
'data' => $languages,
'hint' => sprintf( __( 'Optional. Select the language that will be used for the social buttons. Used only with the native buttons.', 'bizpanda' ), opanda_get_settings_url('text') )
);
$options[] = array(
'type' => 'dropdown',
'way' => 'buttons',
'name' => 'facebook_version',
'title' => __( 'Facebook API Version', 'bizpanda' ),
'default' => 'v5.0',
'data' => array(
array('v5.0', 'v5.0'),
array('v6.0', 'v6.0'),
array('v7.0', 'v7.0'),
),
'hint' => __( 'Optional. Use the most recent version of the API by default.', 'bizpanda' )
);
$options[] = array(
'type' => 'separator'
);
$options[] = array(
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'own_apps_for_permissions',
'title' => __( 'Use Own Apps<br />To Request Permissions', 'bizpanda' ),
'hint' => __( 'Optional. Some social buttons require a user to grant a set of permissions to perform social actions. It works fine out-of-box by using embedded social apps. At the case if you wish to display a logo of your website when a user grants the permissions you need to register your own social apps.', 'bizpanda' )
);
$options[] = array(
'type' => 'div',
'id' => 'own_social_apps_wrap',
'items' => $this->getSocialAppsOptions()
);
$options[] = array(
'type' => 'separator'
);
$options[] = array(
'type' => 'html',
'html' => '<div class="col-md-offset-2" style="padding: 10px 0 10px 0;">' .
'<strong style="font-size: 15px;">' . __('Sign-In Buttons', 'bizpanda') . '</strong>' .
'<p>' . __('Options to configure sign-in buttons used with sign-in lockers.', 'bizpanda') . '</p>' .
'</div>'
);
$options[] = array(
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'own_apps_to_signin',
'title' => __( 'Use Own Apps<br />To Sign-In Users', 'bizpanda' ),
'hint' => __( 'Optional. Sign-In buttons work fine out-of-box by using embedded social apps. Set your own apps only if you wish to display a logo of your website when a user signs-in.', 'bizpanda' )
);
$options[] = array(
'type' => 'div',
'id' => 'own_signin_apps_wrap',
'items' => $this->getSignInAppsOptions()
);
$options[] = array(
'type' => 'separator'
);
return $options;
}
/**
* Returns options for social buttons.
*/
protected function getSocialAppsOptions() {
$options[] = array(
'type' => 'separator'
);
$options[] = array(
'type' => 'textbox',
'name' => 'facebook_app_id',
'title' => __( 'Facebook App ID', 'bizpanda' ),
'hint' => sprintf( __( 'The App ID of your Facebook App.', 'bizpanda' ), admin_url('admin.php?page=how-to-use-' . $this->plugin->pluginName . '&onp_sl_page=facebook-app') ),
'after' => sprintf( __( '<a href="%s" class="btn btn-default">How To Get</a>', 'bizpanda' ), admin_url('admin.php?page=how-to-use-' . $this->plugin->pluginName . '&onp_sl_page=facebook-app') )
);
$options[] = array(
'type' => 'separator'
);
$options[] = array(
'type' => 'textbox',
'name' => 'google_client_id',
'title' => __( 'Google Client ID', 'bizpanda' ),
'after' => sprintf( __( '<a href="%s" class="btn btn-default">How To Get</a>', 'bizpanda' ), admin_url('admin.php?page=how-to-use-' . $this->plugin->pluginName . '&onp_sl_page=google-client-id') ),
'hint' => sprintf( __( 'The Google Client ID of your Google App.', 'bizpanda' ) )
);
$options[] = array(
'type' => 'textbox',
'name' => 'google_client_secret',
'title' => __( 'Google Client Secret', 'bizpanda' ),
'hint' => __( 'The Google Client Secret of your Google App.', 'bizpanda' )
);
$options[] = array(
'type' => 'separator'
);
$options[] = array(
'type' => 'textbox',
'name' => 'twitter_social_app_consumer_key',
'title' => __( 'Twitter App Key', 'bizpanda' ),
'after' => sprintf( __( '<a href="%s" class="btn btn-default">How To Get</a>', 'bizpanda' ), admin_url('admin.php?page=how-to-use-' . $this->plugin->pluginName . '&onp_sl_page=twitter-app') ),
'hint' => sprintf( __( 'The Twitter Consumer Key of your Twitter App (set only "Read" permission).', 'bizpanda' ) )
);
$options[] = array(
'type' => 'textbox',
'name' => 'twitter_social_app_consumer_secret',
'title' => __( 'Twitter App Key Secret', 'bizpanda' ),
'hint' => __( 'The Twitter Consumer Secret of your Twitter App.', 'bizpanda' ),
'for' => array(__('Connect Locker', 'bizpanda'))
);
return $options;
}
/**
* Returns options for sign-in buttons.
*/
protected function getSignInAppsOptions() {
$options[] = array(
'type' => 'separator'
);
$options[] = array(
'type' => 'textbox',
'name' => 'facebook_app_id',
'title' => __( 'Facebook App ID', 'bizpanda' ),
'after' => sprintf( __( '<a href="%s" class="btn btn-default">How To Get</a>', 'bizpanda' ), admin_url('admin.php?page=how-to-use-' . $this->plugin->pluginName . '&onp_sl_page=facebook-app') ),
'hint' => sprintf( __( 'The Facebook App ID of your Facebook App.', 'bizpanda' ) )
);
$options[] = array(
'type' => 'textbox',
'name' => 'facebook_app_secret',
'title' => __( 'Facebook App Secret', 'bizpanda' ),
'hint' => __( 'The Facebook App Secret of your Facebook App.', 'bizpanda' )
);
$options[] = array(
'type' => 'separator'
);
$options[] = array(
'type' => 'textbox',
'name' => 'google_client_id',
'title' => __( 'Google Client ID', 'bizpanda' ),
'after' => sprintf( __( '<a href="%s" class="btn btn-default">How To Get</a>', 'bizpanda' ), admin_url('admin.php?page=how-to-use-' . $this->plugin->pluginName . '&onp_sl_page=google-client-id') ),
'hint' => sprintf( __( 'The Google Client ID of your Google App.', 'bizpanda' ) )
);
$options[] = array(
'type' => 'textbox',
'name' => 'google_client_secret',
'title' => __( 'Google Client Secret', 'bizpanda' ),
'hint' => __( 'The Google Client Secret of your Google App.', 'bizpanda' )
);
$options[] = array(
'type' => 'separator'
);
$options[] = array(
'type' => 'textbox',
'name' => 'twitter_signin_app_consumer_key',
'title' => __( 'Twitter App Key', 'bizpanda' ),
'after' => sprintf( __( '<a href="%s" class="btn btn-default">How To Get</a>', 'bizpanda' ), admin_url('admin.php?page=how-to-use-' . $this->plugin->pluginName . '&onp_sl_page=twitter-app') ),
'hint' => sprintf( __( 'The Twitter Consumer Key of your Twitter App (set "Read" and "Write" permissions).', 'bizpanda' ) )
);
$options[] = array(
'type' => 'textbox',
'name' => 'twitter_signin_app_consumer_secret',
'title' => __( 'Twitter App Key Secret', 'bizpanda' ),
'hint' => __( 'The Twitter Consumer Secret of your Twitter App.', 'bizpanda' ),
'for' => array(__('Connect Locker', 'bizpanda'))
);
$options[] = array(
'type' => 'separator'
);
$options[] = array(
'type' => 'textbox',
'name' => 'linkedin_client_id',
'title' => __( 'LinkedIn Client ID', 'bizpanda' ),
'after' => sprintf( __( '<a href="%s" class="btn btn-default">How To Get</a>', 'bizpanda' ), admin_url('admin.php?page=how-to-use-' . $this->plugin->pluginName . '&onp_sl_page=linkedin-api-key') ),
'hint' => sprintf( __( 'The LinkedIn Client ID of your LinkedIn App.', 'bizpanda' ) )
);
$options[] = array(
'type' => 'textbox',
'name' => 'linkedin_client_secret',
'title' => __( 'LinkedIn Client Secret', 'bizpanda' ),
'hint' => __( 'The LinkedIn Client Secret of your LinkedIn App.', 'bizpanda' )
);
return $options;
}
}

View File

@@ -0,0 +1,189 @@
<?php
/**
* A class for the page providing the basic settings.
*
* @author Paul Kashtanoff <paul@byonepress.com>
* @copyright (c) 2013, OnePress Ltd
*
* @package core
* @since 1.0.0
*/
/**
* The page Basic Settings.
*
* @since 1.0.0
*/
class OPanda_StatsSettings extends OPanda_Settings {
public $id = 'stats';
/**
* Sets notices.
*
* @since 1.0.0
* @return void
*/
public function init() {
if ( isset( $_GET['onp_table_cleared'] )) {
$this->success = __('The data has been successfully cleared.', 'bizpanda');
}
}
/**
* Shows the header html of the settings screen.
*
* @since 1.0.0
* @return void
*/
public function header() {
?>
<p><?php _e('Configure here how the plugin should collect the statistical data.', 'optionpanda') ?></p>
<?php
}
/**
* Returns options for the Basic Settings screen.
*
* @since 1.0.0
* @return void
*/
public function getOptions() {
global $optinpanda;
$options = array();
$options[] = array(
'type' => 'separator'
);
$options[] = array(
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'google_analytics',
'title' => __( 'Google Analytics', 'bizpanda' ),
'hint' => __( 'If set On, the plugin will generate <a href="https://support.google.com/analytics/answer/1033068?hl=en" target="_blank">events</a> for the Google Analytics when the content is unlocked.<br /><strong>Note:</strong> before enabling this feature, please <a href="https://support.google.com/analytics/answer/1008015?hl=en" target="_blank">make sure</a> that your website contains the Google Analytics tracker code.', 'bizpanda' )
);
$options[] = array(
'type' => 'html',
'html' => array($this, 'statsHtml')
);
$options[] = array(
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'tracking',
'title' => __( 'Collecting Stats', 'bizpanda' ),
'hint' => __( 'Turns on collecting the statistical data for reports.', 'bizpanda' )
);
$options[] = array(
'type' => 'separator'
);
return $options;
}
/**
* Render the html block on how much the statistics data takes places.
*
* @sinve 1.0.0
* @return void
*/
public function statsHtml() {
global $wpdb;
$dataSizeInBytes = $wpdb->get_var(
"SELECT round(data_length + index_length) as 'size_in_bytes' FROM information_schema.TABLES WHERE " .
"table_schema = '" . DB_NAME . "' AND table_name = '{$wpdb->prefix}opanda_stats_v2'");
$count = $wpdb->get_var("SELECT COUNT(*) AS n FROM {$wpdb->prefix}opanda_stats_v2");
$humanDataSize = factory_325_get_human_filesize( $dataSizeInBytes );
?>
<div class="form-group">
<label class="col-sm-2 control-label"></label>
<div class="control-group controls col-sm-10">
<p class="onp-sl-inline">
<?php if ( $count == 0 ) { ?>
<?php printf( __( 'The statistical data is <strong>empty</strong>.', 'bizpanda' ), $humanDataSize ); ?>
<?php } else { ?>
<?php printf( __( 'The statistical data takes <strong>%s</strong> on your server', 'bizpanda' ), $humanDataSize ); ?>
<a class="button" style="margin-left: 5px;" href="<?php $this->actionUrl('clearStatsData') ?>"><?php _e('clear data', 'bizpanda') ?></a>
<?php } ?>
</p>
</div>
</div>
<?php
}
/**
* Clears the statisticals data.
*
* @sinve 1.0.0
* @return void
*/
public function clearStatsDataAction() {
if ( !isset( $_REQUEST['onp_confirmed'] ) ) {
return $this->confirm(array(
'title' => __('Are you sure that you want to clear the current statistical data?', 'bizpanda'),
'description' => __('All the statistical data will be removed.', 'bizpanda'),
'actions' => array(
'onp_confirm' => array(
'class' => 'btn btn-danger',
'title' => __("Yes, I'm sure", 'bizpanda'),
'url' => $this->getActionUrl('clearStatsData', array(
'onp_confirmed' => true
))
),
'onp_cancel' => array(
'class' => 'btn btn-default',
'title' => __("No, return back", 'bizpanda'),
'url' => $this->getActionUrl('index')
),
)
));
}
global $wpdb;
$wpdb->query("DELETE FROM {$wpdb->prefix}opanda_stats_v2");
$lockers = get_posts(array(
'post_type' => OPANDA_POST_TYPE
));
foreach( $lockers as $locker ) {
delete_post_meta($locker->ID, 'opanda_imperessions');
delete_post_meta($locker->ID, 'opanda_unlocks');
}
return $this->redirectToAction('index', array('onp_table_cleared' => true));
}
/**
* Shows the html block with a confirmation dialog.
*
* @sinve 1.0.0
* @return void
*/
public function confirm( $data ) {
?>
<div class="onp-page-wrap factory-bootstrap-331" id="onp-confirm-dialog">
<div id="onp-confirm-dialog-wrap">
<h1><?php echo $data['title'] ?></h1>
<p><?php echo $data['description'] ?></p>
<div class='onp-actions'>
<?php foreach( $data['actions'] as $action ) { ?>
<a href='<?php echo $action['url'] ?>' class='<?php echo $action['class'] ?>'>
<?php echo $action['title'] ?>
</a>
<?php } ?>
</div>
</div>
</div>
<?php
}
}

View File

@@ -0,0 +1,147 @@
<?php
/**
* A class for the page providing the subscription settings.
*
* @author Paul Kashtanoff <paul@byonepress.com>
* @copyright (c) 2014, OnePress Ltd
*
* @package core
* @since 1.0.0
*/
/**
* The Subscription Settings
*
* @since 1.0.0
*/
class OPanda_SubscriptionSettings extends OPanda_Settings {
public $id = 'subscription';
public function init() {
if ( isset( $_GET['opanda_aweber_disconnected'] )) {
$this->success = __('Your Aweber Account has been successfully disconnected.', 'bizpanda');
}
}
/**
* Shows the header html of the settings screen.
*
* @since 1.0.0
* @return void
*/
public function header() {
?>
<p><?php _e('Set up here how you would like to save emails of your subscribers.', 'optionpanda') ?></p>
<?php
}
/**
* Returns subscription options.
*
* @since 1.0.0
* @return mixed[]
*/
public function getOptions() {
$options = array();
$options[] = array(
'type' => 'separator'
);
require_once OPANDA_BIZPANDA_DIR . '/admin/includes/subscriptions.php';
$serviceList = OPanda_SubscriptionServices::getSerivcesList();
// fix
$service = get_option('opanda_subscription_service', 'database');
if ( $service == 'none' ) update_option('opanda_subscription_service', 'database');
$listItems = array();
foreach( $serviceList as $serviceName => $serviceInfo ) {
$listItems[] = array(
'value' => $serviceName,
'title' => $serviceInfo['title'],
'hint' => isset( $serviceInfo['description'] ) ? $serviceInfo['description'] : null,
'image' => isset( $serviceInfo['image'] ) ? $serviceInfo['image'] : null,
'hover' => isset( $serviceInfo['hover'] ) ? $serviceInfo['hover'] : null
);
}
$options[] = array(
'type' => 'dropdown',
'name' => 'subscription_service',
'way' => 'ddslick',
'width' => 450,
'data' => $listItems,
'default' => 'none',
'title' => __('Mailing Service', 'bizpanda')
);
$options = apply_filters( 'opanda_subscription_services_options', $options, $this );
$options[] = array(
'type' => 'separator'
);
$options[] = array( 'type' => 'html', 'html' => array($this, 'showConfirmationMessageHeader') );
$options[] = array(
'type' => 'textbox',
'name' => 'sender_email',
'title' => __('Sender Email', 'bizpanda'),
'hint' => __('Optional. A sender for confirmation emails.', 'bizpanda'),
'default' => get_bloginfo('admin_email')
);
$options[] = array(
'type' => 'textbox',
'name' => 'sender_name',
'title' => __('Sender Name', 'bizpanda'),
'hint' => __('Optional. A sender name for confirmation emails.', 'bizpanda'),
'default' => get_bloginfo('name')
);
$options[] = array(
'type' => 'separator'
);
return $options;
}
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('If you are going to use Double Opt-In and send confirmation emails through Wordpress, fill the sender information below.', 'emaillocker' ) ?>
</div>
</div>
<?php
}
/**
* Calls before saving the settings.
*
* @since 1.0.0
* @return void
*/
public function onSaving() {
do_action('opanda_on_saving_subscription_settings', $this );
}
public function disconnectAweberAction() {
delete_option('opanda_aweber_consumer_key');
delete_option('opanda_aweber_consumer_secret');
delete_option('opanda_aweber_access_key');
delete_option('opanda_aweber_access_secret');
delete_option('opanda_aweber_auth_code');
delete_option('opanda_aweber_account_id');
return $this->redirectToAction('index', array('opanda_aweber_disconnected' => true));
}
}

View File

@@ -0,0 +1,198 @@
<?php
/**
* A class for the page providing the basic settings.
*
* @author Paul Kashtanoff <paul@byonepress.com>
* @copyright (c) 2013, OnePress Ltd
*
* @package core
* @since 1.0.0
*/
/**
* The page Basic Settings.
*
* @since 1.0.0
*/
class OPanda_TermsSettings extends OPanda_Settings {
public $id = 'terms';
/**
* Sets notices.
*
* @since 1.0.0
* @return void
*/
public function init() {
if ( isset( $_GET['onp_table_cleared'] )) {
$this->success = __('The data has been successfully cleared.', 'bizpanda');
}
}
/**
* Shows the header html of the settings screen.
*
* @since 1.0.0
* @return void
*/
public function header() {
?>
<p><?php _e('Configure here Terms of Use and Privacy Policy for locker on your website. It\'s not mandatory, but improves transparency and conversions.', 'optionpanda') ?></p>
<?php
}
/**
* Returns options for the Basic Settings screen.
*
* @since 1.0.0
* @return void
*/
public function getOptions() {
global $optinpanda;
$options = array();
$pages = get_pages();
$result = array();
foreach( $pages as $page ) {
$result[] = array($page->ID, $page->post_title . ' [ID=' . $page->ID . ']');
}
$defaultTermsOfUse = file_get_contents( OPANDA_BIZPANDA_DIR . '/content/terms-of-use.html' );
$defaultPrivacy = file_get_contents( OPANDA_BIZPANDA_DIR . '/content/privacy-policy.html' );
$options[] = array(
'type' => 'separator'
);
$options[] = array(
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'terms_enabled',
'title' => __('Enable Terms of Use', 'bizpanda'),
'hint' => __('Set On to show the link to Terms of Use of your website below the Sign-In/Email lockers.', 'bizpanda'),
'default' => true
);
$options[] = array(
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'privacy_enabled',
'title' => __('Enable Privacy Policies', 'bizpanda'),
'hint' => __('Set On to show the link to Privacy Policies of your website below the Sign-In/Email lockers.', 'bizpanda'),
'default' => true
);
$options[] = array(
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'terms_use_pages',
'data' => $result,
'title' => __('Use Existing Pages', 'bizpanda'),
'hint' => __('Set On, if your website already contains pages for "Terms of Use" and "Privacy Policies" and you want to use them.', 'bizpanda'),
'default' => false
);
$options[] = array(
'type' => 'separator'
);
$noPagesWrap = array(
'type' => 'div',
'id' => 'opanda-nopages-options',
'items' => array(
array(
'type' => 'div',
'id' => 'no-page-opanda-terms-enabled-options',
'items' => array(
array(
'type' => 'wp-editor',
'name' => 'terms_of_use_text',
'title' => __('Terms of Use', 'bizpanda'),
'hint' => __('The text of Terms of Use. The link to this text will be shown below the lockers.', 'bizpanda'),
'tinymce' => array(
'height' => 250,
'content_css' => OPANDA_BIZPANDA_URL . '/assets/admin/css/tinymce.010000.css'
),
'default' => $defaultTermsOfUse
),
array(
'type' => 'separator'
)
)
),
array(
'type' => 'div',
'id' => 'no-page-opanda-privacy-enabled-options',
'items' => array(
array(
'type' => 'wp-editor',
'name' => 'privacy_policy_text',
'title' => __('Privacy Policy', 'bizpanda'),
'hint' => __('The text of Privacy Policy. The link to this text will be shown below the lockers.', 'bizpanda'),
'tinymce' => array(
'height' => 250,
'content_css' => OPANDA_BIZPANDA_URL . '/assets/admin/css/tinymce.010000.css'
),
'default' => $defaultPrivacy
),
array(
'type' => 'separator'
)
)
)
)
);
$pagesWrap = array(
'type' => 'div',
'id' => 'opanda-pages-options',
'items' => array(
array(
'type' => 'div',
'id' => 'page-opanda-terms-enabled-options',
'items' => array(
array(
'type' => 'dropdown',
'name' => 'terms_of_use_page',
'data' => $result,
'title' => __('Terms of Use', 'bizpanda'),
'hint' => __('Select a page which contains the "Terms of Use" for the lockers or/and your website.', 'bizpanda')
),
array(
'type' => 'separator'
)
)
),
array(
'type' => 'div',
'id' => 'page-opanda-privacy-enabled-options',
'items' => array(
array(
'type' => 'dropdown',
'name' => 'privacy_policy_page',
'data' => $result,
'title' => __('Privacy Policy', 'bizpanda'),
'hint' => __('Select a page which contains the "Privacy Policy" for the lockers or/and your website.', 'bizpanda')
),
array(
'type' => 'separator'
)
)
),
)
);
$options[] = $noPagesWrap;
$options[] = $pagesWrap;
return $options;
}
}

View File

@@ -0,0 +1,463 @@
<?php
/**
* A class for the page providing the basic settings.
*
* @author Paul Kashtanoff <paul@byonepress.com>
* @copyright (c) 2013, OnePress Ltd
*
* @package core
* @since 1.0.0
*/
/**
* The page Basic Settings.
*
* @since 1.0.0
*/
class OPanda_TextSettings extends OPanda_Settings {
public $id = 'text';
/**
* Shows the header html of the settings screen.
*
* @since 1.0.0
* @return void
*/
public function header() {
?>
<p><?php _e('You can change primary front-end text in the settings of a particular locker. Here you can change the remaining text. It will be applied to all your lockers.', 'bizpanda') ?></p>
<?php
}
/**
* Returns options for the Basic Settings screen.
*
* @since 1.0.0
* @return void
*/
public function getOptions() {
global $optinpanda;
$options = array();
$pages = get_pages();
$result = array();
$result[] = array('0', '- none -');
foreach( $pages as $page ) {
$result[] = array($page->ID, $page->post_title . ' [ID=' . $page->ID . ']');
}
$confirmScreenOptions = array(
'type' => 'form-group',
'title' => 'The Screen "Please Confirm Your Email"',
'hint' => __('Appears when the locker asks the user to confirm one\'s email.', 'bizpanda'),
'items' => array(
array(
'type' => 'textbox',
'name' => 'res_confirm_screen_title',
'title' => __('Header', 'bizpanda'),
'default' => __('Please Confirm Your Email', 'bizpanda')
),
array(
'type' => 'textarea',
'name' => 'res_confirm_screen_instructiont',
'title' => __('Instruction', 'bizpanda'),
'hint' => __('Explain here that the user has to do to confirm one\'s email. Use the tag {email} to display an email address of the user.', 'bizpanda'),
'default' => __('We have sent a confirmation email to {email}. Please click on the confirmation link in the email to reveal the content.', 'bizpanda')
),
array(
'type' => 'textbox',
'name' => 'res_confirm_screen_note1',
'title' => __('Note #1', 'bizpanda'),
'hint' => __('Clarify when the content will be unlocked.', 'bizpanda'),
'default' => __('The content will be unlocked automatically within 10 seconds after confirmation.', 'bizpanda')
),
array(
'type' => 'textbox',
'name' => 'res_confirm_screen_note2',
'title' => __('Note #2', 'bizpanda'),
'hint' => __('Clarify that delivering the confirmation email may take some time.', 'bizpanda'),
'default' => __('Note delivering the email may take several minutes.', 'bizpanda')
),
array(
'type' => 'separator'
),
array(
'type' => 'textbox',
'name' => 'res_confirm_screen_cancel',
'title' => __('Cancel Link', 'bizpanda'),
'default' => __('(cancel)', 'bizpanda'),
'cssClass' => 'opanda-width-short'
),
array(
'type' => 'textbox',
'name' => 'res_confirm_screen_open',
'title' => __('Open My Inbox Button', 'bizpanda'),
'default' => __('Open my inbox on {service}', 'bizpanda'),
'hint' => __('Use the tag {service} to display a name of a mailbox of the user.', 'bizpanda'),
'cssClass' => 'opanda-width-short'
)
)
);
$onestepScreenOptions = array(
'type' => 'form-group',
'title' => 'The Screen "One Step To Complete"',
'hint' => __('Appears when a social network does not return an email address and the locker asks the users to enter it manually.', 'bizpanda'),
'items' => array(
array(
'type' => 'textbox',
'name' => 'res_onestep_screen_title',
'title' => __('Header', 'bizpanda'),
'default' => __('One Step To Complete', 'bizpanda')
),
array(
'type' => 'textarea',
'name' => 'res_onestep_screen_instructiont',
'title' => __('Instruction', 'bizpanda'),
'default' => __('Please enter your email below to continue.', 'bizpanda')
),
array(
'type' => 'textbox',
'name' => 'res_onestep_screen_button',
'title' => __('Button', 'bizpanda'),
'default' => __('OK, complete', 'bizpanda')
)
)
);
$preconfirmLikeScreenOptions = array();
if ( BizPanda::hasPlugin('sociallocker') ) {
$preconfirmLikeScreenOptions = array(
'type' => 'form-group',
'title' => __( 'The Screen "Confirm Your Like"', 'bizpanda' ),
'hint' => __('Appears when a user clicks on the Facebook Like button.', 'bizpanda'),
'items' => array(
array(
'type' => 'textbox',
'name' => 'res_confirm_like_screen_header',
'title' => __('Header', 'bizpanda'),
'default' => __('One More Step', 'bizpanda'),
'cssClass' => 'opanda-width-short',
),
array(
'type' => 'textbox',
'name' => 'res_confirm_like_screen_message',
'title' => __('Message', 'bizpanda'),
'default' => __('Click the button below to like and unlock.', 'bizpanda'),
'cssClass' => 'opanda-width-short'
),
array(
'type' => 'textbox',
'name' => 'res_confirm_like_screen_button',
'title' => __('Button', 'bizpanda'),
'default' => __('Confirm Like', 'bizpanda'),
'cssClass' => 'opanda-width-short'
)
)
);
}
$signinOptions = array();
if ( BizPanda::hasFeature('signin-locker')) {
$signinOptions = array(
'type' => 'form-group',
'title' => __( 'Sign-In Buttons', 'bizpanda' ),
'hint' => __('The text which are located on the Sign-In Buttons.', 'bizpanda'),
'items' => array(
array(
'type' => 'textbox',
'name' => 'res_signin_long',
'title' => __('Long Text', 'bizpanda'),
'hint' => __('Displayed on a wide Sign-In Button', 'bizpanda'),
'default' => __('Sign in via {name}', 'bizpanda'),
'cssClass' => 'opanda-width-short',
),
array(
'type' => 'textbox',
'name' => 'res_signin_short',
'title' => __('Short Text', 'bizpanda'),
'hint' => __('Displayed on a narrow Sign-In Button', 'bizpanda'),
'default' => __('via {name}', 'bizpanda'),
'cssClass' => 'opanda-width-short'
),
array(
'type' => 'separator'
),
array(
'type' => 'textbox',
'name' => 'res_signin_facebook_name',
'title' => __('Facebook', 'bizpanda'),
'default' => __('Facebook', 'bizpanda'),
'cssClass' => 'opanda-width-short'
),
array(
'type' => 'textbox',
'name' => 'res_signin_twitter_name',
'title' => __('Twitter', 'bizpanda'),
'default' => __('Twitter', 'bizpanda'),
'cssClass' => 'opanda-width-short'
),
array(
'type' => 'textbox',
'name' => 'res_signin_google_name',
'title' => __('Google', 'bizpanda'),
'default' => __('Google', 'bizpanda'),
'cssClass' => 'opanda-width-short'
),
array(
'type' => 'textbox',
'name' => 'res_signin_linkedin_name',
'title' => __('LinkedIn', 'bizpanda'),
'default' => __('LinkedIn', 'bizpanda'),
'cssClass' => 'opanda-width-short'
),
array(
'type' => 'separator'
),
array(
'type' => 'textbox',
'name' => 'res_signin_email_form_text',
'title' => __('Email Form Header', 'bizpanda'),
'default' => __('Cannot sign in via social networks? Enter your email manually.', 'bizpanda')
),
array(
'type' => 'textbox',
'name' => 'res_signin_email_button',
'title' => __('Email Button Text', 'bizpanda'),
'default' => __('sign in to unlock', 'bizpanda')
),
array(
'type' => 'textbox',
'name' => 'res_signin_after_email_button',
'title' => __('After Email Button Text', 'bizpanda'),
'default' => __('Your email address is 100% safe from spam!', 'bizpanda')
),
)
);
}
$miscOptions = array(
'type' => 'form-group',
'title' => 'Miscellaneous',
'hint' => __('Various text used usually with all lockers and screens.', 'bizpanda'),
'items' => array(
array(
'type' => 'textbox',
'name' => 'res_misc_data_processing',
'title' => __('Processing Data', 'bizpanda'),
'default' => __('Processing data, please wait...', 'bizpanda')
),
array(
'type' => 'textbox',
'name' => 'res_misc_or_enter_email',
'title' => __('Enter Your Email Manually', 'bizpanda'),
'default' => __('or enter your email manually to sign in', 'bizpanda')
),
array(
'type' => 'separator'
),
'res_misc_enter_your_name' => array(
'type' => 'textbox',
'name' => 'res_misc_enter_your_name',
'title' => __('Enter Your Name', 'bizpanda'),
'default' => __('enter your name', 'bizpanda')
),
array(
'type' => 'textbox',
'name' => 'res_misc_enter_your_email',
'title' => __('Enter Your Email Address', 'bizpanda'),
'default' => __('enter your email address', 'bizpanda')
),
array(
'type' => 'separator'
),
array(
'type' => 'textbox',
'name' => 'res_misc_your_agree_with',
'title' => __('You Agree With', 'bizpanda'),
'hint' => __('Use the tag {links} to display the links to the Terms Of Use and Privacy Policy or tags {terms} and {privacy) to display links apart.', 'bizpanda'),
'default' => __('By clicking on the button(s), you agree with {links}', 'bizpanda')
),
array(
'type' => 'textbox',
'name' => 'res_misc_agreement_checkbox',
'title' => __('I Consent To Processing', 'bizpanda'),
'default' => __('I consent to processing of my data according to {links}', 'bizpanda'),
'hint' => __('Use the tag {links} to display the links to the Terms Of Use and Privacy Policy or tags {terms} and {privacy) to display links apart.', 'bizpanda')
),
array(
'type' => 'textbox',
'name' => 'res_misc_agreement_checkbox_alt',
'title' => __('I Agree With', 'bizpanda'),
'default' => __('I agree with {links}', 'bizpanda'),
'hint' => __('Use the tag {links} to display the links to the Terms Of Use and Privacy Policy or tags {terms} and {privacy) to display links apart.', 'bizpanda')
),
array(
'type' => 'separator'
),
array(
'type' => 'textbox',
'name' => 'res_misc_terms_of_use',
'title' => __('Terms Of Use', 'bizpanda'),
'default' => __('Terms of Use', 'bizpanda'),
'cssClass' => 'opanda-width-short'
),
array(
'type' => 'textbox',
'name' => 'res_misc_privacy_policy',
'title' => __('Privacy Policy', 'bizpanda'),
'default' => __('Privacy Policy', 'bizpanda'),
'cssClass' => 'opanda-width-short'
),
array(
'type' => 'separator'
),
array(
'type' => 'textbox',
'name' => 'res_misc_or_wait',
'title' => __('Or Wait', 'bizpanda'),
'default' => __('or wait {timer}s', 'bizpanda'),
'hint' => __('Use the tag {timer} to display the number of seconds remaining to unlocking.'),
'cssClass' => 'opanda-width-short'
),
array(
'type' => 'textbox',
'name' => 'res_misc_close',
'title' => __('Close', 'bizpanda'),
'default' => __('close', 'bizpanda'),
'cssClass' => 'opanda-width-short'
),
array(
'type' => 'textbox',
'name' => 'res_misc_or',
'title' => __('Or', 'bizpanda'),
'default' => __('OR', 'bizpanda'),
'cssClass' => 'opanda-width-short'
),
)
);
if ( !BizPanda::hasPlugin('optinpanda') ) {
unset( $miscOptions['items']['res_misc_enter_your_name'] );
}
$errosOptions = array(
'type' => 'form-group',
'title' => __('Errors & Notices', 'bizpanda'),
'hint' => __('The text which users see when something goes wrong.', 'bizpanda'),
'items' => array(
array(
'type' => 'textbox',
'name' => 'res_errors_no_consent',
'title' => __('No Consent', 'bizpanda'),
'default' => __('Please give us your consent in order to continue.', 'bizpanda')
),
array(
'type' => 'separator'
),
array(
'type' => 'textbox',
'name' => 'res_errors_empty_field',
'title' => __('Empty Field', 'bizpanda'),
'default' => __('Please fill this field.', 'bizpanda')
),
array(
'type' => 'textbox',
'name' => 'res_errors_empty_email',
'title' => __('Empty Email', 'bizpanda'),
'default' => __('Please enter your email address.', 'bizpanda')
),
'res_errors_temporary_email' => array(
'type' => 'textbox',
'name' => 'res_errors_temporary_email',
'title' => __('Temporary Email', 'bizpanda'),
'default' => __('Sorry, temporary email addresses cannot be used to unlock content.', 'bizpanda')
),
array(
'type' => 'textbox',
'name' => 'res_errors_inorrect_email',
'title' => __('Incorrect Email', 'bizpanda'),
'default' => __('It seems you entered an incorrect email address. Please check it.', 'bizpanda')
),
array(
'type' => 'textbox',
'name' => 'res_errors_empty_name',
'title' => __('Empty Name', 'bizpanda'),
'default' => __('Please enter your name.', 'bizpanda')
),
array(
'type' => 'textbox',
'name' => 'res_errors_empty_checkbox',
'title' => __('Empty Checkbox', 'bizpanda'),
'default' => __('Please mark this checkbox to continue.', 'bizpanda')
),
array(
'type' => 'separator'
),
'res_errors_subscription_canceled' => array(
'type' => 'textbox',
'name' => 'res_errors_subscription_canceled',
'title' => __('Subscription Canceled', 'bizpanda'),
'default' => __('You have canceled your subscription.', 'bizpanda')
),
'res_errors_not_signed_in' => array(
'type' => 'textbox',
'name' => 'res_errors_not_signed_in',
'title' => __('Not Signed In', 'bizpanda'),
'default' => __('Sorry, but you have not signed in. Please try again.', 'bizpanda')
),
'res_errors_not_granted' => array(
'type' => 'textbox',
'name' => 'res_errors_not_granted',
'title' => __('Not Granted Permissions', 'bizpanda'),
'hint' => __('Use the tag {permissions} to show required permissions.'),
'default' => __('Sorry, but you have not granted all the required permissions ({permissions}). Please try again.', 'bizpanda')
)
)
);
if ( !BizPanda::hasFeature('signin-locker')) {
unset( $errosOptions['items']['res_errors_not_signed_in'] );
unset( $errosOptions['items']['res_errors_not_granted'] );
}
if ( !BizPanda::hasPlugin('optinpanda') ) {
unset( $errosOptions['items']['res_errors_subscription_canceled'] );
unset( $errosOptions['items']['res_errors_subscription_canceled'] );
}
$options = array();
if ( !empty( $preconfirmLikeScreenOptions ) ) $options[] = $preconfirmLikeScreenOptions;
if ( BizPanda::hasPlugin('optinpanda') ) {
$options[] = $confirmScreenOptions;
if ( !empty( $signinOptions ) ) $options[] = $signinOptions;
$options[] = $miscOptions;
} else {
if ( !empty( $signinOptions ) ) $options[] = $signinOptions;
$options[] = $miscOptions;
}
$options[] = $onestepScreenOptions;
$options[] = $errosOptions;
$options[] = array(
'type' => 'separator'
);
return $options;
}
}

View File

@@ -0,0 +1,110 @@
<?php
/**
* A class for the page providing the basic settings.
*
* @author Alex Kovalev <alex.kovalevv@gmail.com>
* @copyright (c) 2016, OnePress Ltd
*
* @package core
* @since 1.0.0
*/
/**
* The page Basic Settings.
*
* @since 1.0.0
*/
class OPanda_ZapierSettings extends OPanda_Settings {
public $id = 'zapier';
public function __construct($page) {
parent::__construct($page);
}
/**
* Shows the header html of the settings screen.
*
* @since 1.0.0
* @return void
*/
public function header() {
global $optinpanda;
?>
<p>
<?php printf( __('Allows to set up integration with Zapier via <a href="%s" target="_blank">Webhooks</a>.', 'bizpanda'), 'https://zapier.com/apps/webhook/integrations' )?>
</p>
<?php
}
/**
* Returns options for the Basic Settings screen.
*
* @since 1.0.0
* @return void
*/
public function getOptions() {
$options = array();
$wpEditorData = array();
$defaultLeadsEmail = file_get_contents( OPANDA_BIZPANDA_DIR . '/content/leads-notification.html' );
$defaultUnlocksEmail = file_get_contents( OPANDA_BIZPANDA_DIR . '/content/unlocks-notification.html' );
$options[] = array(
'type' => 'separator'
);
$options[] = array(
'type' => 'url',
'name' => 'zapier_hook_new_leads',
'title' => __( 'Hook For Leads', 'bizpanda' ),
'after' => sprintf( __( '<a href="%s" class="btn btn-default">How To Get</a>', 'bizpanda' ), admin_url('admin.php?page=how-to-use-' . $this->plugin->pluginName . '&onp_sl_page=zapier') ),
'default' => "",
'hint' => sprintf( __( 'Fires when a lead gained. <a href="%s" target="_blank">Click here</a> to know how to get a webhook URL.', 'bizpanda' ), admin_url('admin.php?page=how-to-use-' . $this->plugin->pluginName . '&onp_sl_page=zapier') )
);
$options[] = array(
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'zapier_only_new',
'title' => __( 'Only New Leads', 'bizpanda' ),
'default' => false,
'hint' => __( 'If On, sends data to Zapier only if a lead is new (not listed on the page Leads).', 'bizpanda' )
);
$options[] = array(
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'zapier_only_confirmed',
'title' => __( 'Only Confirmed Leads', 'bizpanda' ),
'default' => false,
'hint' => __( 'If On, sends data to Zapier only for those leads who confirmed their subscription (or all leads if the Single Opt-In is set).', 'bizpanda' )
);
$options[] = array(
'type' => 'separator'
);
$options[] = array(
'type' => 'url',
'way' => 'buttons',
'name' => 'zipier_hook_new_unlocks',
'title' => __( 'Hook For New Unlocks', 'bizpanda' ),
'after' => sprintf( __( '<a href="%s" class="btn btn-default">How To Get</a>', 'bizpanda' ), admin_url('admin.php?page=how-to-use-' . $this->plugin->pluginName . '&onp_sl_page=zapier') ),
'default' => "",
'hint' => sprintf( __( 'Fires when a new unlock occurs. <a href="%s" target="_blank">Click here</a> to know how to get a webhook URL.', 'bizpanda' ), admin_url('admin.php?page=how-to-use-' . $this->plugin->pluginName . '&onp_sl_page=zapier') )
);
$options[] = array(
'type' => 'separator'
);
return $options;
}
public function onSaving() {
}
}