Step-by-Step Guide to Implement Inline Editing in WordPress

1. Enqueue JavaScript and Localize Script In your plugin’s admin script enqueue function, add: php Copy code function enqueue_inline_editing_scripts() { // Enqueue jQuery if not already included wp_enqueue_script(‘jquery’); // Enqueue your custom inline editing script wp_enqueue_script(‘inline-editing-script’, PLUGIN_URL . ‘admin/js/inline-editing.js’, array(‘jquery’), ‘1.0.0’, true); // Localize script to pass AJAX URL and nonce wp_localize_script(‘inline-editing-script’, ‘inlineEditAjax’, array( ‘ajaxurl’… Continue reading Step-by-Step Guide to Implement Inline Editing in WordPress

Published
Categorized as WordPress

EXIM – Email Terminal Commands

Show queue count : exim -bpc stop exim service : service exim stop start exim service : service exim restart clear all email files exim -bp | awk ‘{print $3}’ | xargs exim -Mrm – removing *

GIT add new remote to bitbucket

git remote add origin https://username@bitbucket.org/username/reponame.git git add git commit git push –set-upstream origin master

Published
Categorized as GIT

React Native Simulator – Specify Device

Run these commands inside your React Native project to specify a particular iOS device react-native run-ios –simulator=”iPhone 5s” react-native run-ios –simulator=”iPhone 6″ react-native run-ios –simulator=”iPhone 6 Plus” react-native run-ios –simulator=”iPhone 6s” react-native run-ios –simulator=”iPhone 6s Plus” react-native run-ios –simulator=”iPhone 7″ react-native run-ios –simulator=”iPhone 7 Plus” react-native run-ios –simulator=”iPhone 8″ react-native run-ios –simulator=”iPhone 8 Plus” react-native… Continue reading React Native Simulator – Specify Device

Toggle class in jQuery

jQuery(document).on(‘click’,’.replyPost, .cancelPost’, function(){ jQuery(this).toggleClass(“cancelPost replyPost”); });

Published
Categorized as jQuery

Laravel Database Column Types

Command Description $table->bigIncrements(‘id’); Incrementing ID (primary key) using a “UNSIGNED BIG INTEGER” equivalent. $table->bigInteger(‘votes’); BIGINT equivalent for the database. $table->binary(‘data’); BLOB equivalent for the database. $table->boolean(‘confirmed’); BOOLEAN equivalent for the database. $table->char(‘name’, 4); CHAR equivalent with a length. $table->date(‘created_at’); DATE equivalent for the database. $table->dateTime(‘created_at’); DATETIME equivalent for the database. $table->dateTimeTz(‘created_at’); DATETIME (with timezone) equivalent… Continue reading Laravel Database Column Types

PHP illegal string offset warning

Ran across the PHP Joomla warning after upgrading one of my apps to Joomla 3.45: Warning: Illegal string offset ‘name’ in function golfLeagueShowFormats($formatObject){ $delimiter = “,”; $format_array = explode($delimiter, $formatObject); foreach ($format_array as $format) { $formatnumber = $format[‘name’]; golfLeagueGetFormatName($formatnumber); //return ‘poop’; } } It’s just a warning that only shows up in developer mode. Disabling… Continue reading PHP illegal string offset warning