[ Index ] |
PHP Cross Reference of BuddyPress |
[Summary view] [Print] [Text view]
1 /** 2 * WordPress dependencies. 3 */ 4 const { 5 blockEditor: { 6 RichText, 7 }, 8 element: { 9 createElement, 10 }, 11 } = wp; 12 13 const saveEmbedActivityBlock = ( { attributes } ) => { 14 const { url, caption } = attributes; 15 16 if ( ! url ) { 17 return null; 18 } 19 20 return ( 21 <figure className="wp-block-embed is-type-bp-activity"> 22 <div className="wp-block-embed__wrapper"> 23 { 24 `\n${ url }\n` /* URL needs to be on its own line. */ 25 } 26 </div> 27 { ! RichText.isEmpty( caption ) && ( 28 <RichText.Content 29 tagName="figcaption" 30 value={ caption } 31 /> 32 ) } 33 </figure> 34 ); 35 }; 36 37 export default saveEmbedActivityBlock;
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri May 5 01:01:24 2023 | Cross-referenced by PHPXref 0.7.1 |