add_editor_style is not loading in frontend. Any solution?

Here is my solution: add_filter(‘the_editor_content’, “firmasite_tinymce_style”); function firmasite_tinymce_style($content) { add_editor_style(‘assets/css/custom.css’); // This is for front-end tinymce customization if ( ! is_admin() ) { global $editor_styles; $editor_styles = (array) $editor_styles; $stylesheet = (array) $stylesheet; $stylesheet[] = ‘assets/css/custom.css’; $editor_styles = array_merge( $editor_styles, $stylesheet ); } return $content; } Live Example: http://unsalkorkmaz.com/firmasite-social-buddypress-bbpress-theme-based-on-bootstrap/ Check comments wp_editor.. its loading bootstrap.css … Read more

Deleting users from front-end with wp_delete_user()

You could use AJAX to request a custom ‘action’ and send the users’ ID. Alternatively ‘post’ the action and user ID to the same page. They are both essentially the same thing, but the former doesn’t require the page to be reloaded. There are plenty of topics on this site that deal with AJAX, so … Read more

delete attachment from front end

ended up using ajax in the end… html; <a class=”remImage” name=”<?php echo $attachment->ID; ?>” href=”#”><?php _e(‘delete’);?></a> <input type=”hidden” id=”att_remove” name=”att_remove[]” value=”<?php echo $attachment->ID; ?>” /> <input type=”hidden” name=”nonce” id=”nonce” value=”<?php echo wp_create_nonce( ‘delete_attachment’ ); ?>” /> jquery $(‘.remImage’).live(‘click’, function() { var attID = jQuery(this).attr(‘name’); jQuery.ajax({ type: ‘post’, url: ‘/wp-admin/admin-ajax.php’, data: { action: ‘delete_attachment’, att_ID: jQuery(this).attr(‘name’), … Read more

wp_editor with media buttons

You can use following code to achieve this if ( is_user_logged_in() ) { // Editor without media buttons wp_editor( $content, ‘editorname’, array(‘media_buttons’ => false) ); } else { // Editor with media buttons wp_editor( $content, ‘editorname’); }

Handling jQuery Component Collision

My suggestion would be to use a mix of code isolation in an anonymous function and checking if jquery is already present. Here’s an example: (function() { var jQuery; // your jquery variable // check if jquery is present and if it has the version you want if (window.jQuery === undefined || window.jQuery.fn.jquery !== ‘1.8.3’) … Read more

techhipbettruvabetnorabahisbahis forumutaraftarium24eduseduseduseduseduseduedueduedusedus