{"action":"created","issue":{"url":"https://api.github.com/repos/ThemeFuse/Unyson/issues/1786","repository_url":"https://api.github.com/repos/ThemeFuse/Unyson","labels_url":"https://api.github.com/repos/ThemeFuse/Unyson/issues/1786/labels{/name}","comments_url":"https://api.github.com/repos/ThemeFuse/Unyson/issues/1786/comments","events_url":"https://api.github.com/repos/ThemeFuse/Unyson/issues/1786/events","html_url":"https://github.com/ThemeFuse/Unyson/issues/1786","id":165686053,"number":1786,"title":"Need a little help overriding the table shortcode options","user":{"login":"thednp","id":6761246,"avatar_url":"https://avatars.githubusercontent.com/u/6761246?v=3","gravatar_id":"","url":"https://api.github.com/users/thednp","html_url":"https://github.com/thednp","followers_url":"https://api.github.com/users/thednp/followers","following_url":"https://api.github.com/users/thednp/following{/other_user}","gists_url":"https://api.github.com/users/thednp/gists{/gist_id}","starred_url":"https://api.github.com/users/thednp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thednp/subscriptions","organizations_url":"https://api.github.com/users/thednp/orgs","repos_url":"https://api.github.com/users/thednp/repos","events_url":"https://api.github.com/users/thednp/events{/privacy}","received_events_url":"https://api.github.com/users/thednp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-15T00:12:03Z","updated_at":"2016-07-16T11:52:29Z","closed_at":null,"body":"I'm working on the table shortcode, trying to override the `options.php` doesn't seem to work please correct me where I'm wrong. I would love to add more `row_options` but for now I would like to be able to override the file to use my CSS classes.\r\n\r\n```php\r\n$options = array(\r\n\t'table'         => array(\r\n\t\t'type'  => 'table',\r\n\t\t'label' => false,\r\n\t\t'desc'  => false,\r\n\t\t'header_options'  => array( // is this OK to start here?\r\n\t\t\t'table_purpose' => array(\r\n\t\t\t\t'type'    => 'select',\r\n\t\t\t\t'label'   => __( 'Table Type', 'fw' ),\r\n\t\t\t\t'help'    => __( 'Choose the table styling options', 'fw' ),\r\n\t\t\t\t'choices' => array(\r\n\t\t\t\t\t'pricing' => __( 'Use the table as a pricing table', 'fw' ),\r\n\t\t\t\t\t'tabular' => __( 'Use the table to display tabular data', 'fw' ),\r\n\t\t\t\t),\r\n\t\t\t\t'value'   => 'pricing',\r\n\t\t\t\t'attr'    => array(\r\n\t\t\t\t\t'data-allowed-rows' => json_encode( array(\r\n\t\t\t\t\t\t\t'pricing' => 'default-row heading-row pricing-row button-row switch-row',\r\n\t\t\t\t\t\t\t'tabular' => 'default-row heading-row'\r\n\t\t\t\t\t ) ),\r\n\t\t\t\t\t'data-allowed-cols' => json_encode( array(\r\n\t\t\t\t\t\t'pricing' => 'default-col highlight-col desc-col',\r\n\t\t\t\t\t\t'tabular' => 'default-col desc-col'\r\n\t\t\t\t\t) ),\r\n\t\t\t\t)\r\n\t\t\t)\r\n\t\t),\r\n\t\t'row_options'     => array(\r\n\t\t\t'name' => array(\r\n\t\t\t\t'type'    => 'select',\r\n\t\t\t\t'label'   => false,\r\n\t\t\t\t'desc'    => false,\r\n\t\t\t\t'choices' => array(\r\n\t\t\t\t\t'default-row' => __( 'Default row', 'fw' ),\r\n\t\t\t\t\t'heading-row' => __( 'Heading row', 'fw' ),\r\n\t\t\t\t\t'pricing-row' => __( 'Pricing row', 'fw' ),\r\n\t\t\t\t\t'button-row'  => __( 'Button row', 'fw' ),\r\n\t\t\t\t\t'switch-row'  => __( 'Yes/No', 'fw' )\r\n\t\t\t\t),\r\n\t\t\t)\r\n\t\t),\r\n\t\t'columns_options' => array(\r\n\t\t\t'name' => array(\r\n\t\t\t\t'type'    => 'select',\r\n\t\t\t\t'label'   => false,\r\n\t\t\t\t'desc'    => false,\r\n\t\t\t\t'choices' => array(\r\n\t\t\t\t\t'default-col'   => __( 'Default column', 'fw' ),\r\n\t\t\t\t\t'desc-col'      => __( 'Description column', 'fw' ),\r\n\t\t\t\t\t'highlight-col' => __( 'Highlight column', 'fw' ),\r\n\t\t\t\t\t'center-col'    => __( 'Center text column', 'fw' )\r\n\t\t\t\t),\r\n\t\t\t)\r\n\t\t),\r\n\t\t'content_options' => array(\r\n\t\t\t'default-row' => array(\r\n\t\t\t\t'textarea' => array(\r\n\t\t\t\t\t'type'  => 'textarea-cell',\r\n\t\t\t\t\t'label' => false,\r\n\t\t\t\t\t'desc'  => false,\r\n\t\t\t\t\t'value' => '',\r\n\t\t\t\t)\r\n\t\t\t),\r\n\t\t\t'heading-row' => array(\r\n\t\t\t\t'textarea' => array(\r\n\t\t\t\t\t'type'  => 'textarea-cell',\r\n\t\t\t\t\t'label' => false,\r\n\t\t\t\t\t'desc'  => false,\r\n\t\t\t\t\t'value' => '',\r\n\t\t\t\t)\r\n\t\t\t),\r\n\t\t\t'pricing-row' => array(\r\n\t\t\t\t'amount'      => array(\r\n\t\t\t\t\t'type'         => 'text',\r\n\t\t\t\t\t'label'        => false,\r\n\t\t\t\t\t'desc'         => false,\r\n\t\t\t\t\t'value'        => '',\r\n\t\t\t\t\t'wrapper_attr' => array(\r\n\t\t\t\t\t\t'class' => 'fw-col-sm-6'\r\n\t\t\t\t\t)\r\n\t\t\t\t),\r\n\t\t\t\t'description' => array(\r\n\t\t\t\t\t'type'         => 'text',\r\n\t\t\t\t\t'label'        => false,\r\n\t\t\t\t\t'desc'         => false,\r\n\t\t\t\t\t'value'        => '',\r\n\t\t\t\t\t'attr'         => array(\r\n\t\t\t\t\t\t'placeholder' => __( 'per month', 'fw' )\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'wrapper_attr' => array(\r\n\t\t\t\t\t\t'class' => 'fw-col-sm-6'\r\n\t\t\t\t\t)\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t\t'button-row'  => array(\r\n\t\t\t\t'button' => ( $button = fw()->extensions->get( 'shortcodes' )->get_shortcode( 'button' ) )\r\n\t\t\t\t\t? array(\r\n\t\t\t\t\t\t'type'          => 'popup',\r\n\t\t\t\t\t\t'popup-title'   => __( 'Button', 'fw' ),\r\n\t\t\t\t\t\t'button'        => __( 'Add', 'fw' ),\r\n\t\t\t\t\t\t'popup-options' => $button->get_options()\r\n\t\t\t\t\t)\r\n\t\t\t\t\t: array()\r\n\t\t\t),\r\n\t\t\t'switch-row'  => array(\r\n\t\t\t\t'switch' => array(\r\n\t\t\t\t\t'label'        => false,\r\n\t\t\t\t\t'type'         => 'switch',\r\n\t\t\t\t\t'right-choice' => array(\r\n\t\t\t\t\t\t'value' => 'yes',\r\n\t\t\t\t\t\t'label' => __( 'Yes', 'fw' )\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'left-choice'  => array(\r\n\t\t\t\t\t\t'value' => 'no',\r\n\t\t\t\t\t\t'label' => __( 'No', 'fw' )\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'value'        => 'no',\r\n\t\t\t\t\t'desc'         => false,\r\n\t\t\t\t)\r\n\t\t\t)\r\n\r\n\t\t),\r\n\t\t'value'           => array(\r\n\t\t\t'header_options' => array(\r\n\t\t\t\t'table_purpose' => 'pricing',\r\n\t\t\t),\r\n\t\t\t'cols'           => array(\r\n\t\t\t\tarray( 'name' => 'default-col' ),\r\n\t\t\t\tarray( 'name' => 'default-col' ),\r\n\t\t\t\tarray( 'name' => 'default-col' )\r\n\t\t\t),\r\n\t\t\t'rows'           => array(\r\n\t\t\t\tarray( 'name' => 'default-row' ),\r\n\t\t\t\tarray( 'name' => 'default-row' ),\r\n\t\t\t\tarray( 'name' => 'default-row' )\r\n\t\t\t),\r\n\t\t\t// 'content'        =>\tfw()->extensions->get( 'shortcodes' )->get_shortcode( 'table' )->get_shortcode( 'table' )->fw_generate_default_values()\r\n\t\t\t// 'content'        => (FW_Option_Type_Table::fw_generate_default_values())\r\n\t\t\t// REALLY, HOW DO I DO THIS?\r\n\t\t)\r\n\t)\r\n);\r\n```\r\n\r\n* First I don't know if the file is properly edited according to the `table` option type defaults\r\n* second, I don't know why the `value` - `content` cannot be generated as I written above\r\n\r\nThanks so much"},"comment":{"url":"https://api.github.com/repos/ThemeFuse/Unyson/issues/comments/233126856","html_url":"https://github.com/ThemeFuse/Unyson/issues/1786#issuecomment-233126856","issue_url":"https://api.github.com/repos/ThemeFuse/Unyson/issues/1786","id":233126856,"user":{"login":"thednp","id":6761246,"avatar_url":"https://avatars.githubusercontent.com/u/6761246?v=3","gravatar_id":"","url":"https://api.github.com/users/thednp","html_url":"https://github.com/thednp","followers_url":"https://api.github.com/users/thednp/followers","following_url":"https://api.github.com/users/thednp/following{/other_user}","gists_url":"https://api.github.com/users/thednp/gists{/gist_id}","starred_url":"https://api.github.com/users/thednp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thednp/subscriptions","organizations_url":"https://api.github.com/users/thednp/orgs","repos_url":"https://api.github.com/users/thednp/repos","events_url":"https://api.github.com/users/thednp/events{/privacy}","received_events_url":"https://api.github.com/users/thednp/received_events","type":"User","site_admin":false},"created_at":"2016-07-16T11:52:29Z","updated_at":"2016-07-16T11:52:29Z","body":"Thank you for the reply, I understand the point of the required function for `content` generation, but as it's written above, it doesn't even change labels such as `'label'   => __( 'Table Type', 'fw' ),` it's still using old ones `'label'   => __( 'Table Styling', 'fw' ),`, so there might be another case of hardcoded options."}}
{"actor":{"display_login":"thednp"}}