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
add_filter( 'admin_body_class', 'add_admin_body_template_class' ); | |
function add_admin_body_template_class( $classes ) { | |
if ( ! is_admin() ) { | |
return $classes; | |
} | |
$queried_post_id = filter_input( INPUT_GET, 'post', FILTER_SANITIZE_NUMBER_INT ); | |
if ( ! $queried_post_id ) { |
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
/** | |
* Please note: This file uses ES6 code structures and likely needs to be transpiled for better browser support in your application. | |
* | |
* To use this, you'll need to enqueue it with a localized variable that passes the CF7 feedback endpoint, for example, | |
* | |
wp_register_script( 'cf7-ajax-script', 'path/to/cf7ajax.js', [], '0.1', true ); | |
wp_localize_script( 'cf7-ajax-script', 'cf7FeedbackEndpoint', get_rest_url( null, 'contact-form-7/v1/contact-forms/###/feedback' ) ); | |
wp_enqueue_script( 'cf7-ajax-script' ); |
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 DomainMapper { | |
/** | |
* Where we store the fully qualified domain URL throughout the lifecycle of the WordPress stack. | |
*/ | |
private $domain = null; | |
/** |
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
//team showcase | |
var $xhrObject; | |
$(document).unbind("click").on("click", ".tshowcase-box", function (event) { | |
$this = $(this); | |
$this.siblings().removeClass('active'); | |
$('.person-content-wrap').hide(); | |
$this.toggleClass('active'); | |
var url = $(this).find('a').attr('href'); //get url |