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-based | |
**/ | |
add_action( 'init', array( $this, 'prevent_non_admin_dashboard_access' ) ); | |
public function prevent_non_admin_dashboard_access() { | |
if ( is_admin() && ! current_user_can( 'administrator' ) && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) { | |
wp_redirect( home_url() ); |
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
/** | |
* Scroll on Anchor Link Click | |
*/ | |
jQuery(function() { | |
jQuery('a[href*=#]').on('click', function(event){ | |
event.preventDefault(); | |
jQuery('html,body').animate({scrollTop:jQuery(this.hash).offset().top}, 500); | |
}); |
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 Cookie Consent Text | |
*/ | |
function ilcc_change_consent_text( $text ) { | |
$text = __( 'This is my new text that I want', 'MYTEXTDOMAIN' ); | |
return $text; | |
} |
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
if ( ! function_exists( 'mysite_enqueue_styles' ) ) : | |
/** | |
* Stylesheets | |
* | |
* Registers and enqueues theme stylesheets. | |
**/ | |
function mysite_enqueue_styles() { | |
// Register | |
// wp_register_style( $handle, $src, $deps, $ver, $media ); | |
wp_register_style( 'style', get_stylesheet_uri, false, '1.0', 'all' ); |
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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
uglify: { | |
build: { | |
src: 'assets/js/main.js', | |
dest: 'assets/js/main.min.js' | |
} |
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
################### | |
# .gitignore | |
# | |
# We include all core files in the project repo and split passwords | |
# into ignored situational configurations so that we can store the wp-config. | |
################### | |
# WordPress # | |
############# | |
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
# This is a template .gitignore file for git-managed WordPress projects. | |
# | |
# Fact: you don't want WordPress core files, or your server-specific | |
# configuration files etc., in your project's repository. You just don't. | |
# | |
# Solution: stick this file up your repository root (which it assumes is | |
# also the WordPress root directory) and add exceptions for any plugins, | |
# themes, and other directories that should be under version control. | |
# | |
# See the comments below for more info on how to add exceptions for your |
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
Swedish | |
nplurals=2; plural=(n != 1); | |
English | |
nplurals=2; plural=(n != 1); | |
List: | |
http://docs.translatehouse.org/projects/localization-guide/en/latest/l10n/pluralforms.html?id=l10n/pluralforms |
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
/** | |
* Forms | |
* | |
* Styling for Gravity Forms | |
*/ | |
.gform_body { | |
ul { | |
margin: 0; | |
padding: 0; |
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
function dump_hook( $tag, $hook ) { | |
ksort($hook); | |
echo "<pre>>>>>>\t$tag<br>"; | |
foreach( $hook as $priority => $functions ) { | |
echo $priority; | |
foreach( $functions as $function ) |