Skip to content

Commit f3d8259

Browse files
committed
Disable search bar on user profile and taxonomy pages.
Signed-off-by: Kev Provance <[email protected]>
1 parent 984bab9 commit f3d8259

File tree

5 files changed

+17
-3
lines changed

5 files changed

+17
-3
lines changed

redux-core/assets/css/redux-fields.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

redux-core/assets/css/redux-fields.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

redux-core/assets/js/redux.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,13 @@ function colorNameToHex( colour ) {
395395
);
396396

397397
if ( true === redux.optName.args.search ) {
398+
const url = window.location.href;
399+
const wordAfterUrl = url.split( '/' ).pop();
400+
401+
if ( 'profile.php' === wordAfterUrl || 0 === wordAfterUrl.indexOf( 'edit-tags.php' ) ) {
402+
return false;
403+
}
404+
398405
if ( 0 === $( '#customize-controls' ).length ) {
399406
$( '.redux-container' ).each(
400407
function ( ) {

redux-core/assets/js/redux.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

redux-core/assets/js/redux/init-events.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@
1717
);
1818

1919
if ( true === redux.optName.args.search ) {
20+
const url = window.location.href;
21+
const wordAfterUrl = url.split( '/' ).pop();
22+
23+
if ( 'profile.php' === wordAfterUrl || 0 === wordAfterUrl.indexOf( 'edit-tags.php' ) ) {
24+
return false;
25+
}
26+
2027
if ( 0 === $( '#customize-controls' ).length ) {
2128
$( '.redux-container' ).each(
2229
function ( ) {

0 commit comments

Comments
 (0)