{"id":5928979,"date":"2015-03-23T00:39:18","date_gmt":"2015-03-23T00:39:18","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/code-mode-needed\/"},"modified":"2016-08-22T18:20:24","modified_gmt":"2016-08-22T18:20:24","slug":"code-mode-needed","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/code-mode-needed\/","title":{"rendered":"Code Mode needed"},"content":{"rendered":"<p>Please add a conditional wrap to prevent these WP EasyCart functions\/code from loading on other plugins pages. Thanks.<br \/>\nFile:  \/plugins\/wp-easycart\/inc\/admin\/admin_init.php<br \/>\nCode line:  1038 and modify this function:  ec_print_editor( ) by adding this conditional wrap\/code:<\/p>\n<pre><code>function ec_print_editor( ){\n\nif ( preg_match( &#039;\/page=ec_adminv2\/&#039;, esc_html($_SERVER[&#039;REQUEST_URI&#039;]), $matches) ) {\n\necho &quot;&lt;div class=\\&quot;ec_editor_box_container\\&quot; id=\\&quot;ec_editor_window\\&quot;&gt;&quot;;\necho &quot;&lt;a href=\\&quot;#\\&quot; class=\\&quot;ec_editor_close\\&quot; onclick=\\&quot;return ec_close_editor( );\\&quot;&gt;&lt;span&gt;x&lt;\/span&gt;&lt;\/a&gt;&quot;;\necho &quot;&lt;h3 class=\\&quot;ec_editor_heading\\&quot;&gt;Insert EasyCart Shortcodes&lt;\/h3&gt;&quot;;\necho &quot;&lt;div class=\\&quot;ec_editor_inner_container\\&quot;&gt;&quot;;\n\/\/ Start Container Inner\nec_print_editor_shortcode_menu( ); \/\/ Shortcode Menu\n\/\/ Store shortcode, no options, nothing needed\nec_print_editor_product_menu( );\/\/ Product Menu Store Shortcode Panel\nec_print_editor_product_category( );\/\/ Product Category Store Shortcode Panel\nec_print_editor_manufacturer_group( );\/\/ Manufacturer Group Store Shortcode Panel\nec_print_editor_product_details( );\/\/ Product Details Store Shortcode Panel\n\/\/ Cart shortcode, no options, nothing needed\n\/\/ Account shortcode, no options, nothing needed\nec_print_editor_single_product( );\/\/ Single Product Shortcode Panel\nec_print_editor_multiple_products( );\/\/ Multiple Products Shortcode Panel\nec_print_editor_add_to_cart( );\/\/ Add to Cart Shortcode Panel\n\/\/ Cart Display shortcode, no options, nothing needed\nec_print_editor_membership_content( );\/\/ Add to Cart Shortcode Panel\n\/\/ End Container Inner\necho &quot;&lt;\/div&gt;&quot;;\necho &quot;&lt;\/div&gt;&quot;;\necho &quot;&lt;div class=\\&quot;ec_editor_overlay\\&quot; id=\\&quot;ec_editor_bg\\&quot;&gt;&lt;\/div&gt;&quot;;\n}\n}<\/code><\/pre>\n<p>https:\/\/wordpress.org\/plugins\/wp-easycart\/<\/p>\n","protected":false},"template":"","class_list":["post-5928979","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5928979","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5928979\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=5928979"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}