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
// originally from http://wpsnipp.com/index.php/functions-php/include-custom-post-types-in-right-now-admin-dashboard-widget/ | |
function wph_right_now_content_table_end() { | |
$args = array( | |
'public' => true , | |
'_builtin' => false | |
); | |
$output = 'object'; | |
$operator = 'and'; | |
$post_types = get_post_types( $args , $output , $operator ); |
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
$bp->loggedin_user->id The user ID of the user. | |
$bp->loggedin_user->domain The profile page URL of the user | |
$bp->loggedin_user->fullname The display name of the user | |
$bp->displayed_user->id The user ID of the user. | |
$bp->displayed_user->domain The profile page URL of the 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
<a href="<?php bloginfo('url'); ?>/category/<? echo $post->post_author;?>"><?php echo get_avatar( get_the_author_meta('ID'), '65' ); ?></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
Drop in functions.php | |
function getProfileData($fieldName){ | |
global $bp; | |
return xprofile_get_field_data($fieldName,$bp->loggedin_user->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
<? | |
$random_text = array("Random Text 1", | |
"Random Text 2", | |
"Random Text 3", | |
"Random Text 4", | |
"Random Text 5"); | |
srand(time()); | |
$sizeof = count($random_text); | |
$random = (rand()%$sizeof); | |
print("$random_text[$random]"); |
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
if(!is_admin()) | |
return; |
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
function frl_change_post_labels($post_type, $args){ /* change assigned labels */ | |
global $wp_post_types; | |
if($post_type != 'post') | |
return; | |
$labels = new stdClass(); | |
$labels->name = __('Articles', 'frl'); | |
$labels->singular_name = __('Article', 'frl'); |
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
function frl_quicktags_settings($qt_init, $editor_id){ | |
if($editor_id != 'content') | |
return $qt_init; //not a default case | |
/* default set of values - "strong,em,link,block,del,ins,img,ul,ol,li,code,more,spell,close,fullscreen" */; | |
$qt_init['buttons'] = "strong,em,link,block,img,ul,ol,li,code,fullscreen"; ; | |
return $qt_init; | |
} |
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 | |
// PageLines references | |
// https://github.com/pagelines/DMS/blob/Dev/includes/library.wordpress.php#L54 | |
// 'aspect-thumb' not in use -- https://github.com/pagelines/DMS/search?q=aspect-thumb&type=Code | |
// 'basic-thumb' might be used by PopThumbs -- https://github.com/pagelines/DMS/blob/Dev/sections/popthumbs/section.php#L143 | |
// 'landscape-thumb' used when PL settings have featured image on top of posts -- https://github.com/pagelines/DMS/blob/Dev/includes/class.posts.php#L396 | |
// WordPress references | |
// http://codex.wordpress.org/Function_Reference/add_image_size | |
// http://codex.wordpress.org/Plugin_API/Filter_Reference/image_size_names_choose |
OlderNewer