Skip to content

Commit

Permalink
oik-css v2.1.0 2022/11/22
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbingwide committed Nov 22, 2022
1 parent ff75846 commit 1e544a6
Show file tree
Hide file tree
Showing 6 changed files with 134 additions and 89 deletions.
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* Donate link: https://www.oik-plugins.com/oik/oik-donate/
* Tags: CSS, GeSHi, blocks, shortcodes, [bw_css], [bw_geshi], [bw_autop], [bw_background], oik, lazy, smart
* Requires at least: 5.0
* Tested up to: 6.0.1
* Tested up to: 6.1.1
* Gutenberg compatible: Yes
* Stable tag: 2.0.1
* Stable tag: 2.1.0
* License: GPLv2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -108,18 +108,17 @@ This new plugin depends on Gutenberg, the oik base plugin and oik-css.


## Upgrade Notice
# 2.0.1
Updated shared libraries and wp-scripts. Tested with WordPress 6.0.1
# 2.1.0
Update for ability to style CSS and GeSHi output in documentation

## Changelog
# 2.0.1
* Deleted: Remove redundant logic and files for oik_css_activation() #18
# 2.1.0
* Changed: Implement get_block_wrapper_attributes #16
* Changed: Adding styling of text,background and font size #16
* Changed: Updated wp-scripts
* Changed: Updated shared libraries
* Tested: With WordPress 6.0.1 and WordPress Multi Site
* Tested: With WordPress 6.1.1 and WordPress Multi Site
* Tested: With PHP 8.0
* Tested: With Gutenberg 13.8.2

* Tested: With Gutenberg 14.5.4

## Further reading
If you want to read more about the oik plugins then please visit the
Expand Down
9 changes: 9 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
== Upgrade Notice ==
= 2.0.1 =
Updated shared libraries and wp-scripts. Tested with WordPress 6.0.1

= 2.0.0 =
Upgrade to use the CSS and GeSHi blocks in the block widget editor.
Expand Down Expand Up @@ -70,6 +72,13 @@ Dependent upon the oik base plugin v2.0 (or higher)
Dependent upon the oik base plugin

== Changelog ==
= 2.0.1 =
* Deleted: Remove redundant logic and files for oik_css_activation() #18
* Changed: Updated wp-scripts
* Changed: Updated shared libraries
* Tested: With WordPress 6.0.1 and WordPress Multi Site
* Tested: With PHP 8.0
* Tested: With Gutenberg 13.8.2

= 2.0.0 =
* Changed: Refactor to use wp-scripts,[github bobbingwide oik-css issues 16]
Expand Down
59 changes: 48 additions & 11 deletions libs/class-BW-.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php // (C) Copyright BobbingWide 2017-2022
if ( !defined( "CLASS_BW__INCLUDED" ) ) {
define( "CLASS_BW__INCLUDED", "3.2.2" );
define( "CLASS_BW__INCLUDED", "3.3.1" );

/**
* More HTML output library functions
Expand Down Expand Up @@ -170,8 +170,12 @@ static function bw_textfield( $name, $len, $text, $value, $class=null, $extras=n
if ( $value === null ) {
$value = bw_array_get( $_REQUEST, $name, null );
}
$itext = itext( $name, $len, $value, $class, $extras, $args );
bw_tablerow( array( $lab, $itext ) );
$itext = itext( $name, $len, $value, $class, $extras, $args );
if ( self::is_table() ) {
bw_tablerow(array($lab, $itext));
} else {
bw_gridrow(array($lab, $itext), $class);
}
return;
}

Expand Down Expand Up @@ -207,8 +211,12 @@ static function bw_emailfield( $name, $len, $text, $value, $class=null, $extras=
if ( $value === null ) {
$value = bw_array_get( $_REQUEST, $name, null );
}
$itext = iemail( $name, $len, $value, $class, $extras );
bw_tablerow( array( $lab, $itext ) );
$itext = iemail( $name, $len, $value, $class, $extras );
if ( self::is_table() ) {
bw_tablerow(array($lab, $itext));
} else {
bw_gridrow(array($lab, $itext), $class);
}
return;
}

Expand Down Expand Up @@ -251,8 +259,13 @@ static function bw_textarea( $name, $len, $text, $value, $rows=10, $args=null )
if ( null !== $spellcheck ) {
$spellcheck = kv( "spellcheck", $spellcheck );
}
$itext = iarea( $name, $len, $value, $rows, $spellcheck );
bw_tablerow( array( $lab, $itext) );
$itext = iarea( $name, $len, $value, $rows, $spellcheck );
if ( self::is_table() ) {
bw_tablerow(array($lab, $itext));
} else {
$class = bw_array_get( $args, '#class', null );
bw_gridrow(array($lab, $itext), $class);
}
return;
}

Expand Down Expand Up @@ -317,7 +330,11 @@ static function bw_radio( $name, $text, $values, $labels, $class=null, $extras=n
$iradios .= iradio( $name, $id, $value, $class, $extra );
}
$lab = BW_::label( $name, $text );
bw_tablerow( array( $lab, $iradios ) );
if ( self::is_table() ) {
bw_tablerow(array($lab, $iradios));
} else {
bw_gridrow(array($lab, $iradios), $class);
}
}

/**
Expand All @@ -330,8 +347,13 @@ static function bw_radio( $name, $text, $values, $labels, $class=null, $extras=n
*/
static function bw_select( $name, $text, $value, $args ) {
$lab = BW_::label( $name, $text );
$iselect = iselect( $name, $value, $args );
bw_tablerow( array( $lab, $iselect ) );
$iselect = iselect( $name, $value, $args );
if ( self::is_table() ) {
bw_tablerow(array($lab, $iselect));
} else {
$class = bw_array_get( $args, '#class', null );
bw_gridrow(array($lab, $iselect), $class);
}
return;
}

Expand Down Expand Up @@ -385,7 +407,22 @@ static function br( $text=null ) {
if ( $text ) {
e( $text );
}
}
}

/*
* Determines display format.
*
* @since 3.3.0
* @return bool - true for bw_tablerow, false for bw_gridrow
*/
static function is_table() {
if ( function_exists( 'bw_is_table')) {
$is_table = bw_is_table();
} else {
$is_table = true;
}
return $is_table;
}



Expand Down
2 changes: 1 addition & 1 deletion oik-css.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: oik-css
Plugin URI: https://www.oik-plugins.com/oik-plugins/oik-css
Description: Implements CSS and GeSHi blocks for internal CSS styling and to help document source code examples
Version: 2.0.1
Version: 2.1.0
Author: bobbingwide
Author URI: https://bobbingwide.com/about-bobbing-wide
Text Domain: oik-css
Expand Down
Loading

0 comments on commit 1e544a6

Please sign in to comment.