This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Single Product | |
| add_filter( 'single_add_to_cart_text', 'custom_single_add_to_cart_text' ); | |
| function custom_single_add_to_cart_text() { | |
| return 'Add to cart'; // Change this to change the text on the Single Product Add to cart button. | |
| } | |
| // Variable Product | |
| add_filter( 'variable_add_to_cart_text', 'custom_variable_add_to_cart_text' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $coupon_code = 'UNIQUECODE'; // Code | |
| $amount = '10'; // Amount | |
| $discount_type = 'fixed_cart'; // Type: fixed_cart, percent, fixed_product, percent_product | |
| $coupon = array( | |
| 'post_title' => $coupon_code, | |
| 'post_content' => '', | |
| 'post_status' => 'publish', | |
| 'post_author' => 1, | |
| 'post_type' => 'shop_coupon' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function removeCommonWords($input){ | |
| // EEEEEEK Stop words | |
| $commonWords = array('a','able','about','above','abroad','according','accordingly','across','actually','adj','after','afterwards','again','against','ago','ahead','ain\'t','all','allow','allows','almost','alone','along','alongside','already','also','although','always','am','amid','amidst','among','amongst','an','and','another','any','anybody','anyhow','anyone','anything','anyway','anyways','anywhere','apart','appear','appreciate','appropriate','are','aren\'t','around','as','a\'s','aside','ask','asking','associated','at','available','away','awfully','b','back','backward','backwards','be','became','because','become','becomes','becoming','been','before','beforehand','begin','behind','being','believe','below','beside','besides','best','better','between','beyond','both','brief','but','by','c','came','can','cannot','cant','can\'t','caption','cause','causes','certain','certainly','changes','clearly','c\'mon','co','co.','com','come','comes','concerni |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //initialize | |
| $ch = curl_init(); | |
| // 2. set the options, including the url | |
| curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); | |
| curl_setopt($ch, CURLOPT_URL, "https://api.pingdom.com/api/2.0/traceroute?host=techslides.com"); | |
| curl_setopt($ch, CURLOPT_USERPWD, "EMAIL:PASSWORD"); | |
| curl_setopt($ch, CURLOPT_HTTPHEADER, array("App-Key: YOUR-KEY-HERE")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * excerpt from compound classroom field, for example purposes only | |
| * the real class is over 700 lines | |
| */ | |
| class OlpcGfClassroomField { | |
| /** | |
| * hook into Gravity Forms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Custom functions | |
| */ | |
| function jquery_enqueue() { | |
| wp_deregister_script('jquery'); | |
| wp_register_script('jquery', "http" . ($_SERVER['SERVER_PORT'] == 443 ? "s" : "") . "://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js", false, null); | |
| wp_enqueue_script('jquery'); | |
| } | |
| if (!is_admin()) add_action("wp_enqueue_scripts", "jquery_enqueue", 11); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://0-www.sciencedirect.com.www.consuls.org/science?_ob=QuickSearchURL&_method=submitForm&_acct=C000050221&md5=0c4b6db32507e4a332b2aa6dd47a65f4&qs_all={searchTerms}&qs_author=&qs_title=&qs_vol=&qs_issue=&qs_pages=&x=34&y=15 | |
| http://0-dictionary.oed.com.library.utulsa.edu/cgi/findword?query_type=word&queryword={searchTerms} | |
| http://100.daum.net/search/search.do?query={searchTerms} | |
| http://1000corks.com/search?st={searchTerms}&src=myc | |
| http://11870.com/konsulto/{searchTerms} | |
| http://1000memories.com/search?q={searchTerms} | |
| http://130.219.35.129/search?q={searchTerms}&btnG=Google+Search&entqr=0&output=xml_no_dtd&sort=date%3AD%3AL%3Ad1&client=default_frontend&ud=1&oe=UTF-8&ie=UTF-8&proxystylesheet=default_frontend&site=default_collection | |
| http://1337x.org/search/{searchTerms}/0/ | |
| http://11888.ote.gr/web/guest/white-pages/search?who={searchTerms}&where= | |
| http://140.111.34.46/cgi-bin/newDict/dict.sh?idx=dict.idx&cond={searchTerms}&pieceLen=50&fld=1&cat=&imgFont=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $url = 'URL GOES HERE'; | |
| $key = 'KEY GOES HERE'; | |
| // View https://developers.google.com/speed/docs/insights/v1/getting_started#before_starting to get a key | |
| $data = json_decode(file_get_contents("https://www.googleapis.com/pagespeedonline/v1/runPagespeed?url=$url&key=$key")); | |
| $dat = $data->formattedResults->ruleResults; | |
| foreach($dat as $d) { | |
| $name = $d->localizedRuleName; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .gform_wrapper ul { | |
| padding-left: 0; | |
| list-style: none; } | |
| .gform_wrapper li { | |
| margin-bottom: 15px; } | |
| .gform_wrapper form { | |
| margin-bottom: 0; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class sampleClass { | |
| function __construct() { | |
| add_filter( 'edd_settings_tabs', array($this,'test_tab' )); | |
| add_action('admin_init', array($this,'edd_register_settings_test')); | |
| } |