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
/* | |
Theme Name: Custom Child theme | |
Theme URI: http://example.com/twenty-fifteen-child/ | |
Description: Custom Theme Child Theme | |
Author: Daniel Florido | |
Author URI: http://pixelstorm.com.au | |
Template: parent theme | |
Version: 1.0.0 | |
*/ |
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
[gravityform id=1 title=false description=false ajax=true tabindex=49] |
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
// Register Custom Post Type | |
function slider() { | |
$labels = array( | |
'name' => _x( 'Post Types', 'Post Type General Name', 'Post Types' ), | |
'singular_name' => _x( 'Post Type', 'Post Type Singular Name', 'Post Types' ), | |
'menu_name' => __( 'Post Types', 'Post Types' ), | |
'name_admin_bar' => __( 'Post Type', 'Post Types' ), | |
'archives' => __( 'Item Archives', 'Post Types' ), | |
'parent_item_colon' => __( 'Parent Item:', 'Post Types' ), | |
'all_items' => __( 'All Items', 'Post Types' ), |
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
/* -------------------------------------------------------------------------------------------------------- */ | |
/* Customize HTML Compression */ | |
/* -------------------------------------------------------------------------------------------------------- */ | |
class WP_HTML_Compression | |
{ | |
// Settings | |
protected $compress_css = true; | |
protected $compress_js = true; | |
protected $info_comment = true; |
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
add_filter( 'wpseo_schema_graph_pieces', 'yoast_add_graph_pieces', 11, 2 ); | |
//sample adding the person content type | |
/** | |
* Adds Schema pieces to our output. | |
* | |
* @param array $pieces Graph pieces to output. | |
* @param \WPSEO_Schema_Context $context Object with context variables. | |
* |
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
<?php function agent_notification( $notification, $form) { | |
//This example is using a form with the id of 1 | |
if($form["id"] == 4){ | |
global $post; | |
//the example email is stored in a post meta field called "_cmb_email" | |
//$agent_email = get_post_meta( $post->ID , '_cmb_email', true ); | |
$agent_email = get_field('agent_email'); | |
$notification['to'] = $agent_email; |
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
add_filter( 'gform_submit_button', 'add_custom_css_classes', 10, 2 ); | |
function add_custom_css_classes( $button, $form ) { | |
$dom = new DOMDocument(); | |
$dom->loadHTML( $button ); | |
$input = $dom->getElementsByTagName( 'input' )->item(0); | |
$classes = $input->getAttribute( 'class' ); | |
$classes .= " my-custom-class another-one"; | |
$input->setAttribute( 'class', $classes ); | |
return $dom->saveHtml( $input ); | |
} |
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
{% set block_name = "example_class" %} | |
{% set classes = [ | |
'paragraph', | |
'paragraph--type--' ~ paragraph.bundle|clean_class, | |
view_mode ? 'paragraph--view-mode--' ~ view_mode|clean_class, | |
not paragraph.isPublished() ? 'paragraph--unpublished', | |
block_name | |
] %} | |
{% block paragraph %} | |
{% block 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
// Get all elements with the class "pop-action" | |
const buttons = document.querySelectorAll('.pop-action'); | |
// Iterate through the NodeList of buttons and attach click event listeners | |
buttons.forEach(function(button) { | |
button.addEventListener('click', function() { | |
// Code to run when a button is clicked | |
console.log(`Button "${button.textContent}" clicked.`); |
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
add_filter( 'gform_submit_button', 'add_custom_css_classes', 10, 2 ); | |
function add_custom_css_classes( $button, $form ) { | |
$dom = new DOMDocument(); | |
$dom->loadHTML( $button ); | |
$input = $dom->getElementsByTagName( 'input' )->item(0); | |
$classes = $input->getAttribute( 'class' ); | |
$classes .= " btn btn--primary"; | |
$input->setAttribute( 'class', $classes ); | |
return $dom->saveHtml( $input ); | |
} |