Jon Bishop
Forum Replies Created
-
Forum: Plugins
In reply to: [Socialize] floating.js loading when not needed, causing errorsThe code for the floating share bar was a proof of concept for modifying socialize using built in filters.
Here is the floating share code. It can be copied into its own plugin and modified as needed.
class socialize_inline_class { function init() { $socialize_settings = socializeWP::get_options(); // check to see if turned on, // check to see if single page, post or custom post type if(is_singular() && !is_feed()){ if($socialize_settings['socialize_button_display'] == 'out'){ add_filter('socialize-inline_class', array(__CLASS__, 'replace_class')); add_filter('socialize-after-inline_content', array(__CLASS__, 'email_button')); add_filter('socialize-after-inline_content', array(__CLASS__, 'print_button')); add_filter('wp_enqueue_scripts', array(__CLASS__, 'scripts')); add_action('wp_head', array(__CLASS__, 'style')); } } } function scripts() { wp_enqueue_script('socialize-floating', SOCIALIZE_URL . 'frontend/js/floating.js', array('jquery')); } function style(){ $socialize_settings = socializeWP::get_options(); echo '<style type="text/css" media="screen">'; echo '.socialize-floating { margin-left: '.$socialize_settings['socialize_out_margin'].'px; }'; echo '</style>'; } function replace_class($classes) { $classes = array('socialize-floating', 'socialize-floating-bg'); return $classes; } function email_button($content) { $content .= '<div class="socialize-in-button socialize-in-button-vertical">'; $content .= '<a href="mailto:?subject=' . urlencode(get_the_title()) . '&body=' . urlencode(get_permalink()) . '" class="socialize-email-button">Email</a>'; $content .= '</div>'; return $content; } function print_button($content) { $content .= '<div class="socialize-in-button socialize-in-button-vertical">'; $content .= '<a href="javascript:window.print()" class="socialize-print-button">Print</a>'; $content .= '</div>'; return $content; } } add_filter('wp', array('socialize_inline_class', 'init'));Forum: Plugins
In reply to: [Socialize] Facebook July 2013 Breaking ChangesThe plugin uses Absolute urls via the
get_permalink()functionForum: Plugins
In reply to: [Socialize] Pinterest button doesn't lineupI’ve updated the button to use the latest code.
Forum: Plugins
In reply to: [Socialize] Move Call To Action Box Outside "After Post Content"Use the following code snippet to change the priority of the Call to Action box.
if (class_exists(‘SocializeFrontEnd’)) { global $socializeWPfrontend; remove_filter( ‘the_content’, array($socializeWPfrontend, ‘insert_socialize’)); add_filter(‘the_content’, array($socializeWPfrontend, ‘insert_socialize’), 90 ); }Forum: Plugins
In reply to: [Socialize] Twitter & Facebook buttons not shownPlease give this another try. I’ve updated the code so the buttons should work.
Forum: Plugins
In reply to: [Socialize] Likes not showing on FacebookHere’s a page in the Facebook FAQ that explains how the button works: Where do the Pages I like show on my timeline?
Forum: Plugins
In reply to: [Socialize] Float Right not workingUnfortunately this can get overwritten by the theme. If you can share a test page I may be able to help diagnose the issue specifically for your site.
Forum: Plugins
In reply to: [Socialize] Google and Twitter buttons not showingMake sure you have
wp_footer();in the footerForum: Plugins
In reply to: [Socialize] floating.js loading when not needed, causing errorsI’ve added a
jQuery('.socialize-floating').length > 0check to prevent this error from happening.Forum: Plugins
In reply to: [Socialize] Removing counter for google 1 buttonAdded an option for this in the back end now.
Forum: Plugins
In reply to: [Socialize] How to uninstall Socialize completlyYou may have had some caching issues. The plugin uses a WordPress filter to display the buttons. Hopefully this problem has resolved itself by now.
Forum: Reviews
In reply to: [Post Admin Word Count] Good, but column width should be setThis plugin uses the API to add the new column. WordPress handles the column widths and you can manually control which columns get displayed under “Screen Settings” ate the top of the page.
Thanks for using the plugin and giving a positive rating!
Forum: Plugins
In reply to: [WP About Author] Hide authors withouth descriptionThis is currently possible using the plugin’s built in filters. I’m working on some tutorials I’ll have up on my blog soon.
Forum: Plugins
In reply to: [Socialize] removed plugin but call-to-action box still in postsMake sure you clear your cache. The plugin does not inject content into your posts, it uses the_content filter.
Have not tested but you could try something like this:
add_filter('posts_selection', 'custom_socialize_output'); function custom_socialize_output(){ if (class_exists('SocializeFrontEnd')) { global $socializeWPfrontend; remove_filter( 'the_content', array($socializeWPfrontend, 'insert_socialize')); if(is_category('9')) add_filter('the_content', array($socializeWPfrontend, 'insert_socialize')); } }