source cleanup and formatting
This commit is contained in:
@@ -8,6 +8,7 @@ function roots_nice_search_redirect() {
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
add_action('template_redirect', 'roots_nice_search_redirect');
|
||||
|
||||
function roots_search_query($escaped = true) {
|
||||
@@ -63,7 +64,6 @@ if (!is_admin()) {
|
||||
|
||||
// remove root relative URLs on any attachments in the feed
|
||||
function roots_root_relative_attachment_urls() {
|
||||
// global $wp_query;
|
||||
if (!is_feed()) {
|
||||
add_filter('wp_get_attachment_url', 'roots_root_relative_url');
|
||||
add_filter('wp_get_attachment_link', 'roots_root_relative_url');
|
||||
@@ -385,8 +385,14 @@ add_filter('comment_id_fields', 'roots_remove_self_closing_tags');
|
||||
// check to see if the tagline is set to default
|
||||
// show an admin notice to update if it hasn't been changed
|
||||
// you want to change this or remove it because it's used as the description in the RSS feed
|
||||
function roots_notice_tagline() {
|
||||
echo '<div class="error">';
|
||||
echo '<p>' . sprintf(__('Please update your <a href="%s">site tagline</a>', 'roots'), admin_url('options-general.php')) . '</p>';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
if (get_option('blogdescription') === 'Just another WordPress site') {
|
||||
add_action('admin_notices', create_function('', "echo '<div class=\"error\"><p>" . sprintf(__('Please update your <a href="%s">site tagline</a>', 'roots'), admin_url('options-general.php')) . "</p></div>';"));
|
||||
add_action('admin_notices', 'roots_notice_tagline');
|
||||
}
|
||||
|
||||
// set the post revisions to 5 unless the constant
|
||||
|
||||
Reference in New Issue
Block a user