WordPress.org

Ready to get started?Download WordPress

Ideas

Possibility of rewriting all wordpress core files

  1. jaip
    Member

    Many people with some knowledge of php meets a problem with wordpress - then tries to find their way in the core code - they find a solution as a hack. This is known as the bad solution of course, but I guess many plugin writers also come this way, before they write the actual plugin.
    If you not are familiar with wordpress and mayby not want to dive into wordpress, it can take many hours to find the right hook and getting to work what the hack makes.

    My suggestion is that if you place a file with for example the name link-template.php in your theme folder, then wordpress will use that file instead of the file located in wp-includes. All it will take is that all wordpress core files have unique names and a htacces that does the job. Of course only meant as an alternative to filters and hooks. I dont see any difficulties in it, but mayby I am wrong?

    Posted: 1 year ago #
  2. Ipstenu (Mika Epstein)
    Administrator

    Doing that won't actually help anyone learn the right way to do it, though, and I think encouraging them to do it wrong (or rather, the even longer way) would be detrimental.

    Posted: 1 year ago #
  3. jaip
    Member

    It is not so much about the right way but the easiest way for lasting solutions if you dont want to learn too much about wordpress code. But there is the obvious problem that htaccess does not work for internal redirect. This means that the redirect should be on every include sentence in the core code. And this might be too much of a change. Could you please point out what the problem in your opinion is? (wrong, detrimental)

    Posted: 1 year ago #
  4. Ipstenu (Mika Epstein)
    Administrator

    Sorry, doing_it_wrong() is a common WP term - http://core.trac.wordpress.org/ticket/15824 (it's not a value judgement round these parts :) Just a shorthanded way to explain why not).

    Right: Using filters, hooks, actions, APIs, etc.

    Because: We are able to hook into them via core WP and alert you when/if those things are going away. We expect them to be used and thus account for them when making future changes. We also try very hard to make these things as future proof as possible.

    Introducing yet another 'right' way to do things creates more work that would be better spent learning your new tool, rather than opening a door for an alternate way to learn things. Also that new way may break if your 'one file' change relies on other files and we change those as well.

    Basically I can't see why added a whole second round of 'accepted practices' will do more than cause confusion down the road.

    We have a way that works. Yes, it means learning new things, but if you were going to have to learn new things anyway, why not have them be the right things that are already working?

    Posted: 1 year ago #
  5. jaip
    Member

    The only reason for making an alternative way is to make it easier for those who dont want to dive so deep into wordpress terminology. As far as I can see the problem with related files is equivalent to plugin problems with updates. You are right - you have a way that works. I will close topic for now.

    Posted: 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

  • Rating

    12345
    0 Votes
  • Status

    Sorry, not right now