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 | |
| add_action( 'admin_menu', 'remove_menus' ); | |
| function remove_menus() { | |
| global $menu; | |
| global $submenu; | |
| // echo '<pre>'; | |
| // print_r($menu); |
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
| add_filter('json_api_encode', 'json_api_encode_acf'); | |
| function json_api_encode_acf($response) | |
| { | |
| if (isset($response['posts'])) { | |
| foreach ($response['posts'] as $post) { | |
| json_api_add_acf($post); // Add specs to each post | |
| } | |
| } |
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
| # Apache configuration file | |
| # httpd.apache.org/docs/2.2/mod/quickreference.html | |
| # Note .htaccess files are an overhead, this logic should be in your Apache | |
| # config if possible: httpd.apache.org/docs/2.2/howto/htaccess.html | |
| # Techniques in here adapted from all over, including: | |
| # Kroc Camen: camendesign.com/.htaccess | |
| # perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/ | |
| # Sample .htaccess file of CMS MODx: modxcms.com | |
| # This is the free sample of .htaccess from 6GO s.r.l. | |
| # @author Claudio Ludovico Panetta (@Ludo237) |
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
| <? | |
| include 'spreadsheet.php'; | |
| $Spreadsheet = new Spreadsheet("[email protected]", "password"); | |
| $Spreadsheet-> | |
| setSpreadsheet("Tester")-> | |
| setWorksheet("Sheet1")-> | |
| add(array("Header 1" => "Cell 1", "Header 2" => "Cell 2")); | |
| ?> |
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
| /* | |
| * | |
| * Originally inspired by: http://designedbythomas.co.uk/blog/how-detect-width-web-browser-using-jquery | |
| * | |
| * Original source by https://gist.github.com/highrockmedia/3710930 | |
| * | |
| * My contribution: I re-wrote some code it to fire as one function, so you're only editing values in one place. | |
| * | |
| */ |
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
| /* | |
| * Inspired by: | |
| * http://designedbythomas.co.uk/blog/how-detect-width-web-browser-using-jquery | |
| * | |
| * This script is ideal for getting specific class depending on device width | |
| * for enhanced theming. Media queries are fine in most cases but sometimes | |
| * you want to target a specific JQuery call based on width. This will work | |
| * for that. Be sure to put it first in your script file. Note that you could | |
| * also target the body class instead of 'html' as well. | |
| * Modify as needed |
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
| #!/bin/bash | |
| echo -e "\033[0mCOLOR_NC (No color)" | |
| echo -e "\033[1;37mCOLOR_WHITE\t\033[0;30mCOLOR_BLACK" | |
| echo -e "\033[0;34mCOLOR_BLUE\t\033[1;34mCOLOR_LIGHT_BLUE" | |
| echo -e "\033[0;32mCOLOR_GREEN\t\033[1;32mCOLOR_LIGHT_GREEN" | |
| echo -e "\033[0;36mCOLOR_CYAN\t\033[1;36mCOLOR_LIGHT_CYAN" | |
| echo -e "\033[0;31mCOLOR_RED\t\033[1;31mCOLOR_LIGHT_RED" | |
| echo -e "\033[0;35mCOLOR_PURPLE\t\033[1;35mCOLOR_LIGHT_PURPLE" | |
| echo -e "\033[0;33mCOLOR_YELLOW\t\033[1;33mCOLOR_LIGHT_YELLOW" |
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 temp_mode() { | |
| if ( ! current_user_can( 'edit_themes' ) || ! is_user_logged_in() ) { | |
| echo '<!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>coming soon</title> | |
| <link href="http://fonts.googleapis.com/css?family=Roboto:400,100,900" rel="stylesheet" type="text/css"> | |
| <style type="text/css"> |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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
| /********************************** example **************************************/ | |
| var base_url = 'http://people.cs.uct.ac.za/~swatermeyer/VulaMobi/'; | |
| function example() | |
| { | |
| var response = ""; | |
| var form_data = { | |
| username: username, | |
| password: password |