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 rs_menu_classes( $classes, $item, $args ) { | |
if($args->theme_location == 'primary') { | |
$classes[] = 'list-inline-item'; | |
} | |
return $classes; | |
} | |
add_filter( 'nav_menu_css_class','atg_menu_classes',1,3 ); |
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
/* | |
* Add shortcode support for template parts | |
* Example: [template_part path="template-part-leadership"] | |
*/ | |
function template_part( $atts, $content = null ){ | |
$tp_atts = shortcode_atts(array( | |
'path' => null, | |
), $atts); | |
ob_start(); |
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 | |
/** | |
* WordPress custom install script. | |
* | |
* Drop-ins are advanced plugins in the wp-content directory that replace WordPress functionality when present. | |
* | |
* Language: nl | |
* | |
* if ( file_exists( WP_CONTENT_DIR . '/install.php' ) ) { | |
* require ( WP_CONTENT_DIR . '/install.php' ); |
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 | |
// Define a constant to use with html emails | |
define("HTML_EMAIL_HEADERS", array('Content-Type: text/html; charset=UTF-8')); | |
// @email - Email address of the reciever | |
// @subject - Subject of the email | |
// @heading - Heading to place inside of the woocommerce template | |
// @message - Body content (can be HTML) | |
function send_email_woocommerce_style($email, $subject, $heading, $message) { |
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 | |
if ( ! function_exists( 'child_theme_scripts' ) ) { | |
add_action( 'wp_enqueue_scripts', 'child_theme_scripts' ); | |
function child_theme_scripts() { | |
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); | |
wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( 'parent-style' ) ); | |
} | |
} |
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 | |
/** | |
* ampinstant Project | |
* @package ampinstant | |
* User: dankerizer | |
* Date: 18/03/2017 / 03.36 | |
*/ | |
function wpinstant_extra_profile_fields( $user ) { ?> |
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 | |
/***********************************************************************/ | |
/*************************** TRACKER CLASS ***************************/ | |
/***********************************************************************/ | |
class Custom_Post_Types_Manager { | |
public $ctp_slugs; | |
public $prefix; |
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 | |
/** | |
* Strips url from obsolete stuff, for prettier display | |
* @param string $url The url | |
* @return string The cleaned up & pretty url for displaying | |
*/ | |
function studio_strip_url( $url ) { | |
return rtrim( str_replace(array( 'https://', 'http://', 'mailto:', 'tel:', 'www.' ), '', $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
<?php | |
/* | |
Plugin Name: CF7InsertPost | |
Version: 1 | |
Author: | |
License: GPL3 | |
*/ | |
add_action('wpcf7_before_send_mail', 'cf7_insert_post', 10, 1); | |
function cf7_insert_post( $data ) { |
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
// Register Custom Post Type | |
function books_post() { | |
// Array of custom labels for our custom post type backend. | |
$labels = array( | |
'name' => 'Books', //general name for the post type, usually plural. Default is Posts/Pages | |
'singular_name' => 'Book', //name for single object of this post type. Default is Post/Page | |
'menu_name' => 'Books', // Name used in the menu | |
'name_admin_bar' => 'Book', // String for use in New in Admin menu bar. - New Book | |
'add_new_item' => 'Add New Book', // Default is Add New Post/Add New Page. |