WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Duplicate Post] how to allow authors to duplicate posts (4 posts)

  1. skarck
    Member
    Posted 4 years ago #

    hi there!

    i noticed that only admins and editors are able to duplicate posts, how could i allow it authors as well?

    thanks in advance!

    http://wordpress.org/extend/plugins/duplicate-post/

  2. lopo
    Member
    Posted 4 years ago #

    Choosing the minimum role level allowed to duplicate posts and page will be introduced in next version (very soon, I hope).

    By now I'm afraid you have to hack the code... (e.g. the duplicate_post_plugin_activation() function)

  3. shellyd
    Member
    Posted 3 years ago #

    i took a peek in here and tried changing some of the values - specifically here:

    add_option(
    		DUPLICATE_POST_VIEW_USER_LEVEL_OPTION,
    			'2',
    			'Default user level to copy posts' );
    		add_option(
    		DUPLICATE_POST_CREATE_USER_LEVEL_OPTION,
    			'5',
    			'Default user level to create the templates' );
    		add_option(
    		DUPLICATE_POST_ADMIN_USER_LEVEL_OPTION,
    			'8',

    but i didn't hit on any changes to the numerical values there that made authors capable of posting. can a php neophyte get a little help with that? The plugin has been extremely helpful for admins, but now we've realized our authors need it too! thanks!

  4. lopo
    Member
    Posted 3 years ago #

    Hi!
    I'm sorry I answered in a quick and dirty (and, in fact, wrong) way.

    Here are the instructions. Be careful, since they need to edit the DB "by hand" and it can be very dangerous. I suggest you to backup your DB first...

    - get access to the DB, e.g. with PhpMyAdmin
    - go to the "options" table (usually wp_options, but prefix can change)
    - edit the duplicate_post_create_user_level option so its value becomes 2

    If you're an admin on WordPress, you can also visit
    http://YOURDOMAIN/wp-admin/options.php
    or http://YOURDOMAIN/wordpress/wp-admin/options.php (depending on where you installed WP) and edit the option there.

    The first way is safer, because you will edit only that option, while in second way when you click on "Save" you edit all the options: even though you leave the other ones untouched, things can be messy.

    Please note also that Authors will be able to copy all posts, even those of more powerful users. It can be a bit non-standard (an Author can edit only his/her own posts), depending on your policies.

    I hope that this kind of editing the option, in a friendly and safe way, will make into the next version, which I'm trying to release by the arrival of WP 3.0.

    Feel free to write me again if there is any problem!

Topic Closed

This topic has been closed to new replies.

About this Topic