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
body { | |
background: red; | |
} | |
body:after { | |
content: "css changed"; | |
position: absolute; | |
top: 20px; | |
left: 20px; |
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
alert(123); | |
document.write(456); |
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
name: inverse | |
layout: true | |
class: middle, inverse | |
--- | |
## Detta är en presentation | |
Diggar man markdown är detta ett väldigt enkelt sätt att skapa presentationer på serru. | |
- Använder markdown |
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
/** | |
* This is my dabblet! | |
*/ | |
background: red; | |
#background: linear-gradient(45deg, #f06, yellow); | |
min-height:100%; |
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
/** | |
* get all values or just the from a field in a field group | |
* @param $post_id | |
* @param $field_name_or_id name as string or field group id and field id as array. | |
* for example array(3,2) to fetch field 2 from field group 3 | |
* @param $single bool return a single (the first) value or all values (as array) | |
* @return string or array | |
*/ | |
simple_fields_get_post_value($post_id, $field_name_or_id, $single = true) |
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
<? | |
/** | |
* get all values or just the from a field in a field group | |
* @param $post_id | |
* @param $field_name_or_id name as string or field group id and field id as array. | |
* for example array(3,2) to fetch field 2 from field group 3 | |
* @param $single bool return a single (the first) value or all values (as array) | |
* @return string or array | |
*/ |
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 | |
add_action("plugins_loaded", "init_simple_fields_field_minimalexample"); | |
function init_simple_fields_field_minimalexample() { | |
class simple_fields_field_minimalexample extends simple_fields_field { | |
public $key = "minimalexample", $name = "Minimalistic example field"; | |
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 | |
/** | |
* This is an example field type extension for Simple Fields | |
* Use this as base or inspiration for your own fields | |
*/ | |
// Make sure simple fields have loaded before we try to do anything. Will get errors otherwise. | |
add_action("plugins_loaded", "init_simple_fields_field_example"); |
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 | |
/** | |
* Update/Set a value for a field for a post | |
* Warning: Highly untested! | |
* | |
* @param int $post_id | |
* @param string $field_slug field key | |
* @param int $numInSet if field is repeatable this tells what position it should be stored at. Default is null = add new | |
* @param mixed $post_connector string __none__, __inherit__, or int id of post connector to use for this post, if no connector is defined already |
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
/** | |
* Gets a single value. | |
* The first value if field group is repeatable | |
* | |
* @param string $field_slug | |
* @param int $post_id ID of post or null to use current post in loop | |
* @param array $options Array or query string of options to send to field type | |
* @return mixed string or array, depending on the field type | |
*/ | |
function simple_fields_value($field_slug = NULL, $post_id = NULL, $options = NULL) { |
OlderNewer