0

Currently with organize series plugin author level user cannot manage their own series. I am trying to add feature to the plugin so that author level user can create & manage their own post and admin and editor can manage all series post.

After a little bit searching I have found that that can be done by creating a 'series owner' metadata for series taxonomy and filter by this 'series owner=authorid' to show & manage authors' own post.

For adding meta for series taxonomy I have found some tuts and plugin wordpress.org/extend/plugins/taxonomy-metadata/ and shibashake.com/wordpress-theme/add-term-or-taxonomy-meta-data.

Now how can I do that?

Any help will be appreciated.

1
  • 1
    You can try this: wordpress.org/plugins/user-series It's a very simple plugin extending Organize Series providing exactly what you need.
    – user34837
    Jul 2, 2013 at 15:28

2 Answers 2

1

May I suggest using the Posts 2 Posts plugin instead. You can create a 'serie' custom post type, specifying the appropriate capabilites, which would allow authors to add descriptions, order posts using drag-and-drop, etc.:

https://github.com/scribu/wp-posts-to-posts/wiki/Basic-usage

https://github.com/scribu/wp-posts-to-posts/wiki/Connection-ordering

2

the plugin creates it's own capabilities to the taxonomy "series" in orgSeries-setup.php on line 163.

$capabilities = array(
            'manage_terms' => 'manage_series',
            'edit_terms' => 'manage_series',
            'delete_terms' => 'manage_series',
            'assign_terms' => 'manage_series'
            );  

so you can manage this capabilities and allow it to authors form a plugin like:

then you can save the term meta data as an option like this:

add_action('add_category ',save_series_meta)

function save_series_meta($t_id){
    $t = get_term_by('id',$t_id,'series');
    if ($t){
        get_currentuserinfo();

        $term_data = array(
                            'term_ID' => $t_id,
                            'author'=>$current_user->ID
                            )
        update_option("SeriesMeta$t_id",'$term_data');
    }
}

so when they create a series it will save there id with it as an option

and then you just make user they can only edit there own series like this:

add_action ( 'edit_category_form_fields', 'tme_cat_featured');

function tme_cat_featured( $tag ) {

    $t = get_term_by('id',$tag->term_id,'series');
    if ($t){
        get_currentuserinfo();
        $t_meta = get_option('SeriesMeta$t->term_id')
        if ($current_user->ID != $t_meta['author']){
            echo 'you can only edit your own series!!';
            die()
        }

    }
}

and you will need your won meta box that will only let them create a series and selcet from there own.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.