Plugin Directory

Changeset 1868567


Ignore:
Timestamp:
05/04/2018 09:35:39 AM (8 years ago)
Author:
trasek
Message:
  • FIX Deleted Link.
Location:
ultimate-member-wp-user-frontend-addon/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • ultimate-member-wp-user-frontend-addon/trunk/css/style.css

    r1200433 r1868567  
    4141.um-titles{margin-left: 30px;}
    4242.um-item-thumbnail-special{  border: 1px solid #ddd; padding: 8px; border-radius: 3px;}
     43
     44.ufa-success{
     45  color: #155724;
     46  background-color: #d4edda;
     47  border: 1px solid #c3e6cb;
     48  padding: 15px;
     49  text-align: center;
     50}
  • ultimate-member-wp-user-frontend-addon/trunk/readme.txt

    r1868550 r1868567  
    44Requires at least: 4.9
    55Tested up to: 4.9.5
    6 Stable tag: 2.0
     6Stable tag: 2.1
    77License: GPLv2
    88
     
    3030
    3131== Changelog ==
     32= 2.1 =
     33- FIX Deleted link
     34
    3235= 2.0 =
    3336- Update "WordPress Settings API Class"
  • ultimate-member-wp-user-frontend-addon/trunk/ufa.php

    r1868550 r1868567  
    2222}
    2323
    24 function scripts(){
     24function ufa_scripts(){
    2525        wp_enqueue_style( 'style-ufa', plugins_url('css/style.css', __FILE__), array('wpuf-css') );
    2626}
    27 add_action('wp_enqueue_scripts','scripts');
     27add_action('wp_enqueue_scripts','ufa_scripts');
    2828
    2929add_action( 'plugins_loaded', 'ufa_load_language' );
  • ultimate-member-wp-user-frontend-addon/trunk/user-dashboard.php

    r1200433 r1868567  
    5454        //show delete success message
    5555        if ( isset( $_GET['msg'] ) && $_GET['msg'] == 'deleted' ) {
    56             echo '<div class="success">' . __( 'Post Deleted', 'wpuf' ) . '</div>';
     56            echo '<div class="ufa-success">' . __( 'Post Deleted', 'wpuf' ) . '</div>';
    5757        }
    5858
     
    9494                                        ?>
    9595                                    </div>
    96                                 <?php } ?>                           
     96                                <?php } ?>
    9797                                    <div class="um-titles">
    9898                                  <div class="um-item-link">
     
    102102                                    <?php } else { ?>
    103103                                      <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'wpuf' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a>
    104                                     <?php } ?>                               
     104                                    <?php } ?>
    105105                                  </div>
    106106                                        <div class="um-item-meta">
     
    115115                                            <?php } ?>
    116116                                        </span>
    117                                     <?php } ?>                                     
    118                                     <span>                               
    119                                       <?php if ( wpuf_get_option( 'enable_post_edit', 'wpuf_dashboard', 'yes' ) == 'yes' ) { ?>
    120                                           <?php
    121                                           $edit_page = (int) wpuf_get_option( 'edit_page_id', 'wpuf_general' );
    122                                           $url = get_permalink( $edit_page );
    123                                           ?>
    124                                           <a href="<?php echo wp_nonce_url( $url . '?pid=' . $post->ID, 'wpuf_edit' ); ?>"><?php _e( 'Edit', 'wpuf' ); ?></a>
    125                                       <?php } else { ?>
    126                                           &nbsp;
    127                                       <?php } ?>
    128      
    129                                       <?php if ( wpuf_get_option( 'enable_post_del', 'wpuf_others', 'yes' ) == 'yes' ) { ?>
    130                                           <a href="<?php echo wp_nonce_url( "?action=del&pid=" . $post->ID, 'wpuf_del' ) ?>" onclick="return confirm('Are you sure to delete this post?');"><span style="color: red;"><?php _e( 'Delete', 'wpuf' ); ?></span></a>
    131                                       <?php } ?>
     117                                    <?php } ?>
     118                                    <span>
     119                                        <?php
     120                                        if ( wpuf_get_option( 'enable_post_edit', 'wpuf_dashboard', 'yes' ) == 'yes' ) {
     121                                            $disable_pending_edit   = wpuf_get_option( 'disable_pending_edit', 'wpuf_dashboard', 'on' );
     122                                            $edit_page              = (int) wpuf_get_option( 'edit_page_id', 'wpuf_frontend_posting' );
     123                                            $post_id                = $post->ID;
     124                                            $url                    = add_query_arg( array('pid' => $post->ID), get_permalink( $edit_page ) );
     125
     126                                            $edit_page_url = apply_filters( 'wpuf_edit_post_link', $url );
     127
     128                                            if ( $post->post_status == 'pending' && $disable_pending_edit == 'on' ) {
     129                                              // don't show the edit link
     130                                            } else {
     131                                              ?>
     132                                              <a href="<?php echo wp_nonce_url( $edit_page_url, 'wpuf_edit' ); ?>"><?php _e( 'Edit', 'wpuf' ); ?></a>
     133                                              <?php
     134                                            }
     135                                        }
     136                                        ?>
     137
     138                                        <?php
     139                                        if ( wpuf_get_option( 'enable_post_del', 'wpuf_dashboard', 'yes' ) == 'yes' ) {
     140                                            $del_url = add_query_arg( array('action' => 'del', 'pid' => $post->ID) );
     141                                            $message = __( 'Are you sure to delete?', 'wpuf' );
     142                                            ?>
     143                                            <a href="<?php echo wp_nonce_url( $del_url, 'wpuf_del' ) ?>" onclick="return confirm('<?php echo $message ?>');"><span style="color: red;"><?php _e( 'Delete', 'wpuf' ); ?></span></a>
     144                                        <?php } ?>
    132145                                    </span>
    133146                                        </div>
     
    211224
    212225            //redirect
    213             $redirect = add_query_arg( array('msg' => 'deleted'), get_permalink() );
     226            $roles = get_option('settings_basic');
     227
     228            if(is_array($roles)){
     229                $slugview = $roles['slug_view'];
     230            }else{
     231                $slugview = 'my-posts';
     232            }
     233
     234            $redirect = add_query_arg( array('msg' => 'deleted', 'profiletab' => $slugview), get_permalink() );
    214235            wp_redirect( $redirect );
    215236        } else {
Note: See TracChangeset for help on using the changeset viewer.