./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_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
DROP TABLE IF EXISTS time_dimension; | |
CREATE TABLE time_dimension ( | |
id INTEGER PRIMARY KEY, -- year*10000+month*100+day | |
db_date DATE NOT NULL, | |
year INTEGER NOT NULL, | |
month INTEGER NOT NULL, -- 1 to 12 | |
day INTEGER NOT NULL, -- 1 to 31 | |
quarter INTEGER NOT NULL, -- 1 to 4 | |
week INTEGER NOT NULL, -- 1 to 52/53 | |
day_name VARCHAR(9) NOT NULL, -- 'Monday', 'Tuesday'... |
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
public function get_checkin_poll() | |
{ | |
$filepath = 'storage/work/checkin_poll_' . Auth::user()->id; | |
$last_cycle = File::get($filepath); | |
$break = false; | |
$thread = uniqid(); | |
// if last cycle was > 60 secs continue |
All custom modules should have a Namespace and Module Name.
These are used below as {Namespace}
and {Module}
.
Caution: The Magento autoloader is known to have problems with CamelCase namespaces and/or modules between Windows and *nix systems. If your module requires more than one word for either of these, it is best to just concatenate them to avoid any issues (Example:
{Namespace}_{Examplemodule}
).
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
// Bootstrap Mid-Small - col-ms-* - the missing grid set for Bootstrap3. | |
// | |
// This is a hack to fill the gap between 480 and 767 pixels - a missing range | |
// in the bootstrap responsive grid structure. Use these classes to style pages | |
// on cellphones when they transition from portrait to landscape. | |
// | |
// Contains: | |
// Columns, Offsets, Pushes, Pulls for the Mid-Small layout | |
// Visibility classes for the Mid-Small layout | |
// Redefined visibility classes for the Extra Small layout |
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
function wp_api_encode_acf($data,$post,$context){ | |
$data['meta'] = array_merge($data['meta'],get_fields($post['ID'])); | |
return $data; | |
} | |
if( function_exists('get_fields') ){ | |
add_filter('json_prepare_post', 'wp_api_encode_acf', 10, 3); | |
} |
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
// Bootstrap Mid-Large - col-ml-* - the missing grid set for Bootstrap3. | |
// | |
// | |
// | |
// This is a hack to fill the gap between 768 and 991 pixels - a missing range | |
// in the bootstrap responsive grid structure. Use these classes to style pages | |
// on cellphones when they transition from portrait to landscape. | |
// | |
// Contains: | |
// Columns, Offsets, Pushes, Pulls for the Mid-Small layout |
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
// Copyright 2016 Jeremie Miserez <[email protected]> | |
// | |
// MIT License | |
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF O |
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 | |
/* | |
Plugin Name: Plugin name | |
Plugin URI: http://pluginurl.com | |
Description: Plugin description | |
Version: 1.0.0 | |
Author: Plugin author | |
Author URI: http://pluginauthorurl.com | |
Text Domain: plugin-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
# This might ruin your database and I do not take any responsibility for that. Backup your database before continuing | |
! | |
# Check the results throughly | |
SELECT * FROM `wp_postmeta` | |
WHERE `meta_key` IN | |
( SELECT TRIM(LEADING '_' FROM `meta_key`) AS mk | |
FROM `wp_postmeta` | |
WHERE `meta_value` regexp '^field_[0-9a-f]+' | |
AND `meta_value` NOT IN |
OlderNewer