|
|

楼主 |
发表于 2013-1-17 17:37:25
|
显示全部楼层
////////////////////////////////////////////////////////////////////////////////
- U! J- i+ S( t* }- U6 o// Theme Option( z; n& {! q5 W# [ R
////////////////////////////////////////////////////////////////////////////////* C/ W" I5 ]; s# _( f
# P$ E* @' D1 I8 l0 F' E& Q) m' N
$themename = "Zenx";
) F$ m% X4 D7 C1 x- d8 t+ {$shortname = str_replace(' ', '_', strtolower($themename));
0 h: B- f' U l7 U0 C$ |3 M/ t
8 m( f# n) y# i z* Xfunction get_theme_option($option) g' I: ^$ }* W& D% e
{% D p% g* x# N6 c4 ~ [; s% B" @
global $shortname;
) L& q5 d6 P4 f, D) } return stripslashes(get_option($shortname . '_' . $option));
6 c' w6 V! h0 M) p9 b7 B}/ s$ D I2 Q" [* X/ F5 {
! e z0 b5 i Nfunction get_theme_settings($option)
* t# r" w+ h, Q, h3 R9 \{( s# N0 B/ D+ z; _; l/ i
return stripslashes(get_option($option));
: i% N* n7 D, A$ I+ k6 G}
# H% q5 i9 Y% k. j$wp_dropdown_rd_admin = $wpdb->get_results("SELECT $wpdb->term_taxonomy.term_id,name,description,count FROM $wpdb->term_taxonomy LEFT JOIN $wpdb->terms ON $wpdb->term_taxonomy.term_id = $wpdb->terms.term_id WHERE parent > -1 AND taxonomy = 'category' AND count != '0' GROUP BY $wpdb->terms.name ORDER by $wpdb->terms.name ASC");! w7 h! Z9 K( ]; [3 u! i5 X
$wp_getcat = array();/ ^% p2 V5 r, m w& r
foreach ($wp_dropdown_rd_admin as $category_list) {9 `$ i1 n& d @7 Z- P7 F/ J/ x$ |
$wp_getcat[$category_list->term_id] = $category_list->name;, b5 g7 s2 w* N3 [4 H, d
}: a9 a) k6 x, @/ L: j6 `
$category_bulk_list = array_unshift($wp_getcat, "Choose a category:");
. I2 H) L! X' W ]( { ^' U$number_entries = array("Number of post:","1","2","3","4","5","6","7","8","9","10");
5 {' E" w3 u5 v9 E$crop_position = array("Choose Crop Position","middle","middleleft","middleright","topcenter","topleft","topright","bottomcenter","bottomleft","bottomright");
- R4 s% r) H" V% ]) d1 d1 f0 q& j4 ^# l8 }
$options = array (" H* Y- z. {: ]# y9 n/ ~
/ O4 P' Y3 g, |4 M% u6 q( m- S# I2 r
array( "name" => "Blog Header Settings",
9 V2 K7 v, M2 ^! S( L "type" => "heading",
; `+ Y5 F/ r0 _( o, M ),
+ {+ I& H% y- V, p( e# G
- n W$ b0 u$ b& m, P( Q, W' E array( "name" => "Use Custom Logo On The Blog Header?<br /><em>*Disable by default, Choose Yes to enable it.</em>",- u5 G" `- j; Z! \" h
"id" => $shortname."_header_logo_activate",
: T5 S1 x* j6 l: ~8 }: c "type" => "select",* g( a2 |, _$ k$ q5 {
"std" => "No",( X4 Y3 Y! K8 v: D2 I, n+ I
"options" => array("No", "Yes")),# B. @$ R) M0 n5 {5 ?! R
4 n! C6 [9 P: F @( d8 V* Y; M7 O: c. V
array( "name" => "Insert The Full URL Location Of Your Logo Here <br /><em>*leave blank if not use</em>",
4 n, g6 B& Y9 A4 X/ f "id" => $shortname."_logo_url",
' v. ~5 |) L- N "type" => "text",
2 e# H$ [+ _1 A7 O/ e# j "box" => "social",
9 g6 |2 j. e/ l) Z) G8 ^ "std" => "",8 G4 S K0 s$ G0 ~- u0 b% E- G
),
# [8 }" [1 ~9 z! B$ V " C- b: w& K2 y6 m; `
array( "name" => "Insert Header Banner HTML Code (Header)
4 n9 }4 B: k! ~; @8 m0 Q <br /><em>*Recommended Size 468 x 60</em># x4 X s# C, F) g2 S
<br /><em>*leave blank if not use</em>",
+ [$ E! {. t$ Z1 I' A. }! J "id" => $shortname."_header_banner",
6 p" K% J7 ?; E" m, ]" S# [3 E "type" => "textarea",
m7 X$ z! l1 t Y; F7 E/ l: P "std" => "",; e6 w" j' p- }0 c
),
2 E& H* J5 ~% s3 H% {
& w) D* P; f0 a4 c P6 Z/ | array( "name" => "</div></div>",/ F0 I7 I2 s1 J3 L. p6 A" g
"type" => "close",8 x$ k$ ~+ ]7 h. [, S
),2 |, z6 b- J4 A, U
! F, o# w' M2 e7 g$ j/ W6 `! Y
% h& ~, M6 C8 J8 r, P6 b+ R8 ^2 c9 [: U array( "name" => "Header Navigation Settings"," m4 @$ i. H) t& }+ L) o
"type" => "heading",
/ u% L# P, S# A' ~* v+ U$ O. h ),% C+ u5 r) j# a7 V) [+ ~& N2 f
7 e' X" B) O# s! y- F7 T
array( "name" => "Insert Page ID To Exclude On Header Navigation<br />
) y$ f( F7 I7 r0 M9 S <em>i.e ../wp-admin/page.php?action=edit&post=<span class=\"redbold\">123</span></em><br />" _& ~* B+ d6 y$ D* w' A
<em>*Enter the page post ID number only</em><br />
* |$ P( y8 x* s4 b <em>*separate by comma</em><br />
- b5 d n; W$ T$ h <em>*Exclude pages which you don't want to show on the header navigation</em>",7 T+ Y/ Y2 q3 \5 }
"id" => $shortname."_header_page_navigation",
& p/ s, f7 @( g3 f "type" => "text"," p$ x( k- C6 M- q+ n4 `
"std" => "",
7 D% Q+ J& \& O* g ),
9 h; P Q/ u; w: z& y K7 c% ^0 g5 x' ?2 d
array( "name" => "</div></div>",& n+ |) j2 w' [7 R
"type" => "close", b4 N8 \4 B7 c9 _+ u6 @
),( p: h9 d/ Y* G) R) a
! E+ H4 ]) K: w& e/ H2 ^7 O& w! F2 d
6 t0 y3 Y/ |3 b9 k9 H) _" _4 U# [ array( "name" => "Post Auto Thumbnails Settings",( B& c/ u0 Z6 u5 s
"type" => "heading",
h4 `$ M F1 W ),1 J! ?5 Z/ @7 B
& v) N, J8 j9 @' q% ^6 E+ J array( "name" => "Use <strong>Timthumb Script</strong> For Auto Thumbnails?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
% h9 W0 w, A2 W1 p "id" => $shortname."_timthumb_activate",
' A( m6 E- x9 E "type" => "select",0 a- t3 a9 R$ Y: S6 t) e9 J9 M( n
"std" => "No",
' `: l% y( y) [" O% H "options" => array("No", "Yes")),
( I% o9 f4 v% v6 [ 2 P3 _# T$ y+ F: K- a, O y, B
array( "name" => "If Timthumb is enabled, Please choose its cropping method",
& b& v, I# K4 j; \8 } "id" => $shortname."_timthumb_cropping",
. C \4 r, l1 F/ W: n$ x "type" => "select",
* ~& O9 D# Z$ w1 p5 o4 [ "std" => "",
- e4 M( r% k7 L; J7 P "options" => $crop_position),
1 |6 q' Z8 w) N Q3 [( r, i# u: I% h
array( "name" => "Insert Width Of Thumbnail Image<br />
& {4 ] Y/ {- K! b3 n <em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />- \9 N1 {+ K8 a/ D5 c4 M0 X
<em>*Leave Blank To Use Default: 250</em><br />",# m9 L. t" A# o
"id" => $shortname."_thumb_width",
/ x |8 c1 p4 T "type" => "text",
4 m3 @/ \+ U7 F. F2 ^* M "std" => "",
5 z* | I0 S) g ),* h1 |4 @+ S1 Y) S, q. O1 @% p' @1 X9 c
' Z) I9 ?9 \# x/ o* U K" N array( "name" => "Insert Height Of Thumbnail Image<br />
$ k+ O2 j9 y% K6 K <em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />
, M7 B4 M% H+ d, }( v <em>*Leave Blank To Use Default: 200</em><br />",1 [+ Q [" L/ R5 K+ Y6 d
"id" => $shortname."_thumb_height",3 v8 U2 I0 ~ S7 B* n' }! Y
"type" => "text",
% ? f% c& {( T- X4 X$ k8 p | "std" => "",; ]' ~; V3 [3 t& q' I
),
( v5 H; y; m( O2 d7 z
3 e1 O" D5 w3 y, e array( "name" => "</div></div>",/ Q; p u( k, w/ k6 a& a) n
"type" => "close",
~- H- b' y1 h% ~* { ),
% v% o0 n; d( E- l- E! W+ R
9 n/ O- _3 q4 G5 x array( "name" => "Featured Content Slider Settings",9 u! H8 j# H+ O! {6 I& _; i
"type" => "heading",+ }/ W9 ~% @+ u
),5 e7 i1 c( f' a2 t
2 n9 L7 }# n0 r3 l0 `$ v
array( "name" => "Enable <strong>Featured Content Slider</strong> On Homepage?<br /><em>*Disable by default, Choose Yes to enable it.</em>",3 k9 I# c+ V) C
"id" => $shortname."_featured_activate", t1 V% D2 \0 M* |. v
"type" => "select",
5 V& m8 K8 M% e! p1 o5 n1 F "std" => "No",2 ~. c1 Z. \6 R) @+ q- L
"options" => array("No", "Yes")),- W6 F6 t$ }; [; q# o4 u
9 ^, B* n& N: h7 N
; ]/ K5 r/ Z$ d3 N0 K! E& { K array( "name" => "Choose Which <strong>Category</strong> To Put On The Featured Slider?",; c5 o. c3 M* l7 O0 I& d
"id" => $shortname."_featured_category",
1 o+ m* Q C5 \. g( I "type" => "select",
+ B; Z" Z! I# z! S5 m "std" => "Choose a category:",
6 I/ w0 b7 d4 u) i j" L "options" => $wp_getcat),
1 R% c1 D8 f" Q6 N; o
8 ]: P4 w2 k/ }* X: I array( "name" => "Choose How Many <strong>Post</strong> To Show On The Featured Slider?",) X. \' ] H& k* h. ~, G9 d6 V
"id" => $shortname."_featured_number",
4 y' c2 f' W" J: y$ _- T "type" => "select",
2 @. M+ V3 _3 }* V5 I1 h "std" => "Number of post:",& x) a- d$ Q$ q
"options" => $number_entries),
. e! G" [) B" {9 D) m4 m( `! P! d! P) G& ^$ G, t; P
array( "name" => "</div></div>",
# N" B% b6 e8 y1 N+ c "type" => "close",! G0 K1 ^$ N. ~0 W" T7 W1 L+ D ]: P
),
# t# H: I% s$ \# z, ^; i' T& [5 B3 F9 t
5 }) d* O( g6 g+ x, N array( "name" => "Featured Category Settings",
/ F1 G8 o0 v. f' I "type" => "heading", K/ {7 J% |' T. ?
),
_( {, z4 m; J1 z# t8 s9 Q2 n' c4 A2 G! ?
array( "name" => "Enable <strong>Featured Category Showcase On Sidebar</strong>?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
& A; \8 `. e2 x& G6 u "id" => $shortname."_featured_category_activate"," {' \" H1 W, X
"type" => "select",
1 V' e) |+ R: X/ u "std" => "No",6 }8 ^. w" q) S( @' k V+ O9 M
"options" => array("No", "Yes")),
# b( `! d7 @7 D# t0 k 9 t G6 ]3 r# D1 ?/ E
array( "name" => "Choose Category To Feature On 1st Block?<br /><em>*Leave it as default if not use.</em>",& ~2 @6 [6 |) t/ L
"id" => $shortname."_featured_category_id1",* ?6 \1 E4 B. P6 `4 f5 Y
"type" => "select",
+ K$ ^; V; o0 A/ f2 w "std" => "Choose a category:",. ?8 Q% a. k# V" i
"options" => $wp_getcat),
; h* V6 Z8 p/ w$ |. U9 s
- _" U* D8 {: A7 R array( "name" => "Choose How Many <strong>Post</strong> To Display On 1st Block?<br /><em>*Leave it as default if not use.</em>",7 m2 j$ x# t+ S# m6 y6 _) n, ?
"id" => $shortname."_featured_number1",0 x: W! Y8 _2 }
"type" => "select",8 P* e; b' Y, Y3 }' S
"std" => "Number of post:",2 N$ {4 X. y8 ` h
"options" => $number_entries),) \# t- o3 g" V3 [2 x1 s, q
- ]3 c3 y4 P {
array( "name" => "Choose Category To Feature On 2nd Block?<br /><em>*Leave it as default if not use.</em>",
- l( N( Z9 I/ ?* ^+ H "id" => $shortname."_featured_category_id2",
! K; M) Q: B6 g7 ~9 M "type" => "select",2 e) w" |$ U- E& l4 k
"std" => "Choose a category:",$ V/ k5 u- R2 B9 ^
"options" => $wp_getcat),9 s4 B8 k5 f* {# M8 c
4 H$ B5 W% m7 W* O( ]
array( "name" => "Choose How Many <strong>Post</strong> To Display On 2nd Block?<br /><em>*Leave it as default if not use.</em>",
d* {7 x4 L. j- i, b "id" => $shortname."_featured_number2",
9 D( N' r' k+ z* s "type" => "select",
& `8 K: M$ z7 F6 I8 m3 V "std" => "Number of post:",. {" ^: I; {5 ~4 w
"options" => $number_entries),
$ U3 L* F+ p6 y4 I/ B- O
3 q0 f& G, d, ]% j + U0 \. i- r5 I
array( "name" => "Choose Category To Feature On 3rd Block?<br /><em>*Leave it as default if not use.</em>",
. s; `" m1 Z- G% w: Q9 S "id" => $shortname."_featured_category_id3",
( p6 t, C) h d [ \, W o# {* v) m% { "type" => "select",5 D4 X( @ c, c$ [
"std" => "Choose a category:",* W" {9 }1 j. l* d$ R9 q
"options" => $wp_getcat),
2 Z. I0 y6 X; O: S9 ]
- c: @% }6 V5 m3 O1 F, v array( "name" => "Choose How Many <strong>Post</strong> To Display On 3rd Block?<br /><em>*Leave it as default if not use.</em>",
* l0 o- r3 g. D; o7 h5 m3 _ "id" => $shortname."_featured_number3",( L T9 j/ G* `8 K
"type" => "select",
; m0 q; \9 G7 A! k! d/ _ "std" => "Number of post:",
2 b* c/ h9 R/ p' `9 s" k; ?, t* O "options" => $number_entries),! z% S- i2 w/ o- R
! a/ Q. x, n0 i) F1 Y# m+ h0 R8 d) j* Y& [; M6 P
array( "name" => "</div></div>",
: r- }8 o0 R& V "type" => "close",' \/ U! J" m, K- L/ _$ c8 l$ p c
),
7 Z7 f3 x0 ~3 x; v0 @7 a3 J" L$ u% N( ], z
/ \5 X9 q4 z0 ^8 {# v
array( "name" => "Google Adsense & Analytics Settings",0 f6 m& b b- i Y5 m. I d
"type" => "heading",
( u& j( K" Z2 X, c. M$ @ ),4 X: `& m; z; u, d8 ?* Z" g
9 E# h' W5 V6 b* q, E2 ] array( "name" => "Enable Google Adsense Loops Within Posts<br /><em>*default are disable, you can activate it by choosing enable</em>",
: E0 e) D; A) ~* S "id" => $shortname."_adsense_loop_activate", Z Q2 l- J, q# P& o% Q
"type" => "select",
) M6 c- t; q( n6 h- E "std" => "Disable",/ L8 }8 h8 u) Y
"options" => array("Disable", "Enable")),/ P! X/ y! t% d* X
* X+ y) d7 y' Z0 ]5 n) T% A array( "name" => "Insert Google Adsense Code For Loops Here<br />
% z" \7 F6 h! p2 ] <em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",
7 c$ g! l. g; T# | "id" => $shortname."_adsense_loop",
, {% |8 P* u e& ?+ E' a4 U5 I' M "type" => "textarea",
, O8 R# P* k- S" a% D: U3 @ "std" => "",1 S5 z+ d/ Z* u
),
% o/ w2 b. a( P
0 }1 ~% P% M+ }) l* x! r S array( "name" => "Enable Google Adsense On Single Page<br /><em>*default are disable, you can activate it by choosing enable</em>",
/ E9 e5 {( i" t& M "id" => $shortname."_adsense_single_activate",
: f e- V0 i) l. K7 E( P7 J/ M: t* D "type" => "select",
- g0 u. S! c3 P "std" => "Disable",& l; T& O1 z( X/ f: O4 L& p6 X! b
"options" => array("Disable", "Enable")),
) K4 F6 L$ |( x" H0 e
7 }1 P# F. w; J# g2 v4 h array( "name" => "Insert Google Adsense Code For Single Page Here<br />
: H8 q+ C5 o8 h5 }, F4 b! E' v' S <em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",, Y! x% A) V% E) s0 n$ j
"id" => $shortname."_adsense_single",! g: t V: ?1 c' k4 S) n
"type" => "textarea",7 p5 g* k" b8 M/ u0 W$ m
"std" => "",
% f. R1 ~6 G. y* `% m ),
' d7 u% G$ F' K2 L3 [/ |2 e; x2 Y: s7 H% l; U! S# m
& b- k3 u( e3 { array( "name" => "Insert Google Analytics code <br /><em>*optional - leave it blank if not using</em>",3 `0 J: {& J+ i: d& h, C( w
"id" => $shortname."_google_analytics",4 X' G& n- R0 \$ x
"type" => "textarea",5 P* l9 l, W' ?/ U1 F: m E
"std" => "",+ U" I! k. b1 b$ F
),# } C1 `: t: D' D3 J
; I* c& P* d$ f" x! y5 ?% T array( "name" => "</div></div>",. b, Z T4 [' ` M7 O
"type" => "close"," |4 C8 [2 q! Z
),9 T) c# h: t) @
! k3 K* q, c+ C) F% X
- V [! X, n8 _4 S( z5 F' a array( "name" => "AddThis Social Bookmarking Settings",2 X" M. D) g$ Y( D. {2 E6 j7 F3 c' f/ ^
"type" => "heading",3 s9 X6 ^% O% c/ S1 J
),; I& X! ~! {3 B4 c3 D. K
0 I# x2 B4 |) {- ]! s5 P- h7 j array( "name" => "Insert you AddThis ID here (Only For Tracking Purpose) <br /><em>*leave blank if not necessary</em>
6 E2 }/ e8 `" Q4 G, t <br /><em>*Get a Free AddThis ID <a href=\"http://www.addthis.com\" target=\"_blank\">here</a> if you don't have one</em>",! g8 L8 S/ M( C) }' V% x, C+ Q7 ~; S
"id" => $shortname."_addthis",( ]2 R. ?" {& g/ }
"type" => "text",6 x8 [1 y1 ]) i* Q
"box" => "social",4 e' B5 N, S9 t+ Q/ K
"std" => "",- W" E0 F0 y. `
),
% c; V q" E; c! p# G( e/ Z
7 H" I; ?! t: e) @3 A7 Q, e array( "name" => "</div></div>",5 Q& @ H1 ?* C6 k3 ]" x
"type" => "close",6 Z, v S, q* m) E7 m* K
),2 B. r, g L5 k
" k1 d9 W2 r8 x1 ^
3 [6 N/ p- g# |3 X
) x* E' D$ M& o4 |. H% d: o6 _ array( "name" => "YouTube Video Settings",
& R; h4 J/ v( L! L "type" => "heading",8 ?# P- T4 v2 U* B7 O: a( G
),* x" H& q& X0 I8 u H* f+ f, H0 \
$ J* D% y: C% m2 w% J: }) j array( "name" => "Enable <strong>YouTube Video</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",3 a* t1 G& @0 Q: T/ ]& }1 y/ H
"id" => $shortname."_emvideo_activate",0 y/ I% d$ a1 H" i
"type" => "select",$ P2 L/ Z! A1 W& j
"std" => "No"," y# o+ ?, ~1 L
"options" => array("No", "Yes")),
" s1 m7 p u' V' B( @! A6 }
& N: \) ^/ S1 q5 V2 X( M4 w array( "name" => "Insert YouTube Video Unique Code<br /><em>*You can find videos to embed on <a href=\"http://www.youtube.com\" target=\"_blank\">YouTube</a> site.</em><br /><em>i.e. Youtube - http://www.youtube.com/watch?v=<span class=\"redbold\">Hr0Wv5DJhuk</span></em><br /><em>*Only Insert The Red Bolded Code Inside Below Setting Box.</em>"," g+ A4 Q9 }2 e3 i
"id" => $shortname."_emvideo",
8 ?& Y7 x# G @) }# U( W "std" => "",
+ i8 i6 {8 v$ C' r; F m: U% q "type" => "text"),6 a3 u5 ^8 I' G* I
( \4 b! N4 b" Z1 `. M
array( "name" => "</div></div>",# g2 G+ @$ W: s
"type" => "close",
; M/ J$ [7 J3 t ),( R8 P0 k! u: L% Y" u* @
9 I9 ]. L6 G/ G8 I
array( "name" => "Twitter Settings",
U9 Q& B9 [* e, v0 z "type" => "heading", P! A9 |9 {( j
),/ t) k: F7 I! O: d3 J5 e
5 y: f+ S% [ | array( "name" => "Enable <strong>Twitter</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
2 q* T. Z" M3 A. s. @+ ^- N "id" => $shortname."_twitter_activate",
3 g; ` H' I V$ u "type" => "select",
1 e& L. X+ [5 u, f' L0 a$ G "std" => "No",, ^$ }0 `3 f! w# b7 X6 `
"options" => array("No", "Yes")),, M- s% `0 V* `' }' k
; Y3 P. e; k+ Z9 o* `1 q5 l9 ? array( "name" => "Insert Your Twitter ID here
: y. b% M% t s0 } <br /><em>*leave blank if not necessary</em>
7 B$ e5 D1 n' u! a( K$ c8 d <br /><em>*Register Twitter for free <a href=\"http://www.twitter.com\" target=\"_blank\">here</a> if you don't have one</em>",
1 n5 p4 h3 J5 L/ B "id" => $shortname."_twitter",
3 G& O: e @4 ^% Y7 Q" X, @ "type" => "text",
% t+ l6 S1 F) f: E9 m3 N "box" => "social",
9 o/ X/ _) z3 w; v. r6 z. c "std" => "",( G- r0 b) O" f& a' N. f
),' r9 M3 O% R' \- Z# w
9 ~4 x; \; w s8 b w- X5 ?
array( "name" => "Enter Twitter Feed Count here4 {% A! [: W. H
<br /><em>*leave blank if not necessary</em>1 Y2 _$ W7 W4 v: k5 R
<br /><em>*Enter How Many Twitter Feed To Display</em>",
( q( S z8 p& [7 d! c "id" => $shortname."_twitter_count",3 m, B7 e# Q+ A
"type" => "text",3 f6 y# O2 Z" d2 Q* l) m2 ?5 E) u
"box" => "social",* }/ w# E' Z/ F+ _ B1 ?* m
"std" => "",4 e& N. }% V4 T( M7 j9 e* a
),
% ]0 I1 G: @* \9 U# n: v- v9 T9 F% s6 r" H8 w5 S
array( "name" => "</div></div>",
; J$ F9 H! J: S4 h& S. ]; d "type" => "close",
$ `8 L \3 N- D5 r ),$ a7 V- B7 Q6 d* N P
: _7 d; V8 K7 [
8 I' K% C1 u' u& D) c- F0 c: r& ?
array( "name" => "125 x 125 Banners Advertisement Settings",
& C# g+ [$ g% K, \4 {! D "type" => "heading",
- q& ]3 S4 X" f& G7 f$ R ),% p0 _, ~9 g1 Z3 a
# Q8 d+ I- }+ W) D9 _0 f& T
array( "name" => "Enable <strong>125 x 125 Banners</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
8 x+ |! l' @/ Y "id" => $shortname."_sponsor_activate",, E+ R# J( ^# r6 Y6 {
"type" => "select",3 Q4 e ~* \$ K0 R( N
"std" => "No",
! G9 e6 ?$ o* e) T8 v! f "options" => array("No", "Yes")),. d* S. l# |" z; W8 |( r# M
l: K6 u8 t' p. H1 o* i5 r
2 y2 o# D' _. t2 U/ | array( "name" => "Insert Sponsor Banner One HTML Code<br /><em>*leave blank if not use</em>",
% M: ?$ X* C' F "id" => $shortname."_sponsor_banner_one",: x/ {3 L( X$ z
"type" => "textarea",
& P6 j! q5 P" }& O+ E "std" => "",
1 C' u( g4 @1 t1 Z" X ),
0 e# c# H( X9 d2 h8 w8 Q% X7 O# Z+ I( Z P& E
array( "name" => "Insert Sponsor Banner Two HTML Code<br /><em>*leave blank if not use</em>",
3 X' F9 j7 S/ v- Q4 | "id" => $shortname."_sponsor_banner_two",
8 @+ X% z- o4 x& r, A* N* A' p "type" => "textarea",
6 c' ?) x/ I, ~1 A' C: Z6 [. b "std" => "",) C8 F. r" }2 P' ?5 h# b6 C
),( C, N: ?2 W% _) L
, a+ |( @! b. {( ~* j array( "name" => "Insert Sponsor Banner Three HTML Code<br /><em>*leave blank if not use</em>",
p7 w0 s! {& y5 C9 o# h O0 e "id" => $shortname."_sponsor_banner_three",4 \; U. n9 _- H7 n; ~4 Z$ s f
"type" => "textarea",4 v# F7 M; [$ n5 `- r" u
"std" => "",( C6 W. F9 Z9 ?3 i6 \
),. F7 \7 w. ~$ z& I: H r
* D/ h( E0 f. T
array( "name" => "Insert Sponsor Banner Four HTML Code<br /><em>*leave blank if not use</em>",; M: H. B9 [+ U" @' |* t1 k) l
"id" => $shortname."_sponsor_banner_four",5 g. l& ~& h- {8 G8 p; h0 c0 t
"type" => "textarea",
/ c7 f& O8 H2 w: M$ G "std" => "",, j; h$ t- t9 Y. O# K" ~, j8 h
),! E# G6 D. i* N+ [; w1 m9 Z8 H
- F5 j$ E* X( C" S array( "name" => "Insert Sponsor Banner Five HTML Code<br /><em>*leave blank if not use</em>",
4 R9 V( p$ E7 t: O4 G& y# c6 A "id" => $shortname."_sponsor_banner_five",4 l% g& W6 ^7 G! M
"type" => "textarea",
" u8 u2 _$ t2 V; B& c" r% y5 \/ B& W "std" => "",
9 B/ _1 k1 ~! `4 s8 B ),: S. x4 P8 t- A h& ~
5 w/ P e0 F/ _8 K e
array( "name" => "Insert Sponsor Banner Six HTML Code<br /><em>*leave blank if not use</em>",
7 P. Z7 G: e8 s "id" => $shortname."_sponsor_banner_six",
4 }2 T" i0 Q( N5 U! D7 n "type" => "textarea",
) o$ l: W# u( r# P "std" => "",. J0 e% L1 K+ S s$ Y. S
),
7 E: I4 j' h2 Q
% I* P1 H5 {% _& |" e% W; G array( "name" => "</div></div>",
! d3 R! H9 @* X7 T9 E "type" => "close",7 Y) G* w* ?$ i
),
% k& q6 z) ?' e: ~* I8 F, M# S0 C" h: x
( [) Y: t( W+ z6 Y0 Q3 ` O
3 S( o0 r. @% s* H: `2 Y' O);
1 w* V0 q+ q8 J* @0 k& e9 t& N& v* O7 z2 J. x5 D8 H" J1 ~
function mytheme_admin_panel(){ if ((function_exists("check_theme_footer") || function_exists("check_theme_header"))) {1 r5 |2 a% c8 J5 L5 l& }! D
4 W" D, k" X% a$ Aecho "<div id=\"admin-options\"> ";
! A; g, \" ]: ]0 {: ?4 l
p! ]2 o& e9 x- Z+ |global $themename, $shortname, $options;
! g: q7 f+ b& `, S+ ^ aif ( $_REQUEST['saved'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings saved.</strong></div>';
: M, `. r/ A3 t% Y' q3 y8 c& l0 m9 xif ( $_REQUEST['reset'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings reset.</strong></div>';
( _- q6 z/ K) w' e" B?>
) ?& n' d) r0 Q9 g7 ^* j7 R: C* A: O1 y/ @0 A8 \+ Z
<h4><?php echo "$themename"; ?> Theme Options</h4>1 h% E G2 N; N7 a2 A
3 m7 c! R J" X0 @
<div class="annouce">
+ J# G& v% u; F<h1>Thank You Using Our <?php echo "$themename"; ?> WordPress Theme</h1>
0 r# t2 u$ [+ r8 q- c<p>Don't Forget to <a href="http://feedburner.google.com/fb/a/mailverify?uri=MagPress&loc=en_US" title="MagPress Newsletter" target="_blank" rel="nofollow"><b>Subscribe Our Free NewsLetter</b></a> In Order To Receive Theme's Updates and Fixes.</p>
+ T. j; s: X; r+ i( L8 Y</div># O' q9 O" q% Q8 C m) V
; |0 w6 ^: c# P6 ^<form action="" method="post">1 B! g+ J0 n. f: |+ E
2 y: ]3 u' i. `<?php foreach ($options as $value) { ?>
& \, b2 o K# }) v) Z# j
& o, w) K6 b1 a3 H) F8 T<?php switch ( $value['type'] ) { case 'heading': ?>5 ^1 i8 d% m; E5 }- D' M3 X
' `; t2 J1 z, T4 H2 o" W+ ~
<div class="get-option">
" _4 a, v5 `+ O) |5 t* n! T5 h( B. V9 W. }9 ~
<h2><?php echo $value['name']; ?></h2>: f; N/ D/ V) E' J8 p
/ u# F" u" m" \" h" V/ |
<div class="option-save">
5 Q1 A2 M( ~- f/ g. Z/ v( q3 T R( _/ k. ^$ T: v; l4 |8 R' ~ z; w
<?php
1 U. \; y' `, ?' G$ Sbreak;! s, d8 x9 ~8 d' e! j u
case 'text':- }8 q) t" \3 P! h# @$ K; ?
?>! o% v# V5 N. O0 d
* r4 C3 L# Q# V
<div class="description"><?php echo $value['name']; ?></div>; \9 b$ B A" `3 m3 U+ X0 @
<p><input name="<?php echo $value['id']; ?>" class="myfield" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if (8 K3 T3 m5 e5 x8 w: |+ Y( X
- R9 b/ f$ ~. j
get_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" /></p>
& c- I) P( k. G* W5 W. O8 U2 S. C' J# _) U) S8 a1 a
<?php
4 B9 D5 d/ V& j! h/ K9 Qbreak;0 }6 F0 p) p; I& t+ X$ H
case 'select':
! Y( h1 f% E7 |7 {/ R?>- ]. C! ^9 h4 B0 I5 D
6 c" D- h, V9 m" Q' E
<div class="description"><?php echo $value['name']; ?></div>
0 f0 G4 I2 U1 J& t# D7 N* e9 J<p><select name="<?php echo $value['id']; ?>" class="myselect" id="<?php echo $value['id']; ?>">% ]0 \2 G8 C: j1 ]( _' i3 D; _
<?php foreach ($value['options'] as $option) { ?>/ }/ B1 Q. B7 r8 k& v! Z
<option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option>
0 k' W" g* e6 n2 p; m<?php } ?>5 n3 y" Y* `9 J+ ]+ r
</select>
1 D# l# d3 x6 l$ c</p>- U' I8 b5 Z' F F: p. |9 o
3 ~6 A1 O7 k a0 p [<?php! N4 w; C( K+ p7 h( g7 n
break;7 v7 y. M8 T3 D# W" u$ z: L# X) x
case 'textarea':
! s6 w# E6 l# q% C/ [' j& K$valuex = $value['id'];
! G5 \" i2 W* q" x" R+ I4 {$valuey = stripslashes($valuex);
& ?6 a5 U8 r5 P- h( k h' C$video_code = get_settings($valuey);# N( Q, C; n; z% e5 C" }
?>
+ e4 c: s6 [: O% H6 R, y
, W. w& l w3 Z6 C& G<div class="description"><?php echo $value['name']; ?></div>1 D& f9 B& f1 ]: q) w: c
<p><textarea name="<?php echo $valuey; ?>" class="mytext" cols="40%" rows="8" /><?php if ( get_settings($valuey) != "") { echo stripslashes($video_code); }
; B8 a6 F1 I$ s+ S2 Y7 U& T) e3 B# n6 D! H
else { echo $value['std']; } ?></textarea></p>/ _; H" m* ^$ J, l
4 F) C$ F/ o8 W, e1 A) E) S<?php
9 c/ h. D, j; t! d U: v7 _$ o' zbreak; L3 h2 D3 s& G3 N4 F6 `* }4 {
case 'close':3 J# A5 K1 E0 H* p0 E# k: B7 U; |& O
?>
- [6 [) ^0 {/ o8 X8 A3 X# d9 p, p5 [& }, {; {, _, L- F
<div class="clearfix"></div>
& p7 z# b# o& I$ w</div><!-- OPTION SAVE END -->1 o2 T6 s# [1 p1 x* T
* S5 X1 D% ~1 E* k9 R
<div class="clearfix"></div>; v# b) F/ t# g% v0 E
</div><!-- GET OPTION END -->
3 m" y0 P8 s; a! s8 K: T. A6 _- g" u, x; o
<?php* F# h* o8 q" a" x" b; o8 x
break;/ O/ o% N( @3 A! M8 r; @9 B
default;
2 l& X8 r: I3 T, Y) K( h5 i?>
" m! q. V( f* R: F3 S4 C6 d9 c6 `) A# ~& ?* u
2 U0 P# r% v3 l [; n- p% T
<?php: |/ u3 J" @* Q0 W
break; } ?>
% F) r. G- }- Z0 N& ]$ N6 i
- P% ?1 H1 C$ R<?php } ?>
% I0 k) ?6 C3 e) F$ q9 a- J2 D* \. M* f2 u i7 Y9 C1 w
<p class="save-p">2 r+ u1 J2 @" Q" f' v7 @1 u$ ?: d
<input name="save" type="submit" class="sbutton" value="Save Options" />1 p7 ^0 ^7 q2 }$ f/ N0 [
<input type="hidden" name="action" value="save" />5 y7 g/ u) A2 J! e4 T/ r. c2 t" S
</p>
+ ], b% }4 b& o# ~2 k) n0 b+ v' E</form>
2 |! @$ J" j; ^3 h! Q4 z& z4 `8 f' d0 a% O" e; h: h7 B9 z
<form method="post">
' z) l: b. K6 i' `, n+ G<p class="save-p">, C; t2 f" p% @
<input name="reset" type="submit" class="sbutton" value="Reset Options" />
! y7 U( u# O& c<input type="hidden" name="action" value="reset" />
8 ^# h: B# X) p3 g. N* u% }</p>
) z: f2 X1 C: ~6 V" O. ?/ l& W# g</form>
8 p# F$ p6 y: C o. D% o( v
" d& c8 s. g( Q1 w5 ]</div><!-- ADMIN OPTIONS END -->
& v" j7 D. r6 g& \* U: \1 C. m+ t* x, s& }0 r2 i9 N
<?php } else { echo ("Well, You Done It..You Just Modified Some Codes!"); } }
1 d& y/ g% f" P
0 E3 ?, w/ j2 W$ zfunction mytheme_admin_register() {
7 s& }2 P/ k0 Z- K% ]global $themename, $shortname, $options;
7 d* s( @" k5 f5 ~4 z6 Tif ( $_GET['page'] == basename(__FILE__) ) {
9 \' @+ U; |& C& n6 e1 d8 Gif ( 'save' == $_REQUEST['action'] ) {
* U1 D1 ^+ z. m- x J$ S/ uforeach ($options as $value) {
# k1 y3 X- a3 `update_option( $value['id'], $_REQUEST[ $value['id'] ] ); }
( {/ I0 y* V3 i: p2 aforeach ($options as $value) {
7 f8 B7 E1 N; q' }6 K6 T. yif( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } }
5 N, J1 _6 B* }9 Y1 T( P" |header("Location: themes.php?page=functions.php&saved=true");
+ r. a+ S$ r( S* sdie;% V. a! C$ B! a" Z
} else if( 'reset' == $_REQUEST['action'] ) {5 F$ B* N% B7 w/ B7 E3 n- D" z& X
foreach ($options as $value) {
5 a0 |+ q; s, P$ v3 e) xdelete_option( $value['id'] ); }$ H/ _! A: `- s5 @, x0 b
header("Location: themes.php?page=functions.php&reset=true");' P' S* f* ?# \; v
die;
) T7 }4 V _5 A}
q% z( C; _) v% |$ v- W/ s! K. N}3 f# c6 n. ?" H# n G
add_theme_page($themename." Options", "Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin_panel');
9 [* s1 h1 |( j& I' E}
& \+ _* j4 P* c, D( C8 j
! s% K# ~9 n8 K; w: u8 ofunction mytheme_admin_head() { ?>0 P' ? N! V; r: ]& \8 |7 V( _
<link href="<?php bloginfo('template_directory'); ?>/css/admin-panel.css" rel="stylesheet" type="text/css" />8 N* n8 u! a: F% c0 d
<?php }
8 p8 J7 v/ \2 J9 r4 ] |
|