Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • I had this exact issue with 3.8.2 update. I am hosted on DreamPress (Dreamhost) and the tech who helped me there said that he emptied/reset the memcache on the server my site was hosted on. Once he did that I was able to get to the admin. I think you would have to contact WP Engine and ask them to reset the server Memcache.

    I am having this exact same issue. Can you describe the solution a little more or point me towards the jQuery file that I could download?

    Thanks!

    Thread Starter John McAlester

    (@johnmcalester)

    Hi Simon,

    That works!. Thanks so much for the reply.

    Here are the changes that I made to the intercom-for-wordpress.php file in case some of it may be useful to you.

    Here is a pastebin of the file.

    https://pastebin.com/286ZK8CV

    1 – line 99) Added the action to create the support menu page

    add_action( 'admin_menu',            array( $this, 'create_support_menu'       ) );

    2 – line 383) Created a function that adds the activator filter, sets the activator, and adds a menu page if the “Create Menu Page” option is checked on the plugin settings page.

    /**
    	 * create the support menu link
    	 *
    	 * @return null
    	 */
    	function create_support_menu() {
    
    		add_filter( 'll_intercom_activator', 'pl_intercom_activator' );
    
    		function pl_intercom_activator( $activator ) {
    			return '.toplevel_page_support';
    		}
    
    		$opts = self::get_settings();
    
    		if ($opts['create-support-menu']){
    			add_menu_page(
    				'Support',
    				'Support',
    				'edit_posts',
    				'support', //the slug
    				'', //the function
    				'', //the icon location
    				29
    				);
    		}
    
    	}

    3 – line 488) Added a check box to the plugin settings page for users to choose whether or not they want the plugin to create a support menu.

    <tr valign="top">
    							<th scope="row">Create support menu link?</th>
    							<td>
    								<input name="ll-intercom[create-support-menu]" type="checkbox" value="1" <?php checked( $opts['create-support-menu'] ); ?>>
    							</td>
    						</tr>

    4 – line 588) Added input validation for the new “create-support-menu” checkbox.

    $new['create-support-menu']  = absint( $input['create-support-menu'] );

    Please let me know if any of this code needs correction.

    Cheers,
    John.

    Thread Starter John McAlester

    (@johnmcalester)

    Awesome. Thanks for the followup Simon.

    OK, I think I figured this out thanks to the start I got from this post:
    https://randyjensenonline.com/thoughts/wordpress-custom-post-type-fugue-icons/

    1. I added a function (code from the linked post above) to the functions.php file of my theme.

    2. Then I copied the menu.png image from: wp-admin->images to my theme’s image directory.

    *you could probably link to this file directly without having to copy it but I haven’t figured that out yet.

    3. Then, in the CSS within the function that I added to my theme’s function.php file, I entered the correct values to place the sprite for the icon that I wanted. The x value for each icon is 30 pixels different. So for the “Appearance” menu icon you set the x value to 0, the “Comments” icon is -30px, “Dashboard” icon -60px, etc. The x value is first and then the y value in the CSS declaration.

    Appearance: 0px
    Comments: -30px
    Dashboard: -60px
    Links: -90px
    Media: -120px
    Pages: -150px
    Plugins: -180px
    Tools: -210px
    Settings: -240px
    Posts: -270px
    Users: -300px
    Options: -330px
    Passwords (maybe?): -360px

    I hope this saves some people some time if they would like to set the menu icon of a registered CPT with one of the regular menu icons which come with WordPress.

    Thanks for the reply brian914. That works great for the menu icons which have a gif. As you stated in your first post, if we do this for the top level menu icons, the whole sprite is showing.

    The li that the CPT menu sits in is given a custom id based on the name of the CPT. It should be possible to place some custom CSS someplace and then just copy the rules for which ever menu icon you want.

    I am wondering where the custom CSS should be (functions, custom.css, etc.) and where exactly I can find the CSS rules which position the sprite for each menu icon.

    Thanks again!

    Is it possible to simply use one of the existing menu icons for a custom post type admin menu?

    When you register the CPT you can declare: ‘menu_icon’ =>

    Is it possible to declare something like: ‘menu_icon’ => ‘Pages’

    What are the names of the existing menu icons?

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