Changeset 1529213
- Timestamp:
- 11/06/2016 05:24:55 PM (9 years ago)
- Location:
- easy-code-placement/trunk
- Files:
-
- 224 added
- 22 edited
-
___________todo.txt (added)
-
easy-code-placement.php (modified) (2 diffs)
-
inc/actions/add.php (modified) (1 diff)
-
inc/actions/alignment.php (modified) (1 diff)
-
inc/actions/delete.php (modified) (1 diff)
-
inc/actions/edit.php (modified) (1 diff)
-
inc/actions/settings.php (modified) (1 diff)
-
inc/actions/status.php (modified) (1 diff)
-
inc/css/style.css (modified) (1 diff)
-
inc/error.php (modified) (2 diffs)
-
inc/ext/uikit-2.27.1 (added)
-
inc/ext/uikit-2.27.1/css (added)
-
inc/ext/uikit-2.27.1/css/components (added)
-
inc/ext/uikit-2.27.1/css/components/accordion.almost-flat.css (added)
-
inc/ext/uikit-2.27.1/css/components/accordion.almost-flat.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/accordion.css (added)
-
inc/ext/uikit-2.27.1/css/components/accordion.gradient.css (added)
-
inc/ext/uikit-2.27.1/css/components/accordion.gradient.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/accordion.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/autocomplete.almost-flat.css (added)
-
inc/ext/uikit-2.27.1/css/components/autocomplete.almost-flat.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/autocomplete.css (added)
-
inc/ext/uikit-2.27.1/css/components/autocomplete.gradient.css (added)
-
inc/ext/uikit-2.27.1/css/components/autocomplete.gradient.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/autocomplete.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/datepicker.almost-flat.css (added)
-
inc/ext/uikit-2.27.1/css/components/datepicker.almost-flat.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/datepicker.css (added)
-
inc/ext/uikit-2.27.1/css/components/datepicker.gradient.css (added)
-
inc/ext/uikit-2.27.1/css/components/datepicker.gradient.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/datepicker.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/dotnav.almost-flat.css (added)
-
inc/ext/uikit-2.27.1/css/components/dotnav.almost-flat.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/dotnav.css (added)
-
inc/ext/uikit-2.27.1/css/components/dotnav.gradient.css (added)
-
inc/ext/uikit-2.27.1/css/components/dotnav.gradient.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/dotnav.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/form-advanced.almost-flat.css (added)
-
inc/ext/uikit-2.27.1/css/components/form-advanced.almost-flat.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/form-advanced.css (added)
-
inc/ext/uikit-2.27.1/css/components/form-advanced.gradient.css (added)
-
inc/ext/uikit-2.27.1/css/components/form-advanced.gradient.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/form-advanced.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/form-file.almost-flat.css (added)
-
inc/ext/uikit-2.27.1/css/components/form-file.almost-flat.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/form-file.css (added)
-
inc/ext/uikit-2.27.1/css/components/form-file.gradient.css (added)
-
inc/ext/uikit-2.27.1/css/components/form-file.gradient.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/form-file.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/form-password.almost-flat.css (added)
-
inc/ext/uikit-2.27.1/css/components/form-password.almost-flat.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/form-password.css (added)
-
inc/ext/uikit-2.27.1/css/components/form-password.gradient.css (added)
-
inc/ext/uikit-2.27.1/css/components/form-password.gradient.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/form-password.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/form-select.almost-flat.css (added)
-
inc/ext/uikit-2.27.1/css/components/form-select.almost-flat.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/form-select.css (added)
-
inc/ext/uikit-2.27.1/css/components/form-select.gradient.css (added)
-
inc/ext/uikit-2.27.1/css/components/form-select.gradient.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/form-select.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/htmleditor.almost-flat.css (added)
-
inc/ext/uikit-2.27.1/css/components/htmleditor.almost-flat.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/htmleditor.css (added)
-
inc/ext/uikit-2.27.1/css/components/htmleditor.gradient.css (added)
-
inc/ext/uikit-2.27.1/css/components/htmleditor.gradient.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/htmleditor.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/nestable.almost-flat.css (added)
-
inc/ext/uikit-2.27.1/css/components/nestable.almost-flat.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/nestable.css (added)
-
inc/ext/uikit-2.27.1/css/components/nestable.gradient.css (added)
-
inc/ext/uikit-2.27.1/css/components/nestable.gradient.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/nestable.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/notify.almost-flat.css (added)
-
inc/ext/uikit-2.27.1/css/components/notify.almost-flat.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/notify.css (added)
-
inc/ext/uikit-2.27.1/css/components/notify.gradient.css (added)
-
inc/ext/uikit-2.27.1/css/components/notify.gradient.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/notify.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/placeholder.almost-flat.css (added)
-
inc/ext/uikit-2.27.1/css/components/placeholder.almost-flat.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/placeholder.css (added)
-
inc/ext/uikit-2.27.1/css/components/placeholder.gradient.css (added)
-
inc/ext/uikit-2.27.1/css/components/placeholder.gradient.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/placeholder.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/progress.almost-flat.css (added)
-
inc/ext/uikit-2.27.1/css/components/progress.almost-flat.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/progress.css (added)
-
inc/ext/uikit-2.27.1/css/components/progress.gradient.css (added)
-
inc/ext/uikit-2.27.1/css/components/progress.gradient.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/progress.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/search.almost-flat.css (added)
-
inc/ext/uikit-2.27.1/css/components/search.almost-flat.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/search.css (added)
-
inc/ext/uikit-2.27.1/css/components/search.gradient.css (added)
-
inc/ext/uikit-2.27.1/css/components/search.gradient.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/search.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/slidenav.almost-flat.css (added)
-
inc/ext/uikit-2.27.1/css/components/slidenav.almost-flat.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/slidenav.css (added)
-
inc/ext/uikit-2.27.1/css/components/slidenav.gradient.css (added)
-
inc/ext/uikit-2.27.1/css/components/slidenav.gradient.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/slidenav.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/slider.almost-flat.css (added)
-
inc/ext/uikit-2.27.1/css/components/slider.almost-flat.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/slider.css (added)
-
inc/ext/uikit-2.27.1/css/components/slider.gradient.css (added)
-
inc/ext/uikit-2.27.1/css/components/slider.gradient.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/slider.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/slideshow.almost-flat.css (added)
-
inc/ext/uikit-2.27.1/css/components/slideshow.almost-flat.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/slideshow.css (added)
-
inc/ext/uikit-2.27.1/css/components/slideshow.gradient.css (added)
-
inc/ext/uikit-2.27.1/css/components/slideshow.gradient.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/slideshow.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/sortable.almost-flat.css (added)
-
inc/ext/uikit-2.27.1/css/components/sortable.almost-flat.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/sortable.css (added)
-
inc/ext/uikit-2.27.1/css/components/sortable.gradient.css (added)
-
inc/ext/uikit-2.27.1/css/components/sortable.gradient.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/sortable.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/sticky.almost-flat.css (added)
-
inc/ext/uikit-2.27.1/css/components/sticky.almost-flat.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/sticky.css (added)
-
inc/ext/uikit-2.27.1/css/components/sticky.gradient.css (added)
-
inc/ext/uikit-2.27.1/css/components/sticky.gradient.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/sticky.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/tooltip.almost-flat.css (added)
-
inc/ext/uikit-2.27.1/css/components/tooltip.almost-flat.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/tooltip.css (added)
-
inc/ext/uikit-2.27.1/css/components/tooltip.gradient.css (added)
-
inc/ext/uikit-2.27.1/css/components/tooltip.gradient.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/tooltip.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/upload.almost-flat.css (added)
-
inc/ext/uikit-2.27.1/css/components/upload.almost-flat.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/upload.css (added)
-
inc/ext/uikit-2.27.1/css/components/upload.gradient.css (added)
-
inc/ext/uikit-2.27.1/css/components/upload.gradient.min.css (added)
-
inc/ext/uikit-2.27.1/css/components/upload.min.css (added)
-
inc/ext/uikit-2.27.1/css/uikit.almost-flat.css (added)
-
inc/ext/uikit-2.27.1/css/uikit.almost-flat.min.css (added)
-
inc/ext/uikit-2.27.1/css/uikit.css (added)
-
inc/ext/uikit-2.27.1/css/uikit.gradient.css (added)
-
inc/ext/uikit-2.27.1/css/uikit.gradient.min.css (added)
-
inc/ext/uikit-2.27.1/css/uikit.min.css (added)
-
inc/ext/uikit-2.27.1/fonts (added)
-
inc/ext/uikit-2.27.1/fonts/FontAwesome.otf (added)
-
inc/ext/uikit-2.27.1/fonts/fontawesome-webfont.ttf (added)
-
inc/ext/uikit-2.27.1/fonts/fontawesome-webfont.woff (added)
-
inc/ext/uikit-2.27.1/fonts/fontawesome-webfont.woff2 (added)
-
inc/ext/uikit-2.27.1/js (added)
-
inc/ext/uikit-2.27.1/js/components (added)
-
inc/ext/uikit-2.27.1/js/components/accordion.js (added)
-
inc/ext/uikit-2.27.1/js/components/accordion.min.js (added)
-
inc/ext/uikit-2.27.1/js/components/autocomplete.js (added)
-
inc/ext/uikit-2.27.1/js/components/autocomplete.min.js (added)
-
inc/ext/uikit-2.27.1/js/components/datepicker.js (added)
-
inc/ext/uikit-2.27.1/js/components/datepicker.min.js (added)
-
inc/ext/uikit-2.27.1/js/components/form-password.js (added)
-
inc/ext/uikit-2.27.1/js/components/form-password.min.js (added)
-
inc/ext/uikit-2.27.1/js/components/form-select.js (added)
-
inc/ext/uikit-2.27.1/js/components/form-select.min.js (added)
-
inc/ext/uikit-2.27.1/js/components/grid-parallax.js (added)
-
inc/ext/uikit-2.27.1/js/components/grid-parallax.min.js (added)
-
inc/ext/uikit-2.27.1/js/components/grid.js (added)
-
inc/ext/uikit-2.27.1/js/components/grid.min.js (added)
-
inc/ext/uikit-2.27.1/js/components/htmleditor.js (added)
-
inc/ext/uikit-2.27.1/js/components/htmleditor.min.js (added)
-
inc/ext/uikit-2.27.1/js/components/lightbox.js (added)
-
inc/ext/uikit-2.27.1/js/components/lightbox.min.js (added)
-
inc/ext/uikit-2.27.1/js/components/nestable.js (added)
-
inc/ext/uikit-2.27.1/js/components/nestable.min.js (added)
-
inc/ext/uikit-2.27.1/js/components/notify.js (added)
-
inc/ext/uikit-2.27.1/js/components/notify.min.js (added)
-
inc/ext/uikit-2.27.1/js/components/pagination.js (added)
-
inc/ext/uikit-2.27.1/js/components/pagination.min.js (added)
-
inc/ext/uikit-2.27.1/js/components/parallax.js (added)
-
inc/ext/uikit-2.27.1/js/components/parallax.min.js (added)
-
inc/ext/uikit-2.27.1/js/components/search.js (added)
-
inc/ext/uikit-2.27.1/js/components/search.min.js (added)
-
inc/ext/uikit-2.27.1/js/components/slider.js (added)
-
inc/ext/uikit-2.27.1/js/components/slider.min.js (added)
-
inc/ext/uikit-2.27.1/js/components/slideset.js (added)
-
inc/ext/uikit-2.27.1/js/components/slideset.min.js (added)
-
inc/ext/uikit-2.27.1/js/components/slideshow-fx.js (added)
-
inc/ext/uikit-2.27.1/js/components/slideshow-fx.min.js (added)
-
inc/ext/uikit-2.27.1/js/components/slideshow.js (added)
-
inc/ext/uikit-2.27.1/js/components/slideshow.min.js (added)
-
inc/ext/uikit-2.27.1/js/components/sortable.js (added)
-
inc/ext/uikit-2.27.1/js/components/sortable.min.js (added)
-
inc/ext/uikit-2.27.1/js/components/sticky.js (added)
-
inc/ext/uikit-2.27.1/js/components/sticky.min.js (added)
-
inc/ext/uikit-2.27.1/js/components/timepicker.js (added)
-
inc/ext/uikit-2.27.1/js/components/timepicker.min.js (added)
-
inc/ext/uikit-2.27.1/js/components/tooltip.js (added)
-
inc/ext/uikit-2.27.1/js/components/tooltip.min.js (added)
-
inc/ext/uikit-2.27.1/js/components/upload.js (added)
-
inc/ext/uikit-2.27.1/js/components/upload.min.js (added)
-
inc/ext/uikit-2.27.1/js/core (added)
-
inc/ext/uikit-2.27.1/js/core/alert.js (added)
-
inc/ext/uikit-2.27.1/js/core/alert.min.js (added)
-
inc/ext/uikit-2.27.1/js/core/button.js (added)
-
inc/ext/uikit-2.27.1/js/core/button.min.js (added)
-
inc/ext/uikit-2.27.1/js/core/core.js (added)
-
inc/ext/uikit-2.27.1/js/core/core.min.js (added)
-
inc/ext/uikit-2.27.1/js/core/cover.js (added)
-
inc/ext/uikit-2.27.1/js/core/cover.min.js (added)
-
inc/ext/uikit-2.27.1/js/core/dropdown.js (added)
-
inc/ext/uikit-2.27.1/js/core/dropdown.min.js (added)
-
inc/ext/uikit-2.27.1/js/core/grid.js (added)
-
inc/ext/uikit-2.27.1/js/core/grid.min.js (added)
-
inc/ext/uikit-2.27.1/js/core/modal.js (added)
-
inc/ext/uikit-2.27.1/js/core/modal.min.js (added)
-
inc/ext/uikit-2.27.1/js/core/nav.js (added)
-
inc/ext/uikit-2.27.1/js/core/nav.min.js (added)
-
inc/ext/uikit-2.27.1/js/core/offcanvas.js (added)
-
inc/ext/uikit-2.27.1/js/core/offcanvas.min.js (added)
-
inc/ext/uikit-2.27.1/js/core/scrollspy.js (added)
-
inc/ext/uikit-2.27.1/js/core/scrollspy.min.js (added)
-
inc/ext/uikit-2.27.1/js/core/smooth-scroll.js (added)
-
inc/ext/uikit-2.27.1/js/core/smooth-scroll.min.js (added)
-
inc/ext/uikit-2.27.1/js/core/switcher.js (added)
-
inc/ext/uikit-2.27.1/js/core/switcher.min.js (added)
-
inc/ext/uikit-2.27.1/js/core/tab.js (added)
-
inc/ext/uikit-2.27.1/js/core/tab.min.js (added)
-
inc/ext/uikit-2.27.1/js/core/toggle.js (added)
-
inc/ext/uikit-2.27.1/js/core/toggle.min.js (added)
-
inc/ext/uikit-2.27.1/js/core/touch.js (added)
-
inc/ext/uikit-2.27.1/js/core/touch.min.js (added)
-
inc/ext/uikit-2.27.1/js/core/utility.js (added)
-
inc/ext/uikit-2.27.1/js/core/utility.min.js (added)
-
inc/ext/uikit-2.27.1/js/uikit.js (added)
-
inc/ext/uikit-2.27.1/js/uikit.min.js (added)
-
inc/functions.php (modified) (7 diffs)
-
inc/home.php (modified) (6 diffs)
-
inc/install.php (modified) (4 diffs)
-
inc/js/scripts.js (modified) (2 diffs)
-
inc/load.php (modified) (2 diffs)
-
inc/pages/help.php (modified) (1 diff)
-
inc/pages/settings.php (modified) (1 diff)
-
inc/pages/system.php (modified) (6 diffs)
-
inc/uninstall.php (modified) (2 diffs)
-
lang/easy-code-placement-de_DE.mo (modified) (previous)
-
lang/easy-code-placement-de_DE.po (modified) (11 diffs)
-
lang/easy-code-placement.pot (modified) (7 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
easy-code-placement/trunk/easy-code-placement.php
r1512852 r1529213 4 4 * Text Domain: easy-code-placement 5 5 * Domain Path: /lang 6 * Version: 16.1 07 * Plugin URI: http ://www.randnotizen.org/easy-code-placement/6 * Version: 16.11 7 * Plugin URI: https://www.randnotizen.org/easy-code-placement/ 8 8 * Author: Jens Herdy 9 * Author URI: http ://www.randnotizen.org/9 * Author URI: https://www.randnotizen.org/ 10 10 * Description: A great Wordpress Plugin to place ANY Code ANYWHERE you want. 11 11 * License: GPLv3 12 12 */ 13 13 14 // ************************ 15 // check for direct accesss 16 // ************************ 17 function ecp_check_access() { 18 if ( !function_exists( 'add_action' ) ) { 19 echo 'I\'s not allowed to access any file directly!'; 20 exit; 21 } 22 } 23 24 // ******************* 25 // block direct access 26 // ******************* 27 ecp_check_access(); 28 29 // ******************************************* 14 30 // quick and dirty fix for output buffer error 31 // ******************************************* 15 32 ob_start(); 16 33 34 // ********* 17 35 // standards 18 define('ECP_FILE',__FILE__); 19 define('ECP_VERSION','16.10'); 36 // ********* 37 define( 'ECP_FILE', __FILE__ ); 38 define( 'ECP_VERSION', '16.11' ); 20 39 40 // *********************** 21 41 // load functions, classes 42 // *********************** 22 43 include( dirname( __FILE__ ) . '/inc/functions.php' ); 23 44 45 // ********************************* 24 46 // set filters to replace shortcodes 47 // ********************************* 25 48 add_filter( 'the_title', 'do_shortcode', 99); 26 49 add_filter( 'the_content', 'do_shortcode', 99); … … 30 53 add_filter( 'the_tags', 'do_shortcode', 99); 31 54 55 // ************** 32 56 // load languages 33 load_plugin_textdomain('easy-code-placement', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' ); 57 // ************** 58 load_plugin_textdomain( 'easy-code-placement', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' ); 34 59 60 // *********************************** 35 61 // include install and uninstall files 62 // *********************************** 36 63 include( dirname( __FILE__ ) . '/inc/install.php' ); 37 64 include( dirname( __FILE__ ) . '/inc/uninstall.php' ); 38 65 66 // ******************* 39 67 // update if neccesary 68 // ******************* 40 69 ecp_do_update(); 41 70 71 // **************** 42 72 // add options menu 43 add_action( 'admin_menu', 'ecp_add_page'); 73 // **************** 74 add_action( 'admin_menu', 'ecp_add_page' ); 44 75 76 // ********** 45 77 // add widget 78 // ********** 46 79 add_action( 'widgets_init', 'ecp_register_widget' ); 47 80 -
easy-code-placement/trunk/inc/actions/add.php
r1512852 r1529213 1 1 <?php 2 2 3 // ******************* 4 // block direct access 5 // ******************* 6 ecp_check_access(); 7 8 // ****************** 9 // when form was sent 10 // ****************** 3 11 global $wpdb; 4 5 // when form was sent 6 if(isset($_POST) && isset($_POST['submit'])) { 12 if( isset( $_POST ) && isset( $_POST[ 'submit' ] ) ) { 7 13 8 14 // secure post data and set variables 9 $_POST = stripslashes_deep ( $_POST);10 $t_ecp_name = $_POST[ 'name'];11 $t_ecp_code = $_POST[ 'code'];12 $t_ecp_alignment = $_POST[ 'alignment'];13 $t_ecp_status = $_POST[ 'status'];15 $_POST = stripslashes_deep ( $_POST ); 16 $t_ecp_name = $_POST[ 'name' ]; 17 $t_ecp_code = $_POST[ 'code' ]; 18 $t_ecp_alignment = $_POST[ 'alignment' ]; 19 $t_ecp_status = $_POST[ 'status' ]; 14 20 15 if (strlen($t_ecp_name) > 30) { 21 if( strlen ( $t_ecp_name ) > 30 ) { 22 16 23 // when name is longer than 30 chars 17 $ecp_error = __( 'A maximum of 30 Characters is allowed', 'easy-code-placement');24 $ecp_error = __( 'A maximum of 30 Characters is allowed', 'easy-code-placement' ); 18 25 $ecp_error_page = "&load=add"; 19 26 $ecp_error_id = ""; 20 return( ecp_error($ecp_error, $ecp_error_page, $ecp_error_id));27 return( ecp_error( $ecp_error, $ecp_error_page, $ecp_error_id ) ); 21 28 } 22 29 23 if (preg_match("/[^a-zA-Z0-9\_-]/i", $t_ecp_name)) { 30 if( preg_match ( "/[^a-zA-Z0-9\_-]/i", $t_ecp_name ) ) { 31 24 32 // when name contains spechial chars 25 $ecp_error = __( 'Special Characters are not allowed in the Code Name', 'easy-code-placement');33 $ecp_error = __( 'Special Characters are not allowed in the Code Name', 'easy-code-placement' ); 26 34 $ecp_error_page = "&load=add"; 27 35 $ecp_error_id = ""; 28 return( ecp_error($ecp_error, $ecp_error_page, $ecp_error_id));36 return( ecp_error( $ecp_error, $ecp_error_page, $ecp_error_id ) ); 29 37 } 30 38 31 if ($t_ecp_name =="" || $t_ecp_code =="") { 39 if( $t_ecp_name =="" || $t_ecp_code =="" ) { 40 32 41 // when post emty goto error page 33 $ecp_error = __( 'The Code Name and / or the Code must be filled in', 'easy-code-placement');42 $ecp_error = __( 'The Code Name and / or the Code must be filled in', 'easy-code-placement' ); 34 43 $ecp_error_page = "&load=add"; 35 44 $ecp_error_id = ""; 36 return( ecp_error($ecp_error, $ecp_error_page, $ecp_error_id));45 return( ecp_error( $ecp_error, $ecp_error_page, $ecp_error_id ) ); 37 46 } 38 47 39 $ecp_count = $wpdb->get_results( "SELECT * FROM ".$wpdb->prefix."ecp_data WHERE name = '$t_ecp_name'"); 40 if ($wpdb->num_rows) { 48 $ecp_count = $wpdb->get_results ( "SELECT * FROM " . $wpdb->prefix . "ecp_data WHERE name = '$t_ecp_name'" ); 49 if( $wpdb->num_rows ) { 50 41 51 // when name in database goto error page 42 $ecp_error = __( 'The Code Name already exist - It must be uniqe', 'easy-code-placement');52 $ecp_error = __( 'The Code Name already exist - It must be uniqe', 'easy-code-placement' ); 43 53 $ecp_error_page = "&load=add"; 44 54 $ecp_error_id = ""; 45 return( ecp_error($ecp_error, $ecp_error_page, $ecp_error_id));55 return( ecp_error( $ecp_error, $ecp_error_page, $ecp_error_id ) ); 46 56 } 47 57 48 $wpdb->insert( $wpdb->prefix.'ecp_data', array('name' =>$t_ecp_name,'code'=>$t_ecp_code,'alignment'=>$t_ecp_alignment,'shortcode'=>$t_ecp_name,'status'=>$t_ecp_status,'added'=>date('Y-m-d H:i:s'),'version'=>ECP_VERSION));58 $wpdb->insert( $wpdb->prefix . 'ecp_data', array ( 'name' => $t_ecp_name, 'code' => $t_ecp_code, 'alignment' => $t_ecp_alignment, 'shortcode' => $t_ecp_name, 'status' => $t_ecp_status, 'added' => date ( 'Y-m-d H:i:s' ), 'version' => ECP_VERSION ) ); 49 59 50 60 // when added to database goto options page 51 header( 'Location: options-general.php?page=ecp');61 header( 'Location: options-general.php?page=ecp' ); 52 62 exit(); 53 63 54 64 } else { 55 // when nothing done 65 66 // ***************** 67 // when nothing done 68 // ***************** 56 69 ?> 57 70 58 71 <div class="wrap"> 59 <h2>Easy Code Placement - <?php _e('New Code','easy-code-placement'); ?></h2> 60 <br> 72 <h2>Easy Code Placement - <?php _e('New Code','easy-code-placement'); ?></h2> 61 73 62 <form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>"> 63 <table class="table borderless paddingless" style="max-width:1000px;"> 64 <tr> 65 <td> 66 <div class="form-group"> 67 <label for="name" class="control-label"><?php _e('Name','easy-code-placement'); ?>:</label> 68 <input id="name" name="name" type="text" class="form-control"> 69 <p class="help-block"> 70 <i class="fa fa-info"></i> <?php _e('Only Letters and Numbers are allowed','easy-code-placement'); ?><br> 71 <i class="fa fa-info"></i> <?php _e('Instead of Whitesspaces use Underlines','easy-code-placement'); ?><br> 72 <i class="fa fa-info"></i> <?php _e('A maximum of 30 Characters is allowed','easy-code-placement'); ?> 73 </p> 74 </div> 75 </td> 76 </tr> 77 <tr> 78 <td> 79 <div class="form-group"> 80 <label for="code" class="control-label"><?php _e('Code','easy-code-placement'); ?>:</label> 81 <textarea id="code" name="code" rows="10" class="form-control"></textarea> 82 </div> 83 </td> 84 </tr> 85 <tr> 86 <td> 87 <div class="form-group"> 88 <label for="alignment" class="control-label"><?php _e('Alignment','easy-code-placement'); ?>:</label> 89 <select id="alignment" name="alignment" class="form-control"> 90 <option value="0" checked><?php _e('None','easy-code-placement'); ?></option> 91 <option value="1"><?php _e('Left','easy-code-placement'); ?></option> 92 <option value="2"><?php _e('Center','easy-code-placement'); ?></option> 93 <option value="3"><?php _e('Right','easy-code-placement'); ?></option> 94 </select> 95 </div> 96 </td> 97 </tr> 98 <tr> 99 <td> 100 <div class="form-group"> 101 <label for="status" class="control-label"><?php _e('Status','easy-code-placement'); ?>:</label> 102 <select id="status" name="status" class="form-control"> 103 <option value="1" checked><?php _e('Online','easy-code-placement'); ?></option> 104 <option value="2"><?php _e('Offline','easy-code-placement'); ?></option> 105 </select> 106 </div> 107 </td> 108 </tr> 109 </table> 110 <button type="button" class="btn btn-default" onClick='document.location.href="<?php echo admin_url('options-general.php?page=ecp');?>"'><?php _e('Back','easy-code-placement'); ?></button> <button type="submit" name="submit" class="btn btn-primary"><?php _e('Add','easy-code-placement'); ?></button> 111 </form> 112 74 <form method="post" class="uk-margin-top" action="<?php echo $_SERVER[ "REQUEST_URI" ]; ?>"> 75 <fieldset> 76 <legend><?php _e( 'Name', 'easy-code-placement' ); ?>:</legend> 77 <input name="name" type="text" class="uk-form-width-large"> 78 <p class="help-block"> 79 <i class="uk-icon-info"></i> <?php _e( 'Only Letters and Numbers are allowed', 'easy-code-placement' ); ?><br> 80 <i class="uk-icon-info"></i> <?php _e( 'Instead of Whitesspaces use Underlines', 'easy-code-placement' ); ?><br> 81 <i class="uk-icon-info"></i> <?php _e( 'A maximum of 30 Characters is allowed', 'easy-code-placement' ); ?> 82 </p> 83 </fieldset> 84 <fieldset> 85 <legend><?php _e( 'Code', 'easy-code-placement' ); ?>:</legend> 86 <textarea name="code" rows="10" class="uk-form-width-large"></textarea> 87 </fieldset> 88 <fieldset> 89 <legend><?php _e( 'Alignment', 'easy-code-placement' ); ?>:</legend> 90 <select name="alignment" class="uk-form-width-large"> 91 <option value="0" checked><?php _e( 'None', 'easy-code-placement' ); ?></option> 92 <option value="1"><?php _e( 'Left', 'easy-code-placement' ); ?></option> 93 <option value="2"><?php _e( 'Center', 'easy-code-placement' ); ?></option> 94 <option value="3"><?php _e( 'Right', 'easy-code-placement' ); ?></option> 95 </select> 96 </fieldset> 97 <fieldset> 98 <legend><?php _e( 'Status', 'easy-code-placement' ); ?>:</legend> 99 <select name="status" class="uk-form-width-large"> 100 <option value="1" checked><?php _e( 'Online', 'easy-code-placement' ); ?></option> 101 <option value="2"><?php _e( 'Offline', 'easy-code-placement' ); ?></option> 102 </select> 103 </fieldset> 104 <button type="button" class="uk-button" onClick='document.location.href="<?php echo admin_url( 'options-general.php?page=ecp' ); ?>"'><?php _e( 'Back', 'easy-code-placement' ); ?></button> <button type="submit" name="submit" class="uk-button uk-button-primary"><?php _e( 'Add','easy-code-placement' ); ?></button> 105 </form> 106 113 107 </div> 114 108 -
easy-code-placement/trunk/inc/actions/alignment.php
r1420409 r1529213 1 1 <?php 2 3 // ******************* 4 // block direct access 5 // ******************* 6 ecp_check_access(); 2 7 3 8 global $wpdb; 4 9 5 10 // secure get data and set variables 6 $_GET = stripslashes_deep( $_GET);7 $ecp_id = $_GET[ 'ecpid'];8 $ecp_alignment = $_GET[ 'alignment'];11 $_GET = stripslashes_deep( $_GET ); 12 $ecp_id = $_GET[ 'ecpid' ]; 13 $ecp_alignment = $_GET[ 'alignment' ]; 9 14 10 if (isset($_GET['pagenum'])) {11 $t_ecp_sendpage =$_GET['pagenum'];12 $ecp_sendpage ='&pagenum='.$t_ecp_sendpage.'';15 if( isset( $_GET[ 'pagenum' ] ) ) { 16 $t_ecp_sendpage = $_GET[ 'pagenum' ]; 17 $ecp_sendpage = '&pagenum=' . $t_ecp_sendpage . ''; 13 18 } 14 19 15 if ($ecp_id=="" || !is_numeric($ecp_id)) { 20 if( $ecp_id=="" || !is_numeric( $ecp_id ) ) { 21 16 22 // when get emty or other than numbers goto error page 17 $ecp_error = __( 'Modifying of the ID is not allowed', 'easy-code-placement');23 $ecp_error = __( 'Modifying of the ID is not allowed', 'easy-code-placement' ); 18 24 $ecp_error_page = ""; 19 25 $ecp_error_id = ""; 20 return(ecp_error($ecp_error, $ecp_error_page, $ecp_error_id)); 21 } elseif ($ecp_alignment !=="0" && $ecp_alignment !=="1" && $ecp_alignment !=="2" && $ecp_alignment !=="3") { 26 return( ecp_error( $ecp_error, $ecp_error_page, $ecp_error_id ) ); 27 }elseif( $ecp_alignment !== "0" && $ecp_alignment !== "1" && $ecp_alignment !== "2" && $ecp_alignment !== "3" ) { 28 22 29 // when get emty or other than numbers goto error page 23 $ecp_error = __( 'Modifying the Alignment to something else than 0, 1, 2 or 3 is not allowed', 'easy-code-placement');30 $ecp_error = __( 'Modifying the Alignment to something else than 0, 1, 2 or 3 is not allowed', 'easy-code-placement' ); 24 31 $ecp_error_page = ""; 25 32 $ecp_error_id = ""; 26 return( ecp_error($ecp_error, $ecp_error_page, $ecp_error_id));33 return( ecp_error( $ecp_error, $ecp_error_page, $ecp_error_id ) ); 27 34 } 28 35 29 36 // change status 30 $wpdb->update( $wpdb->prefix.'ecp_data', array('alignment'=>$ecp_alignment), array('id'=>$ecp_id));37 $wpdb->update( $wpdb->prefix . 'ecp_data', array( 'alignment' => $ecp_alignment ), array( 'id' => $ecp_id ) ); 31 38 32 39 // when status changes goto options page 33 header( 'Location: options-general.php?page=ecp'.$ecp_sendpage.'');40 header( 'Location: options-general.php?page=ecp' . $ecp_sendpage . '' ); 34 41 35 42 ?> -
easy-code-placement/trunk/inc/actions/delete.php
r1335072 r1529213 1 1 <?php 2 3 // ******************* 4 // block direct access 5 // ******************* 6 ecp_check_access(); 2 7 3 8 global $wpdb; 4 9 5 10 // secure get data and set variables 6 $_GET = stripslashes_deep( $_GET);7 $ecp_id = intval( $_GET['ecpid']);11 $_GET = stripslashes_deep( $_GET ); 12 $ecp_id = intval( $_GET[ 'ecpid' ]); 8 13 9 if($ecp_id=="" || !is_numeric($ecp_id)) { 14 if( $ecp_id =="" || !is_numeric( $ecp_id ) ) { 15 10 16 // when get emty or other than numbers goto error page 11 $ecp_error = __( 'Modifying of the ID is not allowed', 'easy-code-placement');17 $ecp_error = __( 'Modifying of the ID is not allowed', 'easy-code-placement' ); 12 18 $ecp_error_page = ""; 13 19 $ecp_error_id = ""; 14 return( ecp_error($ecp_error, $ecp_error_page, $ecp_error_id));20 return( ecp_error( $ecp_error, $ecp_error_page, $ecp_error_id ) ); 15 21 } 16 22 17 23 // delete code 18 $wpdb->delete( $wpdb->prefix.'ecp_data', array('id'=>$ecp_id));24 $wpdb->delete( $wpdb->prefix . 'ecp_data', array( 'id' => $ecp_id ) ); 19 25 20 26 // when data is deleted goto options page 21 header( 'Location: options-general.php?page=ecp');27 header( 'Location: options-general.php?page=ecp' ); 22 28 23 29 ?> -
easy-code-placement/trunk/inc/actions/edit.php
r1512852 r1529213 1 1 <?php 2 3 // ******************* 4 // block direct access 5 // ******************* 6 ecp_check_access(); 2 7 3 8 global $wpdb; 4 9 5 if (isset($_GET['pagenum'])) {6 $t_ecp_sendpage =$_GET['pagenum'];7 $ecp_sendpage ='&pagenum='.$t_ecp_sendpage.'';10 if( isset( $_GET[ 'pagenum' ] ) ) { 11 $t_ecp_sendpage = $_GET[ 'pagenum' ]; 12 $ecp_sendpage = '&pagenum=' . $t_ecp_sendpage . ''; 8 13 } 9 14 15 // ****************** 10 16 // when form was sent 11 if(isset($_POST) && isset($_POST['submit'])) { 17 // ****************** 18 if( isset( $_POST ) && isset( $_POST[ 'submit' ] ) ) { 12 19 13 20 // secure post data and set variables 14 $_POST = stripslashes_deep ($_POST);15 $t_ecp_code = $_POST[ 'code'];16 $t_ecp_alignment = $_POST[ 'alignment'];17 $t_ecp_status = $_POST[ 'status'];18 $t_ecp_id = $_POST[ 'id'];21 $_POST = stripslashes_deep( $_POST ); 22 $t_ecp_code = $_POST[ 'code' ]; 23 $t_ecp_alignment = $_POST[ 'alignment' ]; 24 $t_ecp_status = $_POST[ 'status' ]; 25 $t_ecp_id = $_POST[ 'id' ]; 19 26 20 if($t_ecp_id=="" || !is_numeric($t_ecp_id)) { 27 if( $t_ecp_id=="" || !is_numeric( $t_ecp_id ) ) { 28 21 29 // when get emty or other than numbers goto error page 22 $ecp_error = __( 'Modifying of the ID is not allowed', 'easy-code-placement');30 $ecp_error = __( 'Modifying of the ID is not allowed', 'easy-code-placement' ); 23 31 $ecp_error_page = ""; 24 32 $ecp_error_id = ""; 25 return( ecp_error($ecp_error, $ecp_error_page, $ecp_error_id));33 return( ecp_error( $ecp_error, $ecp_error_page, $ecp_error_id ) ); 26 34 } 27 35 28 if ($t_ecp_code =="") { 36 if( $t_ecp_code == "" ) { 37 29 38 // when post emty goto error page 30 $ecp_error = __( 'The Code must be filled in', 'easy-code-placement');39 $ecp_error = __( 'The Code must be filled in', 'easy-code-placement' ); 31 40 $ecp_error_page = "&load=edit"; 32 41 $ecp_error_id = "&ecpid=$ecp_id"; 33 return( ecp_error($ecp_error, $ecp_error_page, $ecp_error_id));42 return( ecp_error( $ecp_error, $ecp_error_page, $ecp_error_id ) ); 34 43 } 35 44 36 $wpdb->update( $wpdb->prefix.'ecp_data', array('code'=>$t_ecp_code,'alignment'=>$t_ecp_alignment,'status'=>$t_ecp_status,'changed'=>date('Y-m-d H:i:s')), array('id'=>$t_ecp_id));45 $wpdb->update( $wpdb->prefix . 'ecp_data', array( 'code' => $t_ecp_code, 'alignment' => $t_ecp_alignment, 'status' => $t_ecp_status, 'changed' => date( 'Y-m-d H:i:s' ) ), array( 'id' => $t_ecp_id ) ); 37 46 38 47 // when edited goto options page 39 header( 'Location: options-general.php?page=ecp'.$ecp_sendpage.'');48 header( 'Location: options-general.php?page=ecp' . $ecp_sendpage . '' ); 40 49 exit(); 41 50 42 } else { 43 // when nothing done 51 }else{ 52 53 // ***************** 54 // when nothing done 55 // ****************** 44 56 45 57 // secure get data and set variables 46 $_GET = stripslashes_deep( $_GET);47 $ecp_id = $_GET[ 'ecpid'];58 $_GET = stripslashes_deep( $_GET ); 59 $ecp_id = $_GET[ 'ecpid' ]; 48 60 49 if($ecp_id=="" || !is_numeric($ecp_id)) { 61 if( $ecp_id == "" || !is_numeric( $ecp_id ) ) { 62 50 63 // when get emty or other than numbers goto error page 51 $ecp_error = __( 'Modifying of the ID is not allowed', 'easy-code-placement');64 $ecp_error = __( 'Modifying of the ID is not allowed', 'easy-code-placement' ); 52 65 $ecp_error_page = ""; 53 66 $ecp_error_id = ""; 54 return( ecp_error($ecp_error, $ecp_error_page, $ecp_error_id));67 return( ecp_error( $ecp_error, $ecp_error_page, $ecp_error_id ) ); 55 68 } 56 69 57 $ecp_load = $wpdb->get_row( 'SELECT * FROM '.$wpdb->prefix.'ecp_data WHERE id= '.$ecp_id.'');70 $ecp_load = $wpdb->get_row( 'SELECT * FROM ' . $wpdb->prefix . 'ecp_data WHERE id= ' . $ecp_id . '' ); 58 71 ?> 59 72 60 73 <div class="wrap"> 61 <h2>Easy Code Placement - <?php _e('Edit Code','easy-code-placement'); ?></h2> 62 <br> 74 <h2>Easy Code Placement - <?php _e( 'Edit Code', 'easy-code-placement' ); ?></h2> 63 75 64 <form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>"> 65 <table class="table borderless paddingless" style="max-width:1000px;"> 66 <tr> 67 <td> 68 <div class="form-group"> 69 <label for="name" class="control-label"><?php _e('Name','easy-code-placement'); ?>:</label> 70 <input id="name disabledInput" name="name" type="text" class="form-control" placeholder="<?php echo ($ecp_load->name); ?>" disabled> 71 <input type="hidden" name="id" align="center" value="<?php echo ($ecp_load->id); ?>"> 72 </div> 73 </td> 74 </tr> 75 <tr> 76 <td> 77 <div class="form-group"> 78 <label for="code" class="control-label"><?php _e('Code','easy-code-placement'); ?>:</label> 79 <textarea id="code" name="code" rows="10" class="form-control"><?php echo ($ecp_load->code); ?></textarea> 80 </div> 81 </td> 82 </tr> 83 <tr> 84 <td> 85 <div class="form-group"> 86 <label for="alignment" class="control-label"><?php _e('Alignment','easy-code-placement'); ?>:</label> 87 <select id="alignment" name="alignment" class="form-control"> 88 <option value="0"<?php if ($ecp_load->alignment == "0" OR $ecp_load->alignment == "") {echo " selected";} else {echo "";}; ?>><?php _e('None','easy-code-placement'); ?></option> 89 <option value="1"<?php if ($ecp_load->alignment == "1") {echo " selected";} else {echo "";}; ?>><?php _e('Left','easy-code-placement'); ?></option> 90 <option value="2"<?php if ($ecp_load->alignment == "2") {echo " selected";} else {echo "";}; ?>><?php _e('Center','easy-code-placement'); ?></option> 91 <option value="3"<?php if ($ecp_load->alignment == "3") {echo " selected";} else {echo "";}; ?>><?php _e('Right','easy-code-placement'); ?></option> 92 </select> 93 </div> 94 </td> 95 </tr> 96 <tr> 97 <td> 98 <div class="form-group"> 99 <label for="status" class="control-label"><?php _e('Status','easy-code-placement'); ?>:</label> 100 <select id="status" name="status" class="form-control"> 101 <option value="1"<?php if ($ecp_load->status == "1") {echo " selected";} else {echo "";}; ?>><?php _e('Online','easy-code-placement'); ?></option> 102 <option value="2"<?php if ($ecp_load->status == "2") {echo " selected";} else {echo "";}; ?>><?php _e('Offline','easy-code-placement'); ?></option> 103 </select> 104 </div> 105 </td> 106 </tr> 107 </table> 108 <button type="button" class="btn btn-default" onClick='document.location.href="<?php echo admin_url('options-general.php?page=ecp'.$ecp_sendpage.'');?>"'><?php _e('Back','easy-code-placement'); ?></button> <button type="submit" name="submit" class="btn btn-primary"><?php _e('Save','easy-code-placement'); ?></button> 109 </form> 76 <form method="post" class="uk-margin-top" action="<?php echo $_SERVER[ "REQUEST_URI" ]; ?>"> 77 <fieldset> 78 <legend><?php _e( 'Name', 'easy-code-placement' ); ?>:</legend> 79 <input name="name" type="text" class="uk-form-width-large" placeholder="<?php echo ( $ecp_load->name ); ?>" disabled> 80 <input type="hidden" name="id" align="center" value="<?php echo ( $ecp_load->id ); ?>"> 81 </fieldset> 82 <fieldset> 83 <legend><?php _e( 'Code', 'easy-code-placement' ); ?>:</legend> 84 <textarea name="code" rows="10" class="uk-form-width-large"><?php echo ( $ecp_load->code ); ?></textarea> 85 </fieldset> 86 <fieldset> 87 <legend><?php _e( 'Alignment', 'easy-code-placement' ); ?>:</legend> 88 <select name="alignment" class="uk-form-width-large"> 89 <option value="0"<?php if( $ecp_load->alignment == "0" OR $ecp_load->alignment == "" ) { echo " selected"; } else {echo ""; }; ?>><?php _e( 'None', 'easy-code-placement' ); ?></option> 90 <option value="1"<?php if( $ecp_load->alignment == "1" ) { echo " selected"; } else { echo ""; }; ?>><?php _e( 'Left', 'easy-code-placement' ); ?></option> 91 <option value="2"<?php if( $ecp_load->alignment == "2" ) { echo " selected"; } else { echo ""; }; ?>><?php _e( 'Center', 'easy-code-placement' ); ?></option> 92 <option value="3"<?php if( $ecp_load->alignment == "3" ) { echo " selected"; } else { echo ""; }; ?>><?php _e( 'Right', 'easy-code-placement' ); ?></option> 93 </select> 94 </fieldset> 95 <fieldset> 96 <legend><?php _e('Status','easy-code-placement'); ?>:</legend> 97 <select name="status" class="uk-form-width-large"> 98 <option value="1"<?php if( $ecp_load->status == "1" ) { echo " selected"; } else { echo ""; }; ?>><?php _e( 'Online', 'easy-code-placement' ); ?></option> 99 <option value="2"<?php if( $ecp_load->status == "2" ) { echo " selected"; } else { echo ""; }; ?>><?php _e( 'Offline', 'easy-code-placement' ); ?></option> 100 </select> 101 </fieldset> 102 <button type="button" class="uk-button" onClick='document.location.href="<?php echo admin_url( 'options-general.php?page=ecp' . $ecp_sendpage . '' );?>"'><?php _e( 'Back', 'easy-code-placement' ); ?></button> <button type="submit" name="submit" class="uk-button uk-button-primary"><?php _e( 'Save', 'easy-code-placement' ); ?></button> 103 </form> 110 104 111 105 </div> -
easy-code-placement/trunk/inc/actions/settings.php
r1512852 r1529213 1 1 <?php 2 3 // ******************* 4 // block direct access 5 // ******************* 6 ecp_check_access(); 2 7 3 8 global $wpdb; 4 9 5 10 // secure post data and set variables 6 $_POST = stripslashes_deep ($_POST);7 $t_ecp_per_page = $_POST[ 'perpage'];8 $t_ecp_role = $_POST[ 'role'];11 $_POST = stripslashes_deep( $_POST ); 12 $t_ecp_per_page = $_POST[ 'perpage' ]; 13 $t_ecp_role = $_POST[ 'role' ]; 9 14 10 if ($t_ecp_per_page == "") { 15 if( $t_ecp_per_page == "" ) { 16 11 17 // when perpage is empty 12 $ecp_error = __( 'The Option "Codes per Page" must be filled in', 'easy-code-placement');18 $ecp_error = __( 'The Option "Codes per Page" must be filled in', 'easy-code-placement' ); 13 19 $ecp_error_page = "&load=settings"; 14 20 $ecp_error_id = ""; 15 return( ecp_error($ecp_error, $ecp_error_page, $ecp_error_id));21 return( ecp_error( $ecp_error, $ecp_error_page, $ecp_error_id ) ); 16 22 } 17 23 18 if (!is_numeric($t_ecp_per_page)) { 24 if( !is_numeric( $t_ecp_per_page ) ) { 25 19 26 // when perpage not a number 20 $ecp_error = __( 'The Value for the Option "Codes per Page" must be numeric', 'easy-code-placement');27 $ecp_error = __( 'The Value for the Option "Codes per Page" must be numeric', 'easy-code-placement' ); 21 28 $ecp_error_page = "&load=settings"; 22 29 $ecp_error_id = ""; 23 return( ecp_error($ecp_error, $ecp_error_page, $ecp_error_id));30 return( ecp_error( $ecp_error, $ecp_error_page, $ecp_error_id ) ); 24 31 } 25 32 26 $wpdb->update( $wpdb->prefix.'ecp_options', array('option_value'=>$t_ecp_per_page), array('option_name'=>'perpage'));27 $wpdb->update( $wpdb->prefix.'ecp_options', array('option_value'=>$t_ecp_role), array('option_name'=>'role'));33 $wpdb->update( $wpdb->prefix . 'ecp_options', array( 'option_value' => $t_ecp_per_page ), array( 'option_name' => 'perpage' ) ); 34 $wpdb->update( $wpdb->prefix . 'ecp_options', array( 'option_value' => $t_ecp_role ), array( 'option_name' => 'role' ) ); 28 35 29 36 // when added to database goto options page 30 header( 'Location: options-general.php?page=ecp');37 header( 'Location: options-general.php?page=ecp' ); 31 38 32 39 ?> -
easy-code-placement/trunk/inc/actions/status.php
r1420409 r1529213 1 1 <?php 2 3 // ******************* 4 // block direct access 5 // ******************* 6 ecp_check_access(); 2 7 3 8 global $wpdb; 4 9 5 10 // secure get data and set variables 6 $_GET = stripslashes_deep( $_GET);7 $ecp_id = $_GET[ 'ecpid'];8 $ecp_status = $_GET[ 'status'];11 $_GET = stripslashes_deep( $_GET ); 12 $ecp_id = $_GET[ 'ecpid' ]; 13 $ecp_status = $_GET[ 'status' ]; 9 14 10 if (isset($_GET['pagenum'])) {11 $t_ecp_sendpage =$_GET['pagenum'];12 $ecp_sendpage ='&pagenum='.$t_ecp_sendpage.'';15 if( isset( $_GET[ 'pagenum' ] ) ) { 16 $t_ecp_sendpage = $_GET[ 'pagenum' ]; 17 $ecp_sendpage = '&pagenum=' . $t_ecp_sendpage . ''; 13 18 } 14 19 15 if ($ecp_id=="" || !is_numeric($ecp_id)) { 20 if( $ecp_id=="" || !is_numeric( $ecp_id )) { 21 16 22 // when get emty or other than numbers goto error page 17 $ecp_error = __( 'Modifying of the ID is not allowed', 'easy-code-placement');23 $ecp_error = __( 'Modifying of the ID is not allowed', 'easy-code-placement' ); 18 24 $ecp_error_page = ""; 19 25 $ecp_error_id = ""; 20 return(ecp_error($ecp_error, $ecp_error_page, $ecp_error_id)); 21 } elseif ($ecp_status !=="1" && $ecp_status !=="2") { 26 return( ecp_error( $ecp_error, $ecp_error_page, $ecp_error_id ) ); 27 }elseif( $ecp_status !=="1" && $ecp_status !=="2" ) { 28 22 29 // when get emty or other than numbers goto error page 23 $ecp_error = __( 'Modifying of the Status to something else than 1 or 2 is not allowed', 'easy-code-placement');30 $ecp_error = __( 'Modifying of the Status to something else than 1 or 2 is not allowed', 'easy-code-placement' ); 24 31 $ecp_error_page = ""; 25 32 $ecp_error_id = ""; 26 return( ecp_error($ecp_error, $ecp_error_page, $ecp_error_id));33 return( ecp_error( $ecp_error, $ecp_error_page, $ecp_error_id ) ); 27 34 } 28 35 29 36 // change status 30 $wpdb->update( $wpdb->prefix.'ecp_data', array('status'=>$ecp_status), array('id'=>$ecp_id));37 $wpdb->update( $wpdb->prefix . 'ecp_data', array( 'status' => $ecp_status ), array( 'id' => $ecp_id ) ); 31 38 32 39 // when status changes goto options page 33 header( 'Location: options-general.php?page=ecp'.$ecp_sendpage.'');40 header( 'Location: options-general.php?page=ecp' . $ecp_sendpage . '' ); 34 41 35 42 ?> -
easy-code-placement/trunk/inc/css/style.css
r1512852 r1529213 1 /* Override Bootstrap Vertikel Align for Table Cells */ 2 .table tbody>tr>td{ 3 vertical-align: middle !important; 1 html { 2 background: #f1f1f1 !important; 3 background-image: -webkit-radial-gradient(100% 100%,center,#f1f1f1,#f1f1f1) !important; 4 background-image: radial-gradient(100% 100% at center,#f1f1f1,#f1f1f1) !important; 4 5 } 5 6 6 /* Override Bootstrap Design Reset with WP default */ 7 body { 8 font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif !important; 7 .wrap { 8 max-width: 1000px !important; 9 9 } 10 11 /* Override Bootstrap Table Border */12 .borderless td, .borderless th {13 border: none !important;14 }15 16 /* Override Bootstrap Table Padding */17 .paddingless td, .paddingless th {18 padding: 0px !important;19 }20 21 /* Override Bootstrap Pagination Margin */22 .pagination {23 margin: 0px 0px !important;24 }25 26 /* Center Bootstrap Modals vertically */27 .vertical-alignment-helper {28 display:table;29 height: 100%;30 width: 100%;31 }32 .vertical-align-center {33 display: table-cell;34 vertical-align: middle;35 }36 .modal-content {37 width:inherit !important;38 height:inherit !important;39 margin: 0 auto !important;40 } -
easy-code-placement/trunk/inc/error.php
r1335072 r1529213 1 <?php 2 3 // ******************* 4 // block direct access 5 // ******************* 6 ecp_check_access(); 7 8 ?> 9 1 10 <div class="wrap"> 2 <h2>Easy Code Placement <?php _e( 'Error','easy-code-placement'); ?></h2>11 <h2>Easy Code Placement <?php _e( 'Error', 'easy-code-placement' ); ?></h2> 3 12 <br> 4 13 5 14 <table width="100%" border="0" cellspacing="0" cellpadding="6"> 6 15 <tr> 7 <td><h3><font color="#FF0000"><?php _e( 'Error','easy-code-placement'); ?>!</font></h3></td>16 <td><h3><font color="#FF0000"><?php _e( 'Error', 'easy-code-placement' ); ?>!</font></h3></td> 8 17 </tr> 9 18 <tr> … … 11 20 </tr> 12 21 </table> 13 <br><input type="button" class="button-secondary" value="<?php _e( 'Back','easy-code-placement'); ?>" onClick='document.location.href="<?php echo admin_url("options-general.php?page=ecp$ecp_error_page$ecp_error_id");?>"'>22 <br><input type="button" class="button-secondary" value="<?php _e( 'Back', 'easy-code-placement' ); ?>" onClick='document.location.href="<?php echo admin_url( "options-general.php?page=ecp$ecp_error_page$ecp_error_id" ); ?>"'> 14 23 15 24 </div> -
easy-code-placement/trunk/inc/functions.php
r1512852 r1529213 1 1 <?php 2 2 3 // ******************* 4 // block direct access 5 // ******************* 6 ecp_check_access(); 7 8 // *********************** 3 9 // check if role >= option 10 // *********************** 4 11 function ecp_check_role() { 5 12 global $wpdb; 6 $ecp_role = $wpdb->get_var("SELECT option_value FROM ".$wpdb->prefix."ecp_options WHERE option_name = 'role'" ); 7 if (!current_user_can($ecp_role)) { 8 wp_die("<h2>" . __('You don´t have the Permissions to access this Page. Please contact the Administrator.','easy-code-placement') . "</h2>"); 9 } 10 } 11 13 $ecp_role = $wpdb->get_var( "SELECT option_value FROM " . $wpdb->prefix . "ecp_options WHERE option_name = 'role'" ); 14 if( !current_user_can( $ecp_role ) ) { 15 wp_die( "<h2>" . __( 'You don´t have the Permissions to access this Page. Please contact the Administrator.', 'easy-code-placement' ) . "</h2>" ); 16 } 17 } 18 19 // **************************************** 12 20 // generate options menu if user is allowed 21 // **************************************** 13 22 function ecp_add_page() { 14 23 global $wpdb; 15 24 global $ecp_settings_page; 16 $ecp_role = $wpdb->get_var("SELECT option_value FROM ".$wpdb->prefix."ecp_options WHERE option_name = 'role'" ); 17 $ecp_settings_page = add_options_page( __('Easy Code Placement', 'my-domain'), __('Easy Code Placement', 'my-domain'), $ecp_role, 'ecp', 'ecp' ); 18 } 19 25 $ecp_role = $wpdb->get_var( "SELECT option_value FROM " . $wpdb->prefix . "ecp_options WHERE option_name = 'role'" ); 26 $ecp_settings_page = add_options_page( __( 'Easy Code Placement', 'easy-code-placement' ), __( 'Easy Code Placement', 'easy-code-placement' ), $ecp_role, 'ecp', 'ecp' ); 27 } 28 29 // ******************* 20 30 // add options to menu 31 // ******************* 21 32 function ecp() { 22 include ( dirname( __FILE__ ) . '/load.php' ); 23 } 24 33 include( dirname( __FILE__ ) . '/load.php' ); 34 } 35 36 // ********** 25 37 // show error 26 function ecp_error($ecp_error, $ecp_error_page, $ecp_error_id) { 27 include ( dirname( __FILE__ ) . '/error.php' ); 28 } 29 38 // ********** 39 function ecp_error( $ecp_error, $ecp_error_page, $ecp_error_id ) { 40 include( dirname( __FILE__ ) . '/error.php' ); 41 } 42 43 // *************************** 30 44 // replace shortcode with code 31 add_shortcode('ecp','ecp_replace'); 32 function ecp_replace($ecp_code){ 45 // *************************** 46 add_shortcode( 'ecp', 'ecp_replace' ); 47 function ecp_replace( $ecp_code ) { 33 48 global $wpdb; 34 $query = $wpdb->get_results($wpdb->prepare( "SELECT * FROM ".$wpdb->prefix."ecp_data WHERE name=%s" ,$ecp_code)); 35 if(count($query)>0){ 36 foreach ($query as $code_load){ 49 $query = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM " . $wpdb->prefix . "ecp_data WHERE name=%s" ,$ecp_code ) ); 50 if( count( $query ) >0 ){ 51 foreach( $query as $code_load ) { 52 37 53 // when status is activ 38 if($code_load->status === '1') { 54 if( $code_load->status === '1' ) { 55 39 56 // allow php code 40 if (strpos($code_load->code, '<' . '?') !== false) {57 if( strpos( $code_load->code, '<' . '?' ) !== false ) { 41 58 ob_start(); 42 eval( '?' . '>' . $code_load->code);59 eval( '?' . '>' . $code_load->code ); 43 60 $code_load->code = ob_get_contents(); 44 61 ob_end_clean(); 45 } 62 } 63 46 64 // set alignment 47 if ($code_load->alignment === '0' OR $code_load->alignment === '') {65 if( $code_load->alignment === '0' OR $code_load->alignment === '' ) { 48 66 $ecp_output = $code_load->code; 49 } elseif ($code_load->alignment === '1') {67 }elseif( $code_load->alignment === '1' ) { 50 68 $ecp_output = "<p align='left'>" . $code_load->code . "</p>"; 51 } elseif ($code_load->alignment === '2') {69 }elseif( $code_load->alignment === '2' ) { 52 70 $ecp_output = "<p align='center'>" . $code_load->code . "</p>"; 53 } elseif ($code_load->alignment === '3') {71 }elseif( $code_load->alignment === '3' ) { 54 72 $ecp_output = "<p align='right'>" . $code_load->code . "</p>"; 55 73 } 56 74 return $ecp_output; 75 57 76 // when status is deactive 58 } else{77 }else{ 59 78 return ''; 60 79 } 61 80 } 62 81 }else{ 82 63 83 // when shortcode not found 64 84 return ''; … … 67 87 } 68 88 69 // update to 16.10 89 // *************** 90 // update to 16.11 91 // *************** 70 92 function ecp_update(){ 93 71 94 // multiside update 72 if (is_multisite()) {95 if( is_multisite() ) { 73 96 global $wpdb; 74 97 $blog = $wpdb->blogid; 75 $blogids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs"); 76 foreach ($blogids as $blogid) { 77 switch_to_blog($blogid); 98 $blogids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs" ); 99 foreach( $blogids as $blogid ) { 100 switch_to_blog( $blogid ); 101 78 102 // if not updated yet to 3.2.1 still regenerate missing tables in multisite 79 103 ecp_install(); 80 $wpdb->query("UPDATE ".$wpdb->prefix."ecp_data SET version='16.10'"); 81 $wpdb->update($wpdb->prefix.'ecp_options', array( 'option_value' => '16.10' ), array( 'option_name' => 'version' )); 82 } 83 switch_to_blog($blog); 84 } else { 104 $wpdb->query( "UPDATE " . $wpdb->prefix . "ecp_data SET version='16.11'" ); 105 $wpdb->update( $wpdb->prefix . 'ecp_options', array( 'option_value' => '16.11' ), array( 'option_name' => 'version' ) ); 106 } 107 switch_to_blog( $blog ); 108 }else{ 109 85 110 // single update 86 111 global $wpdb; 87 $wpdb->query("UPDATE ".$wpdb->prefix."ecp_data SET version='16.10'"); 88 $wpdb->update($wpdb->prefix.'ecp_options', array( 'option_value' => '16.10' ), array( 'option_name' => 'version' )); 89 } 90 } 91 112 $wpdb->query( "UPDATE " . $wpdb->prefix . "ecp_data SET version='16.11'" ); 113 $wpdb->update( $wpdb->prefix . 'ecp_options', array( 'option_value' => '16.11' ), array( 'option_name' => 'version' ) ); 114 } 115 } 116 117 // *************** 92 118 // update function 119 // *************** 93 120 function ecp_do_update(){ 94 121 global $wpdb; 95 $ecp_options_version = $wpdb->get_var("SELECT option_value FROM ".$wpdb->prefix."ecp_options WHERE option_name = 'version'" ); 122 $ecp_options_version = $wpdb->get_var( "SELECT option_value FROM " . $wpdb->prefix . "ecp_options WHERE option_name = 'version'" ); 123 96 124 // check if user is admin 97 if (! is_admin()) {125 if( !is_admin() ) { 98 126 return; 127 99 128 // check if we use the current version 100 } elseif ($ecp_options_version === '16.10') {129 }elseif( $ecp_options_version === '16.11' ) { 101 130 return; 131 102 132 // if user is admin and we have an old version do the update 103 } else{133 }else{ 104 134 ecp_update(); 105 135 return; … … 107 137 } 108 138 139 // **************** 109 140 // class for widget 141 // **************** 110 142 class ecp_widget extends WP_Widget { 143 111 144 // id, name, description 112 145 function __construct() { … … 117 150 ); 118 151 } 152 119 153 // front-end 120 public function widget($args,$instance) { 154 public function widget( $args, $instance ) { 155 global $wpdb; 156 $query = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM " . $wpdb->prefix . "ecp_data WHERE name=%s", $instance[ 'ecp_code' ] ) ); 157 121 158 // when no code selected output nothing 122 if ($instance['ecp_code'] === "nothing") {159 if( $instance[ 'ecp_code' ] === "nothing" ) { 123 160 echo ''; 161 }elseif( empty( $query ) ) { 162 echo ''; 163 124 164 // otherwise output ecp code 125 } else { 165 }else{ 166 126 167 // output border and design? 127 if ($instance['ecp_display'] != "1") { 128 if (array_key_exists('before_widget', $args)) echo $args['before_widget']; 129 } 168 if( $instance[ 'ecp_display' ] != "1" ) { 169 if( array_key_exists( 'before_widget', $args ) ) echo $args[ 'before_widget' ]; 170 } 171 130 172 // output 131 global $wpdb; 132 $ecp_output = ecp_replace($instance['ecp_code']); 173 $ecp_output = ecp_replace( $instance[ 'ecp_code' ] ); 133 174 echo $ecp_output; 175 134 176 // output border and design? 135 if ($instance['ecp_display'] != "1") { 136 if (array_key_exists('after_widget', $args)) echo $args['after_widget']; 137 } 138 } 139 } 177 if( $instance[ 'ecp_display' ] != "1" ) { 178 if( array_key_exists( 'after_widget', $args ) ) echo $args[ 'after_widget' ]; 179 } 180 } 181 } 182 140 183 // back-end 141 184 public function form($instance) { 185 142 186 // load selected options er reset all 143 if (empty($instance['ecp_code'])) {187 if( empty( $instance[ 'ecp_code' ] ) ) { 144 188 $instance['ecp_code'] = 'nothing'; 145 189 } 146 if (empty($instance['ecp_display'])) {147 $instance[ 'ecp_display'] = '0';190 if( empty( $instance[ 'ecp_display' ] ) ) { 191 $instance[ 'ecp_display' ] = '0'; 148 192 } 149 193 ?> … … 153 197 <option value="nothing" <?php selected( $instance['ecp_code'], 'nothing'); ?>><?php _e( 'Please select a Code', 'easy-code-placement' ); ?></option> 154 198 <?php 199 155 200 // get codes 156 201 global $wpdb; 157 $ecp_codes = $wpdb->get_results( "SELECT name FROM {$wpdb->prefix}ecp_data" ); 202 $ecp_codes = $wpdb->get_results( "SELECT name FROM " . $wpdb->prefix . "ecp_data" ); 203 158 204 // generate dropdown options 159 foreach( $ecp_codes as $ecp_codeitem) {160 $selected = selected( $instance[ 'ecp_code'], $ecp_codeitem->name);205 foreach( $ecp_codes as $ecp_codeitem ) { 206 $selected = selected( $instance[ 'ecp_code' ], $ecp_codeitem->name ); 161 207 echo '<option value="' . $ecp_codeitem->name . '"' . $selected . '>' . $ecp_codeitem->name . '</option>'; 162 208 } … … 165 211 </p> 166 212 <p> 167 <input class="checkbox" type="checkbox" value="1" <?php checked( '1', $instance[ 'ecp_display'] ); ?> id="<?php echo $this->get_field_id('ecp_display'); ?>" name="<?php echo $this->get_field_name('ecp_display'); ?>">168 <label for="<?php echo $this->get_field_id( 'ecp_display'); ?>"><?php _e( 'Remove Borders and Design from Widget?', 'easy-code-placement' ); ?></label>213 <input class="checkbox" type="checkbox" value="1" <?php checked( '1', $instance[ 'ecp_display' ] ); ?> id="<?php echo $this->get_field_id( 'ecp_display' ); ?>" name="<?php echo $this->get_field_name( 'ecp_display' ); ?>"> 214 <label for="<?php echo $this->get_field_id( 'ecp_display' ); ?>"><?php _e( 'Remove Borders and Design from Widget?', 'easy-code-placement' ); ?></label> 169 215 </p> 170 216 <?php … … 172 218 173 219 // save selected code in back-end 174 public function update( $new_instance, $old_instance) {220 public function update( $new_instance, $old_instance ) { 175 221 $instance = array(); 176 $instance[ 'ecp_code'] = $new_instance['ecp_code'];177 $instance[ 'ecp_display'] = $new_instance['ecp_display'];222 $instance[ 'ecp_code' ] = $new_instance[ 'ecp_code' ]; 223 $instance[ 'ecp_display' ] = $new_instance[ 'ecp_display' ]; 178 224 return $instance; 179 225 } 180 226 } 181 227 228 // *************** 182 229 // register widget 230 // *************** 183 231 function ecp_register_widget() { 184 232 register_widget( 'ecp_widget' ); 185 233 } 186 234 187 // add clipboard.js, font-awesome, bootstrap, jquery and own css and js to admin area 188 function ecp_admin_enqueue($hook) { 235 // ******************************************************** 236 // add clipboard.js, uikit and own css and js to admin area 237 // ******************************************************** 238 function ecp_admin_enqueue( $hook ) { 239 189 240 // check if on content page 190 241 global $ecp_settings_page; 191 if ( $hook != $ecp_settings_page ) {242 if( $hook != $ecp_settings_page ) { 192 243 return; 193 244 } 245 194 246 // add to wp 195 wp_enqueue_script( 'ecp_admin_jquery', plugins_url('/ext/jquery-3.1.1.min.js' , __FILE__), array(), '3.1.1', false ); 196 wp_enqueue_script( 'ecp_admin_clipboard', plugins_url('/ext/clipboard.js-1.5.12/clipboard.min.js' , __FILE__), array(), '1.5.12', false ); 197 wp_enqueue_script( 'ecp_admin_bootstrap', plugins_url('/ext/bootstrap-3.3.7/js/bootstrap.min.js' , __FILE__), array(), '3.3.7', false ); 198 wp_enqueue_script( 'ecp_admin_js', plugins_url('/js/scripts.js' , __FILE__), array(), '16.10', true ); 199 wp_enqueue_style( 'ecp_admin_css', plugins_url('/css/style.css' , __FILE__), array(), '16.10', 'all' ); 200 wp_enqueue_style( 'ecp_admin_fontawesome', plugins_url('/ext/font-awesome-4.6.3/css/font-awesome.min.css' , __FILE__), array(), '4.6.3', 'all' ); 201 wp_enqueue_style( 'ecp_admin_bootstrap', plugins_url('/ext/bootstrap-3.3.7/css/bootstrap.min.css' , __FILE__), array(), '3.3.7', 'all' ); 247 wp_enqueue_script( 'ecp_admin_uikit_js', plugins_url( '/ext/uikit-2.27.1/js/uikit.min.js' , __FILE__ ), array( 'jquery' ), '2.27.1', false ); 248 wp_enqueue_script( 'ecp_admin_uikit_accordion_js', plugins_url( '/ext/uikit-2.27.1/js/components/accordion.min.js' , __FILE__ ), array( 'jquery' ), '2.27.1', false ); 249 wp_enqueue_script( 'ecp_admin_uikit_tooltip_js', plugins_url( '/ext/uikit-2.27.1/js/components/tooltip.min.js' , __FILE__ ), array( 'jquery' ), '2.27.1', false ); 250 wp_enqueue_script( 'ecp_admin_uikit_pagination_js', plugins_url( '/ext/uikit-2.27.1/js/components/pagination.min.js' , __FILE__ ), array( 'jquery' ), '2.27.1', false ); 251 wp_enqueue_script( 'ecp_admin_clipboard', plugins_url( '/ext/clipboard.js-1.5.12/clipboard.min.js', __FILE__ ), array( 'jquery' ), '1.5.12', false ); 252 wp_enqueue_script( 'ecp_admin_js', plugins_url( '/js/scripts.js', __FILE__ ), array( 'jquery' ), '16.10', true ); 253 wp_enqueue_style( 'ecp_admin_css', plugins_url( '/css/style.css', __FILE__ ), array(), '16.10', 'all' ); 254 wp_enqueue_style( 'ecp_admin_uikit_css', plugins_url( '/ext/uikit-2.27.1/css/uikit.gradient.min.css' , __FILE__ ), array(), '2.27.1', 'all' ); 255 wp_enqueue_style( 'ecp_admin_uikit_accordion_css', plugins_url( '/ext/uikit-2.27.1/css/components/accordion.gradient.min.css' , __FILE__ ), array(), '2.27.1', 'all' ); 256 wp_enqueue_style( 'ecp_admin_uikit_tooltip_css', plugins_url( '/ext/uikit-2.27.1/css/components/tooltip.gradient.min.css' , __FILE__ ), array(), '2.27.1', 'all' ); 202 257 } 203 258 add_action( 'admin_enqueue_scripts', 'ecp_admin_enqueue' ); 204 259 260 // ********** 261 // info modal 262 // ********** 263 function ecp_info_modal( $id ) { 264 return " 265 <script> 266 jQuery('#info" . $id . "').appendTo('body'); 267 jQuery(document).on('click', '#infotrigger" . $id . "', infomodal_handler" . $id . "); 268 function infomodal_handler" . $id . "(e) 269 { 270 console.log(e); 271 var added" . $id . " = jQuery(this).data('added" . $id . "'); 272 var modified" . $id . " = jQuery(this).data('modified" . $id . "'); 273 jQuery('#info" . $id . "').on({ 274 'show.uk.modal':function(){ 275 jQuery('#added" . $id . "', jQuery(this)).text(added" . $id . "); 276 jQuery('#modified" . $id . "', jQuery(this)).text(modified" . $id . "); 277 } 278 }).trigger('show.uk.modal'); 279 } 280 </script> 281 282 <!-- Info Modal --> 283 <div class='uk-modal' id='info" . $id . "'> 284 <div class='uk-modal-dialog'> 285 <h4 style='margin-bottom:5px;'>" . __( 'Added on', 'easy-code-placement' ) . ":</h4> 286 <div id='added" . $id . "'></div><br> 287 <h4 style='margin-bottom:5px;'>" . __( 'Last Modified on', 'easy-code-placement' ) . ":</h4> 288 <div id='modified" . $id . "'></div> 289 <div class='uk-modal-footer uk-text-right'> 290 <button type='button' class='uk-button uk-modal-close'>" . __( 'Close', 'easy-code-placement' ) . "</button> 291 </div> 292 </div> 293 </div> 294 "; 295 } 296 297 // ************* 298 // confirm modal 299 // ************* 300 function ecp_confirm_modal( $id ) { 301 return " 302 <script> 303 jQuery('#confirm" . $id . "').appendTo('body'); 304 jQuery(document).on('click', '#confirmtrigger" . $id . "', confirmmodal_handler" . $id . "); 305 function confirmmodal_handler" . $id . "(e) 306 { 307 console.log(e); 308 var href" . $id . " = jQuery(this).data('href" . $id . "'); 309 jQuery('#confirm" . $id . "').on({ 310 'show.uk.modal':function(){ 311 jQuery('#confirm" . $id . " a').attr('href', href" . $id . "); 312 } 313 }).trigger('show.uk.modal'); 314 } 315 </script> 316 317 <!-- Confirm Modal --> 318 <div class='uk-modal' id='confirm" . $id . "'> 319 <div class='uk-modal-dialog'> 320 " . __( 'Are you really sure you want to permanently delete this Shortcode?', 'easy-code-placement' ) . " 321 <div class='uk-modal-footer uk-text-right'> 322 <button type='button' class='uk-button uk-modal-close'>" . __( 'No!', 'easy-code-placement' ) . "</button> 323 <a type='button' class='uk-button uk-button-danger' href='' target='_self'>" . __( 'Confirm', 'easy-code-placement' ) . "</a> 324 </div> 325 </div> 326 </div> 327 "; 328 } 329 205 330 ?> -
easy-code-placement/trunk/inc/home.php
r1512852 r1529213 1 1 <?php 2 2 3 // ******************* 4 // block direct access 5 // ******************* 6 ecp_check_access(); 7 8 // ******************************************** 3 9 // setup pagination and get codes from database 10 // ******************************************** 4 11 global $wpdb; 5 $ecp_perpage = $wpdb->get_var( "SELECT option_value FROM ".$wpdb->prefix."ecp_options WHERE option_name = 'perpage'");6 $ecp_total_rows = $wpdb->get_var( "SELECT COUNT( `id`) FROM {$wpdb->prefix}ecp_data" );7 $ecp_pagenum = isset( $_GET[ 'pagenum'] ) ? absint( $_GET['pagenum'] ) : 1;12 $ecp_perpage = $wpdb->get_var( "SELECT option_value FROM " . $wpdb->prefix . "ecp_options WHERE option_name = 'perpage'" ); 13 $ecp_total_rows = $wpdb->get_var( "SELECT COUNT( `id` ) FROM " . $wpdb->prefix . "ecp_data" ); 14 $ecp_pagenum = isset( $_GET[ 'pagenum' ] ) ? absint( $_GET[ 'pagenum' ] ) : 1; 8 15 $ecp_calc = ( $ecp_pagenum - 1 ) * $ecp_perpage; 9 $ecp_codes = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}ecp_data LIMIT $ecp_calc, $ecp_perpage" );16 $ecp_codes = $wpdb->get_results( "SELECT * FROM " . $wpdb->prefix . "ecp_data LIMIT $ecp_calc, $ecp_perpage" ); 10 17 $ecp_num_pages = ceil( $ecp_total_rows / $ecp_perpage ); 11 $ecp_sendpage = '&pagenum=' .$ecp_pagenum.'';18 $ecp_sendpage = '&pagenum=' . $ecp_pagenum. ''; 12 19 $ecp_pagination = paginate_links( array( 13 'base' => add_query_arg( 'pagenum', '%#%' ),14 'format' => '?pagenum=%#%',15 'total' => $ecp_num_pages,16 'current' => $ecp_pagenum,17 'prev_text' => __('« Previous','easy-code-placement'),18 'next_text' => __('Next »','easy-code-placement'),19 'type' => 'array'20 'base' => add_query_arg( 'pagenum', '%#%' ), 21 'format' => '?pagenum=%#%', 22 'total' => $ecp_num_pages, 23 'current' => $ecp_pagenum, 24 'prev_text' => __( '« Previous', 'easy-code-placement' ), 25 'next_text' => __( 'Next »', 'easy-code-placement' ), 26 'type' => 'array' 20 27 ) 21 28 ); … … 24 31 25 32 <!-- Table for Codes --> 26 <table class=" table table-striped table-hover table-bordered" style="max-width:1000px;margin-top:25px;">33 <table class="uk-table uk-table-hover uk-table-striped"> 27 34 <colgroup> 28 35 <col width="40%" /> … … 39 46 <tbody> 40 47 <?php 48 41 49 // if codes in database 42 if (!empty($ecp_codes)) { 50 if( !empty( $ecp_codes ) ) { 51 43 52 // output codes to display 44 foreach ( $ecp_codes as $ecp_code ) {53 foreach( $ecp_codes as $ecp_code ) { 45 54 ?> 46 55 <tr> 47 <td ><?php echo $ecp_code->name; ?></td>48 <td>< a class="clipboard btn btn-default btn-sm" style="padding:6px 12px;" data-toggle="tooltip" data-placement="right" data-clipboard-text="[ecp code="<?php echo $ecp_code->shortcode; ?>"]" href="#" title="<?php echo _e('Copy Shortcode to Clipboard','easy-code-placement'); ?>"><i class="fa fa-clipboard" style="height:14px;width:14px;"></i> <?php _e('Copy','easy-code-placement'); ?></a></td>56 <td class="uk-table-middle"><?php echo $ecp_code->name; ?></td> 57 <td><button class="clipboard uk-button" data-uk-tooltip="{pos:'right'}" data-clipboard-text="[ecp code="<?php echo $ecp_code->shortcode; ?>"]" href="#" title="<?php echo _e( 'Copy Shortcode to Clipboard', 'easy-code-placement' ); ?>"><i class="uk-icon-clipboard"></i> <?php _e( 'Copy', 'easy-code-placement' ); ?></button></td> 49 58 <td> 50 59 <?php 60 51 61 // Status 52 if ($ecp_code->status === '1') {53 ?><a class=" btn btn-default" data-toggle="tooltip" data-placement="right" href="<?php echo admin_url('options-general.php?page=ecp&load=status&ecpid='.$ecp_code->id.'&status=2'.$ecp_sendpage.''); ?>" title="<?php echo _e('Online - Click to change','easy-code-placement'); ?>"><i class="fa fa-check" style="width:14px;color:green;"></i></a> <?php54 } elseif ($ecp_code->status === '2') {55 ?><a class=" btn btn-default" data-toggle="tooltip" data-placement="right" href="<?php echo admin_url('options-general.php?page=ecp&load=status&ecpid='.$ecp_code->id.'&status=1'.$ecp_sendpage.''); ?>" title="<?php echo _e('Offline - Click to change','easy-code-placement'); ?>"><i class="fa fa-times" style="width:14px;color:red;"></i></a> <?php62 if( $ecp_code->status === '1' ) { 63 ?><a class="uk-button" data-uk-tooltip="{pos:'right'}" href="<?php echo admin_url( 'options-general.php?page=ecp&load=status&ecpid=' . $ecp_code->id . '&status=2'.$ecp_sendpage . '' ); ?>" title="<?php echo _e( 'Online - Click to change', 'easy-code-placement' ); ?>"><i class="uk-icon-check" style="width:14px;color:green;"></i></a> <?php 64 }elseif( $ecp_code->status === '2' ) { 65 ?><a class="uk-button" data-uk-tooltip="{pos:'right'}" href="<?php echo admin_url( 'options-general.php?page=ecp&load=status&ecpid=' . $ecp_code->id . '&status=1'.$ecp_sendpage . '' ); ?>" title="<?php echo _e( 'Offline - Click to change', 'easy-code-placement' ); ?>"><i class="uk-icon-times" style="width:14px;color:red;"></i></a> <?php 56 66 } 67 57 68 // Alignment 58 if ($ecp_code->alignment === '0') {59 ?><a class=" btn btn-default" data-toggle="tooltip" data-placement="right" href="<?php echo admin_url('options-general.php?page=ecp&load=alignment&ecpid='.$ecp_code->id.'&alignment=1'.$ecp_sendpage.''); ?>" title="<?php echo _e('No Alignment - Click to change','easy-code-placement'); ?>"><i class="fa fa-ban" style="width:14px;color:red;"></i></a> <?php60 } elseif ($ecp_code->alignment === '1') {61 ?><a class=" btn btn-default" data-toggle="tooltip" data-placement="right" href="<?php echo admin_url('options-general.php?page=ecp&load=alignment&ecpid='.$ecp_code->id.'&alignment=2'.$ecp_sendpage.''); ?>" title="<?php echo _e('Alignment Left - Click to change','easy-code-placement'); ?>"><i class="fa fa-align-left" style="width:14px;"></i></a> <?php62 } elseif ($ecp_code->alignment === '2') {63 ?><a class=" btn btn-default" data-toggle="tooltip" data-placement="right" href="<?php echo admin_url('options-general.php?page=ecp&load=alignment&ecpid='.$ecp_code->id.'&alignment=3'.$ecp_sendpage.''); ?>" title="<?php echo _e('Alignment Center - Click to change','easy-code-placement'); ?>"><i class="fa fa-align-center" style="width:14px;"></i></a> <?php64 } elseif ($ecp_code->alignment === '3') {65 ?><a class=" btn btn-default" data-toggle="tooltip" data-placement="right" href="<?php echo admin_url('options-general.php?page=ecp&load=alignment&ecpid='.$ecp_code->id.'&alignment=0'.$ecp_sendpage.''); ?>" title="<?php echo _e('Alignment Right - Click to change','easy-code-placement'); ?>"><i class="fa fa-align-right" style="width:14px;"></i></a> <?php69 if( $ecp_code->alignment === '0' ) { 70 ?><a class="uk-button" data-uk-tooltip="{pos:'right'}" href="<?php echo admin_url( 'options-general.php?page=ecp&load=alignment&ecpid=' . $ecp_code->id . '&alignment=1'.$ecp_sendpage . '' ); ?>" title="<?php echo _e( 'No Alignment - Click to change', 'easy-code-placement' ); ?>"><i class="uk-icon-ban" style="width:14px;color:red;"></i></a> <?php 71 }elseif ( $ecp_code->alignment === '1' ) { 72 ?><a class="uk-button" data-uk-tooltip="{pos:'right'}" href="<?php echo admin_url( 'options-general.php?page=ecp&load=alignment&ecpid=' . $ecp_code->id . '&alignment=2'.$ecp_sendpage . '' ); ?>" title="<?php echo _e( 'Alignment Left - Click to change', 'easy-code-placement' ); ?>"><i class="uk-icon-align-left"></i></a> <?php 73 }elseif ( $ecp_code->alignment === '2' ) { 74 ?><a class="uk-button" data-uk-tooltip="{pos:'right'}" href="<?php echo admin_url( 'options-general.php?page=ecp&load=alignment&ecpid=' . $ecp_code->id . '&alignment=3'.$ecp_sendpage . '' ); ?>" title="<?php echo _e( 'Alignment Center - Click to change', 'easy-code-placement' ); ?>"><i class="uk-icon-align-center"></i></a> <?php 75 }elseif ( $ecp_code->alignment === '3' ) { 76 ?><a class="uk-button" data-uk-tooltip="{pos:'right'}" href="<?php echo admin_url( 'options-general.php?page=ecp&load=alignment&ecpid=' . $ecp_code->id . '&alignment=0'.$ecp_sendpage . '' ); ?>" title="<?php echo _e( 'Alignment Right - Click to change', 'easy-code-placement' ); ?>"><i class="uk-icon-align-right"></i></a> <?php 66 77 }?> 67 78 <!-- Edit Button --> 68 <a class=" btn btn-primary" data-toggle="tooltip" data-placement="right" href="<?php echo admin_url('options-general.php?page=ecp&load=edit&ecpid='.$ecp_code->id.''.$ecp_sendpage.''); ?>" title="<?php echo _e('Edit','easy-code-placement'); ?>"><i class="fa fa-cog" style="width:14px;"></i></a> 79 <a class="uk-button uk-button-primary" data-uk-tooltip="{pos:'right'}" href="<?php echo admin_url( 'options-general.php?page=ecp&load=edit&ecpid=' . $ecp_code->id . '' . $ecp_sendpage . '' ); ?>" title="<?php echo _e('Edit','easy-code-placement'); ?>"><i class="uk-icon-cog"></i></a> 69 80 <!-- Delete Button --> 70 <button type="button" class="btn btn-danger" data-toggle="modal" data-target="#confirm" data-href="<?php echo admin_url('options-general.php?page=ecp&load=delete&ecpid='.$ecp_code->id); ?>"><i class="fa fa-trash" style="width:14px;"></i></button> 81 <button type="button" id="confirmtrigger<?php echo $ecp_code->id; ?>" class="uk-button uk-button-danger" data-uk-modal="{target:'#confirm<?php echo $ecp_code->id; ?>',center:true}" data-href<?php echo $ecp_code->id; ?>="<?php echo admin_url( 'options-general.php?page=ecp&load=delete&ecpid=' . $ecp_code->id ); ?>"><i class="uk-icon-trash"></i></button> 82 <?php echo ecp_confirm_modal( $ecp_code->id ); ?> 71 83 <!-- Button for Info Modal --> 72 <button type="button" class="btn btn-default" data-toggle="modal" data-target="#info" data-added="<?php if( strtotime($ecp_code->added) > strtotime('2000-01-01 01:00:00') ) { echo date('d.m.Y - H:i', strtotime($ecp_code->added)); } else { echo "-";} ?>" data-modified="<?php if( strtotime($ecp_code->changed) > strtotime('2000-01-01 01:00:00') ) { echo date('d.m.Y - H:i', strtotime($ecp_code->changed)); } else { echo "-";} ?>"><i class="fa fa-info" style="width:14px;"></i></button> 84 <button type="button" id="infotrigger<?php echo $ecp_code->id; ?>" class="uk-button" data-uk-modal="{target:'#info<?php echo $ecp_code->id; ?>',center:true}" data-added<?php echo $ecp_code->id; ?>="<?php if( strtotime( $ecp_code->added ) > strtotime( '2000-01-01 01:00:00' ) ) { echo date( 'd.m.Y - H:i', strtotime( $ecp_code->added ) ); } else { echo "-";} ?>" data-modified<?php echo $ecp_code->id; ?>="<?php if( strtotime( $ecp_code->changed ) > strtotime( '2000-01-01 01:00:00' ) ) { echo date( 'd.m.Y - H:i', strtotime( $ecp_code->changed ) ); } else { echo "-"; } ?>"><i class="uk-icon-info"></i></button> 85 <?php echo ecp_info_modal( $ecp_code->id ); ?> 73 86 </td> 74 87 </tr> 75 88 <?php } 89 76 90 // if the database is empty 77 } else{ ?>78 <tr><td colspan="3"><center><?php _e( 'No Code found - Click "Add New Code" to add one.','easy-code-placement'); ?></center></td></tr>91 }else{ ?> 92 <tr><td colspan="3"><center><?php _e( 'No Code found - Click "Add New Code" to add one.', 'easy-code-placement' ); ?></center></td></tr> 79 93 <?php } ?> 80 94 </tbody> … … 82 96 83 97 <!-- Pagination --> 84 <table style="width:100%; max-width:1000px;">98 <table style="width:100%;"> 85 99 <tbody> 86 100 <tr> 87 <td width="200px"><button type="button" class=" btn btn-primary" onClick='document.location.href="<?php echo admin_url('options-general.php?page=ecp&load=add');?>"'><?php _e('Add New Code','easy-code-placement'); ?></button></td>88 <td align="right">101 <td width="200px"><button type="button" class="uk-button uk-button-primary" onClick='document.location.href="<?php echo admin_url( 'options-general.php?page=ecp&load=add' );?>"'><?php _e( 'Add New Code', 'easy-code-placement' ); ?></button></td> 102 <td> 89 103 <?php 104 90 105 // output pagination 91 if (is_array($ecp_pagination)) {92 echo '<ul class=" pagination">';93 foreach ($ecp_pagination as $i => $ecp_page) {94 if ($ecp_pagenum == 1 && $i == 0) {95 echo "<li class=' active'>$ecp_page</li>";96 } else{97 if ($ecp_pagenum != 1 && $ecp_pagenum == $i) {98 echo "<li class=' active'>$ecp_page</li>";99 } else{106 if( is_array( $ecp_pagination ) ) { 107 echo '<ul class="uk-pagination uk-pagination-right">'; 108 foreach( $ecp_pagination as $i => $ecp_page ) { 109 if( $ecp_pagenum == 1 && $i == 0 ) { 110 echo "<li class='uk-active'>$ecp_page</li>"; 111 }else{ 112 if( $ecp_pagenum != 1 && $ecp_pagenum == $i ) { 113 echo "<li class='uk-active'>$ecp_page</li>"; 114 }else{ 100 115 echo "<li>$ecp_page</li>"; 101 116 } … … 110 125 111 126 <!-- PayPal Donate Button --> 112 <table style="ma x-width:1000px;margin-top:60px;">127 <table style="margin-top:60px;"> 113 128 <tbody> 114 129 <tr> … … 121 136 </form> 122 137 </td> 123 <td><?php _e( 'If you want to thank the developer for this free Plugin, you are welcome to make a donation via PayPal (you don\'t need a PayPal account to make the donation).','easy-code-placement'); ?></td>138 <td><?php _e( 'If you want to thank the developer for this free Plugin, you are welcome to make a donation via PayPal (you don\'t need a PayPal account to make the donation).', 'easy-code-placement' ); ?></td> 124 139 </tr> 125 140 </tbody> 126 141 </table> 127 128 <!-- Info Modal -->129 <div class="modal fade" id="info" tabindex="-1">130 <div class="vertical-alignment-helper">131 <div class="modal-dialog modal-sm vertical-align-center">132 <div class="modal-content">133 <div class="modal-body">134 <h4 style="margin-bottom:5px;"><?php echo _e('Added on','easy-code-placement'); ?>:</h4>135 <div id="added"></div><br>136 <h4 style="margin-bottom:5px;"><?php echo _e('Last Modified on','easy-code-placement'); ?>:</h4>137 <div id="modified"></div>138 </div>139 <div class="modal-footer">140 <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo _e('Close','easy-code-placement'); ?></button>141 </div>142 </div>143 </div>144 </div>145 </div>146 147 <!-- Confirm Modal -->148 <div class="modal fade" id="confirm" tabindex="-1">149 <div class="vertical-alignment-helper">150 <div class="modal-dialog modal-sm vertical-align-center">151 <div class="modal-content">152 <div class="modal-body">153 <?php echo _e('Are you really sure you want to permanently delete this Shortcode?','easy-code-placement'); ?>154 </div>155 <div class="modal-footer">156 <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo _e('No!','easy-code-placement'); ?></button>157 <a type="button" class="btn btn-danger" href="" target="_self"><?php echo _e('Confirm','easy-code-placement'); ?></a>158 </div>159 </div>160 </div>161 </div>162 </div> -
easy-code-placement/trunk/inc/install.php
r1506547 r1529213 1 1 <?php 2 2 3 // ******************* 4 // block direct access 5 // ******************* 6 ecp_check_access(); 7 8 // **************** 3 9 // install function 10 // **************** 4 11 function ecp_install(){ 5 12 global $wpdb; 13 6 14 // create data table 7 $ecp_table = "CREATE TABLE IF NOT EXISTS " .$wpdb->prefix."ecp_data (15 $ecp_table = "CREATE TABLE IF NOT EXISTS " . $wpdb->prefix . "ecp_data ( 8 16 `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, 9 17 `name` varchar(35) COLLATE utf8_unicode_ci NOT NULL, … … 16 24 `version` varchar(10) COLLATE utf8_unicode_ci NOT NULL 17 25 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1"; 18 $wpdb->query($ecp_table); 26 $wpdb->query( $ecp_table ); 27 19 28 // create options table 20 $ecp_options = "CREATE TABLE IF NOT EXISTS " .$wpdb->prefix."ecp_options (29 $ecp_options = "CREATE TABLE IF NOT EXISTS " . $wpdb->prefix . "ecp_options ( 21 30 `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, 22 31 `option_name` varchar(10) COLLATE utf8_unicode_ci NOT NULL UNIQUE, 23 32 `option_value` varchar(20) COLLATE utf8_unicode_ci NOT NULL 24 33 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1"; 25 $wpdb->query($ecp_options); 34 $wpdb->query( $ecp_options ); 35 26 36 // insert data (ignore for updates) 27 $wpdb->query( "INSERT IGNORE INTO ".$wpdb->prefix."ecp_options (option_name,option_value) VALUES ('version','".ECP_VERSION."')");28 $wpdb->query( "INSERT IGNORE INTO ".$wpdb->prefix."ecp_options (option_name,option_value) VALUES ('perpage','10')");29 $wpdb->query( "INSERT IGNORE INTO ".$wpdb->prefix."ecp_options (option_name,option_value) VALUES ('role','manage_options')");37 $wpdb->query( "INSERT IGNORE INTO " . $wpdb->prefix . "ecp_options ( option_name, option_value ) VALUES ( 'version', '" . ECP_VERSION . "' )" ); 38 $wpdb->query( "INSERT IGNORE INTO " . $wpdb->prefix . "ecp_options ( option_name, option_value ) VALUES ( 'perpage', '10' )" ); 39 $wpdb->query( "INSERT IGNORE INTO " . $wpdb->prefix . "ecp_options ( option_name, option_value ) VALUES ( 'role', 'manage_options' )" ); 30 40 } 31 41 42 // ********************************* 32 43 // multiside or single installation? 33 function ecp_net_inst($networkwide) { 44 // ********************************* 45 function ecp_net_inst( $networkwide ) { 34 46 global $wpdb; 47 35 48 // multiside installation 36 if (is_multisite() && $networkwide) {49 if( is_multisite() && $networkwide ) { 37 50 $blog = $wpdb->blogid; 38 $blogids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs");39 foreach ( $blogids as $blogid) {40 switch_to_blog( $blogid);51 $blogids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs" ); 52 foreach ( $blogids as $blogid ) { 53 switch_to_blog( $blogid ); 41 54 ecp_install(); 42 55 } 43 switch_to_blog($blog); 44 } else { 56 switch_to_blog( $blog ); 57 }else{ 58 45 59 // single installation 46 60 ecp_install(); … … 49 63 50 64 // register install hook 51 register_activation_hook ( ECP_FILE, 'ecp_net_inst' );65 register_activation_hook( ECP_FILE, 'ecp_net_inst' ); 52 66 67 // **************************************************** 53 68 // add tables and data in it when a new blog is created 54 function ecp_new_blog($blog_id) { 55 if ( is_plugin_active_for_network( 'easy-code-placement/easy-code-placement.php' ) ) { 56 switch_to_blog($blog_id); 69 // **************************************************** 70 function ecp_new_blog( $blog_id ) { 71 if( is_plugin_active_for_network( 'easy-code-placement/easy-code-placement.php' ) ) { 72 switch_to_blog( $blog_id ); 57 73 ecp_install(); 58 74 restore_current_blog(); … … 61 77 62 78 // tell wordpress what to do when adding a new blog 63 add_action ( 'wpmu_new_blog', 'ecp_new_blog', 99 );79 add_action( 'wpmu_new_blog', 'ecp_new_blog', 99 ); 64 80 65 81 ?> -
easy-code-placement/trunk/inc/js/scripts.js
r1512852 r1529213 1 // Tooltip 2 $(document).ready(function(){ 3 $('[data-toggle="tooltip"]').tooltip(); 4 }); 5 1 // ********* 6 2 // Clipboard 3 // ********* 7 4 var clipboard = new Clipboard('.clipboard'); 8 5 clipboard.on('success', function(e) { … … 12 9 console.log(e); 13 10 }); 14 15 // Info Modal16 $('#info').appendTo("body");17 $(document).ready(function () {18 $('#info').on('show.bs.modal', function (event) {19 var button = $(event.relatedTarget);20 var added = button.data('added');21 var modified = button.data('modified');22 var modal = $(this);23 modal.find('.modal-body #added').text(added);24 modal.find('.modal-body #modified').text(modified);25 });26 });27 28 // Confirm Modal29 $('#confirm').appendTo("body");30 $(document).ready(function () {31 $('#confirm').on('show.bs.modal', function (event) {32 var button = $(event.relatedTarget);33 var href = button.data('href');34 var modal = $(this);35 $("#confirm a").attr("href", href);36 });37 }); -
easy-code-placement/trunk/inc/load.php
r1512852 r1529213 1 1 <?php 2 2 3 // ******************* 4 // block direct access 5 // ******************* 6 ecp_check_access(); 7 8 // ****************** 3 9 // when get data load 4 if (isset($_GET['load']) && !empty($_GET['load']) ) { 5 switch($_GET['load']) { 10 // ****************** 11 if( isset( $_GET[ 'load' ] ) && !empty( $_GET[ 'load' ] ) ) { 12 switch( $_GET[ 'load' ] ) { 13 6 14 // when delete load 7 15 case "delete": 8 16 include ( dirname( __FILE__ ) . '/actions/delete.php' ); 9 17 break; 18 10 19 // when edit load 11 20 case "edit": 12 21 include ( dirname( __FILE__ ) . '/actions/edit.php' ); 13 22 break; 23 14 24 // when add load 15 25 case "add": 16 26 include ( dirname( __FILE__ ) . '/actions/add.php' ); 17 27 break; 28 18 29 // when status load 19 30 case "status": 20 31 include ( dirname( __FILE__ ) . '/actions/status.php' ); 21 32 break; 33 22 34 // when alignment load 23 35 case "alignment": 24 36 include ( dirname( __FILE__ ) . '/actions/alignment.php' ); 25 37 break; 38 26 39 // when alignment load 27 40 case "settings": … … 29 42 break; 30 43 } 31 } else { 32 ?> 33 44 }else{ 45 46 // ***************** 47 // when nothing done 48 // ***************** 49 ?> 34 50 <div class="wrap"> 35 <h2><?php _e('Easy Code Placement','easy-code-placement'); ?></h2><br> 36 <div style="max-width:1000px;"> 37 <ul class="nav nav-tabs"> 38 <li class="active"><a href="#home" data-toggle="tab"><?php _e('Home','easy-code-placement'); ?></a></li> 39 <li><a href="#settings" data-toggle="tab"><?php _e('Settings','easy-code-placement'); ?></a></li> 40 <li><a href="#help" data-toggle="tab"><?php _e('Help','easy-code-placement'); ?></a></li> 41 <li><a href="#system" data-toggle="tab"><?php _e('System Information','easy-code-placement'); ?></a></li> 51 <h2><?php _e( 'Easy Code Placement', 'easy-code-placement' ); ?></h2><br> 52 53 <!-- tab navigation --> 54 <ul class="uk-tab uk-margin-top" data-uk-tab="{connect:'#ecp-tabs'}"> 55 <li class="active"><a href=""><?php _e( 'Home', 'easy-code-placement' ); ?></a></li> 56 <li><a href=""><?php _e( 'Settings', 'easy-code-placement' ); ?></a></li> 57 <li><a href=""><?php _e( 'Help', 'easy-code-placement' ); ?></a></li> 58 <li><a href=""><?php _e( 'System Information', 'easy-code-placement' ); ?></a></li> 42 59 </ul> 43 <div class="tab-content"> 44 <div class="tab-pane active" id="home"><?php include ( dirname( __FILE__ ) . '/home.php' ); ?></div> 45 <div class="tab-pane" id="settings"><?php include ( dirname( __FILE__ ) . '/pages/settings.php' ); ?></div> 46 <div class="tab-pane" id="help"><?php include ( dirname( __FILE__ ) . '/pages/help.php' ); ?></div> 47 <div class="tab-pane" id="system"><?php include ( dirname( __FILE__ ) . '/pages/system.php' ); ?></div> 48 </div> 49 </div> 60 61 <!-- tab content general --> 62 <ul id="ecp-tabs" class="uk-switcher uk-margin"> 63 <li><?php include( dirname( __FILE__ ) . '/home.php' ); ?></li> 64 <li><?php include( dirname( __FILE__ ) . '/pages/settings.php' ); ?></li> 65 <li><?php include( dirname( __FILE__ ) . '/pages/help.php' ); ?></li> 66 <li><?php include( dirname( __FILE__ ) . '/pages/system.php' ); ?></li> 67 </ul> 68 50 69 </div> 51 70 -
easy-code-placement/trunk/inc/pages/help.php
r1512852 r1529213 1 <div class="container" style="padding-left:0px;padding-right:0px;margin-top:25px;max-width:1000px;"> 2 <div class="panel-group" id="accordion"> 3 <div class="panel panel-default"> 4 <div class="panel-heading" id="q01"> 5 <h4 class="panel-title"> 6 <a data-toggle="collapse" data-parent="#accordion" href="#a01"> 7 <?php echo _e('Where do I get the Shortcode from?','easy-code-placement'); ?> 8 </a> 9 </h4> 10 </div> 11 <div id="a01" class="panel-collapse collapse"> 12 <div class="panel-body"> 13 <?php echo _e('You only need to Click on the "Copy" Button in the Row with your Shortcode you need. When you click on the Button the Shortcode is copied to your Clipoard. Now you only need to Press "Strg + V" on your Keyboard or Right-Click on your Mouse and click on "Insert" at the place you want to have the Shortcode.','easy-code-placement'); ?> 14 </div> 15 </div> 16 </div> 17 <div class="panel panel-default"> 18 <div class="panel-heading" id="q02"> 19 <h4 class="panel-title"> 20 <a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#a02"> 21 <?php echo _e('The "Copy" Button don´t work or I want to write the Code manually!','easy-code-placement'); ?> 22 </a> 23 </h4> 24 </div> 25 <div id="a02" class="panel-collapse collapse"> 26 <div class="panel-body"> 27 <?php echo _e('Just type [ecp code="%PLACEHOLDER%"] at the place you want to have the Shortcode. Replace %PLACEHOLDER% with the Name of your Shortcode.','easy-code-placement'); ?> 28 </div> 29 </div> 30 </div> 31 <div class="panel panel-default"> 32 <div class="panel-heading" id="q03"> 33 <h4 class="panel-title"> 34 <a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#a03"> 35 <?php echo _e('Where can I place the Shortcode?','easy-code-placement'); ?> 36 </a> 37 </h4> 38 </div> 39 <div id="a03" class="panel-collapse collapse"> 40 <div class="panel-body"> 41 <?php echo _e('At the moment you can place the Shortcode at the following Areas: Widget Title and Content, Title of Posts and Pages (only Text and without alignement), Content of Posts and Pages, Menu (in the Link-Text and the URL must be "#" if you dont want to link it somewhere), Tags and Excerpts.','easy-code-placement'); ?> 42 </div> 43 </div> 44 </div> 1 <?php 2 3 // ******************* 4 // block direct access 5 // ******************* 6 ecp_check_access(); 7 8 ?> 9 10 <div class="uk-accordion" data-uk-accordion> 11 <h3 class="uk-accordion-title"><?php echo _e( 'Where do I get the Shortcode from?', 'easy-code-placement' ); ?></h3> 12 <div class="uk-accordion-content"><?php echo _e( 'You only need to Click on the "Copy" Button in the Row with your Shortcode you need. When you click on the Button the Shortcode is copied to your Clipoard. Now you only need to Press "Strg + V" on your Keyboard or Right-Click on your Mouse and click on "Insert" at the place you want to have the Shortcode.', 'easy-code-placement' ); ?></div> 13 <h3 class="uk-accordion-title"><?php echo _e( 'The "Copy" Button don´t work or I want to write the Code manually!', 'easy-code-placement' ); ?></h3> 14 <div class="uk-accordion-content"><?php echo _e( 'Just type [ecp code="%PLACEHOLDER%"] at the place you want to have the Shortcode. Replace %PLACEHOLDER% with the Name of your Shortcode.', 'easy-code-placement' ); ?></div> 15 <h3 class="uk-accordion-title"><?php echo _e( 'Where can I place the Shortcode?', 'easy-code-placement' ); ?></h3> 16 <div class="uk-accordion-content"><?php echo _e( 'At the moment you can place the Shortcode at the following Areas: Widget Title and Content, Title of Posts and Pages (only Text and without alignement), Content of Posts and Pages, Menu (in the Link-Text and the URL must be "#" if you dont want to link it somewhere), Tags and Excerpts.', 'easy-code-placement' ); ?></div> 17 <h3 class="uk-accordion-title"><?php echo _e( 'The Output doesn´t look right or it has a colored Background!', 'easy-code-placement' ); ?></h3> 18 <div class="uk-accordion-content"><?php echo _e( 'Be sure to use the "Copy" Button to get your Shortcode or write in manually. Otherwise it can happen that you Copy HTML Code that´s around the Shortcode. You couldn´t see see it but you can Copy it!', 'easy-code-placement' ); ?></div> 45 19 </div> 46 </div> -
easy-code-placement/trunk/inc/pages/settings.php
r1512852 r1529213 1 <form method="post" action="<?php echo admin_url('options-general.php?page=ecp&load=settings'); ?>"> 2 <table class="table table-striped table-hover table-bordered" style="margin-top:25px;"> 3 <colgroup> 4 <col width="25%" /> 5 <col width="75%" /> 6 </colgroup> 7 <thead> 8 <tr> 9 <th><?php _e('Name','easy-code-placement'); ?></th> 10 <th><?php _e('Value','easy-code-placement'); ?></th> 11 </tr> 12 </thead> 1 <?php 2 3 // ******************* 4 // block direct access 5 // ******************* 6 ecp_check_access(); 7 8 ?> 9 10 <form method="post" action="<?php echo admin_url( 'options-general.php?page=ecp&load=settings' ); ?>"> 11 <table class="uk-table"> 13 12 <tbody> 14 13 <tr> 15 <td ><?php _e('Who can manage this Plugin?','easy-code-placement'); ?></td>16 <td >14 <td class="uk-width-1-4 uk-table-middle"><?php _e( 'Who can manage this Plugin?', 'easy-code-placement' ); ?></td> 15 <td class="uk-width-3-4"> 17 16 <?php 18 17 global $wpdb; 19 $ecp_role = $wpdb->get_var( "SELECT option_value FROM ".$wpdb->prefix."ecp_options WHERE option_name = 'role'");18 $ecp_role = $wpdb->get_var( "SELECT option_value FROM " . $wpdb->prefix . "ecp_options WHERE option_name = 'role'" ); 20 19 ?> 21 <select name="role" class="form-control">22 <option <?php if ($ecp_role === 'manage_options') {echo 'selected';}; ?> value="manage_options"><?php _e('Adminstrators and higher','easy-code-placement'); ?></option>23 <option <?php if ($ecp_role === 'manage_categories') {echo 'selected';}; ?> value="manage_categories"><?php _e('Editors and higher','easy-code-placement'); ?></option>24 <option <?php if ($ecp_role === 'publish_posts') {echo 'selected';}; ?> value="publish_posts"><?php _e('Authors and higher','easy-code-placement'); ?></option>25 <option <?php if ($ecp_role === 'edit_posts') {echo 'selected';}; ?> value="edit_posts"><?php _e('Contributors and higher','easy-code-placement'); ?></option>20 <select name="role"> 21 <option <?php if( $ecp_role === 'manage_options' ) { echo 'selected'; }; ?> value="manage_options"><?php _e( 'Adminstrators and higher', 'easy-code-placement' ); ?></option> 22 <option <?php if( $ecp_role === 'manage_categories' ) { echo 'selected'; }; ?> value="manage_categories"><?php _e( 'Editors and higher', 'easy-code-placement' ); ?></option> 23 <option <?php if( $ecp_role === 'publish_posts' ) { echo 'selected'; }; ?> value="publish_posts"><?php _e( 'Authors and higher', 'easy-code-placement' ); ?></option> 24 <option <?php if( $ecp_role === 'edit_posts' ) { echo 'selected'; }; ?> value="edit_posts"><?php _e( 'Contributors and higher', 'easy-code-placement' ); ?></option> 26 25 </select> 27 26 </td> 28 27 </tr> 29 28 <tr> 30 <td ><?php _e('Codes per Page','easy-code-placement'); ?></td>31 <td >29 <td class="uk-width-1-4 uk-table-middle"><?php _e( 'Codes per Page', 'easy-code-placement' ); ?></td> 30 <td class="uk-width-3-4"> 32 31 <?php 33 32 global $wpdb; 34 $ecp_per_page = $wpdb->get_var( "SELECT option_value FROM ".$wpdb->prefix."ecp_options WHERE option_name = 'perpage'");33 $ecp_per_page = $wpdb->get_var( "SELECT option_value FROM " . $wpdb->prefix . "ecp_options WHERE option_name = 'perpage'" ); 35 34 ?> 36 <input type="text" class="form-control"name="perpage" value="<?php echo $ecp_per_page; ?>" size="10" maxlength="2">35 <input type="text" name="perpage" value="<?php echo $ecp_per_page; ?>" size="10" maxlength="2"> 37 36 </td> 38 37 </tr> 39 38 </tbody> 40 39 </table> 41 <br><button type="submit" name="submit" class=" btn btn-primary"><?php _e('Save','easy-code-placement'); ?></button>40 <br><button type="submit" name="submit" class="uk-button uk-button-primary"><?php _e( 'Save', 'easy-code-placement' ); ?></button> 42 41 </form> -
easy-code-placement/trunk/inc/pages/system.php
r1512852 r1529213 1 <?php 2 3 // ******************* 4 // block direct access 5 // ******************* 6 ecp_check_access(); 7 8 ?> 9 1 10 <h3><?php _e('General','easy-code-placement'); ?></h3> 2 <table class="table table-striped table-hover table-bordered" style="max-width:1000px;"> 3 <colgroup> 4 <col width="25%" /> 5 <col width="75%" /> 6 </colgroup> 7 <thead> 8 <tr> 9 <th><?php _e('Name','easy-code-placement'); ?></th> 10 <th><?php _e('Value','easy-code-placement'); ?></th> 11 </tr> 12 </thead> 11 <table class="uk-table"> 13 12 <tbody> 14 13 <tr> 15 <td ><?php _e('PHP Version','easy-code-placement'); ?></td>16 <td ><?php echo PHP_VERSION; ?></td>14 <td class="uk-width-1-4"><?php _e( 'PHP Version', 'easy-code-placement' ); ?></td> 15 <td class="uk-width-3-4"><?php echo PHP_VERSION; ?></td> 17 16 </tr> 18 17 <tr> 19 <td ><?php _e('MySQL Version','easy-code-placement'); ?></td>20 <td ><?php21 if (isset($GLOBALS['wpdb']->dbh->server_info)) {22 echo $GLOBALS[ 'wpdb']->dbh->server_info;23 } else if (function_exists('mysql_get_server_info')) {18 <td class="uk-width-1-4"><?php _e( 'MySQL Version', 'easy-code-placement' ); ?></td> 19 <td class="uk-width-3-4"><?php 20 if( isset( $GLOBALS[ 'wpdb' ]->dbh->server_info ) ) { 21 echo $GLOBALS[ 'wpdb' ]->dbh->server_info; 22 }else if( function_exists( 'mysql_get_server_info' ) ) { 24 23 echo mysql_get_server_info(); 25 } else{26 _e( 'Error','easy-code-placement');24 }else{ 25 _e( 'Error', 'easy-code-placement' ); 27 26 } 28 27 ?> … … 30 29 </tr> 31 30 <tr> 32 <td ><?php _e('WordPress Version','easy-code-placement'); ?></td>33 <td ><?php echo get_bloginfo ('version'); ?></td>31 <td class="uk-width-1-4"><?php _e( 'WordPress Version', 'easy-code-placement' ); ?></td> 32 <td class="uk-width-3-4"><?php echo get_bloginfo ( 'version' ); ?></td> 34 33 </tr> 35 34 <tr> 36 <td ><?php _e('WordPress Network Page','easy-code-placement'); ?></td>37 <td ><?php38 if (is_multisite()) {39 _e( 'Yes','easy-code-placement');40 } else{41 _e( 'No','easy-code-placement');35 <td class="uk-width-1-4"><?php _e( 'WordPress Network Page', 'easy-code-placement' ); ?></td> 36 <td class="uk-width-3-4"><?php 37 if( is_multisite() ) { 38 _e( 'Yes', 'easy-code-placement' ); 39 }else{ 40 _e( 'No', 'easy-code-placement' ); 42 41 } 43 42 ?> … … 45 44 </tr> 46 45 <tr> 47 <td ><?php _e('Plugin Version (File)','easy-code-placement'); ?></td>48 <td ><?php echo ECP_VERSION; ?></td>46 <td class="uk-width-1-4"><?php _e( 'Plugin Version (File)', 'easy-code-placement' ); ?></td> 47 <td class="uk-width-3-4"><?php echo ECP_VERSION; ?></td> 49 48 </tr> 50 49 <tr> 51 <td ><?php _e('Plugin Version (Database)','easy-code-placement'); ?></td>52 <td ><?php50 <td class="uk-width-1-4"><?php _e( 'Plugin Version (Database)', 'easy-code-placement' ); ?></td> 51 <td class="uk-width-3-4"><?php 53 52 global $wpdb; 54 $ecp_options_version = $wpdb->get_var( "SELECT option_value FROM ".$wpdb->prefix."ecp_options WHERE option_name = 'version'");55 if ($ecp_options_version === '') {56 _e( 'Error','easy-code-placement');57 } else{53 $ecp_options_version = $wpdb->get_var( "SELECT option_value FROM " . $wpdb->prefix . "ecp_options WHERE option_name = 'version'" ); 54 if( $ecp_options_version === '' ) { 55 _e( 'Error', 'easy-code-placement' ); 56 }else{ 58 57 echo $ecp_options_version; 59 58 } … … 62 61 </tr> 63 62 <tr> 64 <td ><?php _e('Role','easy-code-placement'); ?></td>65 <td ><?php63 <td class="uk-width-1-4"><?php _e( 'Role', 'easy-code-placement' ); ?></td> 64 <td class="uk-width-3-4"><?php 66 65 global $wpdb; 67 $ecp_options_role = $wpdb->get_var( "SELECT option_value FROM ".$wpdb->prefix."ecp_options WHERE option_name = 'role'");68 if ($ecp_options_role === '') {69 _e( 'Error','easy-code-placement');70 } else{66 $ecp_options_role = $wpdb->get_var( "SELECT option_value FROM " . $wpdb->prefix . "ecp_options WHERE option_name = 'role'" ); 67 if( $ecp_options_role === '' ) { 68 _e( 'Error', 'easy-code-placement' ); 69 }else{ 71 70 echo $ecp_options_role; 72 71 } … … 75 74 </tr> 76 75 <tr> 77 <td ><?php _e('Codes per Page','easy-code-placement'); ?></td>78 <td ><?php76 <td class="uk-width-1-4"><?php _e( 'Codes per Page' ,'easy-code-placement' ); ?></td> 77 <td class="uk-width-3-4"><?php 79 78 global $wpdb; 80 $ecp_per_page = $wpdb->get_var( "SELECT option_value FROM ".$wpdb->prefix."ecp_options WHERE option_name = 'perpage'");81 if ($ecp_per_page === '') {82 _e( 'Error','easy-code-placement');83 } else{79 $ecp_per_page = $wpdb->get_var( "SELECT option_value FROM " . $wpdb->prefix . "ecp_options WHERE option_name = 'perpage'" ); 80 if( $ecp_per_page === '' ) { 81 _e( 'Error', 'easy-code-placement' ); 82 }else{ 84 83 echo $ecp_per_page; 85 84 } … … 90 89 </table> 91 90 92 <h3><?php _e('Configuration','easy-code-placement'); ?></h3> 93 <table class="table table-striped table-hover table-bordered" style="max-width:1000px;"> 94 <colgroup> 95 <col width="25%" /> 96 <col width="75%" /> 97 </colgroup> 98 <thead> 99 <tr> 100 <th><?php _e('Name','easy-code-placement'); ?></th> 101 <th><?php _e('Value','easy-code-placement'); ?></th> 102 </tr> 103 </thead> 91 <h3><?php _e( 'Configuration', 'easy-code-placement' ); ?></h3> 92 <table class="uk-table"> 104 93 <tbody> 105 94 <tr> 106 <td ><?php _e('PHP max. execution time','easy-code-placement'); ?></td>107 <td ><?php108 if (function_exists('ini_get')) {109 echo ini_get( 'max_execution_time').'s';110 } else{111 _e( 'Error','easy-code-placement');95 <td class="uk-width-1-4"><?php _e( 'PHP max. execution time', 'easy-code-placement' ); ?></td> 96 <td class="uk-width-3-4"><?php 97 if( function_exists( 'ini_get' ) ) { 98 echo ini_get( 'max_execution_time' ) . 's'; 99 }else{ 100 _e( 'Error', 'easy-code-placement' ); 112 101 } ?> 113 102 </td> 114 103 </tr> 115 104 <tr> 116 <td ><?php _e('PHP memory limit','easy-code-placement'); ?></td>117 <td ><?php118 if (function_exists('ini_get')) {119 echo ini_get( 'memory_limit').'B';120 } else{121 _e( 'Error','easy-code-placement');105 <td class="uk-width-1-4"><?php _e( 'PHP memory limit', 'easy-code-placement' ); ?></td> 106 <td class="uk-width-3-4"><?php 107 if( function_exists( 'ini_get' ) ) { 108 echo ini_get( 'memory_limit' ) . 'B'; 109 }else{ 110 _e( 'Error', 'easy-code-placement' ); 122 111 } ?> 123 112 </td> 124 113 </tr> 125 114 <tr> 126 <td ><?php _e('WordPress memory limit','easy-code-placement'); ?></td>127 <td ><?php echo WP_MEMORY_LIMIT; ?>B</td>115 <td class="uk-width-1-4"><?php _e( 'WordPress memory limit', 'easy-code-placement' ); ?></td> 116 <td class="uk-width-3-4"><?php echo WP_MEMORY_LIMIT; ?>B</td> 128 117 </tr> 129 118 </tbody> 130 119 </table> 131 120 132 <h3><?php _e('Paths','easy-code-placement'); ?></h3> 133 <table class="table table-striped table-hover table-bordered" style="max-width:1000px;"> 134 <colgroup> 135 <col width="25%" /> 136 <col width="75%" /> 137 </colgroup> 138 <thead> 139 <tr> 140 <th><?php _e('Name','easy-code-placement'); ?></th> 141 <th><?php _e('Value','easy-code-placement'); ?></th> 142 </tr> 143 </thead> 121 <h3><?php _e( 'Paths', 'easy-code-placement' ); ?></h3> 122 <table class="uk-table"> 144 123 <tbody> 145 124 <tr> 146 <td ><?php _e('Home URL','easy-code-placement'); ?></td>147 <td class=" code"><?php echo home_url(); ?></td>125 <td class="uk-width-1-4"><?php _e( 'Home URL', 'easy-code-placement' ); ?></td> 126 <td class="uk-width-3-4"><?php echo home_url(); ?></td> 148 127 </tr> 149 128 <tr> 150 <td ><?php _e('Site URL','easy-code-placement'); ?></td>151 <td class=" code"><?php echo site_url(); ?></td>129 <td class="uk-width-1-4"><?php _e( 'Site URL', 'easy-code-placement' ); ?></td> 130 <td class="uk-width-3-4"><?php echo site_url(); ?></td> 152 131 </tr> 153 132 <tr> 154 <td ><?php _e('Plugin URL','easy-code-placement'); ?></td>155 <td class=" code"><?php echo plugins_url(); ?></td>133 <td class="uk-width-1-4"><?php _e( 'Plugin URL', 'easy-code-placement' ); ?></td> 134 <td class="uk-width-3-4"><?php echo plugins_url(); ?></td> 156 135 </tr> 157 136 </tbody> -
easy-code-placement/trunk/inc/uninstall.php
r1501662 r1529213 1 1 <?php 2 2 3 // ******************* 4 // block direct access 5 // ******************* 6 ecp_check_access(); 7 8 // ****************** 3 9 // uninstall function 10 // ****************** 4 11 function ecp_uninstall(){ 5 12 global $wpdb; 13 6 14 // delete tables 7 $wpdb->query( "DROP TABLE ".$wpdb->prefix."ecp_data");8 $wpdb->query( "DROP TABLE ".$wpdb->prefix."ecp_options");15 $wpdb->query( "DROP TABLE " . $wpdb->prefix . "ecp_data" ); 16 $wpdb->query( "DROP TABLE " . $wpdb->prefix . "ecp_options" ); 9 17 } 10 18 19 // ****************************** 11 20 // multiside or single uninstall? 21 // ****************************** 12 22 function ecp_net_uninstall() { 13 global $wpdb; 23 global $wpdb; 24 14 25 // multiside uninstallation 15 if (is_multisite()) {26 if( is_multisite() ) { 16 27 $blog = $wpdb->blogid; 17 $blogids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs");18 foreach ($blogids as $blogid) {19 switch_to_blog( $blogid);28 $blogids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs" ); 29 foreach( $blogids as $blogid ) { 30 switch_to_blog( $blogid ); 20 31 ecp_uninstall(); 21 32 } 22 switch_to_blog($blog); 23 } else { 33 switch_to_blog( $blog ); 34 }else{ 35 24 36 // single uninstallation 25 37 ecp_uninstall(); … … 28 40 29 41 // register uninstall hook 30 register_uninstall_hook ( ECP_FILE, 'ecp_net_uninstall' );42 register_uninstall_hook( ECP_FILE, 'ecp_net_uninstall' ); 31 43 44 // ********************************************* 32 45 // delete tables and data when a blog is deleted 33 function ecp_deleted_blog($tables) { 46 // ********************************************* 47 function ecp_deleted_blog( $tables ) { 34 48 global $wpdb; 35 $tables[] = $wpdb->prefix .'ecp_options';36 $tables[] = $wpdb->prefix .'ecp_data';49 $tables[] = $wpdb->prefix . 'ecp_options'; 50 $tables[] = $wpdb->prefix . 'ecp_data'; 37 51 return $tables; 38 52 } 39 add_filter ( 'wpmu_drop_tables', 'ecp_deleted_blog', 99 );53 add_filter( 'wpmu_drop_tables', 'ecp_deleted_blog', 99 ); 40 54 41 55 ?> -
easy-code-placement/trunk/lang/easy-code-placement-de_DE.po
r1512852 r1529213 3 3 "Project-Id-Version: Easy Code Placement\n" 4 4 "Report-Msgid-Bugs-To: \n" 5 "POT-Creation-Date: 2016-1 0-10 23:29+0200\n"6 "PO-Revision-Date: 2016-1 0-10 23:29+0200\n"5 "POT-Creation-Date: 2016-11-06 15:12+0100\n" 6 "PO-Revision-Date: 2016-11-06 15:12+0100\n" 7 7 "Last-Translator: Jens Herdy <[email protected]>\n" 8 8 "Language-Team: \n" … … 13 13 "Plural-Forms: nplurals=2; plural=n != 1;\n" 14 14 "X-Poedit-SourceCharset: UTF-8\n" 15 "X-Generator: Poedit 1.8. 9\n"15 "X-Generator: Poedit 1.8.11\n" 16 16 "X-Poedit-Basepath: ..\n" 17 17 "X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;" … … 24 24 "X-Poedit-SearchPathExcluded-0: inc/ext\n" 25 25 26 #: inc/actions/add.php: 17 inc/actions/add.php:7226 #: inc/actions/add.php:24 inc/actions/add.php:81 27 27 msgid "A maximum of 30 Characters is allowed" 28 28 msgstr "Maximal 30 Zeichen sind erlaubt" 29 29 30 #: inc/actions/add.php: 2530 #: inc/actions/add.php:33 31 31 msgid "Special Characters are not allowed in the Code Name" 32 32 msgstr "Sonderzeichen sind im Code Namen nicht erlaubt" 33 33 34 #: inc/actions/add.php: 3334 #: inc/actions/add.php:42 35 35 msgid "The Code Name and / or the Code must be filled in" 36 36 msgstr "Der Code Name und / oder der Code müssen ausgefüllt werden" 37 37 38 #: inc/actions/add.php: 4238 #: inc/actions/add.php:52 39 39 msgid "The Code Name already exist - It must be uniqe" 40 40 msgstr "Der Name existiert bereits - Er muss einmalig sein" 41 41 42 #: inc/actions/add.php: 5942 #: inc/actions/add.php:72 43 43 msgid "New Code" 44 44 msgstr "Code hinzufügen" 45 45 46 #: inc/actions/add.php:67 inc/actions/edit.php:69 inc/home.php:34 47 #: inc/pages/settings.php:9 inc/pages/system.php:9 inc/pages/system.php:100 48 #: inc/pages/system.php:140 46 #: inc/actions/add.php:76 inc/actions/edit.php:78 inc/home.php:41 49 47 msgid "Name" 50 48 msgstr "Name" 51 49 52 #: inc/actions/add.php:7 050 #: inc/actions/add.php:79 53 51 msgid "Only Letters and Numbers are allowed" 54 52 msgstr "Nur Buchstaben und Zahlen sind erlaubt" 55 53 56 #: inc/actions/add.php: 7154 #: inc/actions/add.php:80 57 55 msgid "Instead of Whitesspaces use Underlines" 58 56 msgstr "Anstelle von Leerzeichen sind Unterstriche zu benutzen" 59 57 60 #: inc/actions/add.php:8 0 inc/actions/edit.php:7858 #: inc/actions/add.php:85 inc/actions/edit.php:83 61 59 msgid "Code" 62 60 msgstr "Code" 63 61 64 #: inc/actions/add.php:8 8 inc/actions/edit.php:8662 #: inc/actions/add.php:89 inc/actions/edit.php:87 65 63 msgid "Alignment" 66 64 msgstr "Ausrichtung" 67 65 68 #: inc/actions/add.php:9 0 inc/actions/edit.php:8866 #: inc/actions/add.php:91 inc/actions/edit.php:89 69 67 msgid "None" 70 68 msgstr "Keine" 71 69 72 #: inc/actions/add.php:9 1 inc/actions/edit.php:8970 #: inc/actions/add.php:92 inc/actions/edit.php:90 73 71 msgid "Left" 74 72 msgstr "Links" 75 73 76 #: inc/actions/add.php:9 2 inc/actions/edit.php:9074 #: inc/actions/add.php:93 inc/actions/edit.php:91 77 75 msgid "Center" 78 76 msgstr "Zentriert" 79 77 80 #: inc/actions/add.php:9 3 inc/actions/edit.php:9178 #: inc/actions/add.php:94 inc/actions/edit.php:92 81 79 msgid "Right" 82 80 msgstr "Rechts" 83 81 84 #: inc/actions/add.php: 101 inc/actions/edit.php:9982 #: inc/actions/add.php:98 inc/actions/edit.php:96 85 83 msgid "Status" 86 84 msgstr "Status" 87 85 88 #: inc/actions/add.php:10 3 inc/actions/edit.php:10186 #: inc/actions/add.php:100 inc/actions/edit.php:98 89 87 msgid "Online" 90 88 msgstr "Online" 91 89 92 #: inc/actions/add.php:10 4 inc/actions/edit.php:10290 #: inc/actions/add.php:101 inc/actions/edit.php:99 93 91 msgid "Offline" 94 92 msgstr "Offline" 95 93 96 #: inc/actions/add.php:1 10 inc/actions/edit.php:108 inc/error.php:1394 #: inc/actions/add.php:104 inc/actions/edit.php:102 inc/error.php:22 97 95 msgid "Back" 98 96 msgstr "Zurück" 99 97 100 #: inc/actions/add.php:1 1098 #: inc/actions/add.php:104 101 99 msgid "Add" 102 100 msgstr "Hinzufügen" 103 101 104 #: inc/actions/alignment.php: 17 inc/actions/delete.php:11105 #: inc/actions/edit.php: 22 inc/actions/edit.php:51 inc/actions/status.php:17102 #: inc/actions/alignment.php:23 inc/actions/delete.php:17 103 #: inc/actions/edit.php:30 inc/actions/edit.php:64 inc/actions/status.php:23 106 104 msgid "Modifying of the ID is not allowed" 107 105 msgstr "Das verändern der ID ist nicht erlaubt" 108 106 109 #: inc/actions/alignment.php: 23107 #: inc/actions/alignment.php:30 110 108 msgid "" 111 109 "Modifying the Alignment to something else than 0, 1, 2 or 3 is not allowed" … … 114 112 "erlaubt" 115 113 116 #: inc/actions/edit.php:3 0114 #: inc/actions/edit.php:39 117 115 msgid "The Code must be filled in" 118 116 msgstr "Es muss ein Code eingegeben werden" 119 117 120 #: inc/actions/edit.php: 61118 #: inc/actions/edit.php:74 121 119 msgid "Edit Code" 122 120 msgstr "Code bearbeiten" 123 121 124 #: inc/actions/edit.php:10 8 inc/pages/settings.php:41122 #: inc/actions/edit.php:102 inc/pages/settings.php:40 125 123 msgid "Save" 126 124 msgstr "Speichern" 127 125 128 #: inc/actions/settings.php:1 2126 #: inc/actions/settings.php:18 129 127 msgid "The Option \"Codes per Page\" must be filled in" 130 128 msgstr "Die Option \"Codes pro Seite\" muss ausgefüllt werden" 131 129 132 #: inc/actions/settings.php:2 0130 #: inc/actions/settings.php:27 133 131 msgid "The Value for the Option \"Codes per Page\" must be numeric" 134 132 msgstr "Die Wert der Option \"Codes pro Seite\" muss numerisch sein" 135 133 136 #: inc/actions/status.php: 23134 #: inc/actions/status.php:30 137 135 msgid "Modifying of the Status to something else than 1 or 2 is not allowed" 138 136 msgstr "" 139 137 "Das verändern des Status zu etwas anderem als 1 oder 2 ist nicht erlaubt" 140 138 141 #: inc/error.php: 2 inc/error.php:7 inc/pages/system.php:26142 #: inc/pages/system.php:5 6 inc/pages/system.php:69 inc/pages/system.php:82143 #: inc/pages/system.php:1 11 inc/pages/system.php:121139 #: inc/error.php:11 inc/error.php:16 inc/pages/system.php:25 140 #: inc/pages/system.php:55 inc/pages/system.php:68 inc/pages/system.php:81 141 #: inc/pages/system.php:100 inc/pages/system.php:110 144 142 msgid "Error" 145 143 msgstr "Fehler" 146 144 147 #: inc/functions.php: 8145 #: inc/functions.php:15 148 146 msgid "" 149 147 "You don´t have the Permissions to access this Page. Please contact the " … … 153 151 "kontaktiere den Administrator." 154 152 155 #: inc/functions.php: 17 inc/functions.php:115 inc/load.php:35153 #: inc/functions.php:26 inc/functions.php:148 inc/load.php:51 156 154 msgid "Easy Code Placement" 157 155 msgstr "Easy Code Placement" 158 156 159 #: inc/functions.php:1 16157 #: inc/functions.php:149 160 158 msgid "Add a Code wherever you want it." 161 159 msgstr "Füge einen Code ein wo immer du möchtest." 162 160 163 #: inc/functions.php:1 51161 #: inc/functions.php:195 164 162 msgid "Code to Display:" 165 163 msgstr "Code der angezeigt werden soll:" 166 164 167 #: inc/functions.php:1 53165 #: inc/functions.php:197 168 166 msgid "Please select a Code" 169 167 msgstr "Bitte wähle einen Code aus" 170 168 171 #: inc/functions.php: 168169 #: inc/functions.php:214 172 170 msgid "Remove Borders and Design from Widget?" 173 171 msgstr "Rahmen und Design vom Widget entfernen?" 174 172 175 #: inc/home.php: 17173 #: inc/home.php:24 176 174 msgid "« Previous" 177 175 msgstr "« Vorherige" 178 176 179 #: inc/home.php: 18177 #: inc/home.php:25 180 178 msgid "Next »" 181 179 msgstr "Nächste »" 182 180 183 #: inc/home.php: 35181 #: inc/home.php:42 184 182 msgid "Shortcode" 185 183 msgstr "Shortcode" 186 184 187 #: inc/home.php: 36185 #: inc/home.php:43 188 186 msgid "Action" 189 187 msgstr "Aktion" 190 188 191 #: inc/home.php: 48189 #: inc/home.php:57 192 190 msgid "Copy Shortcode to Clipboard" 193 191 msgstr "Kopiere Shortcode in die Zwischenablage" 194 192 195 #: inc/home.php: 48193 #: inc/home.php:57 196 194 msgid "Copy" 197 195 msgstr "Kopieren" 198 196 199 #: inc/home.php: 53197 #: inc/home.php:63 200 198 msgid "Online - Click to change" 201 199 msgstr "Online - Klicke um dies zu ändern" 202 200 203 #: inc/home.php: 55201 #: inc/home.php:65 204 202 msgid "Offline - Click to change" 205 203 msgstr "Offline - Klicke um dies zu ändern" 206 204 207 #: inc/home.php: 59205 #: inc/home.php:70 208 206 msgid "No Alignment - Click to change" 209 207 msgstr "Keine Ausrichtung - Klicke um dies zu ändern" 210 208 211 #: inc/home.php: 61209 #: inc/home.php:72 212 210 msgid "Alignment Left - Click to change" 213 211 msgstr "Ausrichtung links - Klicke um dies zu ändern" 214 212 215 #: inc/home.php: 63213 #: inc/home.php:74 216 214 msgid "Alignment Center - Click to change" 217 215 msgstr "Ausrichtung zentriert - Klicke um dies zu ändern" 218 216 219 #: inc/home.php: 65217 #: inc/home.php:76 220 218 msgid "Alignment Right - Click to change" 221 219 msgstr "Ausrichtung rechts - Klicke um dies zu ändern" 222 220 223 #: inc/home.php: 68221 #: inc/home.php:79 224 222 msgid "Edit" 225 223 msgstr "Bearbeiten" 226 224 227 #: inc/home.php: 78225 #: inc/home.php:90 228 226 msgid "No Code found - Click \"Add New Code\" to add one." 229 227 msgstr "" … … 231 229 "hinzuzufügen." 232 230 233 #: inc/home.php: 87231 #: inc/home.php:99 234 232 msgid "Add New Code" 235 233 msgstr "Neuen Code hinzufügen" 236 234 237 #: inc/home.php:1 23235 #: inc/home.php:136 238 236 msgid "" 239 237 "If you want to thank the developer for this free Plugin, you are welcome to " … … 245 243 "benötigt)." 246 244 247 #: inc/home.php:1 34245 #: inc/home.php:144 248 246 msgid "Added on" 249 247 msgstr "Hinzugefügt am" 250 248 251 #: inc/home.php:1 36249 #: inc/home.php:146 252 250 msgid "Last Modified on" 253 251 msgstr "Zuletzt geändert am" 254 252 255 #: inc/home.php:14 0253 #: inc/home.php:149 256 254 msgid "Close" 257 255 msgstr "Schließen" 258 256 259 #: inc/home.php:15 3257 #: inc/home.php:157 260 258 msgid "Are you really sure you want to permanently delete this Shortcode?" 261 259 msgstr "" 262 260 "Bist du wirklich sicher das du den Shortcode für immer löschen möchtest?" 263 261 264 #: inc/home.php:15 6262 #: inc/home.php:159 265 263 msgid "No!" 266 264 msgstr "Nein!" 267 265 268 #: inc/home.php:1 57266 #: inc/home.php:160 269 267 msgid "Confirm" 270 268 msgstr "Bestätigen" 271 269 272 #: inc/load.php: 38270 #: inc/load.php:55 273 271 msgid "Home" 274 272 msgstr "Übersicht" 275 273 276 #: inc/load.php: 39274 #: inc/load.php:56 277 275 msgid "Settings" 278 276 msgstr "Einstellungen" 279 277 280 #: inc/load.php: 40278 #: inc/load.php:57 281 279 msgid "Help" 282 280 msgstr "Hilfe" 283 281 284 #: inc/load.php: 41282 #: inc/load.php:58 285 283 msgid "System Information" 286 284 msgstr "System Informationen" 287 285 288 #: inc/pages/help.php: 7286 #: inc/pages/help.php:11 289 287 msgid "Where do I get the Shortcode from?" 290 288 msgstr "Wo bekomme ich den Shortcode her?" 291 289 292 #: inc/pages/help.php:1 3290 #: inc/pages/help.php:12 293 291 msgid "" 294 292 "You only need to Click on the \"Copy\" Button in the Row with your Shortcode " … … 305 303 "\"Einfügen\" auswählen." 306 304 307 #: inc/pages/help.php: 21305 #: inc/pages/help.php:13 308 306 msgid "The \"Copy\" Button don´t work or I want to write the Code manually!" 309 307 msgstr "" … … 311 309 "eingeben!" 312 310 313 #: inc/pages/help.php: 27311 #: inc/pages/help.php:14 314 312 msgid "" 315 313 "Just type [ecp code=\"%PLACEHOLDER%\"] at the place you want to have the " … … 320 318 "Shortcodes." 321 319 322 #: inc/pages/help.php: 35320 #: inc/pages/help.php:15 323 321 msgid "Where can I place the Shortcode?" 324 322 msgstr "Wo kann ich den Shortcode platzieren?" 325 323 326 #: inc/pages/help.php: 41324 #: inc/pages/help.php:16 327 325 msgid "" 328 326 "At the moment you can place the Shortcode at the following Areas: Widget " … … 337 335 "Schlagwörter und Auszüge." 338 336 339 #: inc/pages/settings.php:10 inc/pages/system.php:10 inc/pages/system.php:101 340 #: inc/pages/system.php:141 341 msgid "Value" 342 msgstr "Wert" 343 344 #: inc/pages/settings.php:15 337 #: inc/pages/help.php:17 338 msgid "The Output doesn´t look right or it has a colored Background!" 339 msgstr "" 340 "Die Ausgabe sieht nicht richtig aus oder hat einen farbigen Hintergrund!" 341 342 #: inc/pages/help.php:18 343 msgid "" 344 "Be sure to use the \"Copy\" Button to get your Shortcode or write in " 345 "manually. Otherwise it can happen that you Copy HTML Code that´s around the " 346 "Shortcode. You couldn´t see see it but you can Copy it!" 347 msgstr "" 348 "Stell bitte sicher das du den \"Kopieren\" Button verwendest oder den " 349 "Shortcode selber schreibst. Andernfalls kann es passieren das du HTML Code " 350 "kopierst der um den Shortcode herum liegt. Du kannst ihn nicht sehen aber du " 351 "kannst ihn kopieren!" 352 353 #: inc/pages/settings.php:14 345 354 msgid "Who can manage this Plugin?" 346 355 msgstr "Wer kann dieses Plugin verwalten?" 347 356 348 #: inc/pages/settings.php:2 2357 #: inc/pages/settings.php:21 349 358 msgid "Adminstrators and higher" 350 359 msgstr "Administratoren und höher" 351 360 352 #: inc/pages/settings.php:2 3361 #: inc/pages/settings.php:22 353 362 msgid "Editors and higher" 354 363 msgstr "Redakteure und höher" 355 364 356 #: inc/pages/settings.php:2 4365 #: inc/pages/settings.php:23 357 366 msgid "Authors and higher" 358 367 msgstr "Autoren und höher" 359 368 360 #: inc/pages/settings.php:2 5369 #: inc/pages/settings.php:24 361 370 msgid "Contributors and higher" 362 371 msgstr "Mitarbeiter und höher" 363 372 364 #: inc/pages/settings.php: 30 inc/pages/system.php:77373 #: inc/pages/settings.php:29 inc/pages/system.php:76 365 374 msgid "Codes per Page" 366 375 msgstr "Codes pro Seite" 367 376 368 #: inc/pages/system.php:1 377 #: inc/pages/system.php:10 369 378 msgid "General" 370 379 msgstr "Allgemein" 371 380 372 #: inc/pages/system.php:1 5381 #: inc/pages/system.php:14 373 382 msgid "PHP Version" 374 383 msgstr "PHP Version" 375 384 376 #: inc/pages/system.php:1 9385 #: inc/pages/system.php:18 377 386 msgid "MySQL Version" 378 387 msgstr "MySQL Version" 379 388 380 #: inc/pages/system.php:3 2389 #: inc/pages/system.php:31 381 390 msgid "WordPress Version" 382 391 msgstr "WordPress Version" 383 392 384 #: inc/pages/system.php:3 6393 #: inc/pages/system.php:35 385 394 msgid "WordPress Network Page" 386 395 msgstr "WordPress Netzwerk Seite" 387 396 388 #: inc/pages/system.php:3 9397 #: inc/pages/system.php:38 389 398 msgid "Yes" 390 399 msgstr "Ja" 391 400 392 #: inc/pages/system.php:4 1401 #: inc/pages/system.php:40 393 402 msgid "No" 394 403 msgstr "Nein" 395 404 396 #: inc/pages/system.php:4 7405 #: inc/pages/system.php:46 397 406 msgid "Plugin Version (File)" 398 407 msgstr "Plugin Version (Datei)" 399 408 400 #: inc/pages/system.php:5 1409 #: inc/pages/system.php:50 401 410 msgid "Plugin Version (Database)" 402 411 msgstr "Plugin Version (Datenbank)" 403 412 404 #: inc/pages/system.php:6 4413 #: inc/pages/system.php:63 405 414 msgid "Role" 406 415 msgstr "Rolle" 407 416 408 #: inc/pages/system.php:9 2417 #: inc/pages/system.php:91 409 418 msgid "Configuration" 410 419 msgstr "Konfiguration" 411 420 412 #: inc/pages/system.php: 106421 #: inc/pages/system.php:95 413 422 msgid "PHP max. execution time" 414 423 msgstr "PHP max. Ausführungszeit" 415 424 416 #: inc/pages/system.php:1 16425 #: inc/pages/system.php:105 417 426 msgid "PHP memory limit" 418 427 msgstr "PHP Speicherlimit" 419 428 420 #: inc/pages/system.php:1 26429 #: inc/pages/system.php:115 421 430 msgid "WordPress memory limit" 422 431 msgstr "WordPress Speicherlimit" 423 432 424 #: inc/pages/system.php:1 32433 #: inc/pages/system.php:121 425 434 msgid "Paths" 426 435 msgstr "Pfade" 427 436 428 #: inc/pages/system.php:1 46437 #: inc/pages/system.php:125 429 438 msgid "Home URL" 430 439 msgstr "Home URL" 431 440 432 #: inc/pages/system.php:1 50441 #: inc/pages/system.php:129 433 442 msgid "Site URL" 434 443 msgstr "Seiten URL" 435 444 436 #: inc/pages/system.php:1 54445 #: inc/pages/system.php:133 437 446 msgid "Plugin URL" 438 447 msgstr "Plugin URL" 448 449 #~ msgid "Value" 450 #~ msgstr "Wert" 439 451 440 452 #~ msgid "" -
easy-code-placement/trunk/lang/easy-code-placement.pot
r1512852 r1529213 5 5 "Project-Id-Version: Easy Code Placement\n" 6 6 "Report-Msgid-Bugs-To: \n" 7 "POT-Creation-Date: 2016-1 0-10 23:29+0200\n"7 "POT-Creation-Date: 2016-11-06 15:12+0100\n" 8 8 "POT-Revision-Date: Thu May 19 2016 17:08:44 GMT+0200 (Mitteleuropäische " 9 9 "Sommerzeit)\n" … … 22 22 "esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;esc_html_x:1,2c;" 23 23 "comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2\n" 24 "X-Generator: Poedit 1.8. 9\n"24 "X-Generator: Poedit 1.8.11\n" 25 25 "X-Poedit-SearchPath-0: .\n" 26 26 "X-Poedit-SearchPathExcluded-0: inc/ext\n" 27 27 28 #: inc/actions/add.php: 17 inc/actions/add.php:7228 #: inc/actions/add.php:24 inc/actions/add.php:81 29 29 msgid "A maximum of 30 Characters is allowed" 30 30 msgstr "" 31 31 32 #: inc/actions/add.php: 2532 #: inc/actions/add.php:33 33 33 msgid "Special Characters are not allowed in the Code Name" 34 34 msgstr "" 35 35 36 #: inc/actions/add.php: 3336 #: inc/actions/add.php:42 37 37 msgid "The Code Name and / or the Code must be filled in" 38 38 msgstr "" 39 39 40 #: inc/actions/add.php: 4240 #: inc/actions/add.php:52 41 41 msgid "The Code Name already exist - It must be uniqe" 42 42 msgstr "" 43 43 44 #: inc/actions/add.php: 5944 #: inc/actions/add.php:72 45 45 msgid "New Code" 46 46 msgstr "" 47 47 48 #: inc/actions/add.php:67 inc/actions/edit.php:69 inc/home.php:34 49 #: inc/pages/settings.php:9 inc/pages/system.php:9 inc/pages/system.php:100 50 #: inc/pages/system.php:140 48 #: inc/actions/add.php:76 inc/actions/edit.php:78 inc/home.php:41 51 49 msgid "Name" 52 50 msgstr "" 53 51 54 #: inc/actions/add.php:7 052 #: inc/actions/add.php:79 55 53 msgid "Only Letters and Numbers are allowed" 56 54 msgstr "" 57 55 58 #: inc/actions/add.php: 7156 #: inc/actions/add.php:80 59 57 msgid "Instead of Whitesspaces use Underlines" 60 58 msgstr "" 61 59 62 #: inc/actions/add.php:8 0 inc/actions/edit.php:7860 #: inc/actions/add.php:85 inc/actions/edit.php:83 63 61 msgid "Code" 64 62 msgstr "" 65 63 66 #: inc/actions/add.php:8 8 inc/actions/edit.php:8664 #: inc/actions/add.php:89 inc/actions/edit.php:87 67 65 msgid "Alignment" 68 66 msgstr "" 69 67 70 #: inc/actions/add.php:9 0 inc/actions/edit.php:8868 #: inc/actions/add.php:91 inc/actions/edit.php:89 71 69 msgid "None" 72 70 msgstr "" 73 71 74 #: inc/actions/add.php:9 1 inc/actions/edit.php:8972 #: inc/actions/add.php:92 inc/actions/edit.php:90 75 73 msgid "Left" 76 74 msgstr "" 77 75 78 #: inc/actions/add.php:9 2 inc/actions/edit.php:9076 #: inc/actions/add.php:93 inc/actions/edit.php:91 79 77 msgid "Center" 80 78 msgstr "" 81 79 82 #: inc/actions/add.php:9 3 inc/actions/edit.php:9180 #: inc/actions/add.php:94 inc/actions/edit.php:92 83 81 msgid "Right" 84 82 msgstr "" 85 83 84 #: inc/actions/add.php:98 inc/actions/edit.php:96 85 msgid "Status" 86 msgstr "" 87 88 #: inc/actions/add.php:100 inc/actions/edit.php:98 89 msgid "Online" 90 msgstr "" 91 86 92 #: inc/actions/add.php:101 inc/actions/edit.php:99 87 msgid "Status"88 msgstr ""89 90 #: inc/actions/add.php:103 inc/actions/edit.php:10191 msgid "Online"92 msgstr ""93 94 #: inc/actions/add.php:104 inc/actions/edit.php:10295 93 msgid "Offline" 96 94 msgstr "" 97 95 98 #: inc/actions/add.php:1 10 inc/actions/edit.php:108 inc/error.php:1396 #: inc/actions/add.php:104 inc/actions/edit.php:102 inc/error.php:22 99 97 msgid "Back" 100 98 msgstr "" 101 99 102 #: inc/actions/add.php:1 10100 #: inc/actions/add.php:104 103 101 msgid "Add" 104 102 msgstr "" 105 103 106 #: inc/actions/alignment.php: 17 inc/actions/delete.php:11 inc/actions/edit.php:22107 #: inc/actions/edit.php: 51 inc/actions/status.php:17104 #: inc/actions/alignment.php:23 inc/actions/delete.php:17 inc/actions/edit.php:30 105 #: inc/actions/edit.php:64 inc/actions/status.php:23 108 106 msgid "Modifying of the ID is not allowed" 109 107 msgstr "" 110 108 111 #: inc/actions/alignment.php: 23109 #: inc/actions/alignment.php:30 112 110 msgid "Modifying the Alignment to something else than 0, 1, 2 or 3 is not allowed" 113 111 msgstr "" 114 112 115 #: inc/actions/edit.php:3 0113 #: inc/actions/edit.php:39 116 114 msgid "The Code must be filled in" 117 115 msgstr "" 118 116 119 #: inc/actions/edit.php: 61117 #: inc/actions/edit.php:74 120 118 msgid "Edit Code" 121 119 msgstr "" 122 120 123 #: inc/actions/edit.php:10 8 inc/pages/settings.php:41121 #: inc/actions/edit.php:102 inc/pages/settings.php:40 124 122 msgid "Save" 125 123 msgstr "" 126 124 127 #: inc/actions/settings.php:1 2125 #: inc/actions/settings.php:18 128 126 msgid "The Option \"Codes per Page\" must be filled in" 129 127 msgstr "" 130 128 131 #: inc/actions/settings.php:2 0129 #: inc/actions/settings.php:27 132 130 msgid "The Value for the Option \"Codes per Page\" must be numeric" 133 131 msgstr "" 134 132 135 #: inc/actions/status.php: 23133 #: inc/actions/status.php:30 136 134 msgid "Modifying of the Status to something else than 1 or 2 is not allowed" 137 135 msgstr "" 138 136 139 #: inc/error.php: 2 inc/error.php:7 inc/pages/system.php:26 inc/pages/system.php:56140 #: inc/pages/system.php: 69 inc/pages/system.php:82 inc/pages/system.php:111141 #: inc/pages/system.php:1 21137 #: inc/error.php:11 inc/error.php:16 inc/pages/system.php:25 138 #: inc/pages/system.php:55 inc/pages/system.php:68 inc/pages/system.php:81 139 #: inc/pages/system.php:100 inc/pages/system.php:110 142 140 msgid "Error" 143 141 msgstr "" 144 142 145 #: inc/functions.php: 8143 #: inc/functions.php:15 146 144 msgid "" 147 145 "You don´t have the Permissions to access this Page. Please contact the " … … 149 147 msgstr "" 150 148 151 #: inc/functions.php: 17 inc/functions.php:115 inc/load.php:35149 #: inc/functions.php:26 inc/functions.php:148 inc/load.php:51 152 150 msgid "Easy Code Placement" 153 151 msgstr "" 154 152 155 #: inc/functions.php:1 16153 #: inc/functions.php:149 156 154 msgid "Add a Code wherever you want it." 157 155 msgstr "" 158 156 159 #: inc/functions.php:1 51157 #: inc/functions.php:195 160 158 msgid "Code to Display:" 161 159 msgstr "" 162 160 163 #: inc/functions.php:1 53161 #: inc/functions.php:197 164 162 msgid "Please select a Code" 165 163 msgstr "" 166 164 167 #: inc/functions.php: 168165 #: inc/functions.php:214 168 166 msgid "Remove Borders and Design from Widget?" 169 167 msgstr "" 170 168 171 #: inc/home.php: 17169 #: inc/home.php:24 172 170 msgid "« Previous" 173 171 msgstr "" 174 172 175 #: inc/home.php: 18173 #: inc/home.php:25 176 174 msgid "Next »" 177 175 msgstr "" 178 176 179 #: inc/home.php: 35177 #: inc/home.php:42 180 178 msgid "Shortcode" 181 179 msgstr "" 182 180 183 #: inc/home.php: 36181 #: inc/home.php:43 184 182 msgid "Action" 185 183 msgstr "" 186 184 187 #: inc/home.php: 48185 #: inc/home.php:57 188 186 msgid "Copy Shortcode to Clipboard" 189 187 msgstr "" 190 188 191 #: inc/home.php: 48189 #: inc/home.php:57 192 190 msgid "Copy" 193 191 msgstr "" 194 192 195 #: inc/home.php: 53193 #: inc/home.php:63 196 194 msgid "Online - Click to change" 197 195 msgstr "" 198 196 199 #: inc/home.php: 55197 #: inc/home.php:65 200 198 msgid "Offline - Click to change" 201 199 msgstr "" 202 200 203 #: inc/home.php: 59201 #: inc/home.php:70 204 202 msgid "No Alignment - Click to change" 205 203 msgstr "" 206 204 207 #: inc/home.php: 61205 #: inc/home.php:72 208 206 msgid "Alignment Left - Click to change" 209 207 msgstr "" 210 208 211 #: inc/home.php: 63209 #: inc/home.php:74 212 210 msgid "Alignment Center - Click to change" 213 211 msgstr "" 214 212 215 #: inc/home.php: 65213 #: inc/home.php:76 216 214 msgid "Alignment Right - Click to change" 217 215 msgstr "" 218 216 219 #: inc/home.php: 68217 #: inc/home.php:79 220 218 msgid "Edit" 221 219 msgstr "" 222 220 223 #: inc/home.php: 78221 #: inc/home.php:90 224 222 msgid "No Code found - Click \"Add New Code\" to add one." 225 223 msgstr "" 226 224 227 #: inc/home.php: 87225 #: inc/home.php:99 228 226 msgid "Add New Code" 229 227 msgstr "" 230 228 231 #: inc/home.php:1 23229 #: inc/home.php:136 232 230 msgid "" 233 231 "If you want to thank the developer for this free Plugin, you are welcome to " … … 236 234 msgstr "" 237 235 238 #: inc/home.php:1 34236 #: inc/home.php:144 239 237 msgid "Added on" 240 238 msgstr "" 241 239 242 #: inc/home.php:1 36240 #: inc/home.php:146 243 241 msgid "Last Modified on" 244 242 msgstr "" 245 243 246 #: inc/home.php:14 0244 #: inc/home.php:149 247 245 msgid "Close" 248 246 msgstr "" 249 247 250 #: inc/home.php:15 3248 #: inc/home.php:157 251 249 msgid "Are you really sure you want to permanently delete this Shortcode?" 252 250 msgstr "" 253 251 254 #: inc/home.php:15 6252 #: inc/home.php:159 255 253 msgid "No!" 256 254 msgstr "" 257 255 258 #: inc/home.php:1 57256 #: inc/home.php:160 259 257 msgid "Confirm" 260 258 msgstr "" 261 259 262 #: inc/load.php: 38260 #: inc/load.php:55 263 261 msgid "Home" 264 262 msgstr "" 265 263 266 #: inc/load.php: 39264 #: inc/load.php:56 267 265 msgid "Settings" 268 266 msgstr "" 269 267 270 #: inc/load.php: 40268 #: inc/load.php:57 271 269 msgid "Help" 272 270 msgstr "" 273 271 274 #: inc/load.php: 41272 #: inc/load.php:58 275 273 msgid "System Information" 276 274 msgstr "" 277 275 278 #: inc/pages/help.php: 7276 #: inc/pages/help.php:11 279 277 msgid "Where do I get the Shortcode from?" 280 278 msgstr "" 281 279 282 #: inc/pages/help.php:1 3280 #: inc/pages/help.php:12 283 281 msgid "" 284 282 "You only need to Click on the \"Copy\" Button in the Row with your Shortcode " … … 289 287 msgstr "" 290 288 291 #: inc/pages/help.php: 21289 #: inc/pages/help.php:13 292 290 msgid "The \"Copy\" Button don´t work or I want to write the Code manually!" 293 291 msgstr "" 294 292 295 #: inc/pages/help.php: 27293 #: inc/pages/help.php:14 296 294 msgid "" 297 295 "Just type [ecp code=\"%PLACEHOLDER%\"] at the place you want to have the " … … 299 297 msgstr "" 300 298 301 #: inc/pages/help.php: 35299 #: inc/pages/help.php:15 302 300 msgid "Where can I place the Shortcode?" 303 301 msgstr "" 304 302 305 #: inc/pages/help.php: 41303 #: inc/pages/help.php:16 306 304 msgid "" 307 305 "At the moment you can place the Shortcode at the following Areas: Widget Title " … … 311 309 msgstr "" 312 310 313 #: inc/pages/settings.php:10 inc/pages/system.php:10 inc/pages/system.php:101 314 #: inc/pages/system.php:141 315 msgid "Value" 316 msgstr "" 317 318 #: inc/pages/settings.php:15 311 #: inc/pages/help.php:17 312 msgid "The Output doesn´t look right or it has a colored Background!" 313 msgstr "" 314 315 #: inc/pages/help.php:18 316 msgid "" 317 "Be sure to use the \"Copy\" Button to get your Shortcode or write in manually. " 318 "Otherwise it can happen that you Copy HTML Code that´s around the Shortcode. " 319 "You couldn´t see see it but you can Copy it!" 320 msgstr "" 321 322 #: inc/pages/settings.php:14 319 323 msgid "Who can manage this Plugin?" 320 324 msgstr "" 321 325 326 #: inc/pages/settings.php:21 327 msgid "Adminstrators and higher" 328 msgstr "" 329 322 330 #: inc/pages/settings.php:22 323 msgid " Adminstrators and higher"331 msgid "Editors and higher" 324 332 msgstr "" 325 333 326 334 #: inc/pages/settings.php:23 327 msgid " Editors and higher"335 msgid "Authors and higher" 328 336 msgstr "" 329 337 330 338 #: inc/pages/settings.php:24 331 msgid "Authors and higher"332 msgstr ""333 334 #: inc/pages/settings.php:25335 339 msgid "Contributors and higher" 336 340 msgstr "" 337 341 338 #: inc/pages/settings.php: 30 inc/pages/system.php:77342 #: inc/pages/settings.php:29 inc/pages/system.php:76 339 343 msgid "Codes per Page" 340 344 msgstr "" 341 345 342 #: inc/pages/system.php:1 346 #: inc/pages/system.php:10 343 347 msgid "General" 344 348 msgstr "" 345 349 346 #: inc/pages/system.php:1 5350 #: inc/pages/system.php:14 347 351 msgid "PHP Version" 348 352 msgstr "" 349 353 350 #: inc/pages/system.php:1 9354 #: inc/pages/system.php:18 351 355 msgid "MySQL Version" 352 356 msgstr "" 353 357 354 #: inc/pages/system.php:3 2358 #: inc/pages/system.php:31 355 359 msgid "WordPress Version" 356 360 msgstr "" 357 361 358 #: inc/pages/system.php:3 6362 #: inc/pages/system.php:35 359 363 msgid "WordPress Network Page" 360 364 msgstr "" 361 365 362 #: inc/pages/system.php:3 9366 #: inc/pages/system.php:38 363 367 msgid "Yes" 364 368 msgstr "" 365 369 366 #: inc/pages/system.php:4 1370 #: inc/pages/system.php:40 367 371 msgid "No" 368 372 msgstr "" 369 373 370 #: inc/pages/system.php:4 7374 #: inc/pages/system.php:46 371 375 msgid "Plugin Version (File)" 372 376 msgstr "" 373 377 374 #: inc/pages/system.php:5 1378 #: inc/pages/system.php:50 375 379 msgid "Plugin Version (Database)" 376 380 msgstr "" 377 381 378 #: inc/pages/system.php:6 4382 #: inc/pages/system.php:63 379 383 msgid "Role" 380 384 msgstr "" 381 385 382 #: inc/pages/system.php:9 2386 #: inc/pages/system.php:91 383 387 msgid "Configuration" 384 388 msgstr "" 385 389 386 #: inc/pages/system.php: 106390 #: inc/pages/system.php:95 387 391 msgid "PHP max. execution time" 388 392 msgstr "" 389 393 390 #: inc/pages/system.php:1 16394 #: inc/pages/system.php:105 391 395 msgid "PHP memory limit" 392 396 msgstr "" 393 397 394 #: inc/pages/system.php:1 26398 #: inc/pages/system.php:115 395 399 msgid "WordPress memory limit" 396 400 msgstr "" 397 401 398 #: inc/pages/system.php:1 32402 #: inc/pages/system.php:121 399 403 msgid "Paths" 400 404 msgstr "" 401 405 402 #: inc/pages/system.php:1 46406 #: inc/pages/system.php:125 403 407 msgid "Home URL" 404 408 msgstr "" 405 409 406 #: inc/pages/system.php:1 50410 #: inc/pages/system.php:129 407 411 msgid "Site URL" 408 412 msgstr "" 409 413 410 #: inc/pages/system.php:1 54414 #: inc/pages/system.php:133 411 415 msgid "Plugin URL" 412 416 msgstr "" -
easy-code-placement/trunk/readme.txt
r1512852 r1529213 5 5 Requires at least: 4.0 6 6 Tested up to: 4.6.1 7 Stable tag: 16.1 07 Stable tag: 16.11 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 87 87 88 88 == Changelog == 89 90 = 16.11 = 91 * 06.11.2016 92 * Added UIkit 2.27.1 93 * Removed jQuery (using WP version now), Bootstrap (using UIkit now) and Font-Awesome (build into UIkit) 94 * Added a help question 95 * Fixed a wrong Text-Domain in two strings 96 * When shortcode is deleted and the widget is still on the page its not shown anymore 97 * Added tons of spaces and comments for a better readability of the code 98 * Updated the German translation 99 * Direct access to the plugin files is now checked and blocked 89 100 90 101 = 16.10 =
Note: See TracChangeset
for help on using the changeset viewer.