/**
  * 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.
 *
 * @see WPSEO_Replace_Vars::retrive_sep()
 *
 * @return string
 */
function wpseo_retrieve_seperator()
{
    $replacement = WPSEO_Options::get_default('wpseo_titles', 'separator');
    // Get the titles option and the separator options
    $titles_options = get_option('wpseo_titles');
    $seperator_options = WPSEO_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: 'wpseo_replacements_filter_sep' - Allow customization of the separator character(s)
     *
     * @api string $replacement The current separator
     */
    return apply_filters('wpseo_replacements_filter_sep', $replacement);
}
					<td>
						<?php 
$yform->checkbox('forcerewritetitle', __('Enable force rewrite titles', 'wordpress-seo'));
echo '<p class="description">', __('WordPress SEO 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.', 'wordpress-seo'), '</p>';
?>
					</td>
				</tr>
				<tr>
					<th>
						<?php 
_e('Title Separator', 'wordpress-seo');
?>
					</th>
					<td>
						<?php 
$yform->radio('separator', WPSEO_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.', 'wordpress-seo'), ' ', __('Symbols are shown in the size they\'ll appear in in search results.', 'wordpress-seo'), '</p>';
?>
					</td>
				</tr>
			</table>
		</div>
		<div id="home" class="wpseotab">
			<?php 
if ('posts' == get_option('show_on_front')) {
    echo '<p><strong>', __('Homepage', 'wordpress-seo'), '</strong><br/>';
    $yform->textinput('title-home-wpseo', __('Title template', 'wordpress-seo'), 'template homepage-template');
    $yform->textarea('metadesc-home-wpseo', __('Meta description template', 'wordpress-seo'), array('class' => 'template homepage-template'));
    if ($options['usemetakeywords'] === true) {
        $yform->textinput('metakey-home-wpseo', __('Meta keywords template', 'wordpress-seo'));
    }
Example #4
0
?>
</a>
	<a class="nav-tab" id="archives-tab" href="#top#archives"><?php 
_e('Other', 'wordpress-seo');
?>
</a>
</h2>

<div class="tabwrapper">
<div id="general" class="wpseotab">
	<?php 
echo '<h2>' . __('Title settings', 'wordpress-seo') . '</h2>';
echo $wpseo_admin_pages->checkbox('forcerewritetitle', __('Force rewrite titles', 'wordpress-seo'));
echo '<p class="desc">' . __('WordPress SEO 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.', 'wordpress-seo') . '</p>';
echo '<h2>' . __('Title Separator', 'wordpress-seo') . '</h2>';
echo $wpseo_admin_pages->radio('separator', WPSEO_Option_Titles::get_instance()->get_separator_options(), '');
echo '<p class="desc">' . __('Choose the symbol to use as your title separator. This will display, for instance, between your post title and site name.', 'wordpress-seo') . ' ' . __('Symbols are shown in the size they\'ll appear in in search results.', 'wordpress-seo') . '</p>';
echo '<h2>' . __('Sitewide <code>meta</code> settings', 'wordpress-seo') . '</h2>';
echo $wpseo_admin_pages->checkbox('noindex-subpages-wpseo', __('Noindex subpages of archives', 'wordpress-seo'));
echo '<p class="desc">' . __('If you want to prevent /page/2/ and further of any archive to show up in the search results, enable this.', 'wordpress-seo') . '</p>';
echo $wpseo_admin_pages->checkbox('usemetakeywords', __('Use <code>meta</code> keywords tag?', 'wordpress-seo'));
echo '<p class="desc">' . __('I don\'t know why you\'d want to use meta keywords, but if you want to, check this box.', 'wordpress-seo') . '</p>';
echo $wpseo_admin_pages->checkbox('noodp', __('Add <code>noodp</code> meta robots tag sitewide', 'wordpress-seo'));
echo '<p class="desc">' . __('Prevents search engines from using the DMOZ description for pages from this site in the search results.', 'wordpress-seo') . '</p>';
echo $wpseo_admin_pages->checkbox('noydir', __('Add <code>noydir</code> meta robots tag sitewide', 'wordpress-seo'));
echo '<p class="desc">' . __('Prevents search engines from using the Yahoo! directory description for pages from this site in the search results.', 'wordpress-seo') . '</p>';
echo '<h2>' . __('Clean up the <code>&lt;head&gt;</code>', 'wordpress-seo') . '</h2>';
echo $wpseo_admin_pages->checkbox('hide-rsdlink', __('Hide RSD Links', 'wordpress-seo'));
echo $wpseo_admin_pages->checkbox('hide-wlwmanifest', __('Hide WLW Manifest Links', 'wordpress-seo'));
echo $wpseo_admin_pages->checkbox('hide-shortlink', __('Hide Shortlink for posts', 'wordpress-seo'));
echo $wpseo_admin_pages->checkbox('hide-feedlinks', __('Hide RSS Links', 'wordpress-seo'));
Example #5
0
<?php

/**
 * @package WPSEO\Admin\Views
 */
if (!defined('WPSEO_VERSION')) {
    header('Status: 403 Forbidden');
    header('HTTP/1.1 403 Forbidden');
    exit;
}
if (!current_theme_supports('title-tag')) {
    $yform->light_switch('forcerewritetitle', __('Force rewrite titles', 'wordpress-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.', 'wordpress-seo'), 'Yoast SEO') . '</p>';
}
echo '<h2>' . esc_html__('Title Separator', 'wordpress-seo') . '</h2>';
$legend = __('Title separator symbol', 'wordpress-seo');
$legend_attr = array('class' => 'radiogroup screen-reader-text');
$yform->radio('separator', WPSEO_Option_Titles::get_instance()->get_separator_options(), $legend, $legend_attr);
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.', 'wordpress-seo'), ' ', __('Symbols are shown in the size they\'ll appear in the search results.', 'wordpress-seo'), '</p>';
echo '<h2>' . __('Enabled analysis', 'wordpress-seo') . '</h2>';
$yform->light_switch('content-analysis-active', __('Readability analysis', 'wordpress-seo'));
echo '<p class="description">', __('Removes the readability tab from the metabox and disables all readability-related suggestions.', 'wordpress-seo') . '</p>';
$yform->light_switch('keyword-analysis-active', __('Keyword analysis', 'wordpress-seo'));
echo '<p class="description">', __('Removes the keyword tab from the metabox and disables all keyword-related suggestions.', 'wordpress-seo') . '</p>';
 /**
  * Get CiviCRM basepage title for <title> element
  *
  * Callback method for 'wp_title' hook, called at the end of function wp_title
  *
  * @param string $title Title that might have already been set
  * @param string $separator Separator determined in theme (but defaults to WordPress default)
  * @param string $separator_location Whether the separator should be left or right
  */
 public function wp_page_title($title, $separator = '&raquo;', $separator_location = '')
 {
     // if feed, return just the title
     if (is_feed()) {
         return $this->basepage_title;
     }
     // set default separator location, if it isn't defined
     if ('' === trim($separator_location)) {
         $separator_location = is_rtl() ? 'left' : 'right';
     }
     // if we have WP SEO present, use its separator
     if (class_exists('WPSEO_Options')) {
         $separator_code = WPSEO_Options::get_default('wpseo_titles', 'separator');
         $separator_array = WPSEO_Option_Titles::get_instance()->get_separator_options();
         if (array_key_exists($separator_code, $separator_array)) {
             $separator = $separator_array[$separator_code];
         }
     }
     // construct title depending on separator location
     if ($separator_location == 'right') {
         $title = $this->basepage_title . " {$separator} " . get_bloginfo('name', 'display');
     } else {
         $title = get_bloginfo('name', 'display') . " {$separator} " . $this->basepage_title;
     }
     // return modified title
     return $title;
 }