Forum Replies Created
-
Just tried and it did not work. Have any other suggestions 🙂
in reply to: Bookmarks pluginThank you, like this right:
function collection_options($default_collection, $post_id){
$output = ”;
$user_id = get_current_user_id();
$collections = $this->get_collections($user_id);
$bookmarks = (array) get_user_meta($user_id, ‘_userpro_bookmarks’, true);
if (isset($bookmarks[$post_id])){
$cur_collection = $bookmarks[$post_id];
} else {
$cur_collection = 0;
}
$output .= ‘default_collection2’;
foreach($collections as $k => $v) {
if (!isset($v[‘label’])) $v[‘label’] = $default_collection;
$output .= ‘<option value=”‘.$k.'” ‘.selected($k, $cur_collection, 0).’ >’.$v[‘label’];
$output .= ‘</option>’;
}
return $output;
}in reply to: Bookmarks pluginYou are talking about here, line 162:
/* Get collections for user */
function collection_options($default_collection, $post_id){
$output = ”;
$user_id = get_current_user_id();
$collections = $this->get_collections($user_id);
$bookmarks = (array) get_user_meta($user_id, ‘_userpro_bookmarks’, true);
if (isset($bookmarks[$post_id])){
$cur_collection = $bookmarks[$post_id];
} else {
$cur_collection = 0;
}
foreach($collections as $k => $v) {
if (!isset($v[‘label’])) $v[‘label’] = $default_collection;
$output .= ‘<option value=”‘.$k.'” ‘.selected($k, $cur_collection, 0).’ >’.$v[‘label’];
$output .= ‘</option>’;
}
return $output;
}But I’m not sure what to do to add what I need to, sorry.
in reply to: Bookmarks pluginThis reply has been marked as private.in reply to: Bookmarks pluginIf I can get the direction on how to do this I can do it myself, it doesn’t need to be a complete change of the plugin. I have added the field in the admin area for a second set but I cant figure out how to add it to the array as a default.
Thank you for your time.
in reply to: Bookmarks plugin