Changeset 3106757
- Timestamp:
- 06/24/2024 03:21:32 PM (20 months ago)
- Location:
- contractor-commerce-integration/tags/1.1.4
- Files:
-
- 1 deleted
- 18 edited
-
README.txt (modified) (1 diff)
-
admin/class-contractor-commerce-admin.php (modified) (1 diff)
-
admin/css/contractor-commerce-admin.css (modified) (1 diff)
-
admin/img/ConCom-Logo-Vector-Scaled-1.svg (modified) (1 diff)
-
admin/index.php (modified) (1 diff)
-
admin/js/contractor-commerce-admin.js (modified) (1 diff)
-
admin/partials/contractor-commerce-admin-settings.php (modified) (1 diff)
-
includes/class-contractor-commerce-activator.php (modified) (1 diff)
-
includes/class-contractor-commerce-deactivator.php (modified) (1 diff)
-
includes/class-contractor-commerce-i18n.php (modified) (1 diff)
-
includes/class-contractor-commerce-loader.php (modified) (1 diff)
-
includes/class-contractor-commerce.php (modified) (1 diff)
-
includes/index.php (modified) (1 diff)
-
public/class-contractor-commerce-public.php (modified) (1 diff)
-
public/css/contractor-commerce-public.css (modified) (1 diff)
-
public/index.php (modified) (1 diff)
-
public/js/contractor-commerce-public.js (modified) (1 diff)
-
public/partials/contractor-commerce-public-display.php (modified) (1 diff)
-
trunk (deleted)
Legend:
- Unmodified
- Added
- Removed
-
contractor-commerce-integration/tags/1.1.4/README.txt
r3105521 r3106757 4 4 Requires at least: 3.0.1 5 5 Tested up to: 6.3 6 Stable tag: 1.1. 36 Stable tag: 1.1.4 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later -
contractor-commerce-integration/tags/1.1.4/admin/class-contractor-commerce-admin.php
r2661119 r3106757 1 <?php2 3 /**4 * The admin-specific functionality of the plugin.5 *6 * @link https://www.contractorcommerce.com/7 * @since 1.0.08 *9 * @package Contractor_Commerce10 * @subpackage Contractor_Commerce/admin11 */12 13 /**14 * The admin-specific functionality of the plugin.15 *16 * Defines the plugin name, version, and two examples hooks for how to17 * enqueue the admin-specific stylesheet and JavaScript.18 *19 * @package Contractor_Commerce20 * @subpackage Contractor_Commerce/admin21 * @author PJ Hile <[email protected]>22 */23 class Contractor_Commerce_Admin {24 25 /**26 * The ID of this plugin.27 *28 * @since 1.0.029 * @access private30 * @var string $plugin_name The ID of this plugin.31 */32 private $plugin_name;33 34 /**35 * The version of this plugin.36 *37 * @since 1.0.038 * @access private39 * @var string $version The current version of this plugin.40 */41 private $version;42 43 /**44 * Initialize the class and set its properties.45 *46 * @since 1.0.047 * @param string $plugin_name The name of this plugin.48 * @param string $version The version of this plugin.49 */50 public function __construct( $plugin_name, $version ) {51 52 $this->plugin_name = $plugin_name;53 $this->version = $version;54 55 }56 57 /**58 * Register the stylesheets for the admin area.59 *60 * @since 1.0.061 */62 public function enqueue_styles() {63 64 /**65 * This function is provided for demonstration purposes only.66 *67 * An instance of this class should be passed to the run() function68 * defined in Contractor_Commerce_Loader as all of the hooks are defined69 * in that particular class.70 *71 * The Contractor_Commerce_Loader will then create the relationship72 * between the defined hooks and the functions defined in this73 * class.74 */75 76 wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/contractor-commerce-admin.css', array(), $this->version, 'all' );77 78 }79 80 /**81 * Register the JavaScript for the admin area.82 *83 * @since 1.0.084 */85 public function enqueue_scripts() {86 87 /**88 * This function is provided for demonstration purposes only.89 *90 * An instance of this class should be passed to the run() function91 * defined in Contractor_Commerce_Loader as all of the hooks are defined92 * in that particular class.93 *94 * The Contractor_Commerce_Loader will then create the relationship95 * between the defined hooks and the functions defined in this96 * class.97 */98 99 wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/contractor-commerce-admin.js', array( 'jquery' ), $this->version, false );100 101 }102 103 public function concom_settings_link( $links ) {104 105 $url = esc_url( add_query_arg(106 'page',107 'contractor_commerce',108 get_admin_url() . 'admin.php'109 ) );110 111 $settings_link = "<a href='$url'>" . __( 'Settings' ) . '</a>';112 113 array_push(114 $links,115 $settings_link116 );117 118 return $links;119 }120 121 } -
contractor-commerce-integration/tags/1.1.4/admin/css/contractor-commerce-admin.css
r2661119 r3106757 1 .concom-head {2 background-color: #fff;3 background-image: url("../img/ConCom-Logo-Vector-Scaled-1.svg");4 background-repeat: no-repeat;5 background-position: 2% 50%;6 box-shadow: 0 1px 0 #c3c4c7, 0 1px 1px 1px rgb(0 0 0 / 4%);7 padding: 10px 30px;8 height: 80px;9 margin-left: -20px;10 } -
contractor-commerce-integration/tags/1.1.4/admin/img/ConCom-Logo-Vector-Scaled-1.svg
r2661119 r3106757 1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>2 <svg3 xmlns:dc="http://purl.org/dc/elements/1.1/"4 xmlns:cc="http://creativecommons.org/ns#"5 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"6 xmlns:svg="http://www.w3.org/2000/svg"7 xmlns="http://www.w3.org/2000/svg"8 xmlns:xlink="http://www.w3.org/1999/xlink"9 id="svg8"10 version="1.1"11 viewBox="0 0 52.54625 17.065626"12 height="17.065626mm"13 width="52.546249mm">14 <defs15 id="defs2" />16 <metadata17 id="metadata5">18 <rdf:RDF>19 <cc:Work20 rdf:about="">21 <dc:format>image/svg+xml</dc:format>22 <dc:type23 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />24 <dc:title></dc:title>25 </cc:Work>26 </rdf:RDF>27 </metadata>28 <g29 transform="translate(-80.316162,-131.98505)"30 id="layer1">31 <image32 width="52.546249"33 height="17.065626"34 preserveAspectRatio="none"35 xlink:href="data:image/png;base64,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 SGysNp7sassKu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ymJ5596dM64EAAAAACNKaayeUiyppwQAAACIRAmN1VOJJfWUAAAAAAloo5eXYxVLV095586d3+ST BgAAAEhEjsbqscWSekoAAACATLRjIde1i6Wrpzw6mhEAAAAA0pKqsXoMsWzrKWklBAAAAFAKKcZC Woulq6fkkwMAAAAolJiN1S3F8u7duws+LQAAAIDCaVsTrUoUy856yuvrr2z/8yt8egAAAAAFYt1Y XSuW3fWU1wglAAAAQOlYNlbXiOXdu3fPOw4RqQQAAACoCYvopUQs29T3gk8AAAAAYGRoGquHiuWd e3c29KcEAAAAGDFtY/XLmGK5Fco1/SkBAAAAJkJoY3VfseyppwQAAACAsRLSWH1ILKmnBAAAAAAn mIuh6GWfWFJPCQAAAACvGGqs3iWWW6lcHa2n/PzzX+GsAgAAAEyYrrGQR8Xy3r0lZwwAAAAAOjnW WP1QLF095e17t084UwAAAADgxWFj9b1YutGM1FMCAAAAQDAueukaqzux7KynvGbeNwAAAAzz/9EN ouGmTKSwAAAAAElFTkSuQmCC "36 id="image36"37 x="80.316162"38 y="131.98505" />39 </g>40 </svg> -
contractor-commerce-integration/tags/1.1.4/admin/index.php
r2661119 r3106757 1 <?php // Silence is golden -
contractor-commerce-integration/tags/1.1.4/admin/js/contractor-commerce-admin.js
r2661119 r3106757 1 (function( $ ) {2 'use strict';3 4 /**5 * All of the code for your admin-facing JavaScript source6 * should reside in this file.7 *8 * Note: It has been assumed you will write jQuery code here, so the9 * $ function reference has been prepared for usage within the scope10 * of this function.11 *12 * This enables you to define handlers, for when the DOM is ready:13 *14 * $(function() {15 *16 * });17 *18 * When the window is loaded:19 *20 * $( window ).load(function() {21 *22 * });23 *24 * ...and/or other possibilities.25 *26 * Ideally, it is not considered best practise to attach more than a27 * single DOM-ready or window-load handler for a particular page.28 * Although scripts in the WordPress core, Plugins and Themes may be29 * practising this, we should strive to set a better example in our own work.30 */31 32 })( jQuery ); -
contractor-commerce-integration/tags/1.1.4/admin/partials/contractor-commerce-admin-settings.php
r3105521 r3106757 1 <?php2 3 /**4 * Provide a admin settings area for the plugin5 *6 * This file is used to create the settings form of the plugin.7 *8 * @link https://www.contractorcommerce.com/9 * @since 1.0.010 *11 * @package Contractor_Commerce12 * @subpackage Contractor_Commerce/admin/partials13 */14 15 add_action( 'admin_menu', 'concom_add_admin_menu' );16 add_action( 'admin_init', 'concom_settings_init' );17 18 19 function concom_add_admin_menu( ) {20 21 add_options_page( 'Contractor Commerce', 'Contractor Commerce', 'manage_options', 'contractor_commerce', 'concom_options_page' );22 23 }24 25 26 function concom_settings_init( ) {27 28 register_setting( 'pluginPage', 'concom_settings' );29 30 add_settings_section(31 'concom_pluginPage_section',32 null,33 'concom_settings_section_callback',34 'pluginPage'35 );36 37 add_settings_field(38 'concom_text_field_0',39 __( 'Key', 'concom' ),40 'concom_text_field_0_render',41 'pluginPage',42 'concom_pluginPage_section'43 );44 45 add_settings_field(46 'concom_select_field_1',47 __( 'Page', 'concom' ),48 'concom_select_field_1_render',49 'pluginPage',50 'concom_pluginPage_section'51 );52 53 add_settings_field(54 'Checkbox Element',55 __( 'Enable SEO Performance', 'concom' ),56 'concom_seo_checkbox_render',57 'pluginPage',58 'concom_pluginPage_section'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 }69 70 function concom_text_field_0_render( ) {71 72 $options = get_option( 'concom_settings' );73 ?>74 <input type='text' name='concom_settings[concom_text_field_0]' value='<?php echo $options['concom_text_field_0']; ?>' class='regular-text'>75 <?php76 77 }78 79 80 function concom_select_field_1_render( ) {81 82 $options = get_option( 'concom_settings' );83 84 wp_dropdown_pages(array(85 'selected' => $options['concom_select_field_1'],86 'name' => 'concom_settings[concom_select_field_1]',87 'show_option_none' => '— Select —',88 'sort_column' => 'menu_order, post_title',89 ));90 ?>91 <a href="post-new.php?post_type=page" class="button">Add New Page</a>92 <?php93 94 }95 96 function concom_seo_checkbox_render() {97 98 $options = get_option( 'concom_settings' );99 100 $checked = isset($options['concom_seo_checkbox']) && $options['concom_seo_checkbox'] ? true : false;101 102 echo '<input type="checkbox" id="concom_seo_checkbox" name="concom_settings[concom_seo_checkbox]" value="1"' . checked( 1, $checked, false ) . '/>';103 }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 }112 113 function concom_settings_section_callback( ) {114 115 ?>116 <p>Embed Contractor Commerce in your site by adding your Contractor Commerce key and selecting the page that will serve it.</p>117 <?php118 119 }120 121 122 function concom_options_page( ) {123 124 ?>125 <div class="concom-head"></div>126 <div class="wrap">127 <form action='options.php' method='post'>128 129 <h1>Contractor Commerce Integration</h1>130 131 <?php132 settings_fields( 'pluginPage' );133 do_settings_sections( 'pluginPage' );134 flush_rewrite_rules();135 submit_button();136 ?>137 138 </form>139 <p><a href="https://app.contractorcommerce.com/" target="_blank">Additional Contractor Commerce settings</a></p>140 </div>141 <?php142 143 } -
contractor-commerce-integration/tags/1.1.4/includes/class-contractor-commerce-activator.php
r2661119 r3106757 1 <?php2 3 /**4 * Fired during plugin activation5 *6 * @link https://www.contractorcommerce.com/7 * @since 1.0.08 *9 * @package Contractor_Commerce10 * @subpackage Contractor_Commerce/includes11 */12 13 /**14 * Fired during plugin activation.15 *16 * This class defines all code necessary to run during the plugin's activation.17 *18 * @since 1.0.019 * @package Contractor_Commerce20 * @subpackage Contractor_Commerce/includes21 * @author PJ Hile <[email protected]>22 */23 class Contractor_Commerce_Activator {24 25 /**26 * Short Description. (use period)27 *28 * Long Description.29 *30 * @since 1.0.031 */32 public static function activate() {33 34 }35 36 } -
contractor-commerce-integration/tags/1.1.4/includes/class-contractor-commerce-deactivator.php
r2661119 r3106757 1 <?php2 3 /**4 * Fired during plugin deactivation5 *6 * @link https://www.contractorcommerce.com/7 * @since 1.0.08 *9 * @package Contractor_Commerce10 * @subpackage Contractor_Commerce/includes11 */12 13 /**14 * Fired during plugin deactivation.15 *16 * This class defines all code necessary to run during the plugin's deactivation.17 *18 * @since 1.0.019 * @package Contractor_Commerce20 * @subpackage Contractor_Commerce/includes21 * @author PJ Hile <[email protected]>22 */23 class Contractor_Commerce_Deactivator {24 25 /**26 * Short Description. (use period)27 *28 * Long Description.29 *30 * @since 1.0.031 */32 public static function deactivate() {33 34 }35 36 } -
contractor-commerce-integration/tags/1.1.4/includes/class-contractor-commerce-i18n.php
r2661119 r3106757 1 <?php2 3 /**4 * Define the internationalization functionality5 *6 * Loads and defines the internationalization files for this plugin7 * so that it is ready for translation.8 *9 * @link https://www.contractorcommerce.com/10 * @since 1.0.011 *12 * @package Contractor_Commerce13 * @subpackage Contractor_Commerce/includes14 */15 16 /**17 * Define the internationalization functionality.18 *19 * Loads and defines the internationalization files for this plugin20 * so that it is ready for translation.21 *22 * @since 1.0.023 * @package Contractor_Commerce24 * @subpackage Contractor_Commerce/includes25 * @author PJ Hile <[email protected]>26 */27 class Contractor_Commerce_i18n {28 29 30 /**31 * Load the plugin text domain for translation.32 *33 * @since 1.0.034 */35 public function load_plugin_textdomain() {36 37 load_plugin_textdomain(38 'contractor-commerce',39 false,40 dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/'41 );42 43 }44 45 46 47 } -
contractor-commerce-integration/tags/1.1.4/includes/class-contractor-commerce-loader.php
r2661119 r3106757 1 <?php2 3 /**4 * Register all actions and filters for the plugin5 *6 * @link https://www.contractorcommerce.com/7 * @since 1.0.08 *9 * @package Contractor_Commerce10 * @subpackage Contractor_Commerce/includes11 */12 13 /**14 * Register all actions and filters for the plugin.15 *16 * Maintain a list of all hooks that are registered throughout17 * the plugin, and register them with the WordPress API. Call the18 * run function to execute the list of actions and filters.19 *20 * @package Contractor_Commerce21 * @subpackage Contractor_Commerce/includes22 * @author PJ Hile <[email protected]>23 */24 class Contractor_Commerce_Loader {25 26 /**27 * The array of actions registered with WordPress.28 *29 * @since 1.0.030 * @access protected31 * @var array $actions The actions registered with WordPress to fire when the plugin loads.32 */33 protected $actions;34 35 /**36 * The array of filters registered with WordPress.37 *38 * @since 1.0.039 * @access protected40 * @var array $filters The filters registered with WordPress to fire when the plugin loads.41 */42 protected $filters;43 44 /**45 * Initialize the collections used to maintain the actions and filters.46 *47 * @since 1.0.048 */49 public function __construct() {50 51 $this->actions = array();52 $this->filters = array();53 54 }55 56 /**57 * Add a new action to the collection to be registered with WordPress.58 *59 * @since 1.0.060 * @param string $hook The name of the WordPress action that is being registered.61 * @param object $component A reference to the instance of the object on which the action is defined.62 * @param string $callback The name of the function definition on the $component.63 * @param int $priority Optional. The priority at which the function should be fired. Default is 10.64 * @param int $accepted_args Optional. The number of arguments that should be passed to the $callback. Default is 1.65 */66 public function add_action( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) {67 $this->actions = $this->add( $this->actions, $hook, $component, $callback, $priority, $accepted_args );68 }69 70 /**71 * Add a new filter to the collection to be registered with WordPress.72 *73 * @since 1.0.074 * @param string $hook The name of the WordPress filter that is being registered.75 * @param object $component A reference to the instance of the object on which the filter is defined.76 * @param string $callback The name of the function definition on the $component.77 * @param int $priority Optional. The priority at which the function should be fired. Default is 10.78 * @param int $accepted_args Optional. The number of arguments that should be passed to the $callback. Default is 179 */80 public function add_filter( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) {81 $this->filters = $this->add( $this->filters, $hook, $component, $callback, $priority, $accepted_args );82 }83 84 /**85 * A utility function that is used to register the actions and hooks into a single86 * collection.87 *88 * @since 1.0.089 * @access private90 * @param array $hooks The collection of hooks that is being registered (that is, actions or filters).91 * @param string $hook The name of the WordPress filter that is being registered.92 * @param object $component A reference to the instance of the object on which the filter is defined.93 * @param string $callback The name of the function definition on the $component.94 * @param int $priority The priority at which the function should be fired.95 * @param int $accepted_args The number of arguments that should be passed to the $callback.96 * @return array The collection of actions and filters registered with WordPress.97 */98 private function add( $hooks, $hook, $component, $callback, $priority, $accepted_args ) {99 100 $hooks[] = array(101 'hook' => $hook,102 'component' => $component,103 'callback' => $callback,104 'priority' => $priority,105 'accepted_args' => $accepted_args106 );107 108 return $hooks;109 110 }111 112 /**113 * Register the filters and actions with WordPress.114 *115 * @since 1.0.0116 */117 public function run() {118 119 foreach ( $this->filters as $hook ) {120 add_filter( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );121 }122 123 foreach ( $this->actions as $hook ) {124 add_action( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );125 }126 127 }128 129 } -
contractor-commerce-integration/tags/1.1.4/includes/class-contractor-commerce.php
r3105521 r3106757 1 <?php2 3 /**4 * The file that defines the core plugin class5 *6 * A class definition that includes attributes and functions used across both the7 * public-facing side of the site and the admin area.8 *9 * @link https://www.contractorcommerce.com/10 * @since 1.0.011 *12 * @package Contractor_Commerce13 * @subpackage Contractor_Commerce/includes14 */15 16 /**17 * The core plugin class.18 *19 * This is used to define internationalization, admin-specific hooks, and20 * public-facing site hooks.21 *22 * Also maintains the unique identifier of this plugin as well as the current23 * version of the plugin.24 *25 * @since 1.0.026 * @package Contractor_Commerce27 * @subpackage Contractor_Commerce/includes28 * @author PJ Hile <[email protected]>29 */30 class Contractor_Commerce {31 32 /**33 * The loader that's responsible for maintaining and registering all hooks that power34 * the plugin.35 *36 * @since 1.0.037 * @access protected38 * @var Contractor_Commerce_Loader $loader Maintains and registers all hooks for the plugin.39 */40 protected $loader;41 42 /**43 * The unique identifier of this plugin.44 *45 * @since 1.0.046 * @access protected47 * @var string $plugin_name The string used to uniquely identify this plugin.48 */49 protected $plugin_name;50 51 /**52 * The current version of the plugin.53 *54 * @since 1.0.055 * @access protected56 * @var string $version The current version of the plugin.57 */58 protected $version;59 60 /**61 * Define the core functionality of the plugin.62 *63 * Set the plugin name and the plugin version that can be used throughout the plugin.64 * Load the dependencies, define the locale, and set the hooks for the admin area and65 * the public-facing side of the site.66 *67 * @since 1.0.068 */69 public function __construct() {70 if ( defined( 'CONTRACTOR_COMMERCE_VERSION' ) ) {71 $this->version = CONTRACTOR_COMMERCE_VERSION;72 } else {73 $this->version = '1.1.3';74 }75 $this->plugin_name = 'contractor-commerce';76 77 $this->load_dependencies();78 $this->set_locale();79 $this->define_admin_hooks();80 $this->define_public_hooks();81 82 }83 84 /**85 * Load the required dependencies for this plugin.86 *87 * Include the following files that make up the plugin:88 *89 * - Contractor_Commerce_Loader. Orchestrates the hooks of the plugin.90 * - Contractor_Commerce_i18n. Defines internationalization functionality.91 * - Contractor_Commerce_Admin. Defines all hooks for the admin area.92 * - Contractor_Commerce_Public. Defines all hooks for the public side of the site.93 *94 * Create an instance of the loader which will be used to register the hooks95 * with WordPress.96 *97 * @since 1.0.098 * @access private99 */100 private function load_dependencies() {101 102 /**103 * The class responsible for orchestrating the actions and filters of the104 * core plugin.105 */106 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-contractor-commerce-loader.php';107 108 /**109 * The class responsible for defining internationalization functionality110 * of the plugin.111 */112 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-contractor-commerce-i18n.php';113 114 /**115 * The class responsible for defining all actions that occur in the admin area.116 */117 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-contractor-commerce-admin.php';118 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/partials/contractor-commerce-admin-settings.php';119 120 /**121 * The class responsible for defining all actions that occur in the public-facing122 * side of the site.123 */124 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-contractor-commerce-public.php';125 126 $this->loader = new Contractor_Commerce_Loader();127 128 }129 130 /**131 * Define the locale for this plugin for internationalization.132 *133 * Uses the Contractor_Commerce_i18n class in order to set the domain and to register the hook134 * with WordPress.135 *136 * @since 1.0.0137 * @access private138 */139 private function set_locale() {140 141 $plugin_i18n = new Contractor_Commerce_i18n();142 143 $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );144 145 }146 147 /**148 * Register all of the hooks related to the admin area functionality149 * of the plugin.150 *151 * @since 1.0.0152 * @access private153 */154 private function define_admin_hooks() {155 156 $plugin_admin = new Contractor_Commerce_Admin( $this->get_plugin_name(), $this->get_version() );157 158 $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );159 $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );160 161 $this->loader->add_filter( 'plugin_action_links_contractor-commerce-integration/contractor-commerce.php', $plugin_admin, 'concom_settings_link', 1 );162 163 }164 165 /**166 * Register all of the hooks related to the public-facing functionality167 * of the plugin.168 *169 * @since 1.0.0170 * @access private171 */172 private function define_public_hooks() {173 174 $plugin_public = new Contractor_Commerce_Public( $this->get_plugin_name(), $this->get_version() );175 176 $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );177 $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );178 $this->loader->add_action( 'wp_head', $plugin_public, 'concom_script' );179 180 $this->loader->add_filter( 'the_content', $plugin_public, 'content_filter', 1 );181 182 }183 184 /**185 * Run the loader to execute all of the hooks with WordPress.186 *187 * @since 1.0.0188 */189 public function run() {190 $this->loader->run();191 }192 193 /**194 * The name of the plugin used to uniquely identify it within the context of195 * WordPress and to define internationalization functionality.196 *197 * @since 1.0.0198 * @return string The name of the plugin.199 */200 public function get_plugin_name() {201 return $this->plugin_name;202 }203 204 /**205 * The reference to the class that orchestrates the hooks with the plugin.206 *207 * @since 1.0.0208 * @return Contractor_Commerce_Loader Orchestrates the hooks of the plugin.209 */210 public function get_loader() {211 return $this->loader;212 }213 214 /**215 * Retrieve the version number of the plugin.216 *217 * @since 1.0.0218 * @return string The version number of the plugin.219 */220 public function get_version() {221 return $this->version;222 }223 224 } -
contractor-commerce-integration/tags/1.1.4/includes/index.php
r2661119 r3106757 1 <?php // Silence is golden -
contractor-commerce-integration/tags/1.1.4/public/class-contractor-commerce-public.php
r3105521 r3106757 1 <?php2 3 /**4 * The public-facing functionality of the plugin.5 *6 * @link https://www.contractorcommerce.com/7 * @since 1.0.08 *9 * @package Contractor_Commerce10 * @subpackage Contractor_Commerce/public11 */12 13 /**14 * The public-facing functionality of the plugin.15 *16 * Defines the plugin name, version, and two examples hooks for how to17 * enqueue the public-facing stylesheet and JavaScript.18 *19 * @package Contractor_Commerce20 * @subpackage Contractor_Commerce/public21 * @author PJ Hile <[email protected]>22 */23 class Contractor_Commerce_Public {24 25 /**26 * The ID of this plugin.27 *28 * @since 1.0.029 * @access private30 * @var string $plugin_name The ID of this plugin.31 */32 private $plugin_name;33 34 /**35 * The version of this plugin.36 *37 * @since 1.0.038 * @access private39 * @var string $version The current version of this plugin.40 */41 private $version;42 43 /**44 * Initialize the class and set its properties.45 *46 * @since 1.0.047 * @param string $plugin_name The name of the plugin.48 * @param string $version The version of this plugin.49 */50 public function __construct( $plugin_name, $version ) {51 52 $this->plugin_name = $plugin_name;53 $this->version = $version;54 55 }56 57 /**58 * Register the stylesheets for the public-facing side of the site.59 *60 * @since 1.0.061 */62 public function enqueue_styles() {63 64 /**65 * This function is provided for demonstration purposes only.66 *67 * An instance of this class should be passed to the run() function68 * defined in Contractor_Commerce_Loader as all of the hooks are defined69 * in that particular class.70 *71 * The Contractor_Commerce_Loader will then create the relationship72 * between the defined hooks and the functions defined in this73 * class.74 */75 76 wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/contractor-commerce-public.css', array(), $this->version, 'all' );77 78 }79 80 /**81 * Register the JavaScript for the public-facing side of the site.82 *83 * @since 1.0.084 */85 public function enqueue_scripts() {86 87 /**88 * This function is provided for demonstration purposes only.89 *90 * An instance of this class should be passed to the run() function91 * defined in Contractor_Commerce_Loader as all of the hooks are defined92 * in that particular class.93 *94 * The Contractor_Commerce_Loader will then create the relationship95 * between the defined hooks and the functions defined in this96 * class.97 */98 99 wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/contractor-commerce-public.js', array( 'jquery' ), $this->version, false );100 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 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 119 return '<div id="concom-shop" ' . $historyMode . '></div>';120 }121 122 return $content;123 }124 125 public function concom_script() {126 $options = get_option( 'concom_settings' );127 128 if (isset(get_option( 'concom_settings' )['not_place_in_head']) ) {129 return;130 }131 132 if (get_the_ID() == $options['concom_select_field_1'] ) {133 echo '<script async defer src="https://plugin.contractorcommerce.com?key=' . $options['concom_text_field_0'] . '"></script>';134 }135 }136 } -
contractor-commerce-integration/tags/1.1.4/public/css/contractor-commerce-public.css
r2661119 r3106757 1 /**2 * All of the CSS for your public-facing functionality should be3 * included in this file.4 */ -
contractor-commerce-integration/tags/1.1.4/public/index.php
r2661119 r3106757 1 <?php // Silence is golden -
contractor-commerce-integration/tags/1.1.4/public/js/contractor-commerce-public.js
r2661119 r3106757 1 (function( $ ) {2 'use strict';3 4 /**5 * All of the code for your public-facing JavaScript source6 * should reside in this file.7 *8 * Note: It has been assumed you will write jQuery code here, so the9 * $ function reference has been prepared for usage within the scope10 * of this function.11 *12 * This enables you to define handlers, for when the DOM is ready:13 *14 * $(function() {15 *16 * });17 *18 * When the window is loaded:19 *20 * $( window ).load(function() {21 *22 * });23 *24 * ...and/or other possibilities.25 *26 * Ideally, it is not considered best practise to attach more than a27 * single DOM-ready or window-load handler for a particular page.28 * Although scripts in the WordPress core, Plugins and Themes may be29 * practising this, we should strive to set a better example in our own work.30 */31 32 })( jQuery ); -
contractor-commerce-integration/tags/1.1.4/public/partials/contractor-commerce-public-display.php
r2661119 r3106757 1 <?php2 3 /**4 * Provide a public-facing view for the plugin5 *6 * This file is used to markup the public-facing aspects of the plugin.7 *8 * @link https://www.contractorcommerce.com/9 * @since 1.0.010 *11 * @package Contractor_Commerce12 * @subpackage Contractor_Commerce/public/partials13 */14 ?>15 16 <!-- This file should primarily consist of HTML with a little bit of PHP. -->
Note: See TracChangeset
for help on using the changeset viewer.