Mohammed Al-Mahdawi
Forum Replies Created
-
Forum: Themes and Templates
In reply to: New Theme ReviewForum: Themes and Templates
In reply to: New Theme ReviewHi Suyogya,
Thank you for the reply.
When I submit a plugin it take 1 day to get approved, I think 6 months is too long for the best content management system.
I think they should solve this.Regards,
MohammedForum: Fixing WordPress
In reply to: changed domain on Dashboard; can't log back inIn public_html folder find wp-config.php file and do exactly like what I told you in my answer.
Forum: Fixing WordPress
In reply to: blog not workingEdit your wp-config.php file and add the following just before
/* That's all, stop editing! Happy blogging. */
line:define('WP_HOME','https://example.com'); define('WP_SITEURL','https://example.com');
Don’t forget to change
https://example.com
to your original domain.Forum: Fixing WordPress
In reply to: changed domain on Dashboard; can't log back inEdit your wp-config.php file and add the following just before
/* That's all, stop editing! Happy blogging. */
line:define('WP_HOME','https://xxxx.com'); define('WP_SITEURL','https://xxxx.com');
Don’t forget to change
https://xxxx.com
to your original domain.Thank you for quick reply.
I just sent an email to you.Mohammed
Is it OK now?
Forum: Plugins
In reply to: [MailPoet Newsletters (Previous)] Why You Aren't Answering Me!!!???The MailPoet team contacted me and the problem solved.
Forum: Hacks
In reply to: Disable Specific Categories By ID with wp_dropdown_cats WordPress FilterThank you very much, I really appreciate your time that you spent with me,I just put
$output='';
before the foreach loop the magic happened and everything work perfectly. So the following code work great for me.
You really lifesaver.function mosff_disable_parent_categories($output) { $diabled_categories = array(6,4); $output_parts = explode('value="', $output); $output=''; foreach ($output_parts as $output_part) { preg_match('#\d+#', $output_part, $matches); $first_integre= absint($matches[0]); if (in_array($first_integre, $diabled_categories)) { $findme = '>'; $pos = strpos($output_part, $findme); $befor_first_occure = ($pos); $insert_disable = ' disabled'; $output_part = substr_replace($output_part, $insert_disable, $befor_first_occure, 0); } if ($output_part === reset($output_parts)){ $output .= $output_part; } else { $output .= 'value="'.$output_part; } } return $output; } add_filter('wp_dropdown_cats', mosff_disable_parent_categories);
Forum: Hacks
In reply to: Disable Specific Categories By ID with wp_dropdown_cats WordPress FilterGreat , you were totally right about that,
So the following code is working perfectly but it generates new dropdown menus instead of altering the existing one.
What do you think about that?function mosff_disable_parent_categories($output) { $diabled_categories = array(6,4); $output_parts = explode('value="', $output); foreach ($output_parts as $output_part) { preg_match('#\d+#', $output_part, $matches); $first_integre= absint($matches[0]); if (in_array($first_integre, $diabled_categories)) { $findme = '>'; $pos = strpos($output_part, $findme); $befor_first_occure = ($pos); $insert_disable = ' disabled'; $output_part = substr_replace($output_part, $insert_disable, $befor_first_occure, 0); } if ($output_part === reset($output_parts)){ $output .= $output_part; } else { $output .= 'value="'.$output_part; } } return $output; } add_filter('wp_dropdown_cats', mosff_disable_parent_categories);
Forum: Plugins
In reply to: [Image Watermark] Bulk apply watermark Pressing Issue Please HelpNo, I didn’t get any answer.
Forum: Hacks
In reply to: Disable Specific Categories By ID with wp_dropdown_cats WordPress FilterThank you again for your time and your great explanation.I reach to this point and when execute the following code I get unexpected result.
Could you please tell me why that happened, and what should I do?function mosff_disable_parent_categories($output) { $disabled_categories = array(6,1); $output_parts = explode('value="', $output); $res = array(); foreach ($output_parts as $key => $string) { preg_match('/^(?P<number>\d)/', $string, $match); $res[$key] = absint($match['number']); if (in_array($res[$key], $disabled_categories)) { $findme = '>'; $pos = strpos($string, $findme); $befor_first_occure = ($pos - 1); $insert_disable = 'disabled'; $string = substr_replace($string, $insert_disable, $befor_first_occure, 0); } $output .= $string; return $output; } } add_filter('wp_dropdown_cats', mosff_disable_parent_categories);
Forum: Hacks
In reply to: Disable Specific Categories By ID with wp_dropdown_cats WordPress FilterThank you for your reply,could you please tell me the guidelines on how can I do that or guide me to articles to help me do that?
This problem is solved in Jetpack version 2.9.2, when I told Jetpack team about it.
Thanks Jetpack team.What can I do now ?
Any help please ?