Changeset 3097295
- Timestamp:
- 06/04/2024 10:24:42 AM (21 months ago)
- Location:
- contractor-commerce-integration/trunk
- Files:
-
- 4 edited
-
README.txt (modified) (1 diff)
-
contractor-commerce.php (modified) (2 diffs)
-
includes/class-contractor-commerce.php (modified) (2 diffs)
-
public/class-contractor-commerce-public.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
contractor-commerce-integration/trunk/README.txt
r3043047 r3097295 4 4 Requires at least: 3.0.1 5 5 Tested up to: 6.3 6 Stable tag: 1.1. 26 Stable tag: 1.1.3 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later -
contractor-commerce-integration/trunk/contractor-commerce.php
r3043047 r3097295 17 17 * Plugin URI: https://bitbucket.org/hvactechnologies/contractor-commerce-integration 18 18 * Description: Adds Contractor Commerce to your site. 19 * Version: 1.1. 219 * Version: 1.1.3 20 20 * Author: Contractor Commerce 21 21 * Author URI: https://www.contractorcommerce.com/ … … 38 38 * Rename this for your plugin and update it as you release new versions. 39 39 */ 40 define( 'CONTRACTOR_COMMERCE_VERSION', '1.1. 2' );40 define( 'CONTRACTOR_COMMERCE_VERSION', '1.1.3' ); 41 41 42 42 /** -
contractor-commerce-integration/trunk/includes/class-contractor-commerce.php
r3043047 r3097295 71 71 $this->version = CONTRACTOR_COMMERCE_VERSION; 72 72 } else { 73 $this->version = '1.1. 2';73 $this->version = '1.1.3'; 74 74 } 75 75 $this->plugin_name = 'contractor-commerce'; … … 176 176 $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' ); 177 177 $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' ); 178 $this->loader->add_action( 'wp_head', $plugin_public, 'concom_script' ); 178 179 179 180 $this->loader->add_filter( 'the_content', $plugin_public, 'content_filter', 1 ); -
contractor-commerce-integration/trunk/public/class-contractor-commerce-public.php
r3040296 r3097295 100 100 101 101 } 102 103 public function content_filter( $content ) {104 $options = get_option( 'concom_settings' );105 106 if ( get_the_ID() == $options['concom_select_field_1'] ) {107 $page_name = get_page_uri();108 109 $historyMode = '';110 111 if (isset(get_option( 'concom_settings' )['concom_seo_checkbox']) ) {112 $historyMode .= 'history-mode="' . $page_name . '"';113 }114 115 return '<div id="concom-shop" ' . $historyMode . '></div><script async defer src="https://plugin.contractorcommerce.com?key=' . $options['concom_text_field_0'] . '"></script>';116 }117 118 return $content;119 }120 102 103 public function content_filter( $content ) { 104 $options = get_option( 'concom_settings' ); 105 106 if ( get_the_ID() == $options['concom_select_field_1'] ) { 107 $page_name = get_page_uri(); 108 109 $historyMode = ''; 110 111 if (isset(get_option( 'concom_settings' )['concom_seo_checkbox']) ) { 112 $historyMode .= 'history-mode="' . $page_name . '"'; 113 } 114 115 return '<div id="concom-shop" ' . $historyMode . '></div>'; 116 } 117 118 return $content; 119 } 120 121 public function concom_script() { 122 $options = get_option( 'concom_settings' ); 123 124 if (get_the_ID() == $options['concom_select_field_1'] ) { 125 echo '<script async defer src="https://plugin.contractorcommerce.com?key=' . $options['concom_text_field_0'] . '"></script>'; 126 } 127 } 121 128 }
Note: See TracChangeset
for help on using the changeset viewer.