Djib's
Forum Replies Created
-
Forum: Plugins
In reply to: [Post Share Count] TransientI modified the function to use the transients:
function get_the_post_share_count( $post = 0, $services, $time = 3600, $max_sync = 1 ) { $count = get_transient( 'post_share_count-' . $post->ID ); static $updated = 0; $post = get_post( $post ); $id = isset( $post->ID ) ? $post->ID : 0; $count['total'] = ( isset( $post->post_share_total_count ) ) ? $post->post_share_total_count : 0; if ( isset( $post->post_share_count ) && is_array( $post->post_share_count ) ) $count = array_merge( $count, $post->post_share_count ); if ( ( ! isset( $post->post_share_last_sync ) || $post->post_share_last_sync < ( time() - $time ) ) && $updated < $max_sync) { $updated_counters = post_share_count_sync_post( $id, $services ); update_post_meta( $id, 'post_share_last_sync', time() ); if ( ! empty( $updated_counters ) ) { update_post_meta( $id, 'post_share_count', $updated_counters ); if ( $total = array_sum( $updated_counters ) ) { update_post_meta( $id, 'post_share_total_count', $total ); $updated_counters['total'] = $total; } $count = $updated_counters; } $updated++; } set_transient( 'post_share_count-' . $post->ID, $count, $time ); return apply_filters( 'the_post_share_count', $count, $id ); }and in my theme I take the data from transient
<?php $tableau_count = get_transient('post_share_count-' . $post->ID); echo $tableau_count['twitter']; //and / or echo $tableau_count['facebook']; //and / or echo $tableau_count['googleplus']; //and / or echo $tableau_count['total']; ?>I’m not a developer so I do not know if there is a better solution, but it’s works
Forum: Plugins
In reply to: [Post Share Count] Total sharesThank You, it’s works 🙂
Forum: Plugins
In reply to: [Safari Push] Include the title of the post in "body" by defaultThank you this is corrected, it lacked {post-title} in settings
Forum: Plugins
In reply to: [Safari Push] manual push from the settings does not work since 0.9correction, I’m not sure that the problem comes from the plugin.
I continue to investigate
Forum: Plugins
In reply to: [Safari Push] Issue, all people don't recept pushI know why.
If your Mac is recorded at the beginning in the database, you will receive all Pushs. But if the number of registered devices exceeds a certain number, the rest of the list does not receive.
My tests confirm what I say:
I put my token at the beginning of the list -> I receive all pushs
I put my token at the end -> I did not receive anything
The best solution would be to send tokens to Apple by several small packages.
Forum: Plugins
In reply to: [Safari Push] Issue, all people don't recept pushI have the same problem !
Some people do not receive the push
“i have need to unscribe of push, and re-suscribe and now is good..”
-> Me tooForum: Plugins
In reply to: [Safari Push] Add URL field to push in the settings.okay Thank you
Forum: Plugins
In reply to: [Safari Push] Add URL field to push in the settings.okay.
I don’t have Jetpack so I could not know
Forum: Plugins
In reply to: [Safari Push] No Javascript in footeryes great idea 🙂
Forum: Plugins
In reply to: [Safari Push] Add URL field to push in the settings.Replace :
$url = parse_url( get_permalink( $post->ID ) );
by
$url = parse_url( wp_get_shortlink( $post->ID ) );in line 427
Forum: Plugins
In reply to: [Safari Push] No Javascript in footerI don’t have wp_footer() in my theme
It is possible to detect </ body> and place it just before?
There are many themes that do not have wp_footer ()Thank you
Forum: Plugins
In reply to: [Safari Push] Add URL field to push in the settings.Made in, the problem is not the url title.
If it is too long it does not work.
I tested with this url, it does not work:
Forum: Plugins
In reply to: [Safari Push] Add URL field to push in the settings.I do not really know. I will do some tests.
Ok Thank you
Forum: Plugins
In reply to: [Safari Push] Safari Push 0.7 doesn't workYes Thank You, push manually from the plugin settings works !
You should specify in the settings it is absolutely necessary to use Safari to send a push manually
Thank You for your help 🙂