Plugin Directory

Changeset 2261175


Ignore:
Timestamp:
03/14/2020 10:34:09 PM (6 years ago)
Author:
rm2773
Message:

Update to version 1.0.2.

Location:
wp-studio-tabs
Files:
48 added
6 edited

Legend:

Unmodified
Added
Removed
  • wp-studio-tabs/trunk/css/style.php

    r2242091 r2261175  
    11<?php
    22
    3 global $post;
     3  global $post;
    44
    5 if (has_shortcode( $post->post_content, 'tabs' )):
    6   $tabs_bgcolor = get_post_meta($post->ID, 'tabs_width', true);
    7   //echo $post->ID;
    8 endif;
     5  $tag = 'tabs';
    96
    10 echo $tabs_bgcolor;
     7  // Return if there is no shortcode in post content
     8  if (!has_shortcode($post->post_content, $tag)) {
     9      return false;
     10  }
    1111
    12 $html  = '';
    13 $html .= '<style type="text/css">';
    14 $html .= '.tabs-container { '. $tabs_bgcolor .' }';
    15 $html .= '</style>';
     12  // Get all shortcodes in the post content
     13  preg_match_all('/' . get_shortcode_regex() . '/s', $post->post_content, $matches, PREG_SET_ORDER);
    1614
    17 echo $html; ?>
     15  if (empty($matches)) {
     16      return false;
     17  }
     18
     19  // Loop through shortcodes, parse shortcode attributes and get post ID
     20  foreach ($matches as $shortcode) {
     21    if ($tag === $shortcode[2]) {
     22      $atts = shortcode_parse_atts($shortcode[3]);
     23      $ids[] = $atts['id'];
     24    } elseif (!empty($shortcode[5]) && has_shortcode($shortcode[5], $tag)) {
     25      // nested shortcodes
     26      $shortcode = $this->parse_shortcode_id($shortcode[5]);
     27    }
     28  }
     29  // Return all the post IDs
     30  if (isset($ids)) {
     31    //return $ids;
     32  }
     33
     34  if (isset($ids)):
     35    foreach ($ids as $id):
     36      $tabs_section_bg = get_post_meta ($id, 'tabs_section_bg', true);
     37      $tab_font_color = get_post_meta ($id, 'tab_font_color', true);
     38      $tab_bg_color = get_post_meta ($id, 'tab_bg_color', true);
     39      $tab_border_color = get_post_meta( $id, 'tab_border_color', true);
     40      $tab_current_font_color = get_post_meta ($id, 'tab_current_font_color', true);
     41      $tab_current_bg_color = get_post_meta ($id, 'tab_current_bg_color', true);
     42      $tab_current_border_color = get_post_meta ($id, 'tab_current_border_color', true);
     43    endforeach;
     44  endif;
     45
     46  $html  = '';
     47  $html .= '<style type="text/css">';
     48  $html .= '.tabs-container { background-color: '. $tabs_section_bg .' }';
     49  $html .= '.tabs-container nav ul li a span { color: '. $tab_font_color .' }';
     50  $html .= '.tabs-container nav ul li { background-color: '. $tab_bg_color .'; }';
     51  $html .= '.tabs-container .tabs nav ul li { border: 1px solid '. $tab_border_color .'; border-bottom: 0 }';
     52  $html .= '.tabs-container .tabs nav ul li.tab-current a span { color: '. $tab_current_font_color .' }';
     53  $html .= '.tabs-container .tabs nav ul li.tab-current { background-color: '. $tab_current_bg_color .' }';
     54  $html .= '.tabs-container .tabs nav ul li.tab-current { border: 1px solid '. $tab_current_border_color .'; border-bottom: 0 }';
     55  $html .= '</style>';
     56
     57  echo $html;
     58
     59 ?>
  • wp-studio-tabs/trunk/css/styles-admin-sortables.css

    r2242091 r2261175  
    242242  line-height: 14px;
    243243  box-sizing: border-box;
    244 }
     244  padding: 12px 12px 0 8px;
     245}
  • wp-studio-tabs/trunk/css/styles-admin-tabsets.css

    r2242091 r2261175  
    1010
    1111#wpstudio__tabs_metabox #wpst-tab-group .wpst-tabs-list-wrap > .inside {
    12   margin: 0;
     12  background: #f5f5f5;
     13}
     14
     15#wpstudio__tabs_metabox #wp-simple-tabs-nav .form-table th {
     16  width: 240px
     17}
     18
     19#wpstudio__tabs_metabox #wpst-tab-group .wpst-tabs-list-wrap > .inside {
     20  margin: 0;
     21}
     22
     23#wpstudio__tabs_metabox #wpst-tab-group .wpst-tabs-list-wrap > .inside .wpst-table-head {
     24  background: #fff;
    1325}
    1426
     
    325337} /* End max-width: 799px */
    326338
    327 
    328 
    329 
    330 
    331 
    332 
    333 
    334 
    335 
    336 
    337 
    338 
    339 
    340 
    341 
    342 
     339@media (min-width: 1366px) {
     340  #wpstudio__tabs_metabox #wp-simple-tabs-nav .form-table {
     341    width: 100%
     342  }
     343}
     344
     345@media (min-width: 1600px) {
     346  #wpstudio__tabs_metabox #wp-simple-tabs-nav .form-table {
     347    width: 75%
     348  }
     349}
     350
     351@media (min-width: 1920px) {
     352  #wpstudio__tabs_metabox #wp-simple-tabs-nav .form-table {
     353    width: 50%
     354  }
     355}
     356
     357
     358
     359
     360
     361
     362
     363
     364
     365
     366
     367
     368
     369
     370
     371
     372
  • wp-studio-tabs/trunk/includes/metabox.php

    r2242091 r2261175  
    11<?php
    22
    3 function wpstudio__tabs_metaboxes_tabs_input( $post ) {
     3function wpstudio__tabs_metaboxes_tabs_input($post) {
    44
    55  global $post;
     
    1010    <h2 class="nav-tab-wrapper current">
    1111      <a class="nav-tab nav-tab-active" href="javascript:;">Manage Tabs</a>
     12      <a class="nav-tab" href="javascript:;">Tab Settings</a>
     13     
    1214    </h2>
    1315     
    14     <?php include_once( 'manage-page.php' ); ?>
     16    <?php include_once( 'manage-page.php' ); include_once( 'settings-page.php' ); ?>
    1517
    1618  </div> <!-- #wp-simple-tabs-nav -->
     
    3436  $meta_keys = array(
    3537    'wpst_tabs_order' => '',
     38    'tabs_section_bg' => '',
     39    'tab_font_color' => '',
     40    'tab_current_font_color' => '',
     41    'tab_bg_color' => '',
     42    'tab_current_bg_color' => '',
     43    'tab_border_color' => '',
     44    'tab_current_border_color' => ''
    3645  );
    3746
  • wp-studio-tabs/trunk/readme.txt

    r2248830 r2261175  
    55Tags: tabs
    66Requires at least: 2.9
    7 Tested up to: 5.3
    8 Stable tag: 6.0.3
     7Tested up to: 5.3.2
     8Stable tag: 1.0.2
    99
    1010WP Studio Tabs allows you to create/manage simple animated tabs for your Wordpress website.
     
    2929== Changelog ==
    3030
     31= 1.0.2 =
     32
     33* Added a settings page tab: settings include Section Background Color, Tab Background Color, Active Tab Background Color, Tab Border Color, Active Tab Border Color, Tab Font Color, and Active Tab Font Color
     34
    3135= 1.0.1 =
    3236
  • wp-studio-tabs/trunk/wpstudio-tabs.php

    r2248832 r2261175  
    55 * Plugin URI:        http://wp-studio.net
    66 * Description:       WP Studio Tabs allows you to create/manage simple animated tabs for your Wordpress website.
    7  * Version:           1.0.1
    8  * Requires at least: 5.2
     7 * Version:           1.0.2
     8 * Requires at least: 2.9
    99 * Author:            WP Studio
    1010 * Author URI:        https://wp-studio.net/
     
    130130      $post_id = $atts['id'];
    131131      $tabs_section_bg = get_post_meta( $post_id, 'tabs_section_bg', true );
    132       $content_font_color = get_post_meta ($post_id, 'content_font_color', true);
     132      $tab_font_color = get_post_meta( $post_id, 'tab_font_color', true );
    133133     
    134134      ob_start(); ?>
Note: See TracChangeset for help on using the changeset viewer.