示例#1
0
/**
 * Get the 'full' avatar height setting.
 *
 * @since BuddyPress (1.5.0)
 *
 * @return int The 'full' height.
 */
function bp_core_avatar_full_height()
{
    return apply_filters('bp_core_avatar_full_height', bp_core_avatar_dimension('full', 'height'));
}
示例#2
0
/**
 * Get the 'full' avatar height setting.
 *
 * @since 1.5.0
 *
 * @return int The 'full' height.
 */
function bp_core_avatar_full_height()
{
    /**
     * Filters the 'full' avatar height setting.
     *
     * @since 1.5.0
     *
     * @param int $value Value for the 'full' avatar height setting.
     */
    return apply_filters('bp_core_avatar_full_height', bp_core_avatar_dimension('full', 'height'));
}
示例#3
0
        /**
         * Displays the form to define widget settings
         * 
         * @package BP_Show_Friends_Widget
         * @since    2.0
         * 
         * @uses bp_core_avatar_dimension() to get max size
         */
        function form($instance)
        {
            $instance = wp_parse_args((array) $instance, array('per_page' => 5, 'size' => 50));
            $per_page = intval($instance['per_page']);
            $size = intval($instance['size']);
            $maxsize = bp_core_avatar_dimension('full', 'width');
            $maxsize = !empty($maxsize) ? $maxsize : 100;
            ?>
		
		<p>
			<label for="bp-show-friends-widget-per-page">
				<?php 
            _e('Max Number of Avatars:', 'bp-show-friends');
            ?>
 
				<input class="widefat" id="<?php 
            echo $this->get_field_id('per_page');
            ?>
" name="<?php 
            echo $this->get_field_name('per_page');
            ?>
" type="number" min="1" step="1" value="<?php 
            echo intval($per_page);
            ?>
" style="width: 30%" />
			</label>
		</p>
		<p>
			<label for="bp-show-friends-widget-avatar-size">
				<?php 
            _e('Avatar size (in pixels)', 'bp-show-friends');
            ?>
 
				<input class="widefat" id="<?php 
            echo $this->get_field_id('size');
            ?>
" name="<?php 
            echo $this->get_field_name('size');
            ?>
" type="number" min="40" max="<?php 
            echo $maxsize;
            ?>
" step="5" value="<?php 
            echo intval($size);
            ?>
" style="width: 30%" />
			</label>
		</p>
		
	<?php 
        }