Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function user_profile_filebox( $user ) {
- $contact_id = wp_fusion()->user->get_contact_id( $user->ID );
- if( empty( $contact_id ) ) {
- return;
- }
- wp_fusion()->crm->connect();
- $fields = array( 'FileName', 'Id' );
- $query = array( 'ContactId' => $contact_id );
- $files = wp_fusion()->crm->app->dsQuery( 'FileBox', 1000, 0, $query, $fields );
- if( empty( $files ) ) {
- return;
- }
- ?>
- <table class="form-table">
- <tr>
- <th><label for="files"><?php echo wp_fusion()->crm->name ?> Files</label></th>
- <td id="files">
- <ul>
- <?php foreach( $files as $file ) : ?>
- <li><?php echo $file['Id'] ?>: <?php echo $file['FileName']; ?></li>
- <?php endforeach; ?>
- </ul>
- </td>
- </tr>
- </table>
- <?php
- }
- add_action( 'show_user_profile', 'user_profile_filebox' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement