/** * Get the HTML for addthis settings page * * @param string $updateResult Updated message * * @return string */ private function _getHTML($updateResult) { $html = ' <div class="wrap"> <form id="addthis-settings" method="post" action="'.$this->cmsConnector->getSettingsPageUrl().'" > <div class="Header"> <h1><em>AddThis</em> Sharing Buttons</h1>'; $html .= '</div>'; if ($this->_upgrade && !$this->addThisConfigs->getProfileId()) { $html .= $this->_getupdateSuccessMessage(); } if ($this->_checkAddPubidFailure()) { $html .= $this->_getPubIdFromAddthisFailureMessage(); } if ($updateResult) { $html .= $updateResult; } if ($this->_checkPubidFromAddThis() || (isset($this->_getVariables['advanced_settings']) && ($this->_getVariables['advanced_settings'] == 'true')) ) { // Get Confirmation form $html .= addthis_profile_id_csr_confirmation(); } else { $html .= $this->_getAddThisLinkButton(); } if (!_addthis_is_csr_form()) { $html .= ' <div class="Btn-container-end"> ' . _addthis_settings_buttons(false) . ' </div> <p> <small> '._addthis_eula_text().' </small> </p> </form>'; } return $html; }
function _addthis_settings_buttons($includePreview = true) { $html = ''; if (_addthis_is_csr_form()) { return $html; } if ($includePreview) { $stylesheet = get_option('stylesheet'); $template = get_option('template'); $previewLink = esc_url(get_option('home') . '/'); if (is_ssl()) { $previewLink = str_replace('http://', 'https://', $previewLink); } $queryArgs = array('addthis_preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'preview_iframe' => true, 'TB_iframe' => 'true'); $previewLink = htmlspecialchars(add_query_arg($queryArgs, $previewLink)); $previewHtml = ' <a href="' . $previewLink . '" class="Btn thickbox thickbox-preview" > Preview </a>'; $html .= $previewHtml; } $saveHtml = ' <input type="submit" name="submit" value="Save Changes" class="Btn Btn-blue addthis-submit-button" /> '; $html .= $saveHtml; return $html; }
/** * Get the HTML for addthis settings page * * @param string $updateResult Updated message * * @return string */ private function _getHTML($updateResult) { $html = ' <div class="wrap"> <form id="addthis-settings" method="post" action="' . $this->cmsConnector->getSettingsPageUrl() . '" > <div class="Header"> <!-- XTEC ************ MODIFICAT - Localization support --> <!-- 2015.09.18 @dgras --> <h1>' . __("<em>AddThis</em> Sharing Buttons", 'addthis_trans_domain') . '</h1> <!-- ************ ORIGINAL --> <!-- <h1><em>AddThis</em> Sharing Buttons</h1> -->'; //************ FI if (!_addthis_is_csr_form()) { $html .= '<span class="preview-save-btns">' . _addthis_settings_buttons(false) . '</span>'; } $html .= '</div>'; if ($this->_upgrade && !$this->addThisConfigs->getProfileId()) { $html .= $this->_getupdateSuccessMessage(); } if ($this->_checkAddPubidFailure()) { $html .= $this->_getPubIdFromAddthisFailureMessage(); } if ($updateResult) { $html .= $updateResult; } if ($this->_checkPubidFromAddThis() || isset($this->_getVariables['advanced_settings']) && $this->_getVariables['advanced_settings'] == 'true') { // Get Confirmation form $html .= addthis_profile_id_csr_confirmation(); } else { $html .= $this->_getAddThisLinkButton(); } if (!_addthis_is_csr_form()) { $html .= ' <div class="Btn-container-end"> ' . _addthis_settings_buttons(false) . ' </div> </form>'; } return $html; }