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
<link rel="preload" href="/fonts/fuente.woff2" as="font" type="font/woff2" crossorigin> | |
<link rel="dns-prefetch" href="https://www.google-analytics.com/" /> | |
<link rel="preconnect" href="https://www.google-analytics.com/" /> |
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 | |
function block_restrict_content_register_block() { | |
wp_register_script( | |
'block_restrict_content', | |
plugins_url( 'build/index.js', __FILE__ ), | |
array( 'wp-blocks', 'wp-element', 'wp-editor', 'wp-components' ), | |
'1.0.0' | |
); |
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 | |
global $wp_roles; | |
$all_roles = array_values($wp_roles->get_names()); | |
register_block_type( 'block-restrict-content/block-restrict-content', array( | |
'editor_script' => 'block_restrict_content', | |
'attributes' => [ | |
'rolesSelected' => [ | |
'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; | |
registerBlockType( 'block-restrict-content/block-restrict-content', { | |
title: 'Restrict Content', | |
icon: 'lock', | |
category: 'layout', | |
edit: ( ) => { | |
return ( | |
<div>Hola Editor!</div> | |
) |
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 { Fragment } = wp.element; | |
const { InspectorControls } = wp.editor; | |
const { InnerBlocks } = wp.editor; | |
const { PanelBody, SelectControl } = wp.components; | |
registerBlockType( 'block-restrict-content/block-restrict-content', { | |
title: 'Restrict Content', | |
icon: 'lock', |
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 | |
/** | |
* @author Jesús Olazagoitia (@goiblas) | |
* @license GPL2+ | |
* | |
* @wordpress-plugin | |
* Plugin Name: Block Restrict Content | |
* Version: 1.0.0 | |
* Author: Jesús Olazagoitia | |
* Author URI: https://goiblas.com |
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
:root { | |
--base: 18px; | |
--rhythm: 32px; | |
--scale-factor: .48; | |
} | |
body, h1, h2, h3, h4, h5, h6 { | |
font-size: calc( var(--base) + (var(--base) * var(--scale-factor) * var(--font-increase, 0))); | |
line-height: calc(var(--rhythm) + (var(--rhythm) * var(--rhythm-increase, 0))); | |
} |
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
:root { | |
--base: 18px; | |
--scale-factor: .48; | |
} | |
body, h1, h2, h3, h4, h5, h6 { | |
font-size: calc( var(--base) + (var(--base) * var(--scale-factor) * var(--font-increase, 0))); | |
} | |
h1 { |
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
:root { | |
--base: 16px; | |
--scale-factor: .28; | |
--rhythm: 24px; | |
} | |
@media(min-width: 768px) { | |
:root { | |
--scale-factor: .48; | |
} |
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 | |
class Payment { | |
// ... mas codigo | |
function getCantidades() | |
{ | |
if ($this->isDead) | |
return $this->deadAmount(); | |
if ($this->isSeparated) | |
return $this->separatedAmount(); |
OlderNewer