First, Lets find out what version of PHP we're running (To find out if it's the default version).
To do that, Within the terminal, Fire this command:
which php
// Takes a credit card string value and returns true on valid number | |
function valid_credit_card(value) { | |
// Accept only digits, dashes or spaces | |
if (/[^0-9-\s]+/.test(value)) return false; | |
// The Luhn Algorithm. It's so pretty. | |
let nCheck = 0, bEven = false; | |
value = value.replace(/\D/g, ""); | |
for (var n = value.length - 1; n >= 0; n--) { |
function cpt_feed_request($qv) { | |
if (isset($qv['feed'])) | |
$qv['post_type'] = get_post_types(); | |
return $qv; | |
} | |
add_filter('request', 'cpt_feed_request'); |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta name="description" content="Webpage description goes here" /> | |
<meta charset="utf-8"> | |
<title>Change_me</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta name="author" content=""> | |
<link rel="stylesheet" href="css/style.css"> |
From: StackOverflow
document.getElementById("MyElement").className = "MyClass";
document.getElementById("MyElement").className += " MyClass";
//* Add walker class that displays menu item descriptions | |
class Menu_With_Description extends Walker_Nav_Menu { | |
function start_el(&$output, $item, $depth, $args) { | |
global $wp_query; | |
$indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; | |
$class_names = $value = ''; | |
$classes = empty( $item->classes ) ? array() : (array) $item->classes; |
# Don't show errors which contain full path diclosure (FPD) | |
# Use that line only if PHP is installed as a module and not per CGI | |
# try using a php.ini in that case. | |
# Change mod_php5.c to mod_php7.c if you are running PHP7 | |
<IfModule mod_php5.c> | |
php_flag display_errors Off | |
</IfModule> | |
# Don't list directories | |
<IfModule mod_autoindex.c> |
<?php if (have_posts()) : while(have_posts()) :the_post();?> | |
<div class="post-single" id="post-<?php the_ID(); ?>"> | |
<div class="post-body"> | |
<!-- START CONTENT --> | |
<?php the_content(); | |
//if there are tabs - open up a tabset ul | |
if( get_field('tab') ) { | |
echo ('<ul class="nav nav-tabs" role="tablist">'); |
// Put this script in your functions.php | |
// I have very little pages, and I am sure it can be improved | |
// or adjusted to suit your own project. | |
//Deregister the scripts. | |
function deregister_contact_form() { | |
// You can put here all the pages where there is no contact form | |
if ( ! is_page( 'contact' ) ) { | |
remove_action('wp_enqueue_scripts', 'wpcf7_enqueue_scripts'); | |
} |