File tree Expand file tree Collapse file tree 3 files changed +17
-4
lines changed
js/components/SnippetForm Expand file tree Collapse file tree 3 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 9595form .condition-snippet .snippet-code-container {
9696 display : none ;
9797}
98+
99+ .cs-back {
100+ cursor : pointer ;
101+
102+ & ::before {
103+ content : ' <' ;
104+ color : #2271b1 ;
105+ margin-inline-end : 3px ;
106+ }
107+ }
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ const EditFormWrap: React.FC = () => {
145145
146146 return (
147147 < div className = "wrap" >
148- < p > < small >
148+ < p > < small className = "cs-back" >
149149 { isCondition ( snippet )
150150 ? < a href = { addQueryArgs ( window . CODE_SNIPPETS ?. urls . manage , { type : 'cond' } ) } >
151151 { __ ( 'Back to all conditions' , 'code-snippets' ) }
Original file line number Diff line number Diff line change @@ -97,8 +97,11 @@ protected function ensure_correct_page() {
9797 $ edit_hook .= $ screen ->in_admin ( 'network ' ) ? '-network ' : '' ;
9898
9999 // Disallow visiting the edit snippet page without a valid ID.
100- if ( $ screen ->base === $ edit_hook && ( empty ( $ _REQUEST ['id ' ] ) || 0 === $ this ->snippet ->id || null === $ this ->snippet ->id ) &&
101- ! isset ( $ _REQUEST ['preview ' ] ) ) {
100+ if (
101+ $ screen ->base === $ edit_hook
102+ && ( empty ( $ _REQUEST ['id ' ] ) || 0 === $ this ->snippet ->id || null === $ this ->snippet ->id )
103+ && ! isset ( $ _REQUEST ['preview ' ] )
104+ ) {
102105 wp_safe_redirect ( code_snippets ()->get_menu_url ( 'add ' ) );
103106 exit ;
104107 }
@@ -111,7 +114,7 @@ protected function ensure_correct_page() {
111114 */
112115 public function render () {
113116 printf (
114- '<div id="edit-snippet-form-container">%s </div> ' ,
117+ '<div id="edit-snippet-form-container"><small style="position: relative; top: 14px;">%s</small> </div> ' ,
115118 esc_html__ ( 'Loading edit page… ' , 'code-snippets ' )
116119 );
117120 }
You can’t perform that action at this time.
0 commit comments