Changeset 8550
- Timestamp:
- 03/28/2019 01:36:34 PM (5 years ago)
- Location:
- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/organizers/edit.js
r8515 r8550 118 118 return { 119 119 blockData, 120 organizerPosts 120 organizerPosts: getEntityRecords( 'postType', 'wcb_organizer', organizersQuery ), 121 121 }; 122 122 }; -
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sessions/block-content.js
r8527 r8550 164 164 { show_images && 165 165 <FeaturedImage 166 className={ 'wordcamp-session-image-container align-' + decodeEntities( image_align ) }167 size={ featuredImageSize}168 wpMediaDetails={ get( post, "_embedded.wp:featuredmedia[0].media_details.sizes", {} ) }169 alt={ post.title.rendered}166 className={ 'wordcamp-session-image-container align-' + decodeEntities( image_align ) } 167 size={ featuredImageSize } 168 wpMediaDetails={ get( post, '_embedded.wp:featuredmedia[0].media_details.sizes', {} ) } 169 alt={ post.title.rendered } 170 170 { ...this.props } 171 171 /> -
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sessions/inspector-controls.js
r8514 r8550 68 68 69 69 <FeaturedImageInspectorControls 70 title ={ __( 'Image size', 'wordcamporg' ) }71 help ={ __( 'Specify image height and width, or select a predefined size.', 'wordcamporg' ) }72 selectLabel = { __( 'Size', 'wordcamporg') }70 title={ __( 'Image size', 'wordcamporg' ) } 71 help={ __( 'Specify image height and width, or select a predefined size.', 'wordcamporg' ) } 72 selectLabel={ __( 'Size', 'wordcamporg' ) } 73 73 { ...this.props } 74 74 /> -
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/shared/featured-image/index.js
r8506 r8550 13 13 */ 14 14 export default class FeaturedImage extends Component { 15 16 15 /** 17 16 * @param props Props for function. … … 31 30 */ 32 31 getFullImage() { 33 34 32 const availableSizes = this.props.wpMediaDetails; 35 33 … … 40 38 } 41 39 42 if ( availableSizes.hasOwnProperty( 'full' ) && availableSizes ['full'].hasOwnProperty( 'source_url' ) ) {43 this.setState( { selectedImage: availableSizes ['full']} );44 return availableSizes [ 'full' ];40 if ( availableSizes.hasOwnProperty( 'full' ) && availableSizes.full.hasOwnProperty( 'source_url' ) ) { 41 this.setState( { selectedImage: availableSizes.full } ); 42 return availableSizes.full; 45 43 } 46 44 47 let widestImage = { source_url 45 let widestImage = { source_url: '' }; 48 46 49 47 for ( const size in availableSizes ) { … … 52 50 } 53 51 54 if ( availableSizes[ size ] ['width'] > ( widestImage[ 'width '] || 0 ) && availableSizes[ size ].hasOwnProperty( 'source_url' ) ) {52 if ( availableSizes[ size ].width > ( widestImage[ 'width' ] || 0 ) && availableSizes[ size ].hasOwnProperty( 'source_url' ) ) { 55 53 widestImage = availableSizes[ size ]; 56 54 } … … 65 63 * Renders FeaturedImage component. 66 64 * 67 * @return s{*}65 * @return {*} 68 66 */ 69 67 render() { … … 73 71 const image = this.getFullImage(); 74 72 75 const width = featured_image_width || 150 73 const width = featured_image_width || 150; 76 74 77 return (75 return ( 78 76 <img 79 77 className={ classnames( 'wordcamp-featured-image', className ) } 80 src = { image['source_url']}81 alt ={ alt }82 width ={ width + 'px' }78 src={ image.source_url } 79 alt={ alt } 80 width={ width + 'px' } 83 81 /> 84 ) 82 ); 85 83 } 86 84 } -
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/shared/featured-image/inspector-control.js
r8506 r8550 34 34 label : __( '(Custom)', 'wordcamporg' ), 35 35 value : '', 36 } 36 }, 37 37 ]; 38 38 … … 41 41 */ 42 42 class FeaturedImageInspectorControls extends Component { 43 44 43 componentWillMount() { 45 this.availableSizes = sizePresets.map( ( size) => size.value );44 this.availableSizes = sizePresets.map( ( size ) => size.value ); 46 45 } 47 46 … … 55 54 56 55 render() { 57 58 56 const { attributes, setAttributes, title, help, selectLabel, cropLabel } = this.props; 59 57 const { featured_image_width } = attributes; … … 61 59 return ( 62 60 <PanelBody 63 title ={ title }64 initialopen ={ false }61 title={ title } 62 initialopen={ false } 65 63 > 66 64 <PanelRow> 67 65 <BaseControl 68 help ={ help }66 help={ help } 69 67 > 70 68 <PanelRow> … … 78 76 <PanelRow> 79 77 <TextControl 80 label = { __('Width (in px)', 'wordcamporg' ) }81 type = 'number'82 value ={ featured_image_width }83 onChange ={ ( width ) => setAttributes( { featured_image_width: Number( width ) } ) }78 label={ __( 'Width (in px)', 'wordcamporg' ) } 79 type="number" 80 value={ featured_image_width } 81 onChange={ ( width ) => setAttributes( { featured_image_width: Number( width ) } ) } 84 82 /> 85 83 </PanelRow> -
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/shared/grid-layout/block-content.js
r8517 r8550 18 18 */ 19 19 class GridContentLayout extends Component { 20 21 20 render() { 22 21 const { attributes, className, children } = this.props; … … 44 43 { childComponent } 45 44 </li> 46 ) 45 ); 47 46 } 48 47 ) … … 51 50 ); 52 51 } 53 54 52 } 55 53 -
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/shared/grid-layout/inspector-control.js
r8517 r8550 8 8 const DEFAULT_SCHEMA = { 9 9 grid_columns: { 10 default : 2,11 minimum : 2,12 maximum : 4,10 default : 2, 11 minimum : 2, 12 maximum : 4, 13 13 }, 14 14 }; … … 17 17 */ 18 18 class GridInspectorControl extends Component { 19 20 19 render() { 21 20 const { attributes, setAttributes } = this.props; … … 27 26 const schema = DEFAULT_SCHEMA; 28 27 29 return (28 return ( 30 29 <PanelBody> 31 30 <PanelBody 32 title={ __('Layout', 'wordcamporg')}33 initialOpen={ true}31 title={ __( 'Layout', 'wordcamporg' ) } 32 initialOpen={ true } 34 33 > 35 34 <PanelRow> 36 35 <RangeControl 37 label={ __('Grid Columns', 'wordcamporg')}36 label={ __( 'Grid Columns', 'wordcamporg' ) } 38 37 value={ Number( grid_columns ) } 39 38 min={ schema.grid_columns.minimum } 40 39 max={ schema.grid_columns.maximum } 41 40 initialPosition={ schema.grid_columns.default } 42 onChange={ (option) => setAttributes(43 { grid_columns: option})}41 onChange={ ( option ) => setAttributes( 42 { grid_columns: option } ) } 44 43 /> 45 44 </PanelRow> -
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/shared/grid-layout/toolbar.js
r8517 r8550 14 14 */ 15 15 class GridToolbar extends Component { 16 17 16 render() { 18 17 const { attributes, setAttributes } = this.props; … … 20 19 const layoutOptions = [ 21 20 { 22 value : 'grid',23 label : __('Grid', 'wordcamporg'),24 isActive : layout === 'grid'21 value : 'grid', 22 label : __( 'Grid', 'wordcamporg' ), 23 isActive : layout === 'grid', 25 24 }, 26 25 { 27 value : 'list',28 label : __('List', 'wordcamporg'),29 isActive : layout === 'grid'26 value : 'list', 27 label : __( 'List', 'wordcamporg' ), 28 isActive : layout === 'grid', 30 29 }, 31 30 ]; … … 34 33 <BlockControls> 35 34 <Toolbar 36 controls={ layoutOptions.map((option) => {37 const icon = `${ option.value}-view`;35 controls={ layoutOptions.map( ( option ) => { 36 const icon = `${ option.value }-view`; 38 37 const isActive = layout === option.value; 39 38 40 39 return { 41 icon : icon,42 title : option.label,43 isActive : isActive,44 onClick : () => {40 icon : icon, 41 title : option.label, 42 isActive : isActive, 43 onClick : () => { 45 44 setAttributes( 46 45 { 47 layout : option.value,48 grid_columns : option.value === 'grid' ? 2 : 1,46 layout : option.value, 47 grid_columns : option.value === 'grid' ? 2 : 1, 49 48 } 50 49 ); 51 50 }, 52 51 }; 53 } )}52 } ) } 54 53 /> 55 54 </BlockControls> -
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/block-content.js
r8539 r8550 23 23 * @param attributes 24 24 * @param onFeatureImageChange 25 * @return s{*}25 * @return {*} 26 26 * @constructor 27 27 */ 28 28 function SponsorDetail( { sponsorPost, attributes, onFeatureImageChange } ) { 29 30 29 const { 31 show_name, show_logo, show_desc 30 show_name, show_logo, show_desc, 32 31 } = attributes; 33 32 34 const featuredImageSizes = get( sponsorPost, "_embedded.wp:featuredmedia[0].media_details.sizes", {} );33 const featuredImageSizes = get( sponsorPost, '_embedded.wp:featuredmedia[0].media_details.sizes', {} ); 35 34 36 35 return ( 37 <div className={ "wordcamp-sponsor-details wordcamp-sponsor-details-"+ sponsorPost.slug }>36 <div className={ 'wordcamp-sponsor-details wordcamp-sponsor-details-' + sponsorPost.slug }> 38 37 39 38 { ( show_name || show_name === undefined ) && 40 39 <ItemTitle 41 className= 'wordcamp-sponsor-title'40 className="wordcamp-sponsor-title" 42 41 headingLevel={ 3 } 43 42 title={ sponsorPost.title.rendered.trim() } … … 47 46 { ( show_logo || show_logo === undefined ) && 48 47 <FeaturedImage 49 className={ "wordcamp-sponsor-featured-image wordcamp-sponsor-logo"}50 wpMediaDetails={ featuredImageSizes}51 alt={ sponsorPost.title.rendered}52 attributes={ attributes}48 className={ 'wordcamp-sponsor-featured-image wordcamp-sponsor-logo' } 49 wpMediaDetails={ featuredImageSizes } 50 alt={ sponsorPost.title.rendered } 51 attributes={ attributes } 53 52 /> 54 53 } … … 67 66 */ 68 67 class SponsorBlockContent extends Component { 69 70 68 constructor( props ) { 71 69 super(); 72 70 73 71 this.state = { 74 selectedPosts : [],75 sortBy : 'name_asc',72 selectedPosts : [], 73 sortBy : 'name_asc', 76 74 }; 77 75 } … … 85 83 * @param imageURL 86 84 */ 87 setFeaturedImageURL( sponsorId, imageURL ) {85 setFeaturedImageURL( sponsorId, imageURL ) { 88 86 const sponsor_image_urls = this.sponsorImageUrl || {}; 89 87 sponsor_image_urls[ sponsorId ] = imageURL; … … 99 97 const { selectedPosts: newSelectedPosts, attributes: newAttributes, sponsorTermOrder: newSponsorTermOrder } = nextProps; 100 98 const { sort_by: newSortBy } = newAttributes; 101 const newSelectedPostIds = newSelectedPosts.map( post=> post.id ).sort();99 const newSelectedPostIds = newSelectedPosts.map( ( post ) => post.id ).sort(); 102 100 103 101 const { selectedPosts, sortBy } = this.state; 104 const selectedPostsIds = selectedPosts.map( post=> post.id ).sort();102 const selectedPostsIds = selectedPosts.map( ( post ) => post.id ).sort(); 105 103 106 104 if ( sortBy === newSortBy && newSelectedPosts.length === selectedPosts.length && difference( selectedPostsIds, newSelectedPostIds ).length === 0 ) { … … 118 116 } 119 117 sortedPosts = newSelectedPosts.sort( ( sponsor1, sponsor2 ) => { 120 return newSponsorTermOrder.indexOf( ( sponsor1.sponsor_level || [] )[ 0] ) - newSponsorTermOrder.indexOf( ( sponsor2.sponsor_level || [] )[0] )118 return newSponsorTermOrder.indexOf( ( sponsor1.sponsor_level || [] )[ 0 ] ) - newSponsorTermOrder.indexOf( ( sponsor2.sponsor_level || [] )[ 0 ] ); 121 119 } ); 122 120 break; … … 126 124 const title1 = sponsor1.title.rendered.trim(); 127 125 const title2 = sponsor2.title.rendered.trim(); 128 return title1 > title2 ? -1 : 1 126 return title1 > title2 ? -1 : 1; 129 127 } ); 130 128 break; … … 135 133 const title1 = sponsor1.title.rendered.trim(); 136 134 const title2 = sponsor2.title.rendered.trim(); 137 return title1 < title2 ? -1 : 1 135 return title1 < title2 ? -1 : 1; 138 136 } ); 139 137 break; … … 141 139 this.setState( 142 140 { 143 selectedPosts : sortedPosts,144 sortBy : newSortBy,141 selectedPosts : sortedPosts, 142 sortBy : newSortBy, 145 143 } 146 144 ); … … 150 148 * Renders Sponsor Block content inside editor. 151 149 * 152 * @return s{*}150 * @return {*} 153 151 */ 154 152 render() { … … 163 161 selectedPosts.map( ( post ) => { 164 162 return ( 165 166 167 168 169 ) 163 <SponsorDetail 164 sponsorPost={ post } 165 attributes={ attributes } 166 /> 167 ); 170 168 } ) 171 169 } 172 170 </GridContentLayout> 173 ) 171 ); 174 172 } 175 176 173 } 177 174 -
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/block-controls.js
r8540 r8550 10 10 * Internal dependencies. 11 11 */ 12 import { BlockControls, PlaceholderNoContent } from "../shared/block-controls";12 import { BlockControls, PlaceholderNoContent } from '../shared/block-controls'; 13 13 import SponsorBlockContent from './block-content'; 14 import ItemSelect from '../shared/item-select' 14 import ItemSelect from '../shared/item-select'; 15 15 import { LABEL } from './index'; 16 16 … … 20 20 if ( 'post' === option.type ) { 21 21 return SponsorPostOption( option ); 22 } else { 23 return SponsorLevelOption( option ); 24 } 22 } 23 return SponsorLevelOption( option ); 25 24 } 26 25 27 26 function SponsorPostOption( sponsor ) { 28 27 const imageUrl = get( sponsor.featuredImageData, 'sizes.thumbnail.source_url', false ); 29 return (28 return ( 30 29 <span> 31 30 { sponsor.label } … … 35 34 36 35 function SponsorLevelOption( sponsorLevel ) { 37 return (36 return ( 38 37 <span className="wordcamp-item-select-option-label"> 39 38 { sponsorLevel.label } … … 49 48 */ 50 49 class SponsorBlockControls extends BlockControls { 51 52 50 constructor( props ) { 53 super( props);51 super( props ); 54 52 this.state = { 55 posts : [],56 terms : [],57 loading : true,58 selectedPosts : [],59 sponsorTermOrder : [] 53 posts : [], 54 terms : [], 55 loading : true, 56 selectedPosts : [], 57 sponsorTermOrder : [], 60 58 }; 61 59 } … … 88 86 break; 89 87 case 'specific_terms': 90 if ( intersection( term_ids, post.sponsor_level || [] ) 88 if ( intersection( term_ids, post.sponsor_level || [] ).length ) { 91 89 selectedPosts.push( post ); 92 90 } … … 110 108 const parsedPosts = sponsorPosts.then( 111 109 ( fetchedPosts ) => { 112 113 110 const posts = fetchedPosts.map( 114 111 ( post ) => { 115 116 112 return { 117 label: decodeEntities( post.title.rendered.trim()) ||118 __( '(Untitled)', 'wordcamporg'),119 value : post.id,120 type : 'post',121 featuredImageData : get( post,122 '_embedded.wp:featuredmedia[0].media_details', '' ),123 } 113 label: decodeEntities( post.title.rendered.trim() ) || 114 __( '(Untitled)', 'wordcamporg' ), 115 value : post.id, 116 type : 'post', 117 featuredImageData : get( post, 118 '_embedded.wp:featuredmedia[0].media_details', '' ), 119 }; 124 120 } 125 121 ); … … 129 125 } 130 126 } 131 ).catch( ( e) => {132 console.error( "Error fetching data", e );133 } );127 ).catch( ( e ) => { 128 console.error( 'Error fetching data', e ); 129 } ); 134 130 135 131 const parsedTerms = sponsorLevels.then( … … 149 145 } 150 146 } 151 ).catch( ( e) => {152 console.error( "Error fetching data", e );153 } );147 ).catch( ( e ) => { 148 console.error( 'Error fetching data', e ); 149 } ); 154 150 155 151 const parsedSettings = siteSettings.then( … … 183 179 184 180 if ( newValue && chosen ) { 185 186 181 switch ( chosen ) { 187 182 case 'post' : … … 243 238 return ( 244 239 <PlaceholderNoContent 245 label ={ LABEL }246 loading ={ () => {240 label={ LABEL } 241 loading={ () => { 247 242 return ! Array.isArray( sponsorPosts ); 248 243 } } 249 244 /> 250 ) 245 ); 251 246 } 252 247 … … 275 270 <SponsorBlockContent 276 271 selectedPosts={ selectedPosts } 277 sponsorTermOrder ={ sponsorTermOrder }278 { ...this.props}272 sponsorTermOrder={ sponsorTermOrder } 273 { ...this.props } 279 274 /> 280 275 281 { 'all' !== mode &&276 { 'all' !== mode && 282 277 <Placeholder 283 278 icon={ icon } 284 label = { __('Sponsors', 'wordcamporg') }279 label={ __( 'Sponsors', 'wordcamporg' ) } 285 280 > 286 <div className= ''>281 <div className="" > 287 282 <Button 288 283 isDefault 289 284 isLarge 290 onClick ={285 onClick={ 291 286 () => { 292 287 setAttributes( { mode: 'all' } ); … … 295 290 } 296 291 > 297 { __( 'List all sponsors', 'wordcamporg') }292 { __( 'List all sponsors', 'wordcamporg' ) } 298 293 </Button> 299 294 </div> … … 302 297 buildSelectOptions={ 303 298 () => { 304 return this.buildSelectOptions() 299 return this.buildSelectOptions(); 305 300 } 306 301 } 307 isLoading={ this.state.loading}302 isLoading={ this.state.loading } 308 303 onChange={ 309 ( selectedOptions) => {310 return this.onChange( selectedOptions);304 ( selectedOptions ) => { 305 return this.onChange( selectedOptions ); 311 306 } 312 307 } 313 308 selectProps={ 314 309 { 315 formatOptionLabel: ( optionData) => {310 formatOptionLabel: ( optionData ) => { 316 311 return ( 317 <SponsorOption { ...optionData} />312 <SponsorOption { ...optionData } /> 318 313 ); 319 } 314 }, 320 315 } 321 316 } 322 label={ __('Or, choose specific sponsors or levels',323 'wordcamporg' )}317 label={ __( 'Or, choose specific sponsors or levels', 318 'wordcamporg' ) } 324 319 value={ selectedOptions } 325 { ...this.props}320 { ...this.props } 326 321 /> 327 322 </div> … … 331 326 ); 332 327 } 333 334 328 } 335 329 -
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/edit.js
r8526 r8550 18 18 19 19 class SponsorsEdit extends Component { 20 21 20 /** 22 21 * Constructor for SponsorsEdit block. … … 32 31 componentWillMount() { 33 32 const sponsorQuery = { 34 orderby : 'title',35 order : 'asc',36 per_page : MAX_PAGE,37 _embed : true,33 orderby : 'title', 34 order : 'asc', 35 per_page : MAX_PAGE, 36 _embed : true, 38 37 }; 39 38 40 39 const sponsorLevelQuery = { 41 orderby : 'id',42 order : 'asc',43 per_page : MAX_PAGE,44 _embed : true40 orderby : 'id', 41 order : 'asc', 42 per_page : MAX_PAGE, 43 _embed : true, 45 44 }; 46 45 47 46 this.setState( 48 47 { 49 sponsorPosts : apiFetch( { path: addQueryArgs( '/wp/v2/sponsors', sponsorQuery ) } ),50 sponsorLevels : apiFetch( { path: addQueryArgs( '/wp/v2/sponsor_level', sponsorLevelQuery ) } ),51 siteSettings : apiFetch( { path: addQueryArgs( '/wp/v2/settings', {} ) } ),48 sponsorPosts : apiFetch( { path: addQueryArgs( '/wp/v2/sponsors', sponsorQuery ) } ), 49 sponsorLevels : apiFetch( { path: addQueryArgs( '/wp/v2/sponsor_level', sponsorLevelQuery ) } ), 50 siteSettings : apiFetch( { path: addQueryArgs( '/wp/v2/settings', {} ) } ), 52 51 } 53 52 ); … … 67 66 <SponsorBlockControls 68 67 icon={ SPONSORS_ICON } 69 sponsorPosts ={ sponsorPosts }70 sponsorLevels ={ sponsorLevels }71 siteSettings ={ siteSettings }68 sponsorPosts={ sponsorPosts } 69 sponsorLevels={ sponsorLevels } 70 siteSettings={ siteSettings } 72 71 { ...this.props } 73 72 /> … … 75 74 <Fragment> 76 75 <SponsorInspectorControls 77 sponsorPosts ={ sponsorPosts }78 sponsorLevels ={ sponsorLevels }79 { ...this.props}76 sponsorPosts={ sponsorPosts } 77 sponsorLevels={ sponsorLevels } 78 { ...this.props } 80 79 /> 81 { mode &&80 { mode && 82 81 <GridToolbar 83 { ...this.props}82 { ...this.props } 84 83 /> 85 84 } 86 85 </Fragment> 87 86 </Fragment> 88 ) 87 ); 89 88 } 90 89 } -
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/inspector-controls.js
r8538 r8550 17 17 */ 18 18 class SponsorInspectorControls extends Component { 19 20 19 /** 21 20 * Renders inspector controls. 22 21 */ 23 22 render() { 24 25 23 const sortOptions = [ 26 { label : __( 'Name (A to Z)', 'wordcamporg' ), value: 'name_asc' },27 { label : __( 'Name (Z to A)', 'wordcamporg' ), value: 'name_desc' },28 { label : __( 'Sponsor Level', 'wordcamporg' ), value: 'sponsor_level' },24 { label: __( 'Name (A to Z)', 'wordcamporg' ), value: 'name_asc' }, 25 { label: __( 'Name (Z to A)', 'wordcamporg' ), value: 'name_desc' }, 26 { label: __( 'Sponsor Level', 'wordcamporg' ), value: 'sponsor_level' }, 29 27 ]; 30 28 31 29 const { attributes, setAttributes } = this.props; 32 30 const { 33 show_name, show_logo, show_desc, sort_by 31 show_name, show_logo, show_desc, sort_by, 34 32 } = attributes; 35 33 … … 40 38 /> 41 39 <PanelBody 42 title ={ __( 'Content Settings', 'wordcamporg' ) }43 initialOpen ={ true }40 title={ __( 'Content Settings', 'wordcamporg' ) } 41 initialOpen={ true } 44 42 > 45 43 <PanelRow> 46 44 <ToggleControl 47 label ={ __( 'Name', 'wordcamporg' ) }48 help ={ __( 'Show or hide sponsor name', 'wordcamporg' ) }49 checked ={ show_name === undefined ? true : show_name }45 label={ __( 'Name', 'wordcamporg' ) } 46 help={ __( 'Show or hide sponsor name', 'wordcamporg' ) } 47 checked={ show_name === undefined ? true : show_name } 50 48 onChange={ ( value ) => setAttributes( { show_name: value } ) } 51 49 /> … … 53 51 <PanelRow> 54 52 <ToggleControl 55 label ={ __( 'Logo', 'wordcamporg' ) }56 help ={ __( 'Show or hide sponsor logo', 'wordcamporg' ) }57 checked ={ show_logo === undefined ? true : show_logo }53 label={ __( 'Logo', 'wordcamporg' ) } 54 help={ __( 'Show or hide sponsor logo', 'wordcamporg' ) } 55 checked={ show_logo === undefined ? true : show_logo } 58 56 onChange={ ( value ) => setAttributes( { show_logo: value } ) } 59 57 /> … … 61 59 <PanelRow> 62 60 <ToggleControl 63 label ={ __( 'Description', 'wordcamporg' ) }64 help ={ __( 'Show or hide sponsor description', 'wordcamporg' ) }65 checked ={ show_desc === undefined ? true : show_desc }61 label={ __( 'Description', 'wordcamporg' ) } 62 help={ __( 'Show or hide sponsor description', 'wordcamporg' ) } 63 checked={ show_desc === undefined ? true : show_desc } 66 64 onChange={ ( value ) => setAttributes( { show_desc: value } ) } 67 65 /> … … 69 67 <PanelRow> 70 68 <SelectControl 71 label ={ __( 'Sort by', 'wordcamporg' ) }72 options ={ sortOptions }73 value ={ sort_by || 'name_asc' }69 label={ __( 'Sort by', 'wordcamporg' ) } 70 options={ sortOptions } 71 value={ sort_by || 'name_asc' } 74 72 onChange={ ( value ) => setAttributes( { sort_by: value } ) } 75 help ={ __( 'Configure sponsor levels from the Sponsor -> Order Sponsor Levels page.', 'wordcamporg' ) }73 help={ __( 'Configure sponsor levels from the Sponsor -> Order Sponsor Levels page.', 'wordcamporg' ) } 76 74 /> 77 75 </PanelRow> 78 76 </PanelBody> 79 77 <FeaturedImageInspectorControls 80 title ={ __( 'Logo size', 'wordcamporg' ) }81 help ={ __( 'Specify logo width, or select a predefined size.', 'wordcamporg' ) }82 selectLabel = { __( 'Size', 'wordcamporg') }78 title={ __( 'Logo size', 'wordcamporg' ) } 79 help={ __( 'Specify logo width, or select a predefined size.', 'wordcamporg' ) } 80 selectLabel={ __( 'Size', 'wordcamporg' ) } 83 81 { ...this.props } 84 82 /> 85 83 </InspectorControls> 86 ) 84 ); 87 85 } 88 86 } -
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/webpack.config.js
r8524 r8550 5 5 const NODE_ENV = process.env.NODE_ENV || 'development'; 6 6 const SOURCE_MAPS = process.env.SOURCE_MAPS ? true : false; 7 8 7 9 8 const externals = {
Note: See TracChangeset
for help on using the changeset viewer.