/**
  * Refreshes module data
  *
  * @access public
  * @return void
  */
 public static function refresh()
 {
     self::$data = (array) ThemexCore::getOption(__CLASS__);
 }
Beispiel #2
0
    ?>
</th>
					<td>
						<div class="field-wrapper">
							<input type="text" name="signature" value="<?php 
    echo esc_attr(ThemexUser::$data['user']['profile']['signature']);
    ?>
" />
						</div>
					</td>
				</tr>
				<?php 
}
?>
				<?php 
ThemexForm::renderData('profile', array('edit' => true, 'placeholder' => false, 'before_title' => '<tr><th>', 'after_title' => '</th>', 'before_content' => '<td>', 'after_content' => '</td></tr>'), ThemexUser::$data['user']['profile']);
?>
			</tbody>
		</table>
		<?php 
if (!ThemexCore::checkOption('profile_description')) {
    ?>
			<?php 
    ThemexInterface::renderEditor('description', ThemexUser::$data['user']['profile']['description']);
    ?>
		<?php 
}
?>
		<a href="#" class="element-button submit-button"><span class="button-icon save"></span><?php 
_e('Save Changes', 'academy');
?>
 /**
  * Renders admin profile
  *
  * @access public
  * @param mixed $user
  * @return void
  */
 public static function renderAdminProfile($user)
 {
     $profile = self::getProfile($user->ID);
     $out = '<table class="form-table themex-profile"><tbody>';
     if (current_user_can('edit_users')) {
         $out .= '<tr><th><label for="avatar">' . __('Profile Photo', 'academy') . '</label></th>';
         $out .= '<td><div class="themex-image-uploader">';
         $out .= get_avatar($user->ID);
         $out .= ThemexInterface::renderOption(array('id' => 'avatar', 'type' => 'uploader', 'value' => '', 'wrap' => false));
         $out .= '</div></td></tr>';
     }
     ob_start();
     ThemexForm::renderData('profile', array('edit' => true, 'placeholder' => false, 'before_title' => '<tr><th><label>', 'after_title' => '</label></th>', 'before_content' => '<td>', 'after_content' => '</td></tr>'), $profile);
     $out .= ob_get_contents();
     ob_end_clean();
     $out .= '<tr><th><label>' . __('Profile Text', 'academy') . '</label></th><td>';
     ob_start();
     ThemexInterface::renderEditor('description', themex_array('description', $profile));
     $out .= ob_get_contents();
     ob_end_clean();
     $out .= '</td></tr>';
     $out .= '</tbody></table>';
     echo $out;
 }
 /**
  * Renders admin profile
  *
  * @access public
  * @param mixed $user
  * @return void
  */
 public static function renderAdminProfile($user)
 {
     $profile = self::getProfile($user->ID, true);
     $out = '<table class="form-table themex-profile"><tbody>';
     if (current_user_can('edit_users')) {
         $out .= '<tr><th><label for="avatar">' . __('Profile Photo', 'academy') . '</label></th>';
         $out .= '<td><div class="themex-image-uploader">';
         $out .= get_avatar($user->ID);
         $out .= ThemexInterface::renderOption(array('id' => 'avatar', 'type' => 'uploader', 'value' => '', 'wrap' => false));
         $out .= '</div></td></tr>';
     }
     if (!ThemexCore::checkOption('profile_signature')) {
         $out .= '<tr><th><label>' . __('Signature', 'academy') . '</label></th><td>';
         $out .= '<input type="text" name="signature" value="' . $profile['signature'] . '" />';
         $out .= '</td></tr>';
     }
     ob_start();
     ThemexForm::renderData('profile', array('edit' => true, 'before_title' => '<tr><th><label>', 'after_title' => '</label></th>', 'before_content' => '<td>', 'after_content' => '</td></tr>'), $profile);
     $out .= ob_get_contents();
     ob_end_clean();
     $out .= '<tr><th><label>' . __('Profile Text', 'academy') . '</label></th><td>';
     ob_start();
     ThemexInterface::renderEditor('description', wpautop(get_user_meta($user->ID, 'description', true)));
     $out .= ob_get_contents();
     ob_end_clean();
     $out .= '</td></tr>';
     if (!ThemexCore::checkOption('profile_links')) {
         $out .= '<tr><th><label>' . __('Facebook', 'academy') . '</label></th><td>';
         $out .= '<input type="text" name="facebook" value="' . $profile['facebook'] . '" />';
         $out .= '</td></tr>';
         $out .= '<tr><th><label>' . __('Twitter', 'academy') . '</label></th><td>';
         $out .= '<input type="text" name="twitter" value="' . $profile['twitter'] . '" />';
         $out .= '</td></tr>';
         $out .= '<tr><th><label>' . __('Google', 'academy') . '</label></th><td>';
         $out .= '<input type="text" name="google" value="' . $profile['google'] . '" />';
         $out .= '</td></tr>';
         $out .= '<tr><th><label>' . __('Tumblr', 'academy') . '</label></th><td>';
         $out .= '<input type="text" name="tumblr" value="' . $profile['tumblr'] . '" />';
         $out .= '</td></tr>';
         $out .= '<tr><th><label>' . __('LinkedIn', 'academy') . '</label></th><td>';
         $out .= '<input type="text" name="linkedin" value="' . $profile['linkedin'] . '" />';
         $out .= '</td></tr>';
         $out .= '<tr><th><label>' . __('Flickr', 'academy') . '</label></th><td>';
         $out .= '<input type="text" name="flickr" value="' . $profile['flickr'] . '" />';
         $out .= '</td></tr>';
         $out .= '<tr><th><label>' . __('YouTube', 'academy') . '</label></th><td>';
         $out .= '<input type="text" name="youtube" value="' . $profile['youtube'] . '" />';
         $out .= '</td></tr>';
         $out .= '<tr><th><label>' . __('Vimeo', 'academy') . '</label></th><td>';
         $out .= '<input type="text" name="vimeo" value="' . $profile['vimeo'] . '" />';
         $out .= '</td></tr>';
     }
     $out .= '</tbody></table>';
     echo $out;
 }
Beispiel #5
0
function themex_contact_form($atts, $content = null)
{
    $out = '<form action="' . AJAX_URL . '" method="POST" class="formatted-form ajax-form">';
    $out .= '<div class="message"></div>';
    ob_start();
    ThemexForm::renderData('contact');
    $out .= ob_get_contents();
    ob_end_clean();
    $out .= '<div class="clear"></div><a class="element-button submit-button" href="#">' . __('Submit', 'academy') . '</a>';
    $out .= '<div class="form-loader"></div>';
    $out .= '<input type="hidden" name="slug" value="contact" />';
    $out .= '<input type="hidden" class="action" value="' . THEMEX_PREFIX . 'form_submit" /></form>';
    return $out;
}