Muhammad Mahmoud
Forum Replies Created
-
Forum: Plugins
In reply to: [Ozh' Admin Drop Down Menu] Menu Icons Missing – WP 3.9@ozh:
I will do my best soon, if no one fixed it yet.@snih:
i didn’t notice it on the first time, to fix this problem you have to override admin area css, and it can’t be set as inline style because “before” is a pseudo-class and it’s not possible to create inline styles for it.so, a temporary solution is to hook on “admin_head” action , by adding the following in your theme “functions.php” file
add_action('admin_head', 'custom_css'); function custom_css() { echo '<style> div.wp-menu-image:before { padding:4px 0 !important; } </style>'; }
you can change 4px to any value between 0-7 that you see it fits well with you ??
hope this help!
Forum: Plugins
In reply to: [Ozh' Admin Drop Down Menu] Menu Icons Missing – WP 3.9@spherical
that’s weird ! , i got the class name from the native wordpress styling for menu items
if you have a normal dashboard without Ozh plugin and inspected the menu items code you will find that wordpress uses class “dashicons-before” !Forum: Plugins
In reply to: [Ozh' Admin Drop Down Menu] Menu Icons Missing – WP 3.9hello all
this is a temporary solution that will display the new Dashicons set instead of empty icons
– open the plugin directory and edit the file in that path inc/core.php , starting from line 85 you will find this part of code
if ( isset($item[6]) && ! empty($item[6]) ) { if ( 'none' === $item[6] || 'div' === $item[6] ) $img = '<div '.$imgstyle.' class="wp-menu-image"><br /></div>'; else $img = '<img '.$imgstyle.' class="wp-menu-image" src="' . $item[6] . '" alt="" />'; }
just replace it with the following code
if ( isset($item[6]) && ! empty($item[6]) ) { preg_match('/^dashicons/', $item[6], $matches); if ( 'none' === $item[6] || 'div' === $item[6] ) $img = '<div '.$imgstyle.' class="wp-menu-image"><br /></div>'; elseif (!empty($matches)) $img = '<div '.$imgstyle.' class="wp-menu-image dashicons-before '.$item[6].'"><br /></div>'; else $img = '<img '.$imgstyle.' class="wp-menu-image" src="' . $item[6] . '" alt="" />'; }
i tried to keep the orginal code of the plugin away of modifications , i just added a new condition that look for “dashicons” and then it will alter the div classes with the needed icon class
hope this help
Forum: Plugins
In reply to: [JSON API] submit_comment sends me to urli don’t know if you are still need the solution , it’s 2 months ago ??
but i were facing same problem and found that the wordpress reserve the variable ( name ) , check -> Reserved Terms
so the solution is hard-code one you have to change the code on the plugin files of
$_REQUEST[name] to another name that not reserved by wordpress like $_REQUEST[cname]
and ofcourse use this new name on your queryForum: Plugins
In reply to: About Optimizing Querying Posts by Custom FieldsThanks for your attention .. but this plug wasnt to get what i mean
@ Scribu
Thanks for your reply .. it’s similar to vtxyzzy’s idea
i asked PHP Web Developer .. his name is Burak Guzel [phpandstuff.com]
and he helped me that i can make index(non-unique) to the field with a specific length even it’s type is TEXT
e.g. i will index the first 20 charachters from this field
–>
alter table wp_postmeta ADD INDEX (meta_value
( 20 ) )Thanks 4 All
Forum: Plugins
In reply to: About Optimizing Querying Posts by Custom Fieldsit’s right
but is there any simpler solution ?