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 ss_list_array() { | |
// Set Vars | |
$current_user = get_current_user(); | |
$username = $current_user->user_login; | |
$post = get_the_ID(); |
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 | |
// cmb2 | |
// hook the function to the cmb2_init action | |
add_action( 'cmb2_init', 'cmb2_sample_metaboxes' ); | |
// create the function that creates metaboxes and populates them with fields | |
function cmb2_sample_metaboxes() { |
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( 'ss-site-form', 'ss_frontend_form_shortcode' ); | |
/** | |
* Shortcode to display a CMB2 form for a post ID. | |
* @param array $atts Shortcode attributes | |
* @return string Form HTML markup | |
*/ | |
function ss_frontend_form_shortcode( $atts = array() ) { | |
global $post; |
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 | |
// Free Trial - Let GF Reg use email as username | |
/** | |
* WordPress register with email only, make it possible to register with email | |
* as username in a multisite installation | |
* @param Array $result Result array of the wpmu_validate_user_signup-function | |
* @return Array Altered result array | |
*/ | |
function custom_register_with_email($result) { |
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 | |
// infinite scroll support | |
add_theme_support( 'infinite-scroll', array( | |
'container' => 'content', | |
'footer' => true, | |
'wrapper' => true, | |
'type' => 'click', |
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
/* Portrait and Landscape */ | |
@media only screen | |
and (min-device-width: 320px) | |
and (max-device-width: 480px) | |
and (-webkit-min-device-pixel-ratio: 2) { | |
#wcvat-toggle { | |
position: fixed; | |
bottom: 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
/** | |
* Post Featured Media | |
* | |
* @param int $attachmentid ID for attachment | |
* @param int $size Media size to use | |
* @param int $video oEmbed code | |
* | |
* @return string $media_output Feature Image or Video | |
*/ |
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 | |
// Remove Layers added Child Styles | |
add_action( 'wp_enqueue_scripts', 'remove_default_layers_child_stylesheet', 20 ); |
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 home page content | |
add_action ('after_primary','custom_homepage_content'); | |
function custom_homepage_content() { | |
if (is_front_page()) { |
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 | |
$bp_filetypes = array('128x128.png','128x128.jpg','256x256.png','256x256.jpg','logo.svg'); | |
foreach ($bp_filetypes as $bp_filetype) { | |
$logo_item = $bp_filetype; | |
$url = 'http://ps.w.org/' . $pb_plugin_item[plugin_slug] . '/assets/icon-' . $logo_item; | |
//echo $url; |