Skip to content

Instantly share code, notes, and snippets.

Jody Hamilton jodyHamilton

Block or report user

Report or block jodyHamilton

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jodyHamilton
jodyHamilton / NumberCommasWidget.php
Created Apr 20, 2017
Drupal 8 number field widget that uses commas to separate thousands
View NumberCommasWidget.php
<?php
namespace Drupal\YourModule\Plugin\Field\FieldWidget;
use Drupal\Core\Field\FieldFilteredMarkup;
use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Field\WidgetBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Field\Plugin\Field\FieldWidget\NumberWidget;
View paragraphs-not-orderable.patch
diff --git a/src/Plugin/Field/FieldWidget/InlineParagraphsWidget.php b/src/Plugin/Field/FieldWidget/InlineParagraphsWidget.php
index 48d6d2c48..f72b86d8a 100644
--- a/src/Plugin/Field/FieldWidget/InlineParagraphsWidget.php
+++ b/src/Plugin/Field/FieldWidget/InlineParagraphsWidget.php
@@ -879,7 +879,7 @@ public function formMultipleElements(FieldItemListInterface $items, array &$form
if ($this->realItemCount > 0) {
$elements += array(
- '#theme' => 'field_multiple_value_form',
+ '#theme' => $this->fieldDefinition->isOrderable() ? 'field_multiple_value_form' : 'field_multiple_value_without_order_form',
View wp-config.probo.php
<?php
define('WP_CACHE', false); // Added by W3 Total Cache
define('WP_HOME', $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST']);
define('WP_SITEURL', $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST']);
@jodyHamilton
jodyHamilton / .probo.yml
Last active Apr 14, 2017
A Wordpress Probo Config
View .probo.yml
assets:
- aap.sql
steps:
- name: Set up site with WordPress plugin
plugin: WordPressApp
devDomain: 'http://allagesproductions.com'
devHome: 'http://allagesproductions.com/'
database: 'aap.sql'
databaseName: 'aap'
databaseGzipped: false
View Probo yaml behat selenium
steps:
- name: Run behat tests
command: 'cd /var/www/html/tests ; composer install ; ./bin/behat --profile probo --tags "~@javascript"'
- name: Run behat js tests
command: 'wget http://selenium-release.storage.googleapis.com/2.48/selenium-server-standalone-2.48.2.jar ; apt-get install xvfb -y ; xvfb-run java -jar selenium-server-standalone-2.48.2.jar & ; ./bin/behat --profile probo --tags "@javascript" ; disown'
View probo.yaml
assets:
- zivtech8x.sql.gz
steps:
- name: Setup working directory
command: "drush fec --json-config='{\"settings_php.snippets\": []}' --local-environment=probo zivtech 7 "
- name: Import the database
command: 'gunzip -c $ASSET_DIR/zivtech8x.sql.gz | `drush --root=/var/www/zivtech/webroot sql-connect` ; rm $ASSET_DIR/zivtech8x.sql.gz'
- name: Move code in place
command: 'rm -rf /var/www/zivtech/code ; mv $SRC_DIR /var/www/zivtech/code'
- name: Rewrite settings.php file and repair symlinks
View bear_skin.info.yaml
name: Bear Skin type: theme
description: 'Bear Skin Starter Theme.'
package:
Custom core: 8.x
engine: twig
screenshot: screenshot.png
stylesheets-remove:
- core/modules/system/css/components/messages.theme.css
- core/modules/system/css/components/menu.theme.css
View drupal-mock-request-time-for-tests.patch
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index 728e4ec..394d746 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -215,7 +215,9 @@ define('LANGUAGE_RTL', 1);
* @see http://php.net/manual/reserved.variables.server.php
* @see http://php.net/manual/function.time.php
*/
-define('REQUEST_TIME', (int) $_SERVER['REQUEST_TIME']);
+ // Moved to a phase of drupal_bootstrap so that we can pull this from a
You can’t perform that action at this time.