Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
*
* @see https://github.com/WordPress/gutenberg/blob/3f1324b53cc8bb45d08d12d5321d6f88510bed09/packages/blocks/src/api/serializer.js#L78-L96
* @see https://github.com/WordPress/gutenberg/blob/c5f9bd88125282a0c35f887cc8d835f065893112/packages/editor/src/hooks/generated-class-name.js#L42
* @see https://github.com/Automattic/wp-calypso/pull/30546#issuecomment-463637946
*/
return CoreVideoSave( props );
}
const url = `https://videopress.com/v/${ guid }`;
return (
<figure>
<div>
{ `\n${ url }\n` /* URL needs to be on its own line. */ }
</div>
{ ! RichText.isEmpty( caption ) && (
) }
</figure>
);
};
const { url, title, hasParallax, dimRatio, align, contentAlign, data } = attributes;
const style = backgroundImageStyles(url);
const classes = classnames(
className,
dimRatioToClass(dimRatio),
{
'has-background-dim': dimRatio !== 0,
'has-parallax': hasParallax,
[ `has-${contentAlign}-content` ]: contentAlign !== 'center',
},
align ? `align${align}` : null,
);
return (
<div style="{">
{ ! RichText.isEmpty(title) && (
) }
</div>
);
};
const classes = classnames(
'wp-block-cover-image',
dimRatioToClass(dimRatio),
overlayColorClass,
{
'has-background-dim': dimRatio !== 0,
'has-parallax': hasParallax,
[ `has-${contentAlign}-content` ]: contentAlign !== 'center',
},
align ? `align${align}` : null,
);
return (
<div style="{">
{ ! RichText.isEmpty(title) && (
) }
</div>
);
},
}, {
static Content( { attributes } ) {
const { days, hours, minutes } = attributes;
const timeString = buildDurationString( { days, hours, minutes } );
return
<p>
<span>
{ }
{ RichText.isEmpty( attributes.legend ) && Duration.getDefaultDurationLegend() }
</span>
{ timeString + ". " }
</p>
;
}
}
onClick={ this.switchToEditing }
icon="edit"
/>
<figure>
{ /*
Disable the video player so the user clicking on it won't play the
video when the controls are enabled.
*/ }
<div>
</div>
{ ( ! RichText.isEmpty( caption ) || isSelected ) && (
setAttributes( { caption: value } ) }
inlineToolbar
/>
) }
</figure>
);
}
};
/>
);
} ) }
) }
<div style="{">
<div tabindex="0" role="button">
</div></div>
<div style="{" data-url="{">
{ VIDEO_BACKGROUND_TYPE === backgroundType && (
<video src="{" loop="" muted="" autoplay="">
) }
{ (! RichText.isEmpty(title) || isSelected) && (
) }
</video></div>
);
}
),
});
const image = (
<img height="{" width="{" id="" alt="{" src="{">
);
return (
<figure>
{ href ? <a href="{">{ image }</a> : image }
{ ! RichText.isEmpty(caption) && }
</figure>
);
},
},
const { url, alt, caption, align, href, width, height, id } = attributes;
const image = (
<img height="{" width="{" id="" alt="{" src="{">
);
return (
<figure align="">
{ href ? <a href="{">{ image }</a> : image }
{ ! RichText.isEmpty( caption ) && }
</figure>
);
},
},
) }
<div style="{">
</div>