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 deo_get_attachment(){ | |
global $post; | |
$pattern = get_shortcode_regex(); | |
$output = ''; | |
if( preg_match_all( '/'. $pattern .'/s', $post->post_content, $matches ) | |
&& array_key_exists( 2, $matches ) | |
&& in_array( 'gallery', $matches[2] ) ): |
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
// Literal notation | |
var person = { | |
name: "Alex", | |
age: 29, | |
greet: function() { | |
console.log("Hello, I'm " + this.name); | |
} | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div id="posts"></div> | |
<script id="jsbin-javascript"> |
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: Deo Elementor Extension | |
* Description: Custom Elementor extension. | |
* Plugin URI: https://elementor.com/ | |
* Version: 1.0.0 | |
* Author: DeoThemes | |
* Author URI: https://elementor.com/ | |
* Text Domain: deo-elementor-extension | |
*/ |
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 | |
// AppSumo AJAX form submission | |
add_action( 'wp_ajax_nopriv_deo_appsumo_submission', 'deo_appsumo_submission' ); | |
add_action( 'wp_ajax_deo_appsumo_submission', 'deo_appsumo_submission' ); | |
function deo_appsumo_submission() { | |
check_ajax_referer( 'deo_ajax_nonce', 'nonce' ); | |
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 | |
/** | |
* After import hook | |
* This hook is fired after the import is completed | |
*/ | |
public function after_import() { | |
// Add filter of the link rel attr to avoid JSON damage. | |
add_filter( 'wp_targeted_link_rel', '__return_empty_string', 50, 1 ); |
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 | |
add_filter('woocommerce_product_tabs', 'custom_woocommerce_product_description_tab', 98); | |
function custom_woocommerce_product_description_tab($tabs) { | |
if (isset($tabs['description'])) { | |
$tabs['description']['callback'] = 'custom_woocommerce_product_description_content'; | |
} | |
return $tabs; | |
} | |
function custom_woocommerce_product_description_content() { |