array( 'Authorization' => 'Bearer ' . esc_attr( $absolutte_dribbble_token ) ), ); $absolutte_response = wp_remote_get( 'https://api.dribbble.com/v1/users/' . esc_attr( $absolutte_dribbble_user ), $dribbble_args ); if( ! is_wp_error( $absolutte_response ) ) { if ( 200 == $absolutte_response['response']['code'] ) { $absolutte_response_body = json_decode( $absolutte_response['body'] ); $absolutte_shots_count = $absolutte_response_body->shots_count; $absolutte_drb_shots = wp_remote_get( $absolutte_response_body->shots_url . '?sort=recent&per_page=' . $posts_per_page, $dribbble_args ); if ( 200 == $absolutte_drb_shots['response']['code'] ) { $absolutte_drb_shots_body = json_decode( $absolutte_drb_shots['body'] ); echo "
\n\n"; foreach ( $absolutte_drb_shots_body as $key => $shot ) { $portfolio_image = $shot->images->hidpi; echo "\t\t\t
"; echo "\t\t\t\t\n"; echo '
'; echo '
'; echo '
'; echo '

' . esc_html( $shot->title ) . '

'; echo "\t\t\t
\n"; echo "\t\t\t
\n"; echo ''; echo "
\n"; } echo "
\n\n"; if ( $absolutte_shots_count > $posts_per_page ) { echo '
'; echo '' . esc_html__( 'Load More', 'absolutte' ) . ''; echo '
'; } }else{ echo esc_html( $absolutte_response['body'] ); } }else{ echo esc_html( $absolutte_response['body'] ); } }