• Resolved manolo13

    (@manolo13)


    I love your plugin, i was looking for something like this a long time now. And the buttons extension is awsome.

    I would like to ask, how can i move the “featured Image” from the bottom of the form and place it higher up, under the “Title” field.

    Thanks in advance!

    (i think is something css related?)

    https://ww.wp.xz.cn/plugins/frontier-post/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author finnj

    (@finnj)

    Hi,

    You will need to use your own template form: http://wpfrontier.com/frontier-post-templates-css/

    Thread Starter manolo13

    (@manolo13)

    Hey finnj! Thanks for your prompt answer.

    I am currently using the simple visual editor. What is the name of the template? Old, simple or standard?

    One more question.

    Is there a way to restrict access to the whole media library when user uploading a feature image? I mean upload a featured image directly from pc only?

    Thanks again!

    Thread Starter manolo13

    (@manolo13)

    Ok, i managed to restrict access to the whole media library when user uses the “add media” button (he can see only his files)

    here is the code, inserted in functions.php

    add_action('pre_get_posts','ml_restrict_media_library');
    function ml_restrict_media_library( $wp_query_obj ) {
    
    global $current_user, $pagenow;
    
    if( !is_a( $current_user, 'WP_User') )
    
    return;
    
    if( 'admin-ajax.php' != $pagenow || $_REQUEST['action'] != 'query-attachments' )
    
    return;
    
    if( !current_user_can('manage_media_library') )
    
    $wp_query_obj->set('author', $current_user->ID );
    
    return;
    
    }

    I am still trying to figure out how this can be done with “select featured image”.

    Any help?

    Also, how can i replace text “select featured image” with a button?

    Thanks!

    Thread Starter manolo13

    (@manolo13)

    ok, this is an update!

    DISREGARD THE ABOVE CODE!
    works fine, but admin cannot see the whole library either!!!

    so this is the right code

    function my_files_only( $wp_query ) {
        if ($wp_query->query_vars['post_type']=="attachment"){
            if ( !current_user_can( 'level_5' ) ) {
                global $current_user;
                $wp_query->set( 'author', $current_user->id );
            }
        }
    }
    
    add_filter('parse_query', 'my_files_only' );

    still looking for the featured image thing…

    any help much appreciated!

    Plugin Author finnj

    (@finnj)

    As for restricting media access, try and look here: http://wpfrontier.com/restrict-backend-access-and-access-to-others-media/

    The capabability used to check access in this code is “edit_others_posts” – Administeators and editors has this.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘about featured image’ is closed to new replies.