Please make WP more object oriented

  1. CorvidaeMaru


    When I recently was asked to make a WordPress site for a client, I thought it would be really easy, but it's turning out really difficult. Partly, because I'm new to web development, but also because two things didn't work as expected, and it really throws me.
    Firstly I found the codex difficult to read, that probably is my own fault.
    Secondly, nothing seems to be object oriented. Wouldn't this make it easier to code something?

    For example, making a new post should be something like:

    $custom_post = new post($settings); //you could even have a loading an old post option.
    echo $custom_post->get_meta();

    Or we could extend the post class to make a custom post type, even.

    If there is a good reason, then please explain, because, as a novice, I am obviously a little out of my comfort zone.

    Thank you for reading!

    Posted: 6 years ago #
  2. José Carlos


    I like this idea, to making the WP more POO (like Joomla and other CMS). It's so difficult create an personalizated script to add posts/pages outside the WP admin, and could be helpful to plugin coders extend the post class.

    Sorry by the English!

    Posted: 6 years ago #
  3. bemcapaz

    Or you can do something like im doing lately, creating a framework to Wrapper things that you want to do

    Posted: 6 years ago #
  4. Covi


    "Under consideration"... ¬¬' , great after closing topics as this (and others) about OOP, alluding to "create a fork" ("you can create a fork", "it's open source, you can..."):


    PS: If not MVC exactly, we have also spoken about OOP other times, basically.

    Posted: 6 years ago #
  5. Ipstenu (Mika Epstein)
    Lead Plugin Wrangler

    Under consideration means no one's had a chance to go through all the ideas and file them.

    Posted: 6 years ago #
  6. Covi


    Yeah!, right now is in "is plugin territory", lol.

    Posted: 6 years ago #

RSS feed for this topic


You must log in to post.

  • Rating

    15 Votes
  • Status

    This is plugin territory