Changeset 11612
- Timestamp:
- 02/25/2022 05:46:54 AM (3 years ago)
- Location:
- sites/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/trac.wordpress.org/templates/site.html
r11611 r11612 5 5 6 6 <?python 7 scripts_version = '16 6'7 scripts_version = '167' 8 8 project_slug = req.environ['HTTP_HOST'].split(':')[0].split('.')[0] 9 9 wporg_endpoint = 'https://make.wordpress.org/' + project_slug + '/' -
sites/trunk/wordpress.org/public_html/style/trac/wp-trac.js
r11570 r11612 1920 1920 suggestNotGeneral: ( function() { 1921 1921 var enabled = true, 1922 skipWords = [ 'and', 'any', 'all', 'the', 'for', 'get', 'plugins', 'general' ], 1922 skipWords = [ 'and', 'any', 'all', 'the', 'for', 'get', 'plugins', 'general', 'wordpress' ], 1923 generalCategories = [ 'General' ], 1923 1924 componentWords = {}, 1924 1925 noticeDiv; … … 1927 1928 // Only on new ticket creations. 1928 1929 if ( ! wpTrac.isNewTicket() ) { 1929 return;1930 }1931 1932 // Only if we have a 'General' option.1933 if ( ! $( '#field-component option[value="General"]' ).length ) {1934 1930 return; 1935 1931 } … … 1943 1939 } 1944 1940 1941 // On Meta, WordPress.org site is a "generic" category that shouldn't be used if possible. 1942 if ( $( 'body.meta' ).length ) { 1943 generalCategories.push( 'WordPress.org Site' ); 1944 skipWords.push( 'wordpress.org' ); 1945 } 1946 1947 // Only if we have a 'General' option. 1948 const components = jQuery( '#field-component option' ).get().map( opt => opt.value ), 1949 hasDefaultCat = generalCategories.filter( value => components.includes( value ) ); 1950 1951 if ( ! hasDefaultCat ) { 1952 return; 1953 } 1954 1945 1955 generateComponentWords(); 1946 1956 … … 1949 1959 // Disable once the user hits the component option. 1950 1960 $( '#field-component' ).on( 'change', function() { 1951 // If they selected 'General',keep nagging.1952 enabled = $(this).find( 'option[value="General"]').prop('selected');1961 // If they selected a general category keep nagging. 1962 enabled = ( -1 !== generalCategories.indexOf( $(this).val() ) ); 1953 1963 1954 1964 if ( ! enabled && noticeDiv ) {
Note: See TracChangeset
for help on using the changeset viewer.