Plugin Directory

Changeset 2228940


Ignore:
Timestamp:
01/17/2020 09:15:55 AM (6 years ago)
Author:
coder618
Message:

Post type issue fix and link show permission added

Location:
timeless-component-builder
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • timeless-component-builder/tags/1.1.0/inc/user_function.php

    r2225180 r2228940  
    2121function tcb_link(){
    2222    $id = get_query_var( 'tcb_id', false );
    23     if($id){
    24         return "<a href='".get_edit_post_link($id)."' class='tcb_link tcb_component_edit_link'>Edit</a>";
     23    if( is_user_logged_in() && current_user_can('administrator') ){
     24        if($id){
     25            return "<a href='".get_edit_post_link($id)."' class='tcb_link tcb_component_edit_link'>Edit</a>";
     26        }
    2527    }
    2628    return '';
  • timeless-component-builder/tags/1.1.0/tcb.php

    r2225180 r2228940  
    2424                    'singular_name' => __( 'Component', 'tcb' )
    2525                ),
    26                 'public' => false,
     26                'public' => true,
    2727                'has_archive' => false,
    2828                'publicly_queryable' =>false,
  • timeless-component-builder/trunk/inc/user_function.php

    r2225180 r2228940  
    2121function tcb_link(){
    2222    $id = get_query_var( 'tcb_id', false );
    23     if($id){
    24         return "<a href='".get_edit_post_link($id)."' class='tcb_link tcb_component_edit_link'>Edit</a>";
     23    if( is_user_logged_in() && current_user_can('administrator') ){
     24        if($id){
     25            return "<a href='".get_edit_post_link($id)."' class='tcb_link tcb_component_edit_link'>Edit</a>";
     26        }
    2527    }
    2628    return '';
  • timeless-component-builder/trunk/tcb.php

    r2225180 r2228940  
    2424                    'singular_name' => __( 'Component', 'tcb' )
    2525                ),
    26                 'public' => false,
     26                'public' => true,
    2727                'has_archive' => false,
    2828                'publicly_queryable' =>false,
Note: See TracChangeset for help on using the changeset viewer.