Nikoya
Forum Replies Created
-
hello,
If someone is looking for a solution …
this is what i do actually, it’s not perfect but that works.1, Enable share plugin from jetpack
2, I disable the share filter from jetpack by adding this code in my functions.php
function jptweak_remove_share() { remove_filter( 'the_content', 'sharing_display',19 ); remove_filter( 'the_excerpt', 'sharing_display',19 ); if ( class_exists( 'Jetpack_Likes' ) ) { remove_filter( 'the_content', array( Jetpack_Likes::init(), 'post_likes' ), 30, 1 ); } } add_action( 'loop_start', 'jptweak_remove_share' );
3, Then i add this code in my theme where i need to display share buton
if ( function_exists( 'sharing_display' ) ) { sharing_display( '', true ); } if ( class_exists( 'Jetpack_Likes' ) ) { $custom_likes = new Jetpack_Likes; echo $custom_likes->post_likes( '' ); }
Solution found here : https://jetpack.me/2013/06/10/moving-sharing-icons/
But it’s not perfect for 2 reasons at least :
1, now we can’t use settings page to select where button display
2, The problem stay with all other pluginHi, exactly same problem …
i’ve try different things but don’t find a working solution ??
Thanks
Oops this code is in the file ‘post-widget.php’ line 188 ??
Hi all,
I can’t add block reason : “content_id” not defined.I seems we just need to wait document ius ready.
So i suggest to REPLACE :
jQuery( '.add-content-block-id' ).change( function() { content_id = jQuery( this ).val(); console.log( 'content_id: ' + content_id ); });
BY
jQuery( document ).ready(function() { jQuery( '.add-content-block-id' ).change( function() { content_id = jQuery( this ).val(); console.log( 'content_id: ' + content_id ); }); });
hey Johan
Sorry for the response time …
Your last update seems to solved the issue with multiple tinyMce.
Good work ??
Hi
Custom post type or template are often used to create complexe page with multi tinyMce.
So in my opinion it’s an issue.
I’m totally agree with you when you say “seems a bit like a hack”.
I think the best solution would be to create, then call this div using ajax (thickbox) and destroying this when closing it.
But i don’t really understand how works ajax in backoffice ??
I suggest edit file popup.php
start it with :
<?php // Displays the lightbox popup to insert a content block shortcode to a post/page function add_content_block_popup() { global $add_content_block_popup; if($add_content_block_popup != true){ $add_content_block_popup = true; ?>
close it with
<?php } };
With this we have only 1 div and all seems to be ok.
ohhh found another issue now.
If we have a custom post type with 2 tinymce or more, we have multi div with same id then we can’t use your button cause there is always the message : “choose a block”.
I suppose we need be sure that the div is write only 1 time.
I’ve check it ( v 2.4.3)
All seems to work perfectly.
page / post / custom post / custom settings page with tinyMce
And don’t load div when not requiered.
So i think it’s sooooo good ??
Ty to take time to read my poor english hahahaa
why not simply use media_buttons hook, like you do just before for add_content_block_icon ?
I’ve tryed it.
That works great, and that seems to be logic (at least in my head ^^) to call the button and the div in the same time.
add_filter( 'media_buttons', 'add_content_block_icon' ); add_action( 'media_buttons', 'add_content_block_popup' );
Work great,
but seems to load “add_content_block_popup” (admin_footer hook) function on each admin page not only on page who use tinymce.
i propose to add in file popup.php
line 4
global $current_screen; if( 'content_block' != $current_screen -> post_type ) {
and close this at line 50 with :
}
with this, that will be load with tinymce but not in content_block post type.
Just what we need i think ??
Hey,
thx to reply ??
I understand your logic.
Would be better to detect if we are in content_block post type ?
than detect all other page ….
If i’m wrong, (it’s afton the case ^^) this is the list of page that would be great to see your plugin working on it.
admin.php and themes.php
THx
Fixed by 2.3.2
Thx
Forum: Plugins
In reply to: [Easy Bootstrap Shortcode] Columns : Add clear function when new lineI’ve pushed it.
hmmm … i think i’ve pushed it ^^