Skip to content

Instantly share code, notes, and snippets.

View Tepluypled's full-sized avatar

Statsy Tepluypled

View GitHub Profile
<img scr="/theme.png" alt="The Monstroid2" />
function myprefix_enqueue_google_fonts() {
wp_enqueue_style( 'Trade Winds', 'https://fonts.googleapis.com/css?family=Trade+Winds&display=swap' );
}
add_action( 'wp_enqueue_scripts', 'myprefix_enqueue_google_fonts' );
function custom_add_google_fonts() {
wp_enqueue_style( 'custom-google-fonts', 'https://fonts.googleapis.com/css?family=Trade+Winds&display=swap', false );
}
add_action( 'wp_enqueue_scripts', 'custom_add_google_fonts' );
<IfModule mod_substitute.c>
SubstituteMaxLineLength 30m
</IfModule>
LimitRequestBody 9999999
<style>
body p {
background-color: #DAF7A6;
color: #340E6E;
font-family: Times-New-Roman;
text-align: center;
padding: 5px;
}
</style>
<IfModule mod_substitute.c>
SubstituteMaxLineLength 30m
</IfModule>
LimitRequestBody 9999999
public function add_compatibility_elementor_page_templates() {
$page_templates_module = Elementor\Plugin::$instance->modules_manager->get_modules( 'page-templates' );
add_filter( 'template_include', array( $page_templates_module, 'template_include' ), 100 );
}
@Tepluypled
Tepluypled / custom.php
Last active November 27, 2019 09:33
Part2
<?php
function loadMyBlockFiles() {
wp_enqueue_script(
'my-test-text',
plugin_dir_url(__FILE__). 'custom.js',
array('wp-blocks', 'wp-i18n', 'wp-editor'),
true
);
}
@Tepluypled
Tepluypled / custom.js
Created November 27, 2019 09:28
Part1
registerBlockType('namespace/block-slug', {
//built-in attributes
title: 'The name',
description: 'Block to generate a custom event',
icon: 'format-image',
category: 'layout'
//custom attributes
attributes: {