You appear to be a bot. Output may be restricted
Description
Create the oik_sc_param records for each of the shortcode attswith input coming from the shortcode__syntax or the input fields
Usage
_oiksc_create_params( $plugin, $code, $post_id );
Parameters
- $plugin
- ( string ) required –
- $code
- ( string ) required –
- $post_id
- ( ID ) required –
Returns
voidSource
File name: oik-shortcodes/admin/oik-shortcodes.phpLines:
1 to 21 of 21
function _oiksc_create_params( $plugin, $code, $post_id ) { $syntax = array(); for ( $parmc = 1; $parmc < 10; $parmc++ ) { $name = bw_array_get( $_REQUEST, "sc${parmc}_name", null ); $type = bw_array_get( $_REQUEST, "sc${parmc}_type", null ); $default = bw_array_get( $_REQUEST, "sc${parmc}_default", null ); $values = bw_array_get( $_REQUEST, "sc${parmc}_values", null ); $notes = bw_array_get( $_REQUEST, "sc${parmc}_notes", null ); if ( $name ) { $syntax[ $name ] = bw_skv( $default, $values, $notes ); } } bw_trace2( $syntax, "syntax", true, BW_TRACE_DEBUG ); oik_require( "includes/oik-sc-help.php" ); $syntax_code = _bw_lazy_sc_syntax( $code ); bw_trace2( $syntax_code, "syntax_code", false, BW_TRACE_VERBOSE ); // Once again... there's no need to merge them - just treat each array separately _oiksc_create_param( $syntax, $plugin, $code, $post_id ); _oiksc_create_param( $syntax_code, $plugin, $code, $post_id ); }View on GitHub