View 260-2
<?php
/**
* Add the code below to your WeFoster Child Theme
*/
function wfc_add_main_class() {
echo 'my-custom-class ';
}
add_action( 'class_main','wfc_add_main_class' );
function wfc_add_sidebar_class() {
View doing-it-right.html
<?php get_template_part('templates/loops/content', 'page'); ?>
<!-- My Custom Content -->
<p>This is some custom content after my page content is shown. I'm adding this by overwriting my template via a Child Theme!</p>
<!-- My Custom Content -->
<?php do_action('close_page_content'); ?>
View acf-customizer-patch.php
<?php
/*
Plugin Name: ACF Customizer Patch
Plugin URI: https://gist.github.com/fabrizim/9c0f36365f20705f7f73
Description: A class to allow acf widget fields to be stored with normal widget settings and allow for use in customizer.
Author: Mark Fabrizio
Version: 1.0
Author URI: http://owlwatch.com/
*/
class acf_customizer_patch
View load_anspress.php
<?php
function wfc_load_anpress_when_needed() {
if ( is_anspress() ) {
ap_scripts_front();
}
}
add_action('wp_enqueue_scripts', 'wfc_load_anpress_when_needed', 1);
View starter-settings.php
<?php
function wefoster_import_starter_settings() {
$screen = get_current_screen();
if (strpos($screen->id, "acf-options-starter-kits") == true) {
// Check to see if the settings have already been imported.
$starterkit = get_field( "choose_a_starter_kit", 'option' );
$template = get_template();
$imported = get_option( $template . '_' . $starterkit . '_customizer_import', false );
View theme-tour.php
<?php
/**
* Theme Activation Tour
*
* This class handles the pointers used in the introduction tour.
* @package Popup Demo
*
*/
class WordImpress_Theme_Tour {
View add-dashicons-to-wordpress-customizer.php
<?php
/**
* Enqueue the stylesheet.
* http://aristeides.com/blog/modifying-wordpress-customizer/
*/
function my_enqueue_customizer_stylesheet() {
wp_register_style( 'my-customizer-css', YOUR_PLUGIN_URL. 'assets/css/customizer.css', NULL, NULL, 'all' );
wp_enqueue_style( 'my-customizer-css' );
View bp-default-notification-settings.php
<?php
add_action( 'bp_core_activated_user', 'bpdev_set_email_notifications_preference');
function bpdev_set_email_notifications_preference( $user_id ) {
//I am putting all the notifications to no by default
//you can set the value to 'yes' if you want that notification to be enabled.
$settings_keys = array(
'notification_activity_new_mention' => 'no',
'notification_activity_new_reply' => 'no',
View default-buddypress-avatar-settings.php
<?php
/**
* Change Default Avatar Size
*/
if ( !defined( 'BP_AVATAR_THUMB_WIDTH' ) ) {
define( 'BP_AVATAR_THUMB_WIDTH', 80 );
}
if ( !defined( 'BP_AVATAR_THUMB_HEIGHT' ) ) {
define( 'BP_AVATAR_THUMB_HEIGHT', 80 );
View bp-bb-show-mention-name.php
<?php
function bptricks_add_handle (){
echo '<span class="bbp-user-nicename"><span class="handle-sign">@</span>'. bp_core_get_username(bbp_get_reply_author_id(bbp_get_reply_id())) .'</span>' ;
}
add_action( 'bbp_theme_after_reply_author_details', 'bptricks_add_handle' );
?>