Skip to content

Instantly share code, notes, and snippets.

{
"repositories": [
{
"type": "composer",
"url": "https://wpackagist.org"
},
{
"type": "composer",
"url": "https://packages.metabox.io/KEY"
},
{
"repositories": [
{
"type": "composer",
"url": "https://wpackagist.org"
},
{
"type": "composer",
"url": "https://packages.metabox.io/KEY"
},
@booskills
booskills / sorting.php
Created November 21, 2019 22:50
sorting columns
<?php
// If this file is called directly, abort.
if ( ! defined( 'ABSPATH' ) ) {
die;
}
/**
* Functionality for our Custom Post types
*
*
* @package Rocket_Books
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
<DT><H3 ADD_DATE="1544686201" LAST_MODIFIED="1550055678" PERSONAL_TOOLBAR_FOLDER="true">Bookmarks bar</H3>
<DL><p>
// Remove Options
$option_ids_to_delete = array(
0 => 'rbr_test_field',
1 => 'rbr_archive_column',
2 => 'rbr_text_field1',
3 => 'rbr_color_test',
4 => 'rbr_number_field1',
5 => 'rbr_textarea_field1',
6 => 'rbr_advance_color_field',
7 => 'rbr_checkbox_field1',
<?php
/**
* Place this code where you want to add insertion point
*/
do_action('rbr_single_book_meta_after');
/**
* Place the following code in functions.php file of child theme or extending plugin
<?php
/** This code can be placed in functions.php file of Child theme or any other plugin */
add_filter( 'rbr/admin/settings/advance/fields', 'adding_color_field_to_advance_section' );
function adding_color_field_to_advance_section( $fields_array ) {
// Modify this fields array

Add phpCodeSniffer to PhpStorm:

  1. In the Settings/Preferences dialog (Ctrl+Alt+S),

    Languages & Frameworks | PHP | Quality Tools.

  2. On the Quality Tools page that opens, expand the Code Sniffer area. From the Configuration list, choose the PHP Code Sniffer script that we just installed in our utilities directory.

    You need to select > \phphcs\bin\phpcs.bat