WordPress.org

Ready to get started?Download WordPress

Forums

Question and Answer Forum
Please add the attribute "capability type" to the post (8 posts)

  1. asafche
    Member
    Posted 2 years ago #

    your "question" post type does not have a proper capability type attached to it, so when i wanted to give the logged user the possibility of editing there questions, i couldn't.

    please add this line to line 83 in the "question.php" file:
    'capability_type' => 'question',

    and then everybody who knows how to make use of roles and capabilities will be able to enhance the usage of this plugin with out hacking the code or over complicating the plugin. those who doesn't know how to use it won't even notice that.

    thanks.

    http://wordpress.org/extend/plugins/question-and-answer-forum/

  2. trevorpythag
    Member
    Plugin Author

    Posted 2 years ago #

    Thanks for the tip :)

  3. asafche
    Member
    Posted 2 years ago #

    So, you'll include it in the next Update? it will be great!
    asaf.

  4. trevorpythag
    Member
    Plugin Author

    Posted 2 years ago #

    If you download the plugin again now (or however long it takes for the changes to go through) it should be there. I haven't done much work with roles and capabilities so I wasn't aware this could be done.

    Dave

  5. asafche
    Member
    Posted 2 years ago #

    nice!
    thanks.

    happy i could help.

  6. trevorpythag
    Member
    Plugin Author

    Posted 2 years ago #

    It turns out the way I added the capability type broke the plugin for people who hadn't set up their installation to use the new capability type.

    I have updated the plugin so that the capability type is now set in the config.php file and is defaulted to "post". If you change the value in there it will change it for the plugin.

  7. asafche
    Member
    Posted 2 years ago #

    the problem with the config.php file approach is that when i'll upgrade it will run-over my configurations...

  8. trevorpythag
    Member
    Plugin Author

    Posted 2 years ago #

    I'll include a way of doing this in the admin panel for the next update. However putting things in a config.php file is a good way to quickly impalement these changes and means there is only one file people need to replace when they upgrade.

    I know this is suboptimal but it enables me to make this change more quickly

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic