This file contains 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
// Online C compiler to run C program online | |
#include <stdio.h> | |
#include <stdlib.h> | |
struct Node { | |
int data; // Data for the node. | |
struct Node *nextPtr; // Stores address of the next note. | |
}*firstNode; | |
// Function to create the list |
This file contains 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
if ( has_post_thumbnail() ) { | |
$thumbnail = []; | |
$thumbnail_id = get_post_thumbnail_id(); | |
/** | |
* Get the all data for the image. | |
* like the title, description, alt, etc. | |
*/ | |
$args = [ | |
'post_type' => 'attachment', |
This file contains 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
function save( props ) { | |
return wp.element.createElement( | |
'div', | |
{ | |
id: props.attributes.id | |
}, | |
props.attributes.content | |
); | |
} |
This file contains 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 src="https://fb.me/react-with-addons-15.1.0.js"></script> | |
<script src="https://fb.me/react-dom-15.1.0.js"></script> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> |
This file contains 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
const { registerBlockType } = wp.blocks; | |
const { RichText } = wp.editor; | |
const result = registerBlockType( 'myguten-block/test-block', { | |
title: 'Basic Example', | |
icon: 'smiley', | |
category: 'layout', | |
attributes: { | |
content: { | |
type: 'array', |
This file contains 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
const { registerBlockType } = wp.blocks; | |
const { RichText, BlockControls, AlignmentToolbar, | |
InspectorControls, ColorPalette } = wp.editor; | |
const result = registerBlockType( 'myguten-block/test-block', { | |
title: 'Basic Example', | |
icon: 'smiley', | |
category: 'layout', | |
attributes: { | |
content: { |
This file contains 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
const { registerBlockType } = wp.blocks; | |
const { RichText, BlockControls, AlignmentToolbar, | |
InspectorControls, ColorPalette } = wp.editor; | |
registerBlockType( 'myguten-block/test-block', { | |
title: 'Basic Example', | |
icon: 'smiley', | |
category: 'layout', | |
attributes: { | |
content: { |
This file contains 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
const { registerBlockType } = wp.blocks; | |
const { RichText, BlockControls, AlignmentToolbar } = wp.editor; | |
registerBlockType( 'myguten-block/test-block', { | |
title: 'Basic Example', | |
icon: 'smiley', | |
category: 'layout', | |
attributes: { | |
content: { | |
type: 'array', |
This file contains 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
<?php | |
/* | |
Plugin Name: My Gutenberg Block | |
*/ | |
function my_custom_block_register_block() { | |
// Register JavasScript File build/index.js | |
wp_register_script( | |
'my-custom-block', | |
plugins_url( 'build/index.js', __FILE__ ), |
This file contains 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
// src/index.js | |
const { registerBlockType } = wp.blocks; | |
registerBlockType( 'myguten-block/test-block', { | |
title: 'Basic Example', | |
icon: 'smiley', | |
category: 'layout', | |
edit: ( { className } ) => <div className={ className }>Hello World!</div>, | |
save: () => <div>Hello World!</div>, | |
} ); |
NewerOlder