WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Grrr. Where's this code coming from? (11 posts)

  1. Glenn Ansley
    Member
    Posted 7 years ago #

    Hello,
    I need to validate my page. I have one /> left that I need to change to > but its inside wp_head and I can't find where it's coming from (I even used grep).

    Does anybody know where the following line of code is located? Is it in the wp core or a plugin, or what? Thanks.

    <link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://deeperdevotion.com/xmlrpc.php?rsd" />

  2. Samuel B
    moderator
    Posted 7 years ago #

    Looks like code from your theme's header.php near the top.

  3. Glenn Ansley
    Member
    Posted 7 years ago #

    Well... yes and no.

    Here's my header.php

    <head>
    <?php wp_head(); ?>
    <title>DEEPERDEVOTION.com :: Daily Devotions and Online Resources for Christian Students</title>

    and here's the formated source

    <head>
    <link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://deeperdevotion.com/xmlrpc.php?rsd" />
    
    [podpress js and css]
    
    <title>DEEPERDEVOTION.com :: Daily Devotions and Online Resources for Christian Students</title>
  4. Samuel B
    moderator
    Posted 7 years ago #

    That is your theme's entire header.php?

  5. Glenn Ansley
    Member
    Posted 7 years ago #

    No... I'm just demonstrating that the only thing between <head> and <title> is wp_head() in my php file.

    That means that the link I can't find must be associated with <?php wp_head(); ?>

    ... but where exactly, I can't tell.

  6. Glenn Ansley
    Member
    Posted 7 years ago #

    Here's a workaround... although I'd still like to know where it's coming from if anybody happens to know. Samboll, thanks for your help.

    http://wordpress.org/support/topic/76431?replies=7

  7. Samuel B
    moderator
    Posted 7 years ago #

    Well, the reason I ask is I have stuff like:

    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
    	<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
    	<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />

    and this in another:

    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />

    Surely you have something similar - or am I totally misunderstanding...happens a lot.

  8. charle97
    Member
    Posted 7 years ago #

    looks like the line is from rsd_link in the wp core at wp-includes/general-template.php

  9. Glenn Ansley
    Member
    Posted 7 years ago #

    @samboll: I have those too. They're just below the <title> tag and I knew they weren't affecting my code.

    @charle97: Thanks, that did it... and on a dangerous side note, i just found out that many files are missing from my local backup of my wp_includes folder (which is why grep didn't find it) so thanks... that would have been bad if I ever wiped out my live folder thinking I had a suitable backup.

  10. arthurl
    Member
    Posted 7 years ago #

    The code you speak of is generated by a function called rsd_link() in /wp-includes/general-template.php and then added to the header using an action in /wp-includes/default-filters.php (line 159 for wp 2.2.1).

    The nice thing about actions you can undo them in plugins. So make yourself a plugin file and add the following code:

    remove_action('wp_head','rsd_link');

    And it's gone.

  11. DianeV
    Member
    Posted 7 years ago #

    Clever, arthurl. Thanks for that information.

Topic Closed

This topic has been closed to new replies.

About this Topic