Last active
November 5, 2019 10:16
-
-
Save Nahuai/8bd6932cc2d0fcfd16b8f4b4b0b15b30 to your computer and use it in GitHub Desktop.
Block Template - Nools
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 | |
/* Template block para el CPT de Herrramient de Nools */ | |
add_action( 'register_post_type_args', __NAMESPACE__ . '\block_templates', 20, 2 ); | |
function block_templates( $args, $post_type ) { | |
if ( 'herramienta' === $post_type) { | |
$args[ 'template' ] = [ | |
[ | |
'core/paragraph', [ | |
'placeholder' => __( 'Aquí va el texto descriptivo de la herramienta', 'revolution-pro' ) | |
] | |
], | |
[ | |
'core/html', [ | |
'content' => __( '[restrict subscription=1]', 'revolution-pro' ) | |
] | |
], | |
[ | |
'core/embed', [ | |
'align' => 'center', | |
] | |
], | |
[ | |
'core/file', [ | |
'align' => 'left', | |
] | |
], | |
[ | |
'core/html', [ | |
'content' => __( '[/restrict]', 'revolution-pro' ) | |
] | |
], | |
[ | |
'core/separator' | |
], | |
[ | |
'core/paragraph', [ | |
'content' => __( '<p>Si tienes alguna duda técnica <a rel="noreferrer noopener" aria-label="consulta con soporte" href="https://nools.es/soporte-dudas/">consulta con soporte</a> y si quieres <a href="https://nools.es/sugerencias/" rel="noreferrer noopener" aria-label="dejarnos alguna sugerencia">dejarnos alguna sugerencia</a> háznoslo saber.</p>', 'revolution-pro' ) | |
] | |
], | |
]; | |
} | |
return $args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment