This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 0) Also, install the file extensions wp | |
| 1) Install wp-maximum-upload-size | |
| Edit twenty-twentysomething funcions.php | |
| @ini_set( 'upload_max_size' , '264M' ); | |
| ( sudo chown -R www-data wp-content/ ) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default function Edit( { attributes, setAttributes } ) { | |
| const imSizes = useSelect( | |
| ( select ) => select( 'core/block-editor' ).getSettings().imageSizes | |
| ); | |
| function replaceFunction(item) { | |
| item.label = item.name; | |
| item.value = item.slug; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <a href="<?php the_permalink(); ?>"><?php echo get_the_post_thumbnail( | |
| $post->ID, | |
| 'mytheme-450', | |
| array( | |
| 'srcset' => wp_get_attachment_image_url( get_post_thumbnail_id(), 'mytheme-450' ) . ' 480w, ' . | |
| wp_get_attachment_image_url( get_post_thumbnail_id(), 'mytheme-300' ) . ' 640w, ' . | |
| wp_get_attachment_image_url( get_post_thumbnail_id(), 'mytheme-450') . ' 1200w' | |
| ) | |
| ); ?> | |
| </a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Gutenberg Blocks | |
| * | |
| * All blocks related JavaScript files should be imported here. | |
| * You can create a new block folder in this dir and include code | |
| * for that block here as well. | |
| * | |
| * All blocks should be included here since this is the file that | |
| * Webpack is compiling as the input file. | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // functions.php | |
| function wporg_block_wrapper( $block_content, $block, ) { | |
| $myAttr = $block['attrs']; | |
| $myKeys = array_keys($myAttr); | |
| $disabled = false; | |
| foreach ($myKeys as $myKey) { | |
| $myValue = $myAttr[$myKey]; | |
| if ($myKey == 'disableBlock' ){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| jQuery(document).ready( function () { | |
| jQuery('.datatable').DataTable({ | |
| 'processing': true, | |
| 'data': [ | |
| ['Tiger Nixon', '1' ], | |
| ['Garrett Winters', '2'], | |
| ], | |
| columns: [ | |
| { title: 'Name' }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| edit: ( props ) => { | |
| const { attributes, setAttributes, isSelected } = props; | |
| return ( | |
| <Fragment> | |
| <InspectorControls> | |
| <PanelBody | |
| title="Settings for block" | |
| > |
NewerOlder