/**
  * Get the singleton instance of this class
  *
  * @return object
  */
 public static function get_instance()
 {
     if (!self::$instance instanceof self) {
         self::$instance = new self();
     }
     return self::$instance;
 }
 /**
  * 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);
 }
Esempio n. 3
0
						<?php 
$yform->checkbox('forcerewritetitle', __('Enable force rewrite titles', 'ymbeseo'));
/* translators: %1$s expands to Yoast SEO */
echo '<p class="description">', sprintf(__('%1$s has auto-detected whether it needs to force rewrite the titles for your pages, if you think it\'s wrong and you know what you\'re doing, you can change the setting here.', 'ymbeseo'), 'Yoast SEO') . '</p>';
?>
					</td>
				</tr>
				<tr>
					<th>
						<?php 
_e('Title Separator', 'ymbeseo');
?>
					</th>
					<td>
						<?php 
$yform->radio('separator', YMBESEO_Option_Titles::get_instance()->get_separator_options(), '');
echo '<p class="description">', __('Choose the symbol to use as your title separator. This will display, for instance, between your post title and site name.', 'ymbeseo'), ' ', __('Symbols are shown in the size they\'ll appear in in search results.', 'ymbeseo'), '</p>';
?>
					</td>
				</tr>
			</table>
		</div>
		<div id="home" class="wpseotab">
			<?php 
if ('posts' == get_option('show_on_front')) {
    echo '<p><strong>', __('Homepage', 'ymbeseo'), '</strong><br/>';
    $yform->textinput('title-home-wpseo', __('Title template', 'ymbeseo'), 'template homepage-template');
    $yform->textarea('metadesc-home-wpseo', __('Meta description template', 'ymbeseo'), array('class' => 'template homepage-template'));
    if ($options['usemetakeywords'] === true) {
        $yform->textinput('metakey-home-wpseo', __('Meta keywords template', 'ymbeseo'));
    }