Skip to content

Commit

Permalink
Disable search bar on user profile and taxonomy pages.
Browse files Browse the repository at this point in the history
Signed-off-by: Kev Provance <[email protected]>
  • Loading branch information
kprovance committed Jan 15, 2025
1 parent 984bab9 commit f3d8259
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion redux-core/assets/css/redux-fields.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion redux-core/assets/css/redux-fields.min.css.map

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions redux-core/assets/js/redux.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,13 @@ function colorNameToHex( colour ) {
);

if ( true === redux.optName.args.search ) {
const url = window.location.href;
const wordAfterUrl = url.split( '/' ).pop();

if ( 'profile.php' === wordAfterUrl || 0 === wordAfterUrl.indexOf( 'edit-tags.php' ) ) {
return false;
}

if ( 0 === $( '#customize-controls' ).length ) {
$( '.redux-container' ).each(
function ( ) {
Expand Down
2 changes: 1 addition & 1 deletion redux-core/assets/js/redux.min.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions redux-core/assets/js/redux/init-events.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@
);

if ( true === redux.optName.args.search ) {
const url = window.location.href;
const wordAfterUrl = url.split( '/' ).pop();

if ( 'profile.php' === wordAfterUrl || 0 === wordAfterUrl.indexOf( 'edit-tags.php' ) ) {
return false;
}

if ( 0 === $( '#customize-controls' ).length ) {
$( '.redux-container' ).each(
function ( ) {
Expand Down

0 comments on commit f3d8259

Please sign in to comment.