This file contains 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
<script> | |
/** | |
* An example function in JavaScript | |
* | |
* @param int myInt | |
* @param string myString | |
* | |
* @return string | |
*/ |
This file contains 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
<!-- CSS Stylesheet --> | |
<link rel='stylesheet' type='text/css' href='css/draggable.css' /> | |
<!-- The things we are dragging --> | |
<div class='thing'><label>Thing 1</label></div> | |
<div class='thing'><label>Thing 2</label></div> | |
<div class='thing'><label>Thing 3</label></div> | |
<!-- jQuery and jQuery-UI --> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> |
This file contains 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 | |
/** | |
* Uses the `spl_autoload_register` function to autoload classes so that we don't have to | |
* explicitly require each file for each class we use in our code | |
*/ |
This file contains 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 | |
/** | |
* In this example, we are autoloading classes within the namespace `Acme\ExampleProject`. The file `index.php` is the | |
* entry point to our project; and we are using the `src` directory to store and organize our PHP class files. Our | |
* autoloader is located in `autoload.php` | |
* | |
* The basic behavior is illustrated in the fact that PHP will autoload the file `src/mammals/human.php` whenever we | |
* attempt to create a `new \Acme\ExampleProject\Mammals\Human` anywhere in our project's codebase. | |
* | |
* This diagram illustrates our project structure. Each file's contents can be found below. |
This file contains 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 | |
# Make sure to replace {id} with your form's id | |
add_filter( 'gform_pre_render_{id}', 'my_populate_checkbox' ); | |
function my_populate_checkbox( $form ) { | |
/** | |
* Loop through form fields | |
* |
OlderNewer