Changeset 3105518
- Timestamp:
- 06/21/2024 08:00:03 AM (20 months ago)
- Location:
- contractor-commerce-integration/trunk
- Files:
-
- 2 edited
-
admin/partials/contractor-commerce-admin-settings.php (modified) (2 diffs)
-
public/class-contractor-commerce-public.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
contractor-commerce-integration/trunk/admin/partials/contractor-commerce-admin-settings.php
r3043047 r3105518 57 57 'pluginPage', 58 58 'concom_pluginPage_section' 59 );} 59 ); 60 61 add_settings_field( 62 'not_place_in_head', 63 __("Limit script tag to single page (not placed in <head>)", 'concom'), 64 'not_place_in_head_render', 65 'pluginPage', 66 'concom_pluginPage_section', 67 ); 68 } 60 69 61 70 function concom_text_field_0_render( ) { … … 94 103 } 95 104 105 function not_place_in_head_render() { 106 $options = get_option( 'concom_settings' ); 107 108 $checked = isset($options['not_place_in_head']) && $options['not_place_in_head']; 109 110 echo '<input type="checkbox" id="not_place_in_head" name="concom_settings[not_place_in_head]" value="1"' . checked( 1, $checked, false ) . '/>'; 111 } 96 112 97 113 function concom_settings_section_callback( ) { -
contractor-commerce-integration/trunk/public/class-contractor-commerce-public.php
r3097295 r3105518 113 113 } 114 114 115 if (isset(get_option( 'concom_settings' )['not_place_in_head']) ) { 116 return '<div id="concom-shop" ' . $historyMode . '></div><script async defer src="https://plugin.contractorcommerce.com?key=' . $options['concom_text_field_0'] . '"></script>'; 117 } 118 115 119 return '<div id="concom-shop" ' . $historyMode . '></div>'; 116 120 } … … 122 126 $options = get_option( 'concom_settings' ); 123 127 128 if (isset(get_option( 'concom_settings' )['not_place_in_head']) ) { 129 return; 130 } 131 124 132 if (get_the_ID() == $options['concom_select_field_1'] ) { 125 133 echo '<script async defer src="https://plugin.contractorcommerce.com?key=' . $options['concom_text_field_0'] . '"></script>';
Note: See TracChangeset
for help on using the changeset viewer.