'setting_id', // Unique id * 'title' => 'My Setting', // Title or label for the setting * 'description' => 'Description', // Help text description * 'items' => array( * 'item' => 'Label' // The items to be re-ordered * ) * ); * * @since 2.5 * @package Simple Admin Pages */ class sapAdminPageSettingOrdering_2_7_4 extends sapAdminPageSetting_2_7_4 { public $items; public $sanitize_callback = 'sanitize_text_field'; /** * Add in the JS requried for the values to be stored * @since 2.5 */ public $scripts = array( 'sap-ordering-table' => array( 'path' => 'js/ordering.js', 'dependencies' => array( 'jquery' ), 'version' => SAP_VERSION, 'footer' => true, ), ); /** * Add in the CSS requried for rows to be displayed correctly * @since 2.5 */ public $styles = array( 'sap-ordering-table' => array( 'path' => 'css/ordering.css', 'dependencies' => array( ), 'version' => SAP_VERSION, 'media' => 'all', ), ); /** * Display this setting * @since 2.0 */ public function display_setting() { $input_name = $this->get_input_name(); $values = is_array( $this->value ) ? $this->value : json_decode( html_entity_decode( $this->value ?? '' ), true ); if ( ! is_array( $values ) ) $values = array(); if ( empty( $values ) and is_string( $this->items ) ) $values = array_merge( $values, json_decode( $this->items, true ) ); ?>
display_description(); } }