Title: Mohammed Al-Mahdawi's Replies | WordPress.org

---

# Mohammed Al-Mahdawi

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

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

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 27 total)

1 [2](https://wordpress.org/support/users/engrmth/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/engrmth/replies/page/2/?output_format=md)

 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [New Theme Review](https://wordpress.org/support/topic/new-theme-review/)
 *  Thread Starter [Mohammed Al-Mahdawi](https://wordpress.org/support/users/engrmth/)
 * (@engrmth)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/new-theme-review/#post-7447136)
 * Hi,
 * [@andrew](https://wordpress.org/support/users/andrew/) Nevins now it is 3 weeks
   ago but [@suyogya](https://wordpress.org/support/users/suyogya/) Shukla say that
   it maybe take up to 6 months!
 * Regards,
    Mohammed
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [New Theme Review](https://wordpress.org/support/topic/new-theme-review/)
 *  Thread Starter [Mohammed Al-Mahdawi](https://wordpress.org/support/users/engrmth/)
 * (@engrmth)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/new-theme-review/#post-7447122)
 * Hi 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,
    Mohammed
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [changed domain on Dashboard; can't log back in](https://wordpress.org/support/topic/changed-domain-on-dashboard-cant-log-back-in/)
 *  [Mohammed Al-Mahdawi](https://wordpress.org/support/users/engrmth/)
 * (@engrmth)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/changed-domain-on-dashboard-cant-log-back-in/#post-7036901)
 * In public_html folder find wp-config.php file and do exactly like what I told
   you in my answer.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [blog not working](https://wordpress.org/support/topic/blog-not-working-16/)
 *  [Mohammed Al-Mahdawi](https://wordpress.org/support/users/engrmth/)
 * (@engrmth)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/blog-not-working-16/#post-7003815)
 * Edit your wp-config.php file and add the following just before `/* That's all,
   stop editing! Happy blogging. */`
    line:
 *     ```
       define('WP_HOME','http://example.com');
       define('WP_SITEURL','http://example.com');
       ```
   
 * Don’t forget to change `http://example.com` to your original domain.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [changed domain on Dashboard; can't log back in](https://wordpress.org/support/topic/changed-domain-on-dashboard-cant-log-back-in/)
 *  [Mohammed Al-Mahdawi](https://wordpress.org/support/users/engrmth/)
 * (@engrmth)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/changed-domain-on-dashboard-cant-log-back-in/#post-7036876)
 * Edit your wp-config.php file and add the following just before `/* That's all,
   stop editing! Happy blogging. */`
    line:
 *     ```
       define('WP_HOME','http://xxxx.com');
       define('WP_SITEURL','http://xxxx.com');
       ```
   
 * Don’t forget to change `http://xxxx.com` to your original domain.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Wordfence Security - Firewall, Malware Scan, and Login Security] Make My Plugin Compatible With Wordfence Security](https://wordpress.org/support/topic/make-my-plugin-compatible-with-wordfence-security/)
 *  Thread Starter [Mohammed Al-Mahdawi](https://wordpress.org/support/users/engrmth/)
 * (@engrmth)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/make-my-plugin-compatible-with-wordfence-security/#post-5574750)
 * Thank you for quick reply.
    I just sent an email to you.
 * Mohammed
 *   Forum: [Reviews](https://wordpress.org/support/forum/reviews/)
    In reply to:
   [[WP Demo Builder] Releasing A Premium Plugin With WP Demo Builder Was Terrible!](https://wordpress.org/support/topic/releasing-a-premium-plugin-with-wp-demo-builder-was-terrible/)
 *  Thread Starter [Mohammed Al-Mahdawi](https://wordpress.org/support/users/engrmth/)
 * (@engrmth)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/releasing-a-premium-plugin-with-wp-demo-builder-was-terrible/#post-7895245)
 * Is it OK now?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[MailPoet Newsletters (Previous)] Why You Aren't Answering Me!!!???](https://wordpress.org/support/topic/why-you-arent-answering-me/)
 *  Thread Starter [Mohammed Al-Mahdawi](https://wordpress.org/support/users/engrmth/)
 * (@engrmth)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/why-you-arent-answering-me/#post-5009850)
 * The MailPoet team contacted me and the problem solved.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Disable Specific Categories By ID with wp_dropdown_cats WordPress Filter](https://wordpress.org/support/topic/disable-specific-categories-by-id-with-wp_dropdown_cats-wordpress-filter/)
 *  Thread Starter [Mohammed Al-Mahdawi](https://wordpress.org/support/users/engrmth/)
 * (@engrmth)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/disable-specific-categories-by-id-with-wp_dropdown_cats-wordpress-filter/#post-4797979)
 * Thank 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](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Disable Specific Categories By ID with wp_dropdown_cats WordPress Filter](https://wordpress.org/support/topic/disable-specific-categories-by-id-with-wp_dropdown_cats-wordpress-filter/)
 *  Thread Starter [Mohammed Al-Mahdawi](https://wordpress.org/support/users/engrmth/)
 * (@engrmth)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/disable-specific-categories-by-id-with-wp_dropdown_cats-wordpress-filter/#post-4797959)
 * Great , 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](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Image Watermark] Bulk apply watermark Pressing Issue Please Help](https://wordpress.org/support/topic/bulk-apply-watermark-pressing-issue-please-help/)
 *  Thread Starter [Mohammed Al-Mahdawi](https://wordpress.org/support/users/engrmth/)
 * (@engrmth)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/bulk-apply-watermark-pressing-issue-please-help/#post-4705352)
 * No, I didn’t get any answer.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Disable Specific Categories By ID with wp_dropdown_cats WordPress Filter](https://wordpress.org/support/topic/disable-specific-categories-by-id-with-wp_dropdown_cats-wordpress-filter/)
 *  Thread Starter [Mohammed Al-Mahdawi](https://wordpress.org/support/users/engrmth/)
 * (@engrmth)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/disable-specific-categories-by-id-with-wp_dropdown_cats-wordpress-filter/#post-4797941)
 * Thank 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](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Disable Specific Categories By ID with wp_dropdown_cats WordPress Filter](https://wordpress.org/support/topic/disable-specific-categories-by-id-with-wp_dropdown_cats-wordpress-filter/)
 *  Thread Starter [Mohammed Al-Mahdawi](https://wordpress.org/support/users/engrmth/)
 * (@engrmth)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/disable-specific-categories-by-id-with-wp_dropdown_cats-wordpress-filter/#post-4797919)
 * Thank 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?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Jetpack - WP Security, Backup, Speed, & Growth] After Update Front End Forms and Publicize Stop Working !](https://wordpress.org/support/topic/after-update-front-end-forms-and-publicize-stop-working/)
 *  Thread Starter [Mohammed Al-Mahdawi](https://wordpress.org/support/users/engrmth/)
 * (@engrmth)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/after-update-front-end-forms-and-publicize-stop-working/#post-4690522)
 * This problem is solved in Jetpack version 2.9.2, when I told Jetpack team about
   it.
    Thanks Jetpack team.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Jetpack - WP Security, Backup, Speed, & Growth] After Update Front End Forms and Publicize Stop Working !](https://wordpress.org/support/topic/after-update-front-end-forms-and-publicize-stop-working/)
 *  Thread Starter [Mohammed Al-Mahdawi](https://wordpress.org/support/users/engrmth/)
 * (@engrmth)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/after-update-front-end-forms-and-publicize-stop-working/#post-4690443)
 * **What can I do now ?
    Any help please ?

Viewing 15 replies - 1 through 15 (of 27 total)

1 [2](https://wordpress.org/support/users/engrmth/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/engrmth/replies/page/2/?output_format=md)