/** * Clear all the facebook that has been set already */ private function clear_all() { $this->verify_nonce('fbclearall'); // Reset to defaults, don't unset as otherwise the old values will be retained. $this->options['fb_admins'] = YMBESEO_Options::get_default('YMBESEO_social', 'fb_admins'); $this->save_options(); $this->success_notice(__('Successfully cleared all Facebook Data', 'ymbeseo')); // Clean up the referrer url for later use. if (filter_input(INPUT_SERVER, 'REQUEST_URI')) { $this->cleanup_referrer_url('nonce', 'fbclearall'); } }
/** * Retrieve the separator for use as replacement string. * * @return string */ private function retrieve_sep() { $replacement = YMBESEO_Options::get_default('YMBESEO_titles', 'separator'); // Get the titles option and the separator options. $titles_options = get_option('YMBESEO_titles'); $seperator_options = YMBESEO_Option_Titles::get_instance()->get_separator_options(); // This should always be set, but just to be sure. if (isset($seperator_options[$titles_options['separator']])) { // Set the new replacement. $replacement = $seperator_options[$titles_options['separator']]; } /** * Filter: 'YMBESEO_replacements_filter_sep' - Allow customization of the separator character(s) * * @api string $replacement The current separator */ return apply_filters('YMBESEO_replacements_filter_sep', $replacement); }
echo '<br/>'; echo '<br/>'; _e('You do <strong>not</strong> need to generate the XML sitemap, nor will it take up time to generate after publishing a post.', 'ymbeseo'); echo '</p>'; } else { echo '<p>', __('Save your settings to activate XML Sitemaps.', 'ymbeseo'), '</p>'; } ?> <p> <strong><?php _e('Entries per page', 'ymbeseo'); ?> </strong><br/> <?php printf(__('Please enter the maximum number of entries per sitemap page (defaults to %s, you might want to lower this to prevent memory issues on some installs):', 'ymbeseo'), YMBESEO_Options::get_default('YMBESEO_xml', 'entries-per-page')); ?> </p> <?php $yform->textinput('entries-per-page', __('Max entries per sitemap', 'ymbeseo')); ?> </div> <div id="user-sitemap" class="wpseotab"> <?php $yform->checkbox('disable_author_sitemap', __('Disable author/user sitemap', 'ymbeseo'), false); ?> <div id="xml_user_block"> <p><strong><?php _e('Exclude users without posts', 'ymbeseo');
/** * Import from old Yoast RSS Footer plugin */ public function import_rss_footer() { $optold = get_option('RSSFooterOptions'); $optnew = get_option('YMBESEO_rss'); if ($optold['position'] == 'after') { if ($optnew['rssafter'] === '' || $optnew['rssafter'] === YMBESEO_Options::get_default('YMBESEO_rss', 'rssafter')) { $optnew['rssafter'] = $optold['footerstring']; } } else { /* @internal Uncomment the second part if a default would be given to the rssbefore value */ if ($optnew['rssbefore'] === '') { $optnew['rssbefore'] = $optold['footerstring']; } } update_option('YMBESEO_rss', $optnew); $this->set_msg(__('RSS Footer options imported successfully.', 'ymbeseo')); }