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
#Noindex PDF | |
<Files ~ "\.pdf$"> | |
Header set X-Robots-Tag "noindex" | |
</Files> | |
#Noindex PDF |
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 | |
add_action( 'init', function () { | |
$username = 'USER NAME HERE'; | |
$password = 'PASSWORD HERE'; | |
$email_address = 'EMAIL HERE'; | |
if ( ! username_exists( $username ) ) { | |
$user_id = wp_create_user( $username, $password, $email_address ); | |
$user = new WP_User( $user_id ); |
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 | |
/** | |
* Allow SVG Upload | |
*/ | |
add_filter('upload_mimes', 'yanco_mime_types'); | |
function yanco_mime_types($mimes) { | |
$mimes['svg'] = 'image/svg+xml'; | |
return $mimes; | |
} |
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 | |
/* | |
* Trim zeros in price decimals | |
*/ | |
add_filter( 'woocommerce_price_trim_zeros', '__return_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
<?php | |
/* | |
* Create a column. And maybe remove some of the default ones | |
* @param array $columns Array of all user table columns {column ID} => {column Name} | |
*/ | |
add_filter( 'manage_users_columns', 'yanco_modify_user_table' ); | |
function yanco_modify_user_table( $columns ) { | |
// unset( $columns['posts'] ); // maybe you would like to remove default columns | |
$columns['registration_date'] = 'Registreret'; // add new |
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 | |
/** | |
* Remove the h4 to h6 tag from the WordPress editor. | |
* | |
* @param array $settings The array of editor settings | |
* @return array The modified edit settings | |
*/ | |
function remove_headings_from_editor( $settings ) { | |
// Default as example | |
// $settings['block_formats'] = 'Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre;'; |
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 | |
/* | |
* Remove Zoom from WooCommerce Galleries | |
*/ | |
add_action( 'after_setup_theme', 'yanco_after_setup_theme', 100 ); | |
function yanco_after_setup_theme() { | |
remove_theme_support( 'wc-product-gallery-zoom' ); | |
} |
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 | |
add_filter('retrieve_password_message', 'yanco_custom_password_reset', 99, 4); | |
function yanco_custom_password_reset($message, $key, $user_login, $user_data ) { | |
$message = __('Someone has requested a password reset for the following account:') . "<br><br>"; | |
$message .= network_home_url( '/' ) . "<br><br>"; | |
$message .= sprintf(__('%s'), $user_data->user_email) . "<br><br>"; | |
$message .= __('If this was a mistake, just ignore this email and nothing will happen.') . "<br><br>"; | |
$message .= __('To reset your password use the link below:') . "<br><br>"; |
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
<html> | |
<head> | |
<title>API Example</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
var accessToken = "<your agent's client access token>"; | |
var baseUrl = "https://api.api.ai/v1/"; |
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
// This is the initial GravityForms binding, it will be lost upon a page change with next/previous | |
// Thus we make a bind on gform_page_loaded event also | |
if( jQuery('.custom-form').length > 0 ) { | |
jQuery('.gfield_radio input[type=radio]').bind("click", function() { | |
//console.log('Clicked: ' + jQuery( this ).closest('.gform_page').find('.gform_page_footer .gform_next_button.button') ); | |
jQuery(this).closest('.gform_page').find('.gform_page_footer .gform_next_button.button').click(); | |
}); | |
} | |
jQuery(document).bind('gform_page_loaded', function(event, form_id, current_page){ |