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
function crop_settings_api_init() { | |
// Add the section to media settings | |
add_settings_section( | |
'crop_settings_section', | |
'Crop images', | |
'crop_settings_callback_function', | |
'media' | |
); | |
// Add the fields to the new section | |
add_settings_field( |
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> | |
<style> | |
/** THE CSS **/ | |
.mc-rewards { | |
text-align: center !important; | |
width: 100% !important; | |
margin: 0 auto !important; | |
width: 112px; | |
} |
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
function remove_cssjs_ver( $src ) { | |
if( strpos( $src, '?ver=' ) ) | |
$src = remove_query_arg( 'ver', $src ); | |
return $src; | |
} | |
add_filter( 'style_loader_src', 'remove_cssjs_ver', 1000 ); | |
add_filter( 'script_loader_src', 'remove_cssjs_ver', 1000 ); |
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
var gulp = require('gulp'), | |
sass = require('gulp-sass'), | |
sourcemaps = require('gulp-sourcemaps'); | |
var input = './scss/**/*.scss', | |
output = './css'; | |
gulp.task('sass', function () { | |
return gulp.src(input) | |
.pipe(sourcemaps.init()) |
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
var gulp = require('gulp'); | |
var less = require('gulp-less'); | |
var watch = require('gulp-watch'); | |
var minify = require('gulp-minify-css'); | |
var rename = require('gulp-rename'); | |
var header = require('gulp-header'); | |
var pkg = require('./package.json'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
/* Prepare banner text */ |
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
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
*.pyc |
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
// Creating the widget | |
class wpb_widget extends WP_Widget { | |
function __construct() { | |
parent::__construct( | |
// Base ID of your widget | |
'wpb_widget', | |
// Widget name will appear in UI | |
__('WPBeginner Widget', 'wpb_widget_domain'), |
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
if (strlen(get_the_excerpt()) > 340) { | |
echo substr(get_the_excerpt(), 0, 340) . '...'; } else { | |
echo get_the_excerpt(); | |
} |
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 { | |
background: url(images/bg.jpg) no-repeat center center fixed; | |
-webkit-background-size: cover; | |
-moz-background-size: cover; | |
-o-background-size: cover; | |
background-size: cover; | |
} |