WordPress.org

Ready to get started?Download WordPress

Ideas

Please make WP more object oriented

  1. CorvidaeMaru
    Member

    12345

    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.
    $custom_post->add_new_meta($metaname,$metavalue);
    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: 3 years ago #
  2. José Carlos
    Member

    12345

    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: 3 years ago #
  3. bemcapaz
    Member

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

    Posted: 2 years ago #
  4. Covi
    Member

    12345

    "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..."):
    http://wordpress.org/extend/ideas/topic/rewrite-wordpress-using-mvc/page/2

    ^.^

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

    Posted: 2 years ago #
  5. Ipstenu (Mika Epstein)
    Half-Elf Support Rogue & Mod

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

    Posted: 2 years ago #
  6. Covi
    Member

    12345

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

    Posted: 2 years ago #

RSS feed for this topic

Reply

You must log in to post.

  • Rating

    12345
    15 Votes
  • Status

    This is plugin territory