Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/INN/Largo into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
rclations committed Aug 19, 2017
2 parents 7e7b1ef + 1b228af commit ceee91b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
15 changes: 11 additions & 4 deletions inc/avatars/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,24 @@ function largo_get_avatar_filter( $avatar, $id_or_email, $size, $default, $alt )
* Get the avatar image HTML for the given user id/email and size
*
* @param int|string $id_or_email a wordpress user ID or user email address;
* @param int $string The size of the avatar
* @param int $size The size of the avatar
* @return false|array { Returns an array, or false if no image is available.
* @type string url
* @type int width
* @type int height
* @type bool is_intermediate
* }
*
*/
function largo_get_avatar_src( $id_or_email, $size ) {

// get the user ID
if ( is_numeric( $id_or_email ) ) {
$id = (int) $id_or_email;
} elseif ( is_object( $id_or_email ) ) {
if ( ! empty( $id_or_email->user_id ) ) {
$id = (int) $id_or_email->user_id;
}
$id = ! empty( $id_or_email->user_id )
? (int) $id_or_email->user_id
: null;
} else {
$user = get_user_by( 'email', $id_or_email );
$id = $user->ID;
Expand Down
3 changes: 3 additions & 0 deletions lib/options-framework/options-framework.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,9 @@ function optionsframework_validate( $input ) {
*/

function optionsframework_save_options_notice() {
if ( ! function_exists( 'add_settings_error' ) ) {
require WPINC . '/template.php';
}
add_settings_error( 'options-framework', 'save_options', __( 'Options saved.', 'largo' ), 'updated fade' );
}

Expand Down

0 comments on commit ceee91b

Please sign in to comment.