Videos incluidos (no se incluyen las sesiones de los eventos de la AED):
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 | |
try { | |
$fb = facebook_autopost(); | |
$fb | |
->setDestination($facebook_page_id) | |
->publish(array( | |
'type' => 'status', | |
'params' => array('message' => t('Hello world.')), | |
)); | |
} |
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 | |
try { | |
$fb = facebook_autopost(); | |
$fb | |
->setDestination('me') | |
->publish(array( | |
'type' => 'status', | |
'params' => array('message' => t('Hello world.')), | |
)); | |
} |
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 | |
/** | |
* A base class with getters and setters incorporated. | |
*/ | |
class ObjectBase { | |
/** | |
* Setter function for a generic attribute. | |
* | |
* @param string $property_name |
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
# Add this to your .bash_profile / .bashrc / … | |
# Call this to reinstall a D8 development site. | |
function drupal-reinstall() { | |
pass=$(grep "'password' =>" sites/default/settings.php | grep -v '[\*#]'|sort|uniq|cut -f4 -d\'); | |
username=$(grep "'username' =>" sites/default/settings.php | grep -v '[\*#]'|sort|uniq|cut -f4 -d\'); | |
dbname=$(grep "'database' =>" sites/default/settings.php | grep -v '[\*#]'|sort|uniq|cut -f4 -d\'); | |
sudo rm -rf sites/default; | |
sudo git checkout -- sites/default; | |
sudo chmod -R 777 sites/default; |
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 | |
/** | |
* Get the content of a field for a given array of entity ids. If the field | |
* contains multiple values for a given entity id, then only the latest is | |
* preserved. | |
* | |
* @param string $field_name | |
* The name of the field you need to retrieve. | |
* @param array $entity_ids | |
* An array containing the entity ids to look for. |
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 | |
/** | |
* Implementation of hook_drush_command(). | |
*/ | |
function operations_drush_command() { | |
$items = array(); | |
$items['local-update'] = array( | |
'description' => 'Downloads a dump of the remote database, suffixes that file with the current date and stores it in the selected location. After importing the database, it will run update hooks, revert all features, and clear cache.', |
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
-- Select all media galleries and find all images in there that follow the path structure: public://images/%/%/%/% | |
SELECT n.nid, fmi.field_media_items_fid, file.uri | |
FROM | |
node n | |
INNER JOIN | |
field_data_field_media_items fmi ON fmi.entity_id = n.nid | |
INNER JOIN | |
file_managed file ON file.fid = fmi.field_media_items_fid | |
WHERE | |
n.type = 'media_gallery' |
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
# Based on the agnoster's Theme (https://gist.github.com/3712874) | |
# With some a couple of small changes. | |
# | |
# In order for this theme to render correctly, you will need a | |
# [Powerline-patched font](https://gist.github.com/1595572). | |
### Segment drawing | |
# A few utility functions to make it easy and re-usable to draw segmented prompts | |
CURRENT_BG='NONE' |
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
diff --git a/multifield.features.inc b/multifield.features.inc | |
index ca7a8ab..152ebc1 100644 | |
--- a/multifield.features.inc | |
+++ b/multifield.features.inc | |
@@ -30,3 +30,29 @@ function multifield_features_pipe_field_base_alter(&$pipe, $data, $export) { | |
} | |
} | |
} | |
+ | |
+/** |
OlderNewer