function bizpanda_compability_note()
 {
     $count = 0;
     if (method_exists('BizPanda', 'getInstalledPlugins')) {
         $plugins = BizPanda::getInstalledPlugins();
         $count = count($plugins);
         $titles = array();
         foreach ($plugins as $plugin) {
             $titles[] = $plugin['plugin']->options['title'];
         }
         $titles = implode(',', $titles);
     } else {
         $count = 1;
         if (BizPanda::hasPlugin('optinpanda')) {
             $titles = 'Opt-In Panda';
         } else {
             $titles = 'Social Locker';
         }
     }
     global $bizpanda_issue_plugin;
     echo '<div id="message" class="error" style="padding: 10px;">';
     if ($count > 1) {
         printf(__('Unable to activate <strong>%s</strong>. Please make sure that the following plugins are updated to the latest versions: <strong>%s</strong>. Deactivate %s and try to update the specified plugins.'), $bizpanda_issue_plugin, $titles, $bizpanda_issue_plugin);
     } else {
         printf(__('Unable to activate <strong>%s</strong>. Please make sure that the following plugin is updated to the latest version: <strong>%s</strong>. Deactivate %s and try to update the specified plugin.'), $bizpanda_issue_plugin, $titles, $bizpanda_issue_plugin);
     }
     echo '</div>';
 }
Ejemplo n.º 2
0
 /**
  * Type configurator.
  */
 public function configure()
 {
     global $bizpanda;
     /**
      * Labels
      */
     $pluralName = $this->pluralTitle;
     $singularName = $this->singularTitle;
     $labels = array('singular_name' => $this->singularTitle, 'name' => $this->pluralTitle, 'all_items' => sprintf(__('All Lockers', 'bizpanda'), $pluralName), 'add_new' => sprintf(__('+ New Locker', 'bizpanda'), $singularName), 'add_new_item' => sprintf(__('Add new', 'bizpanda'), $singularName), 'edit' => sprintf(__('Edit', 'bizpanda')), 'edit_item' => sprintf(__('Edit Item', 'bizpanda'), $singularName), 'new_item' => sprintf(__('New Item', 'bizpanda'), $singularName), 'view' => sprintf(__('View', 'factory')), 'view_item' => sprintf(__('View Item', 'bizpanda'), $singularName), 'search_items' => sprintf(__('Search Items', 'bizpanda'), $pluralName), 'not_found' => sprintf(__('No Items found', 'bizpanda'), $pluralName), 'not_found_in_trash' => sprintf(__('No Items found in trash', 'bizpanda'), $pluralName), 'parent' => sprintf(__('Parent Item', 'bizpanda'), $pluralName));
     $this->options['labels'] = apply_filters('opanda_items_lables', $labels);
     /**
      * Menu
      */
     $this->menu->title = BizPanda::getMenuTitle();
     $this->menu->icon = BizPanda::getMenuIcon();
     /**
      * View table
      */
     $this->viewTable = 'OPanda_ItemsViewTable';
     /**
      * Scripts & styles
      */
     $this->scripts->request(array('jquery', 'jquery-effects-highlight', 'jquery-effects-slide'));
     $this->scripts->request(array('bootstrap.transition', 'bootstrap.datepicker', 'bootstrap.tab', 'holder.more-link', 'control.checkbox', 'control.dropdown', 'control.list', 'bootstrap.modal'), 'bootstrap');
     $this->styles->request(array('bootstrap.core', 'bootstrap.datepicker', 'bootstrap.form-group', 'bootstrap.form-metabox', 'bootstrap.tab', 'bootstrap.wp-editor', 'bootstrap.separator', 'control.checkbox', 'control.dropdown', 'control.list', 'holder.more-link'), 'bootstrap');
     $this->scripts->add(OPANDA_BIZPANDA_URL . '/assets/admin/js/filters.010000.js');
     $this->scripts->add(OPANDA_BIZPANDA_URL . '/assets/admin/js/libs/json2.js');
     $this->scripts->add(OPANDA_BIZPANDA_URL . '/assets/admin/js/preview.010000.js');
     $this->scripts->add(OPANDA_BIZPANDA_URL . '/assets/admin/js/item-edit.010008.js')->request('jquery-ui-sortable');
     $this->styles->add(OPANDA_BIZPANDA_URL . '/assets/admin/css/item-edit.010008.css');
     $this->styles->add(OPANDA_BIZPANDA_URL . '/assets/admin/css/item-edit.010000-en_US.css');
     $this->scripts->add(OPANDA_BIZPANDA_URL . '/assets/admin/js/libs/jquery.qtip.min.js');
     $this->styles->add(OPANDA_BIZPANDA_URL . '/assets/admin/css/libs/jquery.qtip.min.css');
     do_action('opanda_panda-item_edit_assets', $this->scripts, $this->styles);
 }
Ejemplo n.º 3
0
 public function fixMenuTitle()
 {
     if (BizPanda::isSinglePlugin()) {
         return __('Go Premium', 'optinpanda');
     }
     return __('<span class="factory-fontawesome-320"><i class="fa fa-star-o" style="margin-right: 5px;"></i>Social Locker</span>', 'optinpanda');
 }
Ejemplo n.º 4
0
 public static function registerPlugin($plugin, $name = null, $type = null)
 {
     $pluginName = empty($name) ? $plugin->pluginName : $name;
     $pluginType = empty($type) ? $plugin->options['build'] !== 'free' ? 'premium' : 'free' : $type;
     if (!isset(self::$_plugins[$pluginName])) {
         self::$_plugins[$pluginName] = array();
     }
     self::$_plugins[$pluginName][$pluginType] = $plugin;
     self::$_installedPlugins[] = array('name' => $pluginName, 'type' => $type, 'plugin' => $plugin);
     self::$_hasPremiumPlugins = self::$_hasPremiumPlugins || 'premium' === $pluginType;
 }
Ejemplo n.º 5
0
 /**
  * Returns an array of the pages of the section 'How to use?'.
  * 
  * @since 1.0.0
  * @return mixed[]
  */
 protected function getPages()
 {
     if ($this->_pages !== false) {
         return $this->_pages;
     }
     $items = array(array('name' => 'social-apps', 'title' => __('Creating Social Apps', 'bizpanda'), 'hollow' => true, 'items' => array(array('name' => 'facebook-app', 'title' => __('Creating Facebook App', 'bizpanda')), array('name' => 'twitter-app', 'title' => __('Creating Twitter App', 'bizpanda')), array('name' => 'google-client-id', 'title' => __('Getting Google Client ID', 'bizpanda')))), array('name' => 'troubleshooting', 'title' => __('Troubleshooting', 'bizpanda')));
     if (BizPanda::hasFeature('linkedin')) {
         $items[0]['items'][] = array('name' => 'linkedin-api-key', 'title' => __('Getting LinkedIn API Key', 'bizpanda'));
     }
     $this->_pages = apply_filters('opanda_help_pages', $items);
     return $this->_pages;
 }
Ejemplo n.º 6
0
 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['account-registered'] = array('title' => __('Accounts', 'signinlocker'), 'color' => '#336699');
     if (BizPanda::hasPlugin('sociallocker')) {
         $fields['got-twitter-follower'] = array('title' => __('Twitter Tweets', 'signinlocker'), 'color' => '#3bb4ea');
         $fields['tweet-posted'] = 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;
 }
 /**
  * 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'))));
     $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')));
     }
     $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.', 'bizpanda'), 'default' => __('By clicking on the button(s), you agree with {links}', 'bizpanda')), 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_empty_email', 'title' => __('Empty Email', 'bizpanda'), 'default' => __('Please enter your email address.', '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' => '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']);
     }
     $options = array();
     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;
 }
 public function configure()
 {
     /**
      * Columns
      */
     $this->columns->clear();
     $this->columns->add('stats', __('<span title="Unlocks / Impressions / Conversion">U / I / %', 'bizpanda'));
     $this->columns->add('title', __('Locker Title', 'bizpanda'));
     if (!BizPanda::isSinglePlugin()) {
         $this->columns->add('type', __('Type', 'bizpanda'));
     }
     $this->columns->add('shortcode', __('Shortcode', 'bizpanda'));
     $this->columns->add('bulk', __('Bulk Lock', 'bizpanda'));
     $this->columns->add('theme', __('Theme', 'bizpanda'));
     $this->columns->add('created', __('Created', 'bizpanda'));
     /**
      * Scripts & styles
      */
     $this->scripts->add(OPANDA_BIZPANDA_URL . '/assets/admin/js/item-view.010000.js');
     $this->styles->add(OPANDA_BIZPANDA_URL . '/assets//admin/css/item-view.010000.css');
 }
Ejemplo n.º 9
0
 /**
  * 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' => 'dropdown', 'name' => 'lang', 'title' => __('Language of Buttons', 'bizpanda'), 'data' => $languages, 'hint' => __('Select the language that will be used for the social buttons in Social Lockers.', 'bizpanda'));
     $options[] = array('type' => 'separator');
     $options[] = array('type' => 'textbox', 'name' => 'facebook_appid', 'title' => __('Facebook App ID', 'bizpanda'), 'hint' => sprintf(__('By default, the developer app id is set. If you want to use the Facebook Share or Facebook Sign-In buttons you need to <a href="%s">register another app</a> id for your website.', '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">Register App</a>', 'bizpanda'), admin_url('admin.php?page=how-to-use-' . $this->plugin->pluginName . '&onp_sl_page=facebook-app')));
     $options[] = array('type' => 'dropdown', 'way' => 'buttons', 'name' => 'facebook_version', 'title' => __('Facebook API Version', 'bizpanda'), 'default' => 'v2.4', 'data' => array(array('v1.0', 'v1.0'), array('v2.0', 'v2.0'), array('v2.3', 'v2.3'), array('v2.4', 'v2.4')), 'hint' => __('Optional. Use the most recent version of the API (v2.4) but if Facebook buttons or widgets don\'t work on your website try to switch to other versions.', 'bizpanda'));
     $options[] = array('type' => 'separator');
     $options[] = array('type' => 'dropdown', 'name' => 'twitter_use_dev_keys', 'title' => __('Twitter API Keys', 'bizpanda'), 'data' => array(array('default', __('Use the default keys', 'bizpanda')), array('custom', __('Use my own Twitter App', 'bizpanda'))), 'after' => sprintf(__('<a href="%s" class="btn btn-default">Register App</a>', 'bizpanda'), admin_url('admin.php?page=how-to-use-' . $this->plugin->pluginName . '&onp_sl_page=twitter-app')), 'hint' => sprintf(__('The Twitter Sign-In button requires a Twitter App. We prepared one for you by default. But if you worry about security, you can <a href="%s">create an own app</a>. Also by creating your own Twitter app you will be able to change the title, description and image for the "Sign In" popup window.', 'bizpanda'), admin_url('admin.php?page=how-to-use-' . $this->plugin->pluginName . '&onp_sl_page=twitter-app')));
     $options[] = array('type' => 'div', 'id' => 'opanda-twitter-custom-options', 'class' => 'opanda-hidden', 'items' => array(array('type' => 'textbox', 'name' => 'twitter_consumer_key', 'title' => __('Twitter Consumer Key', 'bizpanda'), 'hint' => __('The Twitter Consumer Key of your Twitter App.', 'bizpanda'), 'for' => array(__('Connect Locker', 'bizpanda'))), array('type' => 'textbox', 'name' => 'twitter_consumer_secret', 'title' => __('Twitter Consumer 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' => 'google_client_id', 'title' => __('Google Client ID', 'bizpanda'), 'after' => sprintf(__('<a href="%s" class="btn btn-default">Get Client ID</a>', 'bizpanda'), admin_url('admin.php?page=how-to-use-' . $this->plugin->pluginName . '&onp_sl_page=google-client-id')), 'hint' => sprintf(__('If you want to use the YouTube Subscribe or Google Sign-In buttons, please <a href="%s">create a Client ID</a> for your website.', 'bizpanda'), admin_url('admin.php?page=how-to-use-' . $this->plugin->pluginName . '&onp_sl_page=google-client-id')));
     if (BizPanda::hasFeature('linkedin')) {
         $options[] = array('type' => 'separator');
         $options[] = array('type' => 'textbox', 'name' => 'linkedin_api_key', 'title' => __('LinkedIn Client ID', 'bizpanda'), 'after' => sprintf(__('<a href="%s" class="btn btn-default">Get Client ID</a>', 'bizpanda'), admin_url('admin.php?page=how-to-use-' . $this->plugin->pluginName . '&onp_sl_page=linkedin-api-key')), 'hint' => sprintf(__('If you want to use the LinkedIn Sign-In button, please <a href="%s">get a Client ID</a> for your website.', 'bizpanda'), admin_url('admin.php?page=how-to-use-' . $this->plugin->pluginName . '&onp_sl_page=linkedin-api-key')));
     }
     $options[] = array('type' => 'separator');
     return $options;
 }
/**
 * Fires when the BizPanda connected.
 */
function onp_sl_init_bizpanda($activationHook = false)
{
    /**
     * Displays a note about that it's requited to update other plugins.
     */
    if (!$activationHook && !bizpanda_validate(SOCIALLOCKER_BIZPANDA_VERSION, 'Social Locker')) {
        return;
    }
    // enabling features the plugin requires
    BizPanda::enableFeature('lockers');
    BizPanda::enableFeature('terms');
    BizPanda::enableFeature('social');
    // creating the plugin object
    global $sociallocker;
    $sociallocker = new Factory325_Plugin(__FILE__, array('name' => 'sociallocker-next', 'title' => 'Social Locker', 'version' => '4.2.5', 'assembly' => 'free', 'lang' => 'en_US', 'api' => 'http://api.byonepress.com/1.1/', 'premium' => 'http://api.byonepress.com/public/1.0/get/?product=sociallocker-next', 'styleroller' => 'http://sociallocker.org/styleroller', 'account' => 'http://accounts.byonepress.com/', 'updates' => SOCIALLOCKER_DIR . '/plugin/updates/', 'tracker' => '0ec2f14c9e007ba464c230b3ddd98384', 'childPlugins' => array('bizpanda')));
    BizPanda::registerPlugin($sociallocker, 'sociallocker', 'free');
    // requires factory modules
    $sociallocker->load(array(array('bizpanda/libs/factory/bootstrap', 'factory_bootstrap_329', 'admin'), array('bizpanda/libs/factory/notices', 'factory_notices_323', 'admin'), array('bizpanda/libs/onepress/api', 'onp_api_320'), array('bizpanda/libs/onepress/licensing', 'onp_licensing_325'), array('bizpanda/libs/onepress/updates', 'onp_updates_324')));
    require SOCIALLOCKER_DIR . '/panda-items/signin-locker/boot.php';
    require SOCIALLOCKER_DIR . '/panda-items/social-locker/boot.php';
    require SOCIALLOCKER_DIR . '/plugin/boot.php';
}
Ejemplo n.º 11
0
 /**
  * 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);
     $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);
     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);
     }
     $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 (when this option disabled) 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' => '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'));
     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. In future versions of the plugin, we will make this option active by default.', 'bizpanda'));
         $forms[] = array('type' => 'textbox', 'name' => 'timeout', 'title' => __('Timeout of waiting<br />loading the locker (in ms)', 'bizpanda'), 'default' => '20000', 'hint' => __('The use can have browser extensions which block loading scripts from social networks. If the social buttons have not been loaded within the specified timeout, 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;
 }
Ejemplo n.º 12
0
/**
 * 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));
}
Ejemplo n.º 13
0
/**
 * Makes internal page "License Manager" for the Social Locker
 * 
 * @since 1.0.0
 * @return bool true
 */
function sociallocker_make_internal_license_manager($internal)
{
    global $sociallocker;
    if (in_array($sociallocker->license->type, array('free'))) {
        return $internal;
    }
    if (BizPanda::isSinglePlugin()) {
        return $internal;
    }
    return true;
}
Ejemplo n.º 14
0
 /**
  * Adds the action 'lead' action of the user selected 
  * the action 'save email' but 'subscribe' and 'create account' are not selected.
  */
 function opanda_signin_locker_get_actions($id, $optionName)
 {
     $actions = explode(',', opanda_get_item_option($id, $optionName));
     if (empty($actions) || empty($actions[0])) {
         $actions = array();
     }
     if (!BizPanda::hasPlugin('optinpanda')) {
         $temp = $actions;
         $actions = array();
         foreach ($temp as $actionName) {
             if ('subscribe' === $actionName) {
                 continue;
             }
             $actions[] = $actionName;
         }
     }
     $catchLeads = opanda_get_item_option($id, 'catch_leads', false);
     if (!$catchLeads) {
         return $actions;
     }
     if (in_array('signup', $actions)) {
         return $actions;
     }
     if (in_array('subscribe', $actions)) {
         return $actions;
     }
     $actions[] = 'lead';
     return $actions;
 }
Ejemplo n.º 15
0
     $options['icon'] = 'opanda-bizpanda-vc-icon';
     $options['name'] = __('Email Locker', 'bizpanda');
     $options['base'] = 'emaillocker';
     $options['description'] = __('Adds one of existing Email Lockers.', 'bizpanda');
     $lockers = get_transient('opanda_vc_email_lockers');
     if (false === $lockers) {
         $lockers = opanda_get_lockers('email-locker', 'vc');
         set_transient('opanda_vc_email_lockers', $lockers, 60 * 60 * 24);
     }
     $options['params'][0]['value'] = $lockers;
     vc_map($options);
 }
 if (BizPanda::isSinglePlugin() && BizPanda::hasPlugin('sociallocker')) {
     $options['category'] = __('Social Locker', 'bizpanda');
     $options['icon'] = 'opanda-social-locker-vc-icon';
 } elseif (BizPanda::isSinglePlugin() && BizPanda::hasPlugin('optinpanda')) {
     $options['category'] = __('Opt-In Panda', 'bizpanda');
     $options['icon'] = 'opanda-bizpanda-vc-icon';
 } else {
     $options['category'] = __('BizPanda', 'bizpanda');
     $options['icon'] = 'opanda-bizpanda-vc-icon';
 }
 $options['name'] = __('Sign-In Locker', 'bizpanda');
 $options['base'] = 'signinlocker';
 $options['description'] = __('Adds one of existing Sign-In Lockers.', 'bizpanda');
 $lockers = get_transient('opanda_vc_signin_lockers');
 if (false === $lockers) {
     $lockers = opanda_get_lockers('signin-locker', 'vc');
     set_transient('opanda_vc_signin_lockers', $lockers, 60 * 60 * 24);
 }
 $options['params'][0]['value'] = $lockers;
Ejemplo n.º 16
0
    public function leadDetailsAction()
    {
        $leadId = isset($_REQUEST['leadID']) ? intval($_REQUEST['leadID']) : 0;
        $lead = OPanda_Leads::get($leadId);
        $customFields = OPanda_Leads::getCustomFields($leadId);
        $email = $lead->lead_email;
        $name = $lead->lead_name;
        $family = $lead->lead_family;
        if (!empty($name) || !empty($family)) {
            $displayName = $name . ' ' . $family;
        } else {
            $displayName = !empty($lead->lead_display_name) ? $lead->lead_display_name : $lead->lead_email;
        }
        $emailConfirmed = empty($lead->lead_email_confirmed) ? 0 : 1;
        $subscriptionConfirmed = empty($lead->lead_subscription_confirmed) ? 0 : 1;
        if (isset($_POST['submit'])) {
            $data = array();
            $email = $_POST['email'];
            if (!filter_var($email, FILTER_VALIDATE_EMAIL) || !preg_match('/@.+\\./', $email)) {
                $error = __('Please enter a valid email.', 'bizpanda');
            } else {
                $name = $_POST['name'];
                $family = $_POST['family'];
                if (!empty($name) || !empty($family)) {
                    $displayName = $name . ' ' . $family;
                } else {
                    $displayName = !empty($lead->lead_display_name) ? $lead->lead_display_name : $lead->lead_email;
                }
                $data['email'] = $email;
                $data['displayName'] = $displayName;
                $data['name'] = $name;
                $data['family'] = $family;
                $emailConfirmed = empty($_POST['email_confirmed']) ? 0 : 1;
                $subscriptionConfirmed = empty($_POST['subscription_confirmed']) ? 0 : 1;
                $customValues = isset($_POST['opanda_values']) ? $_POST['opanda_values'] : array();
                $customNames = isset($_POST['opanda_names']) ? $_POST['opanda_names'] : array();
                $index = 0;
                foreach ($customNames as $customName) {
                    $data['{' . $customName . '}'] = $customValues[$index];
                    $customFields[$customName] = $customValues[$index];
                    $index++;
                }
                OPanda_Leads::save($lead, $data, array(), $emailConfirmed, $subscriptionConfirmed);
                $url = admin_url('/edit.php?post_type=opanda-item&page=leads-bizpanda&action=leadDetails&leadID=' . $lead->ID . '&opanda_success=1');
                wp_redirect($url);
                exit;
            }
        }
        $avatar = OPanda_Leads::getAvatar($leadId, $lead->lead_email, 150);
        $postUrl = admin_url('/edit.php?post_type=opanda-item&page=leads-bizpanda&action=leadDetails&leadID=' . $lead->ID);
        $cancelUrl = admin_url('/edit.php?post_type=opanda-item&page=leads-bizpanda');
        ?>

        <div class="wrap factory-fontawesome-320" id="opanda-lead-details-page">
            
        <h2>Edit <strong><?php 
        echo $displayName;
        ?>
</strong></h2>
        
        <?php 
        if (isset($_GET['opanda_success'])) {
            ?>
        <div class="factory-bootstrap-329">
            <div class="alert alert-success"><?php 
            _e('<strong>Well done!</strong> The lead data updated successfully.', 'bizpanda');
            ?>
</div>
        </div>
        <?php 
        }
        ?>
        
        <?php 
        if (!empty($error)) {
            ?>
        <div class="factory-bootstrap-329">
            <div class="alert alert-danger"><?php 
            echo $error;
            ?>
</div>
        </div>
        <?php 
        }
        ?>
        
        <form method="POST" action="<?php 
        echo $postUrl;
        ?>
">
            <input type="hidden" name="leadID" value="<?php 
        echo $leadId;
        ?>
" />
            <input type="hidden" name="submit" value="1" />
            
        <table class="form-table">
            <tr>
                <td scope="row" class="avatar-wrap">
                    <div class="opanda-avatar"><?php 
        echo $avatar;
        ?>
</div>
                </td>
                
                <td class="user-info">
                    
                    <h3 class="detail">
                        <ul class="click-to-edit">
                            <li><?php 
        echo $email;
        ?>
</li>
                            <li><input id="opanda_email" class="" type="text" name="email" value="<?php 
        echo $email;
        ?>
" placeholder="<?php 
        _e('Email', 'bizpanda');
        ?>
"></li>
                        </ul>
                    </h3>
                    
                    <div class="detail">
                        <label for="opanda_name"><?php 
        _e('Name:', 'bizpanda');
        ?>
</label>
                        <ul class="click-to-edit">
                            <li><?php 
        echo $name;
        ?>
 <?php 
        echo $family;
        ?>
</li>
                            <li>
                                <input id="opanda_name" type="text" name="name" value="<?php 
        echo $name;
        ?>
" placeholder="<?php 
        _e('First Name', 'bizpanda');
        ?>
">
                                <input id="opanda_family" class="" type="text" name="family" value="<?php 
        echo $family;
        ?>
" placeholder="<?php 
        _e('Last Name', 'bizpanda');
        ?>
">
                            </li>
                        </ul>
                    </div>
                    
                    <div class="detail">
                        <label for="opanda_email_confirmed"><?php 
        _e('Email Confirmed:', 'bizpanda');
        ?>
</label>
                        <ul class="click-to-edit">
                            <li><?php 
        if ($emailConfirmed) {
            _e('yes', 'bizpanda');
        } else {
            _e('no', 'bizpanda');
        }
        ?>
</li>
                            <li>
                                <input type="checkbox" id="opanda_email_confirmed" name="email_confirmed" value="1" <?php 
        if ($emailConfirmed) {
            echo 'checked="checked"';
        }
        ?>
 >            
                            </li>
                        </ul>
                    </div>
                    
                    <?php 
        if (BizPanda::hasPlugin('optinpanda')) {
            ?>
                    
                    <div class="detail">
                        <label for="opanda_subscription_confirmed"><?php 
            _e('Subscription Confirmed:', 'bizpanda');
            ?>
</label>
                        <ul class="click-to-edit">
                            <li><?php 
            if ($subscriptionConfirmed) {
                _e('yes', 'bizpanda');
            } else {
                _e('no', 'bizpanda');
            }
            ?>
</li>
                            <li>
                                <input type="checkbox" id="opanda_email_confirmed" name="subscription_confirmed" value="1" <?php 
            if ($subscriptionConfirmed) {
                echo 'checked="checked"';
            }
            ?>
 >                
                            </li>
                        </ul>
                    </div>
                    
                    <?php 
        }
        ?>
                    
                    <?php 
        if (!empty($customFields)) {
            ?>
                    
                    <div class="custom-field-wrap">
                        
                    <?php 
            $index = 0;
            foreach ($customFields as $fieldName => $fieldValue) {
                $index++;
                ?>
                    
                        <div class="detail">
                            <label for="opanda_<?php 
                echo $index;
                ?>
"><?php 
                echo $fieldName;
                ?>
:</label>

                            <ul class="click-to-edit">
                                <li><?php 
                echo $fieldValue;
                ?>
</li>
                                <li><input type="text" id="opanda_<?php 
                echo $index;
                ?>
" name="opanda_values[]" value="<?php 
                echo $fieldValue;
                ?>
" class="regular-text input"></li>
                                <input type="hidden" name="opanda_names[]" value="<?php 
                echo $fieldName;
                ?>
" />
                            </ul>
                        </div>
                    
                    <?php 
            }
            ?>
                        
                    </div>
                    
                    <?php 
        }
        ?>

                    <div class="controls-wrap">
                        <input type="submit" class="button button-primary" value="<?php 
        _e('Save Changes', 'bizpanda');
        ?>
" />
                        <a href="<?php 
        echo $cancelUrl;
        ?>
" class="button button-default"><?php 
        _e('Return', 'bizpanda');
        ?>
</a> 
                    </div>
                </td>

            </tr>
        </table>
            
        </form>
        
        </div>
        
        <?php 
    }
Ejemplo n.º 17
0
    <h1><?php 
_e('Getting LinkedIn Client ID', 'bizpanda');
?>
</h1>

    <p>
        <?php 
_e('A LinkedIn Client ID is required for the following buttons:', 'bizpanda');
?>
        <ul>
            <li><?php 
_e('LinkedIn Sign-In of the Sign-In Locker.', 'bizpanda');
?>
</li>
            <?php 
if (BizPanda::hasPlugin('optinpanda')) {
    ?>
            <li><?php 
    _e('LinkedIn Subscribe of the Email Locker.', 'bizpanda');
    ?>
</li>     
            <?php 
}
?>
        </ul>
    </p>
    
    <p><?php 
_e('If you want to use these buttons, you need to get create a LinkedIn App for your website and generate a Client ID.', 'bizpanda');
?>
    <?php 
Ejemplo n.º 18
0
    /**
     * Renders the page 
     * 
     * @sinve 1.0.0
     * @return void
     */
    public function indexAction()
    {
        global $bizpanda;
        $current = isset($_GET['opanda_screen']) ? $_GET['opanda_screen'] : null;
        $screens = array();
        $subscriptionOptions = array('title' => __('Subscription Options', 'bizpanda'), 'class' => 'OPanda_SubscriptionSettings', 'path' => OPANDA_BIZPANDA_DIR . '/admin/settings/class.subscription.php');
        $socialOptions = array();
        if (BizPanda::hasFeature('social') || BizPanda::hasPlugin('sociallocker')) {
            $socialOptions = array('title' => __('Social Options', 'bizpanda'), 'class' => 'OPanda_SocialSettings', 'path' => OPANDA_BIZPANDA_DIR . '/admin/settings/class.social.php');
        }
        // for the plugin Opt-In Panda, the subscription options should be the first
        if (BizPanda::isSinglePlugin() && BizPanda::hasPlugin('optinpanda')) {
            if (empty($current)) {
                $current = 'subscription';
            }
            $screens['subscription'] = $subscriptionOptions;
            if (!empty($socialOptions)) {
                $screens['social'] = $socialOptions;
            }
        } else {
            if (empty($current)) {
                $current = 'social';
            }
            if (!empty($socialOptions)) {
                $screens['social'] = $socialOptions;
            }
            if (BizPanda::hasFeature('subscription')) {
                $screens['subscription'] = $subscriptionOptions;
            }
        }
        if (BizPanda::hasFeature('lockers')) {
            $screens['lock'] = array('title' => __('Lock Options', 'bizpanda'), 'class' => 'OPanda_AdvancedSettings', 'path' => OPANDA_BIZPANDA_DIR . '/admin/settings/class.lock.php');
        }
        $screens['stats'] = array('title' => __('Stats Options', 'bizpanda'), 'class' => 'OPanda_StatsSettings', 'path' => OPANDA_BIZPANDA_DIR . '/admin/settings/class.stats.php');
        $screens['text'] = array('title' => __('Front-end Text', 'bizpanda'), 'class' => 'OPanda_TextSettings', 'path' => OPANDA_BIZPANDA_DIR . '/admin/settings/class.text.php');
        if (BizPanda::hasFeature('terms')) {
            $screens['terms'] = array('title' => __('Terms & Policies', 'bizpanda'), 'class' => 'OPanda_TermsSettings', 'path' => OPANDA_BIZPANDA_DIR . '/admin/settings/class.terms.php');
        }
        $screens = apply_filters('opanda_settings_screens', $screens);
        if (!isset($screens[$current])) {
            $current = 'social';
        }
        require_once OPANDA_BIZPANDA_DIR . '/admin/settings/class.settings.php';
        require_once $screens[$current]['path'];
        $screen = new $screens[$current]['class']($this);
        $action = isset($_GET['opanda_action']) ? $_GET['opanda_action'] : null;
        if (!empty($action)) {
            $methodName = $action . 'Action';
            $screen->{$methodName}();
            return;
        }
        // getting options
        $options = $screen->getOptions();
        $options = apply_filters("opanda_{$current}_settings", $options);
        // creating a form
        $form = new FactoryForms328_Form(array('scope' => 'opanda', 'name' => 'setting'), $bizpanda);
        $form->setProvider(new FactoryForms328_OptionsValueProvider(array('scope' => 'opanda')));
        $form->add($options);
        if (isset($_POST['save-action'])) {
            do_action("opanda_{$current}_settings_saving");
            $form->save();
            do_action("opanda_{$current}_settings_saved");
            $redirectArgs = apply_filters("opanda_{$current}_settings_redirect_args", array('opanda_saved' => 1, 'opanda_screen' => $current));
            return $this->redirectToAction('index', $redirectArgs);
        }
        $formAction = add_query_arg(array('post_type' => OPANDA_POST_TYPE, 'page' => 'settings-' . $bizpanda->pluginName, 'opanda_screen' => $current), admin_url('edit.php'));
        ?>
        <div class="wrap ">
            
            <h2 class="nav-tab-wrapper">
                <?php 
        foreach ($screens as $screenName => $screenData) {
            ?>
<a href="<?php 
            $this->actionUrl('index', array('opanda_screen' => $screenName));
            ?>
" class="nav-tab <?php 
            if ($screenName === $current) {
                echo 'nav-tab-active';
            }
            ?>
">
                    <?php 
            echo $screenData['title'];
            ?>
                </a><?php 
        }
        ?>
            </h2>
            
            <?php 
        $screen->header();
        ?>
            
            <div class="factory-bootstrap-329 opanda-screen-<?php 
        echo $current;
        ?>
">
            <form method="post" class="form-horizontal" action="<?php 
        echo $formAction;
        ?>
">

                <?php 
        if (isset($_GET['opanda_saved']) && empty($screen->error)) {
            ?>
                <div id="message" class="alert alert-success">
                    <p><?php 
            _e('The settings have been updated successfully!', 'bizpanda');
            ?>
</p>
                </div>
                <?php 
        }
        ?>
                
                <?php 
        if (!empty($screen->success)) {
            ?>
                <div id="message" class="alert alert-success">
                    <p><?php 
            echo $screen->success;
            ?>
</p>
                </div>
                <?php 
        }
        ?>
                
                <?php 
        if (!empty($screen->error)) {
            ?>
                <div id="message" class="alert alert-danger">
                    <p><?php 
            echo $screen->error;
            ?>
</p>
                </div>
                <?php 
        }
        ?>
                
                <?php 
        do_action('onp_sl_settings_options_notices');
        ?>

                <div style="padding-top: 10px;">
                <?php 
        $form->html();
        ?>
                </div>
                
                <div class="form-group form-horizontal">
                    <label class="col-sm-2 control-label"> </label>
                    <div class="control-group controls col-sm-10">
                        <input name="save-action" class="btn btn-primary" type="submit" value="<?php 
        _e('Save Changes', 'bizpanda');
        ?>
"/>
                    </div>
                </div>
            
            </form>
            </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 (YT)', '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');
        ?>
        <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 
    }
Ejemplo n.º 20
0
    /**
     * Renders content of the metabox.
     * 
     * @see FactoryMetaboxes321_Metabox
     * @since 1.0.0
     * 
     * @return void
     */
    public function html()
    {
        global $bizpanda;
        $query_string = '?action=onp_sl_preview';
        $query_string = apply_filters('opanda_preview_url', $query_string);
        $extra_data = array('data-lang' => get_option('opanda_lang'), 'data-short-lang' => get_option('opanda_short_lang'), 'data-facebook-appid' => get_option('opanda_facebook_appid'), 'data-facebook-version' => get_option('opanda_facebook_version', 'v1.0'));
        $extra_data['data-vk-appid'] = get_option('opanda_vk_appid');
        $extra_data['data-url'] = admin_url('admin-ajax.php') . $query_string;
        $extra_data = apply_filters('onp_sl_preview_data_wrap', $extra_data);
        $dataPrint = sizeof($extra_data) ? ' ' : '';
        foreach ($extra_data as $key => $val) {
            $dataPrint .= $key . '="' . $val . '" ';
        }
        $dataPrint = rtrim($dataPrint, ' ');
        $showStyleRollerOffer = BizPanda::isSinglePlugin() && BizPanda::hasPlugin('sociallocker');
        ?>
        <script>
            function onp_sl_update_preview_height(height) {
                jQuery("#lock-preview-wrap iframe").height(height);
            }
            var pluginName = '<?php 
        echo $bizpanda->pluginName;
        ?>
';

            window.opanda_proxy_url = '<?php 
        echo opanda_proxy_url();
        ?>
'
            window.opanda_facebook_app_id = '<?php 
        echo get_option('opanda_facebook_appid');
        ?>
';
            window.opanda_google_client_id = '<?php 
        echo get_option('opanda_google_client_id');
        ?>
';
            window.opanda_linkedin_api_key = '<?php 
        echo get_option('opanda_linkedin_api_key');
        ?>
';
            window.opanda_terms = '<?php 
        echo opanda_terms_url();
        ?>
';
            window.opanda_privacy_policy = '<?php 
        echo opanda_privacy_policy_url();
        ?>
';
            window.opanda_subscription_service_name = '<?php 
        echo get_option('opanda_subscription_service', 'none');
        ?>
';
            
            <?php 
        if (defined('ONP_OP_STYLER_PLUGIN_ACTIVE')) {
            ?>
            window.onp_sl_styleroller = true;
            <?php 
        } else {
            ?>
            window.onp_sl_styleroller = false;
            window.onp_sl_styleroller_offer_text = '<?php 
            _e('Want more themes?', 'bizpanda');
            ?>
';
            window.onp_sl_styleroller_offer_url = '<?php 
            echo $bizpanda->options['styleroller'];
            ?>
';
            <?php 
        }
        ?>
                
            <?php 
        if ($showStyleRollerOffer) {
            ?>
            window.onp_sl_show_styleroller_offer = true;
            <?php 
        } else {
            ?>
            window.onp_sl_show_styleroller_offer = false;
            <?php 
        }
        ?>
      
        </script>
        <p class="note"><strong><?php 
        _e('Note', 'bizpanda');
        ?>
:</strong> <?php 
        _e('In the preview mode, some features of the locker may not work properly.', 'bizpanda');
        ?>
</p>
        <div id="lock-preview-wrap"<?php 
        echo $dataPrint;
        ?>
>
            <iframe 
                allowtransparency="1" 
                frameborder="0" 
                hspace="0" 
                marginheight="0"
                marginwidth="0"
                name="preview"
                vspace="0"
                width="100%">
                <?php 
        _e('Your browser doen\'t support the iframe tag.', 'bizpanda');
        ?>
            </iframe>           
        </div>
        <?php 
    }
Ejemplo n.º 21
0
 public static function getUrl($pluginName, $type = null, $campaing = null)
 {
     $pluginInfo = self::getPluginInfo($pluginName, $type);
     if (empty($pluginInfo)) {
         return $pluginInfo;
     }
     $url = $pluginInfo['url'];
     if (empty($campaing)) {
         return $url;
     }
     if (false === strpos($url, 'utm_source')) {
         if (BizPanda::isSinglePlugin()) {
             $plugin = BizPanda::getPlugin();
             $args = array('utm_source' => 'plugin-' . $plugin->options['name'], 'utm_medium' => $plugin->license && isset($plugin->license->data['Category']) ? $plugin->license->data['Category'] . '-version' : 'unknown-version', 'utm_campaign' => $campaing, 'tracker' => isset($plugin->options['tracker']) ? $plugin->options['tracker'] : null);
             $url = add_query_arg($args, $url);
         } else {
             $url = add_query_arg(array('utm_source' => 'plugin-bizpanda', 'utm_medium' => 'mixed-versions', 'utm_campaign' => $campaing, 'utm_term' => implode(',', BizPanda::getPluginNames(true))), $url);
         }
     }
     return $url;
 }
Ejemplo n.º 22
0
/**
 * Makes internal page "License Manager" for the Social Locker
 * 
 * @since 1.0.0
 * @return bool true
 */
function sociallocker_make_internal_license_manager($internal)
{
    if (BizPanda::isSinglePlugin()) {
        return $internal;
    }
    return true;
}
Ejemplo n.º 23
0
    /**
     * Shows the screen.
     * 
     * @sinve 1.0.0
     * @return void
     */
    public function indexAction()
    {
        $types = OPanda_Items::getAvailable();
        // checkes extra items which are not installed yet
        require_once OPANDA_BIZPANDA_DIR . '/admin/includes/plugins.php';
        $suggestions = OPanda_Plugins::getSuggestions();
        ?>

        <div class="wrap factory-fontawesome-320">

            <div class="opanda-items ">
                
                <h2><?php 
        _e('Creating New Item', 'bizpanda');
        ?>
</h2>
                <p style="margin-top: 0px;"><?php 
        _e('Choose which items you would like to create.', 'bizpanda');
        ?>
</p>

                <?php 
        foreach ($types as $name => $type) {
            ?>
                <div class="postbox opanda-item opanda-item-<?php 
            echo $type['type'];
            ?>
">

                    <h4 class="opanda-title">
                        <?php 
            echo $type['title'];
            ?>
                    </h4>
                    <div class="opanda-description">
                        <?php 
            echo $type['description'];
            ?>
                    </div>
                    <div class="opanda-buttons">

                        <a href="<?php 
            echo admin_url('post-new.php?post_type=opanda-item&opanda_item=' . $name);
            ?>
" class="button button-large opanda-create">
                            <i class="fa fa-plus"></i><span><?php 
            _e('Create Item', 'bizpanda');
            ?>
</span>
                        </a>

                        <?php 
            if (isset($type['help'])) {
                ?>
                        <a href="<?php 
                echo $type['help'];
                ?>
" class="button button-large opanda-help opanda-right" title="<?php 
                _e('Click here to learn more', 'bizpanda');
                ?>
">
                            <i class="fa fa-question-circle"></i>
                        </a>
                        <?php 
            }
            ?>
                    </div>
                </div>

                <?php 
        }
        ?>
            </div>
            
            <?php 
        if (!empty($suggestions)) {
            ?>
            
            <div class="opanda-separator"></div>
            
            <div class="opanda-extra-items">
                <div class="opanda-inner-wrap">
                    
                    <h2>
                        <?php 
            _e('More Marketing Tools To Grow Your Business', 'bizpanda');
            ?>
                    </h2>
                    <p style="margin-top: 0px;">
                        <?php 
            _e('Check out other plugins which add more features to your lockers.', 'bizpanda');
            ?>
                    </p>
                    
                    <?php 
            foreach ($suggestions as $suggestion) {
                $url = $suggestion['url'];
                if (false === strpos($url, 'utm_source')) {
                    if (BizPanda::isSinglePlugin()) {
                        $plugin = BizPanda::getPlugin();
                        $args = array('utm_source' => 'plugin-' . $plugin->options['name'], 'utm_medium' => $plugin->license && isset($plugin->license->data['Category']) ? $plugin->license->data['Category'] . '-version' : 'unknown-version', 'utm_campaign' => 'suggestions', 'tracker' => isset($plugin->options['tracker']) ? $plugin->options['tracker'] : null);
                        $url = add_query_arg($args, $url);
                    } else {
                        $url = add_query_arg(array('utm_source' => 'plugin-bizpanda', 'utm_medium' => 'mixed-versions', 'utm_campaign' => 'suggestions', 'utm_term' => implode(',', BizPanda::getPluginNames(true))), $url);
                    }
                }
                ?>
                    
                        <div class="postbox opanda-item opanda-item-<?php 
                echo $suggestion['type'];
                ?>
">
                            <div class="opanda-item-cover"></div>
                            
                            <i class="fa fa-plus-circle opanda-plus-background"></i>
                            
                            <h4 class="opanda-title">
                                <?php 
                echo $suggestion['title'];
                ?>
                            </h4>
                            <div class="opanda-description">
                                <?php 
                echo $suggestion['description'];
                ?>
                            </div>
                            <div class="opanda-buttons">
                                <a href='<?php 
                echo $url;
                ?>
' class="button button-large" title="<?php 
                _e('Click here to learn more', 'bizpanda');
                ?>
">
                                    <i class="fa fa-external-link"></i><span>Learn More</span>
                                </a>
                            </div>
                        </div>
                    
                    <?php 
            }
            ?>

                    <img class="opanda-arrow" src='<?php 
            echo OPANDA_BIZPANDA_URL . '/assets/admin/img/new-item-arrow.png';
            ?>
' />
                    
                </div>
            </div>
            
            <?php 
        }
        ?>
        </div>
        <?php 
    }
    /**
     * Shows a status of the lead.
     * 
     * @since 1.0.7
     * @return void
     */
    public function column_status($record)
    {
        if (BizPanda::hasPlugin('optinpanda')) {
            if ($record->lead_email_confirmed) {
                ?>
                <span class="opanda-status-help" title="<?php 
                _e('This email is real. It was received from social networks or the user confirmed it by clicking on the link inside the confirmation email.', 'bizpanda');
                ?>
">
                    <i class="fa fa-check-circle-o"></i><i><?php 
                _e('email', 'optinapnda');
                ?>
</i>
                </span>
            <?php 
            } else {
                ?>
                <span class="opanda-status-help" title="<?php 
                _e('This email was not confirmed. It means that actually this email address may be owned by another user.', 'bizpanda');
                ?>
">
                    <i class="fa fa-circle-o"></i><i><?php 
                _e('email', 'optinapnda');
                ?>
</i>
                </span>
            <?php 
            }
            echo '<br />';
            if ($record->lead_subscription_confirmed) {
                ?>
                <span class="opanda-status-help" title="<?php 
                _e('This user confirmed his subscription.', 'bizpanda');
                ?>
">
                    <i class="fa fa-check-circle-o"></i><i><?php 
                _e('subscription', 'optinapnda');
                ?>
</i>
                </span>
            <?php 
            } else {
                ?>
                <span class="opanda-status-help" title="<?php 
                _e('This user has not confirmed his subscription.', 'bizpanda');
                ?>
">
                    <i class="fa fa-circle-o"></i><i><?php 
                _e('subscription', 'optinapnda');
                ?>
</i>
                </span>
            <?php 
            }
        } else {
            if ($record->lead_email_confirmed) {
                ?>
                <span class="opanda-status-help" title="<?php 
                _e('This email is real. It was received from social networks.', 'bizpanda');
                ?>
">
                    <i class="fa fa-check-circle-o"></i><i><?php 
                _e('email', 'optinapnda');
                ?>
</i>
                </span>
            <?php 
            } else {
                ?>
                <span class="opanda-status-help" title="<?php 
                _e('This email was not confirmed. It means that actually this email address may be owned by another user.', 'bizpanda');
                ?>
">
                    <i class="fa fa-circle-o"></i><i><?php 
                _e('email', 'optinapnda');
                ?>
</i>
                </span>
            <?php 
            }
        }
    }
Ejemplo n.º 25
0
function bizpanda_cancel_plugin_deactivation($cancel)
{
    if (!BizPanda::isSinglePlugin()) {
        return true;
    }
    return $cancel;
}
Ejemplo n.º 26
0
 /**
  * Adds a locker shortcodes on the flight if bulk locking are turned on.
  * 
  * @param type $content
  * @return type
  */
 public static function addSocialLockerShortcodes($content)
 {
     $bulkLockers = get_option('onp_sl_bulk_lockers', array());
     if (empty($bulkLockers)) {
         return $content;
     }
     global $bizpanda;
     $shortcodeEnds = array();
     $bulkIndex = 0;
     $ignoredShortcodes = array();
     foreach ($bulkLockers as $id => $options) {
         if (!in_array($options['way'], array('skip-lock', 'more-tag'))) {
             continue;
         }
         if (self::isPageExcluded($id, $options)) {
             continue;
         }
         $lockerStatus = get_post_status($id);
         if ('publish' !== $lockerStatus) {
             continue;
         }
         $itemType = get_post_meta($id, 'opanda_item', true);
         if ('social-locker' == $itemType && !BizPanda::hasPlugin('sociallocker')) {
             continue;
         }
         if ('email-locker' == $itemType && !BizPanda::hasPlugin('optinpanda')) {
             continue;
         }
         $bulkIndex++;
         switch ($itemType) {
             case 'email-locker':
                 $shortcodeName = 'emaillocker-bulk-' . $bulkIndex;
                 break;
             case 'signin-locker':
                 $shortcodeName = 'signinlocker-bulk-' . $bulkIndex;
                 break;
             default:
                 $shortcodeName = 'sociallocker-bulk-' . $bulkIndex;
                 break;
         }
         $shortcode = new OPanda_LockerShortcode($bizpanda);
         add_shortcode($shortcodeName, array($shortcode, 'render'));
         if ($options['way'] == 'skip-lock') {
             if ($options['skip_number'] == 0) {
                 $content = "[{$shortcodeName} id='{$id}']" . $content;
                 if (!isset($shortcodeEnds[0])) {
                     $shortcodeEnds[0] = array();
                 }
                 $shortcodeEnds[0][] = "[/{$shortcodeName}]";
             } else {
                 $counter = 0;
                 $offset = 0;
                 while (preg_match('/[^\\s]+((<\\/p>)|(\\n\\r){2,}|(\\r\\n){2,}|(\\n){2,}|(\\r){2,})/i', $content, $matches, PREG_OFFSET_CAPTURE, $offset)) {
                     $counter++;
                     $offset = $matches[0][1] + strlen($matches[0][0]);
                     if ($counter == $options['skip_number']) {
                         $beforeShortcode = substr($content, 0, $offset);
                         $insideShortcode = substr($content, $offset);
                         $content = self::normilizerMarkup($beforeShortcode, $insideShortcode, "[{$shortcodeName} id='{$id}']", "");
                         if (!isset($shortcodeEnds[$offset])) {
                             $shortcodeEnds[$offset] = array();
                         }
                         $shortcodeEnds[$offset][] = "[/{$shortcodeName}]";
                         break;
                     }
                 }
             }
         } elseif ($options['way'] == 'more-tag' && is_singular($options['post_types'])) {
             global $post;
             $label = '<span id="more-' . $post->ID . '"></span>';
             $pos = strpos($content, $label);
             if ($pos === false) {
                 return $content;
             }
             $offset = $pos + strlen($label);
             if (substr($content, $offset, 4) == '</p>') {
                 $offset += 4;
             }
             $content = substr($content, 0, $offset) . "[{$shortcodeName} id='{$id}']" . substr($content, $offset);
             if (!isset($shortcodeEnds[$offset])) {
                 $shortcodeEnds[$offset] = array();
             }
             $shortcodeEnds[$offset][] = "[/{$shortcodeName}]";
         }
     }
     if (!empty($shortcodeEnds)) {
         krsort($shortcodeEnds);
         foreach ($shortcodeEnds as $shortcodeEndItem) {
             foreach ($shortcodeEndItem as $shortcodeEnd) {
                 $content .= $shortcodeEnd;
             }
         }
     }
     return $content;
 }
Ejemplo n.º 27
0
<?php

// a condition which allows to create the BizPanda instance only once
if (defined('OPANDA_ACTIVE')) {
    BizPanda::countCallerPlugin();
    return;
}
define('OPANDA_ACTIVE', true);
define('BIZPANDA_VERSION', 117);
define('OPANDA_WORDPRESS', true);
define('OPANDA_POST_TYPE', 'opanda-item');
define('OPANDA_BIZPANDA_DIR', dirname(__FILE__));
define('OPANDA_BIZPANDA_URL', plugins_url(null, __FILE__));
// creating a plugin via the factory
require 'libs/factory/core/boot.php';
global $optinpanda;
global $bizpanda;
$bizpanda = new Factory325_Plugin(__FILE__, array('name' => 'bizpanda', 'lang' => 'en_US', 'version' => '1.1.7', 'updates' => OPANDA_BIZPANDA_DIR . '/plugin/updates/', 'styleroller' => 'http://api.byonepress.com/public/1.0/get/?product=styleroller'));
// requires factory modules
$bizpanda->load(array(array('libs/factory/bootstrap', 'factory_bootstrap_329', 'admin'), array('libs/factory/font-awesome', 'factory_fontawesome_320', 'admin'), array('libs/factory/forms', 'factory_forms_328', 'admin'), array('libs/factory/notices', 'factory_notices_323', 'admin'), array('libs/factory/pages', 'factory_pages_321', 'admin'), array('libs/factory/viewtables', 'factory_viewtables_320', 'admin'), array('libs/factory/metaboxes', 'factory_metaboxes_321', 'admin'), array('libs/factory/shortcodes', 'factory_shortcodes_320'), array('libs/factory/types', 'factory_types_322')));
#comp merge
require OPANDA_BIZPANDA_DIR . '/includes/panda-items.php';
require OPANDA_BIZPANDA_DIR . '/includes/functions.php';
require OPANDA_BIZPANDA_DIR . '/includes/assets.php';
require OPANDA_BIZPANDA_DIR . '/includes/post-types.php';
require OPANDA_BIZPANDA_DIR . '/includes/shortcodes.php';
#endcomp
if (is_admin()) {
    require OPANDA_BIZPANDA_DIR . '/admin/boot.php';
}
Ejemplo n.º 28
0
/**
 * Calls always when we subscribe an user.
 */
function opanda_subscribe($status, $identity, $context)
{
    if ('subscribed' == $status) {
        // if the current service is 'database',
        // then all emails should be added as unconfirmed
        $serviceName = BizPanda::getSubscriptionServiceName();
        $confirmed = $serviceName === 'database' ? false : true;
        do_action('opanda_lead_catched', $identity, $context, $confirmed, $confirmed);
    } elseif ('pending' == $status) {
        do_action('opanda_lead_catched', $identity, $context, false, false);
    }
}