芝麻web文件管理V1.00
编辑当前文件:/www/wwwroot/shphe-en.com/wp-content/plugins/bb-plugin/classes/class-fl-builder-photo.php
sizes ) ) { echo $photo->url; } else if ( ! empty( $photo->sizes->thumbnail ) ) { echo $photo->sizes->thumbnail->url; } else { echo $photo->sizes->full->url; } } /** * Renders the options for a photo select field. * * @since 1.0 * @param string $selected The selected URL. * @param object $photo An object with photo data. * @return void */ static public function get_src_options($selected, $photo) { if ( ! isset( $photo->sizes ) ) { echo '
' . _x( 'Full Size', 'Image size.', 'fl-builder' ) . '
'; } else { $titles = array( 'full' => _x( 'Full Size', 'Image size.', 'fl-builder' ), 'large' => _x( 'Large', 'Image size.', 'fl-builder' ), 'medium' => _x( 'Medium', 'Image size.', 'fl-builder' ), 'thumbnail' => _x( 'Thumbnail', 'Image size.', 'fl-builder' ) ); foreach($photo->sizes as $key => $val) { if(!isset($titles[$key])) { $titles[$key] = ucwords(str_replace(array('_', '-'), ' ', $key)); } echo '
url) . '>' . $titles[$key] . ' - ' . $val->width . ' x ' . $val->height . '
'; } } } }