View ListFieldRowTotal
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
<script> | |
function ListFieldRowCount( listField, totalField ) { | |
var totalRows = jQuery( listField ).find('table.gfield_list tbody tr').length; | |
jQuery( totalField ).val( totalRows ).change(); | |
} | |
function ListFieldRowTotal( formId, fieldId, totalFieldId ) { | |
var listField = '#field_' + formId + '_' + fieldId; | |
var totalField = '#input_' + formId + '_' + totalFieldId; | |
ListFieldRowCount( listField, totalField ); | |
jQuery( listField ).on( 'click', '.add_list_item', function() { |
View gist:a114e090a211355b2dcbc6195bda0eed
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
/* Author: Scott Bolinger | |
* Author URI: http://apppresser.com | |
* | |
* Styling for Display Posts Shortcode plugin for use with the AppTheme. Add this code to a child theme style.css file. | |
* Plugin information: http://www.billerickson.net/shortcode-to-display-posts/ | |
* | |
*/ | |
ul.display-posts-listing { | |
list-style-type: none; |
View redirect-subscriber.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 | |
global $current_user; // Use global | |
get_currentuserinfo(); // Make sure global is set, if not set it. | |
if ( user_can( $current_user, "subscriber" ) ) { | |
// Disable admin bar for subscribers | |
show_admin_bar(false); |