Making WordPress.org

Changeset 12786


Ignore:
Timestamp:
08/01/2023 10:44:10 PM (3 years ago)
Author:
coffee2code
Message:

Photo Directory, Rejection: Constrain JS selectors to affect only photo posts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/photo-directory/inc/rejection.php

    r12731 r12786  
    11051105            document.addEventListener('DOMContentLoaded', function () {
    11061106                // Remove the 'Submit for Review' button.
    1107                 document.querySelector("#publishing-action").remove();
     1107                document.querySelector("body.post-type-photo #publishing-action")?.remove();
    11081108
    11091109                // Remove the 'Preview' button.
    1110                 document.querySelector("#preview-action").remove();
     1110                document.querySelector("body.post-type-photo #preview-action")?.remove();
    11111111
    11121112                // Add rejected post status to status display.
    1113                 document.querySelector(".misc-pub-post-status #post-status-display").innerText = "{$status_label}";
     1113                document.querySelector("body.post-type-photo .misc-pub-post-status #post-status-display").innerText = "{$status_label}";
    11141114
    11151115                // Change visibility display to indicate it is hidden.
    1116                 document.querySelector(".misc-pub-visibility #post-visibility-display").innerText = "{$visibility_label}";
     1116                document.querySelector("body.post-type-photo .misc-pub-visibility #post-visibility-display").innerText = "{$visibility_label}";
    11171117            } );
    11181118            </script>
Note: See TracChangeset for help on using the changeset viewer.