Title: KimTasker's Replies | WordPress.org

---

# KimTasker

  [  ](https://wordpress.org/support/users/kimtasker/)

 *   [Profile](https://wordpress.org/support/users/kimtasker/)
 *   [Topics Started](https://wordpress.org/support/users/kimtasker/topics/)
 *   [Replies Created](https://wordpress.org/support/users/kimtasker/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/kimtasker/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/kimtasker/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/kimtasker/engagements/)
 *   [Favorites](https://wordpress.org/support/users/kimtasker/favorites/)

 Search replies:

## Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Front-End Users] Ajax calls being blocked for anonymous users](https://wordpress.org/support/topic/ajax-calls-being-blocked-for-anonymous-users/)
 *  [KimTasker](https://wordpress.org/support/users/kimtasker/)
 * (@kimtasker)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/ajax-calls-being-blocked-for-anonymous-users/#post-3622809)
 * I had the same issue, and came up with a fix.
    ralphonz’s answer works of course,
   but deleting this piece of code won’t restrict the access to the admin any more,
   which is the whole point of the front end users plugin in the first place.
 * Instead, I suggest replacing the code with something like this :
 *     ```
       public function restrict_admin_access() {
          if (is_admin()) {
             if (strpos($_SERVER['PHP_SELF'], 'wp-admin/admin-ajax.php')===false) {
                if (!$this->is_logged_in()) {
       	    $this->render_page('not-logged-in');
       	 } else if (!$this->has_admin_access()) {
       	    $this->render_404();
       	 }
             }
          }
       }
       ```
   
 * all ajax calls will be allowed now, so the same question arises : is it safe ?
   
   An other solution would be to identify what actions are sent through ajax by 
   other plugins and manually populate the _$valid\_admin\_ajax\_actions_ array 
   in the original code…
 * With the same idea, I’ve had to customize the _rewrite\_admin\_url_ filter as
   it exits on not logged users before checking for ajax request…
 * Better yet, these functions should be overridden in your theme, which requires
   some knowledge : removing original hooks, adding your own, checking for existence
   of the feu plugin,… but as the chance the plugin gets updated seems very small(
   last update in 2011 !), this may not be so important.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Post Type's Archive in WP Nav Menu] Loading gif always visible](https://wordpress.org/support/topic/loading-gif-always-visible/)
 *  [KimTasker](https://wordpress.org/support/users/kimtasker/)
 * (@kimtasker)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/loading-gif-always-visible/#post-3380120)
 * I had the same issue, but fixed it. Actually, the plugin meta-box isn’t structured
   as it should be, some of the code needs to be changed.
    If you open cpt-in-navmenu.
   php in the plugin folder, towards the end of the file you’ll find :
 *     ```
       echo '<div id="cpt-archive" class="posttypediv">';
       echo '<div id="tabs-panel-cpt-archive" class="tabs-panel tabs-panel-active">';
       echo '<ul id="ctp-archive-checklist" class="categorychecklist form-no-clear">';
       echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $post_types), 0, (object) array( 'walker' => $walker) );
       echo '</ul>';
       echo '</div><!-- /.tabs-panel -->';
       echo '</div>';
       echo '<p class="button-controls">';
       echo '<span class="add-to-menu">';
       echo '<img class="waiting" src="' . esc_url( admin_url( 'images/wpspin_light.gif' ) ) . '" alt="" />';
       echo '<input type="submit"' . disabled( $nav_menu_selected_id, 0 ) . ' class="button-secondary submit-add-to-menu" value="' . __('Add to Menu', 'andromedamedia') . '" name="add-ctp-archive-menu-item" id="submit-cpt-archive" />';
       echo '</span>';
       echo '</p>';
       ```
   
 * If you replace it with the following (only some minor changes) :
 *     ```
       echo '<div id="cpt-archive" class="posttypediv">';
       echo '<div id="tabs-panel-cpt-archive" class="tabs-panel tabs-panel-active">';
       echo '<ul id="ctp-archive-checklist" class="categorychecklist form-no-clear">';
       echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $post_types), 0, (object) array( 'walker' => $walker) );
       echo '</ul>';
       echo '</div><!-- /.tabs-panel -->';
       echo '<p class="button-controls">';
       echo '<span class="add-to-menu">';
       echo '<input type="submit"' . disabled( $nav_menu_selected_id, 0 ) . ' class="button-secondary submit-add-to-menu right" value="' . __('Add to Menu', 'andromedamedia') . '" name="add-ctp-archive-menu-item" id="submit-cpt-archive" />';
       echo '<span class="spinner"></span>';
       echo '</span>';
       echo '</p>';
       echo '</div>';
       ```
   
    -  added “right” to the submit button class
       deleted the <img /> of the ajax
      gif added <span class=”spinner”> after the submit button the <div id=”cpt-
      archive”> must include all the box so the closing </div> goes at the end
 * that’s it
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Crayon Syntax Highlighter] Wrong title on copy-paste button](https://wordpress.org/support/topic/wrong-title-on-copy-paste-button/)
 *  [KimTasker](https://wordpress.org/support/users/kimtasker/)
 * (@kimtasker)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/wrong-title-on-copy-paste-button/#post-3657109)
 * I have the same issue in current version (v2.2)
    it’s easily changed though, 
   you just need to edit crayon_formatter.class.php, and change this line of code(
   line 303 in the version I have) : $buttons[‘copy’] = crayon__(‘Expand Code’);
 * switch ‘Expand Code’ to whatever text best suits you (I put ‘Select Code’)

Viewing 3 replies - 1 through 3 (of 3 total)