One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
add_action( 'graphql_register_types', function() { | |
register_graphql_connection([ | |
'fromType' => 'ContentNode', | |
'toType' => 'MediaItem', | |
'fromFieldName' => 'attachedMedia', | |
'connectionArgs' => \WPGraphQL\Connection\PostObjects::get_connection_args(), | |
'resolve' => function( \WPGraphQL\Model\Post $source, $args, $context, $info ) { | |
$resolver = new \WPGraphQL\Data\Connection\PostObjectConnectionResolver( $source, $args, $context, $info, 'attachment' ); | |
$resolver->setQueryArg( 'post_parent', $source->ID ); |
<?php | |
/* | |
Plugin Name: WPMDB Pro Migration Complete Notifications | |
Plugin URI: http://deliciousbrains.com | |
Description: Get notified when a migration completes | |
Author: Delicious Brains | |
Version: 0.0 | |
Author URI: http://deliciousbrains.com | |
*/ |
file name: quick-add-new-user-wp.php and open this link on browser (for example): http://domain.com/quick-add-new-user-wp.php | |
<?php | |
// Adding a new user in Wordpress quickly | |
// coded by Ahmet Oguzhan Basar for OZIVISION | |
// 5:43 PM 9/15/2015 | |
$new_username = "oadmin"; | |
$new_username_password = generate_password(); | |
$new_username_email = "[email protected]"; |
# Where is the location of your current shall. Useful if we need to revert | |
echo $0 | |
# Install ZSH | |
sudo apt-get install zsh | |
# Instal GIT | |
sudo apt-get install git-core | |
# Install OhMyZSH |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
uglify: { | |
options: { | |
sourceMap: true, | |
sourceMapIncludeSources: true, | |
sourceMapIn: 'js/app.coffee.js.map' | |
}, |
<?php | |
/** | |
* Plugin Name: Grunt Sitemap Generator | |
* Plugin URI: http://www.github.com/lgladdy | |
* Description: Generate a JSON list of every page on a site so it can be used with grunt and uncss. Create a folder in /wp-content called mu-plugins, and drop this code into that folder, as grunt-sitemap.php | |
* Author: Liam Gladdy | |
* Author URI: http://gladdy.co.uk | |
* Version: 1.0 | |
*/ | |
// parse a Link header | |
// | |
// Link:<https://example.org/.meta>; rel=meta | |
// | |
// var r = parseLinkHeader(xhr.getResponseHeader('Link'); | |
// r['meta'] outputs https://example.org/.meta | |
// | |
function parseLinkHeader(header) { | |
var linkexp = /<[^>]*>\s*(\s*;\s*[^\(\)<>@,;:"\/\[\]\?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*")))*(,|$)/g; | |
var paramexp = /[^\(\)<>@,;:"\/\[\]\?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*"))/g; |
/*------------------------------------------ | |
Responsive Grid Media Queries - 1280, 1024, 768, 480 | |
1280-1024 - desktop (default grid) | |
1024-768 - tablet landscape | |
768-480 - tablet | |
480-less - phone landscape & smaller | |
--------------------------------------------*/ | |
@media all and (min-width: 1024px) and (max-width: 1280px) { } | |
@media all and (min-width: 768px) and (max-width: 1024px) { } |