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 auto_update_specific_plugins ( $update, $item ) { | |
// Array of plugin slugs to always auto-update | |
$plugins = array ( | |
'bb-ultimate-addon', | |
); | |
if ( in_array( $item->slug, $plugins ) ) { | |
return true; // Always update plugins in this array | |
} else { |
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_action( 'init', 'add_new_user' ); | |
function add_new_user() { | |
$website = "http://example.com"; | |
$userdata = array( | |
'user_login' => 'user_name', | |
'user_url' => $website, | |
'user_pass' => 'user_password', |
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 | |
/** | |
* Change the dynamic header for a particular page. | |
* | |
* @param String $header_id Page/Template ID of the header set from the options panel. | |
* @return String Page/Template ID of the header after manipulation. | |
*/ | |
function bbhf_header_override( $header_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
<?xml version="1.0"?> | |
<ruleset name="WordPress Coding Standards for Plugins"> | |
<description>Generally-applicable sniffs for WordPress plugins</description> | |
<rule ref="PHPCompatibility"/> | |
<config name="testVersion" value="5.3-"/> | |
<rule ref="WordPress-Core" /> | |
<rule ref="WordPress-Docs" /> |
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
listen 443 http2 ssl; | |
ssl on; | |
ssl_certificate /etc/letsencrypt/live/<your-domain>/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/<your-domain>/privkey.pem; |
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
jQuery(document).on('ready', function(event) { | |
// Scroll smoothly to anchor | |
jQuery('a[href^="#"]').on('click', function(event) { | |
var target = jQuery(this.getAttribute('href')); | |
if( target.length ) { | |
event.preventDefault(); | |
jQuery('html, body').stop().animate({ | |
scrollTop: target.offset().top | |
}, 1000); |
OlderNewer