Had a task of copying all the settings from one theme to the other, bock placings and configuration to do that this code snnipet run with drush solved it
**FIRST**
drush sql-query "DELETE FROM block WHERE theme = 'some_theme_2'"
**SECOND**
Had a task of copying all the settings from one theme to the other, bock placings and configuration to do that this code snnipet run with drush solved it
**FIRST**
drush sql-query "DELETE FROM block WHERE theme = 'some_theme_2'"
**SECOND**
Run in drush list of views preprocess functions
drush --root=/Applications/MAMP/htdocs/site-epic php-eval "var_dump(array_keys(views_theme()));"
With devel/php you can go to some site and quickly found out value of some variable in DB that might concern you. So to do that you can go and write
Nice little code that will check your site_deployment.install file and run drush dbup to update your site with deployment changes.
When you deploy something to a site, you will most probably use features. To use featutes with hook_update_N you can use default
This one is easily overlooked but pretty important, strings in translation function can have arguments that can be replaced in 3 ways.
$text = t("This is !name's website", array('!name' => $username));
$text = t("This is @name's website", array('@name' => $username));
$text = t("This is %name's website", array('%name' => $username));
Drush
echo "SHOW TABLES LIKE 'cache%'" | $(drush sql-connect) | tail -n +2 | xargs -L1 -I% echo "TRUNCATE TABLE %;" | $(drush sql-connect) -v
Here's how to do this from the command line...
dpm(entity_get_info());
and you will get all the info you will need, like proper machine names.
To alter the form output we need to use form alter and overide array. We are going to add few options to filters that group filter options together, in this case we are dealing with list of countries.
/**
Disabling Generate automatic URL alias is not possible with configuration, this needs to be done with code.
In hook_form_alter we call