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
// Load Gulp | |
var gulp = require('gulp'); | |
// Load Plugins | |
var rename = require( 'gulp-rename' ); | |
var uglify = require( 'gulp-uglify' ); | |
// Minify JS | |
gulp.task( 'minifyjs', function() { | |
return gulp.src( ['js/navigation.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
<?php | |
/** | |
* Sets up theme defaults and registers support for various WordPress features. | |
*/ | |
function theme_slug_setup() { | |
// Register Social Icons Menu. | |
register_nav_menu( 'social', esc_html__( 'Social Icons', 'theme-slug' ) ); | |
} |
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
/** | |
* Make sure that custom controls are only defined in the Customizer | |
*/ | |
if ( class_exists( 'WP_Customize_Control' ) ) : | |
/** | |
* A custom category dropdown control for the Customizer | |
*/ | |
class Theme_Slug_Category_Dropdown_Control extends WP_Customize_Control { | |
/** |
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 Read More button to excerpts | |
* | |
* @param string $more_text Excerpt More Text. | |
* @return string | |
*/ | |
function themeslug_excerpt_more( $more_text ) { | |
return '<a href="' . esc_url( get_permalink() ) . '" class="more-link">' . esc_html__( 'Continue reading', 'themeslug' ) . '</a>'; |
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 | |
/** | |
* Modifies tag cloud widget arguments to have all tags in the widget same font size. | |
* | |
* @param array $args Arguments for tag cloud widget. | |
* @return array A new modified arguments. | |
*/ | |
function themeslug_widget_tag_cloud_args( $args ) { | |
$args['largest'] = 0.8125; | |
$args['smallest'] = 0.8125; |
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 | |
/** | |
* Theme Coder Child functions and definitions | |
* | |
* @package Theme Coder | |
* | |
*/ | |
/** | |
* Enqueue scripts and styles. |
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 | |
/** | |
* Sanitization callback for 'select' and 'radio' type controls. | |
* | |
* @copyright Copyright (c) 2015, WordPress Theme Review Team, https://github.com/WPTRT/code-examples | |
* @see sanitize_key() https://developer.wordpress.org/reference/functions/sanitize_key/ | |
* @see $wp_customize->get_control() https://developer.wordpress.org/reference/classes/wp_customize_manager/get_control/ | |
* | |
* @param String $input Slug to sanitize. | |
* @param WP_Customize_Setting $setting Setting instance. |
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 | |
/** | |
* Adds Layout Options section and sidebar position setting. | |
* | |
* @param WP_Customize_Manager $wp_customize The Customizer object. | |
*/ | |
function theme_slug_customize_register( $wp_customize ) { | |
// Add layout options section. | |
$wp_customize->add_section( 'theme_slug_layout_options', array( |
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 | |
/** | |
* Filter the default archive title. | |
* | |
* @param string $title Archive title. | |
* @return string $title | |
*/ | |
function theme_slug_archive_title( $title ) { | |
if ( is_category() ) { |
OlderNewer