Changeset 1187794
- Timestamp:
- 06/25/2015 10:14:14 PM (11 years ago)
- Location:
- oypie/trunk
- Files:
-
- 6 added
- 4 edited
-
css/admin.css (added)
-
js/text-button.js (modified) (3 diffs)
-
oypie.php (modified) (5 diffs)
-
pages (added)
-
pages/album.php (added)
-
pages/help.php (added)
-
pages/preference.php (added)
-
pages/price.php (added)
-
readme.txt (modified) (1 diff)
-
shortcode.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
oypie/trunk/js/text-button.js
r1186453 r1187794 29 29 label: 'Mapnavigatie', 30 30 'values': [ 31 {text: 'Ja', value: ' nonav="1"'},32 {text: 'Nee', value: ' '}31 {text: 'Ja', value: ''}, 32 {text: 'Nee', value: ' nonav="1"'} 33 33 ] 34 34 },{ … … 37 37 label: 'Transparantheid', 38 38 'values': [ 39 {text: 'Ja', value: ' trans="1"'}, 40 {text: 'Nee', value: ''} 39 {text: 'Nee', value: ''}, 40 {text: 'Ja', value: ' trans="1"'} 41 ] 42 },{ 43 type: 'listbox', 44 name: 'voorkeuren', 45 label: 'Voorkeursinstellingen', 46 'values': [ 47 {text: 'Nee', value: ''}, 48 {text: 'Ja', value: ' pref="1"'} 41 49 ] 42 50 },{ … … 54 62 onclick: function() { 55 63 editor.windowManager.open( { 56 title: ' Albumtoevoegen',64 title: 'Prijslijst toevoegen', 57 65 body: [{ 58 66 type: 'listbox', -
oypie/trunk/oypie.php
r1186464 r1187794 4 4 Plugin URI: http://sanderonlinemedia.nl/oypie; 5 5 Description: This plugin is for photographers who use the service 'OYPO'. In this plugin you can generate shortcodes for your pages and posts. The shortcode generator can you find under 'Tools' > 'SanderOnline'. 6 Version: 1.1. 16 Version: 1.1.2 7 7 Author: SanderOnline Media / Sander Dijkstra 8 8 Author URI: http://sander-dijkstra.nl/ … … 10 10 */ 11 11 12 include("shortcode.php"); 13 include("widget.php"); 14 15 // Add OYPO 16 12 // Load shortcodes and widget 13 require_once("shortcode.php"); 14 require_once("widget.php"); 17 15 18 16 // Add options page 19 17 add_action( 'admin_menu', 'oypie_menu' ); 20 21 22 18 23 19 wp_enqueue_script('jquery'); … … 25 21 function oypie_menu() { 26 22 add_menu_page("", "OYPie", 'oypie', "oypie", "oypie_home_page",'dashicons-camera', 76 ); 27 add_submenu_page("oypie", "OYPie - Help", "Help", 0, "oypie_help", "oypie_help_page"); 23 add_submenu_page("oypie", "OYPie - Help", "Informatie", 0, "oypie_help", "oypie_help_page"); 24 add_submenu_page("oypie", "OYPie - Albumgenerator", "Albumgenerator", 0, "oypie_album", "oypie_album_page"); 25 add_submenu_page("oypie", "OYPie - Prijslijstgenerator", "Prijslijstgenerator", 0, "oypie_price", "oypie_price_page"); 26 add_submenu_page("oypie", "OYPie - Voorkeuren", "Voorkeuren", 0, "oypie_preference", "oypie_preference_page"); 28 27 remove_submenu_page( 'oypie', 'oypie' ); 29 28 } … … 33 32 34 33 function oypie_price_page() { 35 require_once("p rice_page.php");34 require_once("pages/price.php"); 36 35 } 37 36 38 37 function oypie_help_page() { 39 require_once(" help_page.php");38 require_once("pages/help.php"); 40 39 } 41 40 42 41 function oypie_album_page() { 43 require_once("album_page.php"); 42 require_once("pages/album.php"); 43 } 44 function oypie_preference_page() { 45 require_once("pages/preference.php"); 44 46 } 45 47 … … 74 76 add_action('admin_enqueue_scripts', 'oypie_tc_css'); 75 77 78 function oypie_admin_css() { 79 wp_enqueue_style('oypie', plugins_url('css/admin.css', __FILE__)); 80 } 81 82 add_action('admin_enqueue_scripts', 'oypie_admin_css'); 76 83 ?> -
oypie/trunk/readme.txt
r1186464 r1187794 27 27 28 28 == Changelog == 29 30 = 1.1.2 = 31 Preferences added, old shortcode generators have been updated. 32 29 33 30 34 = 1.1.1 = -
oypie/trunk/shortcode.php
r939329 r1187794 5 5 */ 6 6 function oypo_output($atts) { 7 7 8 extract(shortcode_atts(array( 8 9 'type' => '', 9 10 'id' => '', 10 11 'wl' => '', 11 'trans' => ' 1',12 'nonav' => ' 1',12 'trans' => '', 13 'nonav' => '', 13 14 'css' => '', 14 'colors' => '' 15 'colors' => '', 16 'pref' => '' 15 17 ), $atts)); 16 18 19 20 if($pref == '1') { 21 // Load preferences 22 global $wpdb; 23 $preferences = $wpdb->get_var( "SELECT option_value FROM $wpdb->options WHERE option_name = 'oypie_pref'"); 24 $preferences = explode('\/', $preferences); 25 26 // Set preferences, this overrules the settings of the shortcode! 27 if($preferences[1] != NULL){ 28 $colors = $preferences[1]; 29 } 30 if($preferences[2] != NULL){ 31 $css = $preferences[2]; 32 } 33 if($preferences[3] != NULL){ 34 $wl = $preferences[3]; 35 } 36 if($preferences[4] != NULL){ 37 $trans = $preferences[4]; 38 } 39 40 } 41 17 42 $identical = $id; 18 43 … … 27 52 $out_id = ""; 28 53 } 29 54 30 55 //Transparcency 31 56 if($trans == 1) { … … 52 77 //Custom css link 53 78 if($css != NULL){ 54 $array = get_headers($css);55 $string = $array[0];56 if(strpos($string,"200")) {57 79 $out_css = "var css='".$css."'; 58 80 "; 59 81 } else { 60 $out_css = "";61 }62 }else{63 82 $out_css = ""; 64 83 }
Note: See TracChangeset
for help on using the changeset viewer.