computer data units to each other. Version: 1.1.0 Author: MostafaS Author URI: https://profiles.wordpress.org/mostafas License: GPLv3 or later */ /* Copyright 2015-2016 Mostafa Ziasistani This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ //Load Text Domain function bits2bytes_load_textdomain() { load_plugin_textdomain( 'bits2bytes', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); } add_filter( 'wp_loaded', 'bits2bytes_load_textdomain' ); if ( !defined( 'B2B_Widget_PATH' ) ) define( 'B2B_Widget_PATH', plugin_dir_path( __FILE__ ) ); if ( !defined( 'B2B_Widget_BASENAME' ) ) define( 'B2B_Widget_BASENAME', plugin_basename( __FILE__ ) ); if(function_exists(plugins_url)) { define( 'B2B_PLUGIN_URL', plugins_url() ); } // use widgets_init Action hook to execute custom function add_action( 'widgets_init', 'b2b_register_widgets' ); //register our widget function b2b_register_widgets() { register_widget( 'b2b_widget' ); } //b2b_widget class class b2b_widget extends WP_Widget { //process our new widget function b2b_widget() { $widget_ops = array('classname' => 'b2b_widget', 'description' => __('Allow users convert computer data units to each other','bits2bytes') ); $this->WP_Widget('b2b_bits2bytes_widget', __('Bits2Bytes Widget','bits2bytes'), $widget_ops); } //build our widget settings form function form($instance) { $defaults = array( 'title' => __('Bits2Bytes','bits2bytes') ); $instance = wp_parse_args( (array) $instance, $defaults ); $title = strip_tags($instance['title']); ?>
:
"; echo "| ".__('bits','bits2bytes').": | ? |
| ".__('bytes','bits2bytes').": | ? |
| ".__('kilobits','bits2bytes').": | ? |
| ".__('kilobytes','bits2bytes').": | ? |
| ".__('megabits','bits2bytes').": | ? |
| ".__('megabytes','bits2bytes').": | ? |
| ".__('gigabits','bits2bytes').": | ? |
| ".__('gigabytes','bits2bytes').": | ? |
| ".__('terabits','bits2bytes').": | ? |
| ".__('terabytes','bits2bytes').": | ? |
| ".__('petabits','bits2bytes').": | ? |
| ".__('petabytes','bits2bytes').": | ? |