thomask
Forum Replies Created
-
Forum: Plugins
In reply to: [Edit Flow] [Plugin: Edit Flow] Retrieve Users in Usergroupso just for claryfing that second row – you need to find what key is used in ef for storing user group (if it is in usermeta), let’s call it some_ef_role_key and you need to know id of the role, lets call it $ef_role_id:
$wp_user_search = new WP_User_Query( array(‘meta_key’ => ‘some_ef_role_key’, ‘meta_value’ => $ef_role_id) );Forum: Plugins
In reply to: [Edit Flow] [Plugin: Edit Flow] Retrieve Users in Usergroupif you would be using standard WP roles, not user groups, you could use those functions (imo self explanatory):
function get_users_with_role( $role ) {
$wp_user_search = new WP_User_Search( ”, ”, $role );
return $wp_user_search->get_results();
}function mail_users_with_role( $role,$subject, $message ) {
$users = (get_users_with_role($role));
foreach ($users as $user) {
wp_mail($user->user_email,$subject,$message);
}
}for EF roles i do not know, as i do not know what are they using for storing EF group to user – i guess it will be user_meta, so you can just slightly modify the WP_User_Search to search not by role, but using meta (see http://codex.wordpress.org/Class_Reference/WP_User_Query)
Forum: Plugins
In reply to: [Edit Flow] [Plugin: Edit Flow] some transition_post_status action?aaah I see the problem – it cannot work – you are using standard hook add_action( ‘transition_post_status’, array( $this, ‘notification_status_change’ ), 10, 3 );
but this hook does not work because builtin status functionality is crippled (https://core.trac.wordpress.org/ticket/12706)
so this example http://editflow.org/extend/auto-subscribe-user-groups-for-notifications/ could never work, because your function never recieves proper $new_status and $old_status, but only that stupid default ones with “new” and “inherit”
Forum: Plugins
In reply to: [Edit Flow] [Plugin: Edit Flow] some transition_post_status action?new_status, old_status, $post should be OK.
I have just found, that you got filter ef_notification_status_change what is probably what i am looking for, the problem is, that it seems do not work, as there is still “inherit” / “new” statuses, when i use it, not the custom ones i defined in ef statuses
I know it does not remove default WordPress login. Problem is, that it does not integrate it. So you have to have two separate places, where people could log in to post comments – one in comment area with social logins only and second wherever you got your wp login
Forum: Plugins
In reply to: [WordPress Social Login] [Plugin: WordPress Social Login] tons of errorsUndefined variable: user_id in /var/www/projects/zdrojak/htdocs/public/soubory/plugins/wordpress-social-login/includes/plugin.ui.php on line 189
Forum: Plugins
In reply to: [Edit Flow] [Plugin: Edit Flow] problem with non-ascii chars in descriptionsimo it should be utf-secure, but anyway i do not understand why encoding characters – all plugins i know use in such case seralize/unserialize. WordPress also counts with it with e.g. maybe_serialize data function (http://codex.wordpress.org/Function_Reference/maybe_serialize)
No it is not a proper solution at all. First it is not not recommended to use wp_debug on production site, but it is higly recommended to run it on development site.
Second – it is not recommended to upgrade / install plugins on production site unless you test it first on development site.
So if you are following best practices, than you will see this error notice first on your development site and you will not put it to production one, where any reader would see it.
And if i would need this version desperately for some reason, it would be probably much wiser to look at line 40 of class-opengraph.php, then you will se, that it is checking value of $this->facebook_plugin, which is not defined in the class, nor its parent class and depending on your needs you would write something like var $facebook_plugin = false; And of course informing the developer, what is what i did here 😉
ROFL. “I see a bug” “Solution: close your eyes” 😉
Forum: Plugins
In reply to: [Edit Flow] [Plugin: Edit Flow] problem with non-ascii chars in descriptionsuff, this is tough, i!m triing it for an 2 hours and i know where is the problem but do not have nerves and time to finish it:
1. problem is using htmlentities without utf-8 encoding (for php < 5.4 it uses ISO)
2. you must utf_8 encode string before using json_encodeso line 383 should be
$sanitized_args[$key] = utf8_encode(htmlentities( $sanitized_args[$key], ENT_QUOTES, 'UTF-8' ));similar on line 409 you should have probably
$string_or_unencoded_array[$key] = html_entity_decode( utf8_decode($value), ENT_QUOTES, ‘UTF-8’ );but that json_encode is anyway cripling it, it need to be probably repaired also somewhere else. Imho you should use serialize / unserialize, not json_encode
also i am lookin in the get_encoded_description function and for me it seems as a very “strange” code.
1. imo you should use something like http://codex.wordpress.org/Function_Reference/sanitize_text_field
2. the whole function get_encoded_description function is completely useless, because you putting sanitized strings to $sanitized_args variable, but at the end you are returning original non-sanitized $args
i meant the first one but imo it is connected to the second one – there should be view rights and edit rights – with view rights you would see it on post and on calendar (if enabled), with edit you can edit them.
Forum: Plugins
In reply to: [Debug Bar] [Plugin: Debug Bar] error noticesthe problem is probably that i use diferent decimal separator and your sprintf(‘%0.1f’ … convert the number to string so that number_format then cannot count with it. I do not know what is there the sprintf used for, there are much better ways and you could call it after number_format, not before it. I have deleted the sprintf function from both places and it works without error notices (and times formated as before)
oh i probably got it. you are probably somehow changing the locale, so that here in czech republic we wrote comma as decimal separator, e.g. “0,00010895729064941” in place of “0.00010895729064941” and debug bar is counting with those values like $elapsed*1000; and so that it throws this error notice
Forum: Plugins
In reply to: [Edit Flow] [Plugin: Edit Flow] Can it EDIT FLOW?UPS, it seems it is actually possible, but only by extending it http://editflow.org/extend/ – you should definitely write about it to the user groups section – or better, implement it without it.
And anyway i think, that it would be a good improvement, if you would not create separate user groups, but extend the existing user groups in wordpress, IMO in 99 % there will be correlation between those groups and your groups.
ups, srry, wrong code, right one:
if(function_exists('coauthors')) { $i = new CoAuthorsIterator(); $i->iterate(); $author = ''; do{ if (!$i->is_first()) $author .= $i->is_last() ? ' a ' : ', '; $author .= sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_attr( sprintf( __( 'View all posts by %s', 'twentytwelve' ), get_the_author() ) ), get_the_author() ); } while($i->iterate()); } else { $author = sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_attr( sprintf( __( 'View all posts by %s', 'twentytwelve' ), get_the_author() ) ), get_the_author() ); }