|
|

楼主 |
发表于 2013-1-17 17:37:25
|
显示全部楼层
////////////////////////////////////////////////////////////////////////////////( q: q9 f1 _% I
// Theme Option9 J' S) i) ] p2 d$ {* l* @
////////////////////////////////////////////////////////////////////////////////6 z- }, v, l1 O6 l, k3 Z
6 |, c. d2 b+ |& B* v% Y3 Q; A
$themename = "Zenx";
; K* x0 F& `9 F8 J& A$shortname = str_replace(' ', '_', strtolower($themename));2 s/ a$ k; D! k& |) H) R# n( D
& t* e) n. i: p+ ?; g8 j
function get_theme_option($option)- L8 l' @7 c( y) B
{
& W7 e7 u" t9 P* I+ a; ] global $shortname;8 w) @: G$ u* p
return stripslashes(get_option($shortname . '_' . $option));
4 a k ~5 ]% ?5 |8 [! _}- h- R4 C+ M# \7 K }
. \" Y" D; @" r& o! [3 y8 q6 h4 Afunction get_theme_settings($option)9 N1 ^2 e5 m t
{% ^( |& I4 G w3 i2 u
return stripslashes(get_option($option));
& U, M; C/ e' x}9 Q' w" m. [8 x; g% H9 g' h
$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");
! N0 }5 a. R ^# \0 v$wp_getcat = array();
0 i0 b, M, U. g& ~! [2 gforeach ($wp_dropdown_rd_admin as $category_list) {
' B; ]$ M/ q8 h: E' F5 Y+ C$wp_getcat[$category_list->term_id] = $category_list->name;' f- v$ Y, x1 l
}" O% D9 X2 k/ \! J( y' a
$category_bulk_list = array_unshift($wp_getcat, "Choose a category:");* C* k1 s3 P9 e# O9 `6 n" ~
$number_entries = array("Number of post:","1","2","3","4","5","6","7","8","9","10");
4 D/ Z" E" |! z0 q" b3 P$crop_position = array("Choose Crop Position","middle","middleleft","middleright","topcenter","topleft","topright","bottomcenter","bottomleft","bottomright"); ]# r( M9 E* G' k' N
& X+ j+ C R- j( F* R+ M% `, [( @# B) X$options = array (! I4 U+ U4 V6 R! w, B
: F/ _" N% W$ d$ L
/ T, h9 ]( @3 ]0 |) A array( "name" => "Blog Header Settings",
- p; K D; B( r3 g9 \: [4 _5 {6 D) | "type" => "heading",
; `' Z: Q+ z3 E! g# m( ^) m ),
) N, }& C8 d4 K3 k8 D! }- Q$ w: @( y& a# Q( [5 R. d
array( "name" => "Use Custom Logo On The Blog Header?<br /><em>*Disable by default, Choose Yes to enable it.</em>",+ v; v3 U9 a- H7 J+ J# o
"id" => $shortname."_header_logo_activate",
2 H4 {4 d0 ~" J "type" => "select",
9 Y8 W L' H, Q6 C9 V+ }" L "std" => "No",
) i* `( f. A3 B1 I "options" => array("No", "Yes")),
, n8 s. A" H7 W) j/ C# V5 D8 i' N% a2 m2 J' p0 J
array( "name" => "Insert The Full URL Location Of Your Logo Here <br /><em>*leave blank if not use</em>",
1 J7 D' i/ K7 d8 A "id" => $shortname."_logo_url",+ w# l" m0 s5 L1 s1 E
"type" => "text",. p# x8 n- f' G* N
"box" => "social",
4 e2 O( V! b# _5 R5 ~ M) u$ | "std" => "",, C2 O& C+ O# P8 _% l4 I+ z
),
9 J0 P8 e; {7 _3 V* a2 F+ l2 c 8 C2 h( h2 A, P* U# n
array( "name" => "Insert Header Banner HTML Code (Header)/ k. W) b. `& j" `9 u
<br /><em>*Recommended Size 468 x 60</em>
( }9 o% \. I0 P& ^ <br /><em>*leave blank if not use</em>",
" k" D% M$ A! ?- J! [& g% M0 l "id" => $shortname."_header_banner",
( q4 n: R+ n7 p. K, q "type" => "textarea",
5 d- F$ ~" A- L- A2 D! y "std" => "",4 z# {% w$ f/ q# j5 D A
),: A ~% z$ P3 d& L
# Y7 `; A# t+ D1 U3 U
array( "name" => "</div></div>",! A" J5 {' ~7 r: p! W( k5 G
"type" => "close",2 i! T U& `. R# h2 a; d; E
),. T r) E5 p$ z. p5 d% f
* \1 c0 N2 P* \4 r0 X9 S6 j
8 P. Z& a% L* E, x array( "name" => "Header Navigation Settings",8 q/ o& H6 I5 K* r2 W0 i4 R
"type" => "heading",
6 {* m, y# }; l3 _ ),9 b9 N7 c5 b: ]$ u+ D
% W( X* n* r- C" R
array( "name" => "Insert Page ID To Exclude On Header Navigation<br />; F& O/ s( O$ k& R7 x
<em>i.e ../wp-admin/page.php?action=edit&post=<span class=\"redbold\">123</span></em><br />. v8 _! c; a- T- S0 y6 |
<em>*Enter the page post ID number only</em><br />+ i+ e' n& s4 u& t) T3 F: B
<em>*separate by comma</em><br />
/ |) E" _$ g6 t) o$ Q. Z <em>*Exclude pages which you don't want to show on the header navigation</em>",5 k7 F! N4 j3 n, J
"id" => $shortname."_header_page_navigation",3 @( f" K+ E8 Z+ {1 [
"type" => "text",
4 M+ V0 e; J6 L7 d "std" => "",! |0 a7 c- i2 j: P: y5 y6 Y4 L
),, }8 \, n# b" X! ]$ j; D* t9 i# P* L
; |" W2 X' }4 C8 N* C Q array( "name" => "</div></div>",2 Z& t' H/ X' @' z) r, P; L6 t b2 V
"type" => "close",/ F Y: ~: s# e! E: Y
),8 g; W& d7 P7 f* _
5 J+ V q4 ~$ `
9 T5 n u: ~+ S/ k& } array( "name" => "Post Auto Thumbnails Settings",
- J6 C7 B r0 B* Q4 _0 T "type" => "heading",
# @1 o: p, N# i, V" L% a" R ),; G6 ~2 V8 A2 J5 a6 @6 o
' R. b" E: D; ^7 D9 _* G array( "name" => "Use <strong>Timthumb Script</strong> For Auto Thumbnails?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
+ u% C: v+ z/ K8 `$ B6 u4 o "id" => $shortname."_timthumb_activate",% }7 h: ]. g" D* f& T, {' j
"type" => "select",
9 \1 d5 k: l6 ]5 b) c0 { "std" => "No",
" [& ~6 l! X2 |7 ?3 P- n5 i# G4 J7 X "options" => array("No", "Yes")),# w4 w# S: Q( K5 h; A! r1 x7 n
9 h0 a/ d5 M8 r. Q3 }6 Q4 U
array( "name" => "If Timthumb is enabled, Please choose its cropping method",
6 c5 I+ M5 _- @1 K) W "id" => $shortname."_timthumb_cropping",
& u+ R: |+ T7 P! J6 v "type" => "select",7 b) [, x2 ~1 ]6 U$ d
"std" => "",6 L) l8 n, M" g1 b; ~
"options" => $crop_position),
. k/ K+ C% N6 R* }( Z+ J* e: V# S
( Z4 t3 U6 G6 ?8 ?( L0 g6 e2 S3 d array( "name" => "Insert Width Of Thumbnail Image<br />
2 Z4 o/ M6 p/ k: \" K9 O <em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />3 m- P; _/ H4 Y, H5 p; z
<em>*Leave Blank To Use Default: 250</em><br />",6 F5 }6 S* x' q0 U3 F8 A
"id" => $shortname."_thumb_width",
& r y7 x* j" ]7 T2 v "type" => "text",
+ S7 ?' e1 x' B- O" E% n9 a. d( Q" Y "std" => "",9 V) r( n1 d* F) T. J' B4 Q$ t
),, F1 i+ n/ x2 m1 y( z( x* y
, L3 k, {& K1 }* Y
array( "name" => "Insert Height Of Thumbnail Image<br />% ]* c- u/ l2 `/ V: c
<em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />$ L: M8 ?* W0 x4 m- A
<em>*Leave Blank To Use Default: 200</em><br />",
# Y1 X w* ~- V "id" => $shortname."_thumb_height",3 m. a& n1 H( s. A# S
"type" => "text",
& q8 s9 L4 }7 T$ N" i7 q1 I "std" => "",& I! q2 y- Q9 j& {( ^
),
& F- g8 J5 @# U' W9 j9 i: J6 i' X9 c9 X, a
array( "name" => "</div></div>",9 ~; f5 _0 m% B6 V1 b3 N$ h# p2 ?
"type" => "close",
# _9 ^- ?; d0 t7 w% U3 [7 r4 T ),& X" G$ \1 J1 L( R& r! ]
, F( m4 A7 V8 w. m
array( "name" => "Featured Content Slider Settings",5 W0 _$ y4 l9 O
"type" => "heading",; k+ S- S9 g( N0 t) s! _
)," ]! A* F% z4 P
7 |/ S: t8 s% e& \5 W* z$ @' ]0 N5 j array( "name" => "Enable <strong>Featured Content Slider</strong> On Homepage?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
5 Z6 I+ B3 s: ^+ P% j6 f. q "id" => $shortname."_featured_activate",
( ~$ @9 n& n& y1 V+ s. M" c- R "type" => "select",; ?( R0 @: Y: J. }/ T) {
"std" => "No",
& q1 e, Z3 _2 q/ E "options" => array("No", "Yes")),
$ d" j& [, s- |7 M( A6 b$ Q* Q9 t$ w2 T# f; X4 _) W4 F) k6 p
0 P; A. J; ]: ?/ i
array( "name" => "Choose Which <strong>Category</strong> To Put On The Featured Slider?",; I+ [$ \2 K7 E. U% a
"id" => $shortname."_featured_category"," J4 ~( q' p: @) l, z, `0 ^: Y
"type" => "select",
: }: ^6 G9 h4 r& S1 f3 N5 C M "std" => "Choose a category:",/ ~3 G% u, n, m. }$ _/ e
"options" => $wp_getcat),
% F, L& ?. ^: ~0 X. b! f) [! ^2 {0 C+ j
array( "name" => "Choose How Many <strong>Post</strong> To Show On The Featured Slider?",
! L" a- o. P% w2 z "id" => $shortname."_featured_number",
" u: D& E9 e) B9 k "type" => "select",) i$ g4 X- m3 s) `% M9 \
"std" => "Number of post:"," b/ a# d% [0 s+ p! S0 Y1 _5 H* j
"options" => $number_entries),
- p+ I9 L: b' f, P& Z6 Y. N5 x: i/ @5 F7 w' r
array( "name" => "</div></div>",
+ _" [6 H5 {$ j. G "type" => "close",
$ N' ]* F# }3 R" c% V# O. d' U ),4 p* F% @/ p3 D2 H$ w( v6 J
2 t6 h0 D" t/ F. `# k3 k array( "name" => "Featured Category Settings",
0 {+ f! h. `* Y; }# K! v "type" => "heading",2 w1 X% O1 i, k! A% |& p
),$ O% a j" V$ X d4 v
2 a$ v# C1 t/ U0 r; [/ m
array( "name" => "Enable <strong>Featured Category Showcase On Sidebar</strong>?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
- ^0 t* s) E+ \8 G "id" => $shortname."_featured_category_activate",
: N% _* q- n3 {7 h5 }$ c6 T "type" => "select",' q1 x% C% W; X! v
"std" => "No",
9 w, ^; r, N1 s3 M0 W6 a "options" => array("No", "Yes")),4 p3 G( M3 h3 e" {/ n
4 l, z6 Z2 f% F
array( "name" => "Choose Category To Feature On 1st Block?<br /><em>*Leave it as default if not use.</em>",
0 B/ c, u& b0 r% i" V) \ "id" => $shortname."_featured_category_id1",
/ ~. T$ ]* I4 v) Z7 W2 W2 c "type" => "select",8 J; R% \& S9 N7 L
"std" => "Choose a category:",9 T' [) V/ g1 d! c w
"options" => $wp_getcat),9 X* a( S6 z- F7 {
% y6 I: r" i! u7 A9 t
array( "name" => "Choose How Many <strong>Post</strong> To Display On 1st Block?<br /><em>*Leave it as default if not use.</em>",( K2 r* g H: ~6 J' g+ o/ _
"id" => $shortname."_featured_number1",
: @1 D: U8 ], T! [% K |% P "type" => "select",
; U; ?9 {! C' \/ T: @& h- K" K "std" => "Number of post:",
~# L a/ Q5 t$ r3 y "options" => $number_entries),: w; P, o6 m* w, ^
! ^% }+ X9 g8 A; f! L S' Z# O/ ` array( "name" => "Choose Category To Feature On 2nd Block?<br /><em>*Leave it as default if not use.</em>",5 h/ c, I4 v1 R/ ?2 j# N, i- A4 a
"id" => $shortname."_featured_category_id2",
* X" @% o$ ]* e) z% t5 h; j* o "type" => "select",
% X( o8 I4 w5 u& D5 q "std" => "Choose a category:",& C$ P! F+ c# i& H
"options" => $wp_getcat),( {8 V& v. ~+ ^$ g: t1 U
7 T- V- E- W7 @! ~& J7 n( j& k" N array( "name" => "Choose How Many <strong>Post</strong> To Display On 2nd Block?<br /><em>*Leave it as default if not use.</em>",* q8 w& v. q8 ?1 u
"id" => $shortname."_featured_number2",; X% z% ?! D! v# x, F. A
"type" => "select",
/ U% ^% m2 {+ w9 { "std" => "Number of post:"," V- [0 @; G5 J0 A* M, z# `& X3 P
"options" => $number_entries),
, o# O+ |* s* t+ u ; f! l2 ?3 E9 b
3 R h6 C ? s/ g2 k- s6 H! \
array( "name" => "Choose Category To Feature On 3rd Block?<br /><em>*Leave it as default if not use.</em>",% X5 ^+ H+ } ^" M7 @ z
"id" => $shortname."_featured_category_id3",( \. h6 H& Y9 b0 e r$ O
"type" => "select",/ {$ d k0 ]( s
"std" => "Choose a category:",
; _2 Q: T' r( c "options" => $wp_getcat),
" D, d7 p& E6 D9 w( O' L 2 A4 f: A- Z% n
array( "name" => "Choose How Many <strong>Post</strong> To Display On 3rd Block?<br /><em>*Leave it as default if not use.</em>",3 u/ X% X B ]% g# G
"id" => $shortname."_featured_number3",
. G! ~3 ` ?+ O' Q: ? "type" => "select",5 C0 Z% h- Z/ V
"std" => "Number of post:",
3 b% G, r% d {: J% J; { [* V F- n "options" => $number_entries),/ L# B9 w- c% r! X6 g
" K4 @! S1 @) P$ G) J! x H( H
s0 H; k: ^: ^0 O6 X. h
array( "name" => "</div></div>",2 [8 R; D% W& J: p T4 E3 U
"type" => "close",/ ?: _5 h7 u$ [; K- H% r
),1 W# s6 R+ B8 T$ b( O7 H V9 l
3 C8 A7 F) }" X* a. Z& m
, M P5 y7 p3 O- x
array( "name" => "Google Adsense & Analytics Settings",
. U& o% X; S2 b) M$ S: o* y "type" => "heading",
, r% A; \% Z8 G0 N% ~ ),' @' X1 i3 G8 w, W, S' U/ d
; R. C$ v0 |" N
array( "name" => "Enable Google Adsense Loops Within Posts<br /><em>*default are disable, you can activate it by choosing enable</em>",
. h p+ q$ a0 b- _ "id" => $shortname."_adsense_loop_activate",
5 R, T+ H1 U4 ?0 H: O# T$ Y "type" => "select",
( a* F: w5 ^; U) E" ?) h& w "std" => "Disable",
+ K' y0 I: H* e9 _ v; E+ D "options" => array("Disable", "Enable")),
4 e& n, `' _% i
/ g; N$ q# ~( i1 c6 L' l( S array( "name" => "Insert Google Adsense Code For Loops Here<br />
7 d5 m g; X! q$ d6 ? <em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",
0 Z3 M+ [4 [. }- ~+ d; T "id" => $shortname."_adsense_loop",
3 [/ X1 Q! c' ~ I; h5 L h "type" => "textarea",
7 |3 o7 R: d+ p0 z6 F) Z- ?. } "std" => "",' K$ n8 @3 F6 Z3 O z6 w
),
* } Q" D0 [, d N: r$ a) l
, G0 N! e6 t) A% m" n1 q4 r array( "name" => "Enable Google Adsense On Single Page<br /><em>*default are disable, you can activate it by choosing enable</em>",2 F: F7 K7 I! W5 x' \
"id" => $shortname."_adsense_single_activate",
( l7 K! e2 z) h5 l" P% y "type" => "select",
9 o7 S( W5 j' W7 Z+ \ "std" => "Disable",' F9 ]% j6 s) R; n7 B
"options" => array("Disable", "Enable")),' ]$ N/ Z/ r/ _; K! ] O5 m$ p
( E# q9 y6 o6 R4 O array( "name" => "Insert Google Adsense Code For Single Page Here<br />* x9 A0 S7 ^; `- J% e+ K
<em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",
0 J3 z4 Y: W! B "id" => $shortname."_adsense_single",
! d9 B* l i, e# ], K0 o( r "type" => "textarea",/ W8 ^* Y/ J% y
"std" => "",+ U3 @$ i7 M j9 X, Z5 ?8 e
),
) n, D; L3 w$ g z ]( k& n# S( k& T/ J8 h/ m
/ ?4 n$ p) K3 j& F9 T) r array( "name" => "Insert Google Analytics code <br /><em>*optional - leave it blank if not using</em>",9 s/ v+ S0 I: X0 d# i J
"id" => $shortname."_google_analytics",
. v& O1 v8 [7 X- w1 \" y "type" => "textarea",
& K9 z* P$ L# U/ U. k "std" => "",/ t" u/ d2 o4 L8 }: j$ Q: T4 b: m5 }
),6 h$ V. r1 C& O( ^ n0 d; r3 M
% w% f: c2 c# ~9 u! t2 s7 y: F
array( "name" => "</div></div>",
! @4 S) b6 t6 z5 V# a "type" => "close",
4 }, u8 I3 _0 h$ T! g ),
2 }8 p8 `- r x% H
5 ]! b1 r4 I( \; ~8 D4 @7 I
: x7 x. X/ L8 {7 M array( "name" => "AddThis Social Bookmarking Settings",
# D$ F( z% R8 r( ]1 w "type" => "heading",5 w+ V0 V9 ^; P' u' f
),
& @. M( v! m) y% b6 u" r! H/ P5 v2 M% C) W
array( "name" => "Insert you AddThis ID here (Only For Tracking Purpose) <br /><em>*leave blank if not necessary</em>
5 W# U+ |1 S5 |( } <br /><em>*Get a Free AddThis ID <a href=\"http://www.addthis.com\" target=\"_blank\">here</a> if you don't have one</em>",5 I. w4 {+ u* L* W$ H, N
"id" => $shortname."_addthis",
% p) l$ f% J- y/ | "type" => "text",
. L) c" P7 _! L' U; _2 }0 U% ] "box" => "social",
' q7 |, c, a/ D% R0 a6 r "std" => "",
9 R6 ~; s2 [. e; d; I: M- i ),$ w% n5 u6 p9 k; M# \
. w& Q( A: U, `" f array( "name" => "</div></div>",% R J. l: x. `9 Q2 W: q r
"type" => "close",
: {4 I% X Z1 {$ _ N$ } ),2 q! J" Q: w, {" Q; |( W
) d' G6 K% x4 d( l! ?* u6 S( v
: X) ?4 _0 X. \- l
2 I- g( h# s M7 E+ D3 H array( "name" => "YouTube Video Settings",' Z8 [5 G5 W% ]* m1 R+ Z# \* z3 }
"type" => "heading",
7 m: x2 I( O: k0 f6 W) V2 Q ),, y; P2 i0 g+ `$ e" ?3 L
2 ?/ E% [: j* k5 V' E1 ~ array( "name" => "Enable <strong>YouTube Video</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",# a3 ~* [ b$ y/ A9 X* N/ [
"id" => $shortname."_emvideo_activate",
4 {" ~, M: n, m# L2 R* H" k! a "type" => "select",
* ?3 K! v I' E: F; P) {* x "std" => "No",! F* F3 I, y F! n* t
"options" => array("No", "Yes")),. D3 i! Y: r& L, ?1 f+ k
9 d, B3 A, o5 E+ q/ R. `) N 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>",
f* z$ x& @) P* t) z; y7 x "id" => $shortname."_emvideo",
+ ~0 A2 M5 i: A/ F( W9 z; ] "std" => "",3 H6 e+ j. }- Y
"type" => "text"),
* s% X' ^1 y, x% R4 V* C. g5 a# {* K- [
array( "name" => "</div></div>",+ P( I% r. {9 [" I; a
"type" => "close",
; A; n2 T# q7 |4 y" k! B( } ),
: u+ _1 {3 E& [5 @- D* W- T4 o
/ X/ e2 U1 x9 g I" f L3 L& m array( "name" => "Twitter Settings",
9 F1 R! n$ I' L1 ? "type" => "heading",
) P- h/ f3 x8 i X' N ),
[* ^6 E: \$ s x. e
5 ^* M7 H3 \$ y9 } array( "name" => "Enable <strong>Twitter</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
. G+ @. l$ c% x& s. T "id" => $shortname."_twitter_activate"," }3 Z+ e& L7 i1 c: v) I
"type" => "select",
; x, [( @2 `: F0 e& |0 n "std" => "No",
' e. B) V/ r9 M% D* m "options" => array("No", "Yes")),. n) Y- u7 u% n: S
) h: O- p+ N6 @" V6 _
array( "name" => "Insert Your Twitter ID here
5 z7 k# T+ { Y2 K$ r$ u <br /><em>*leave blank if not necessary</em>2 B4 E/ p' z) K( |; U
<br /><em>*Register Twitter for free <a href=\"http://www.twitter.com\" target=\"_blank\">here</a> if you don't have one</em>",
# U% {+ _7 g V "id" => $shortname."_twitter",
. M& M& o! r K "type" => "text",
0 N5 Z6 [! r6 }% I. q4 D5 A+ b "box" => "social",7 _' K# U8 p8 |( G$ \6 W# T
"std" => "",
2 l0 L* V+ L T) p ),
% G0 G- h( _: B% A. R$ o9 K# T& p: ~% L
array( "name" => "Enter Twitter Feed Count here% j9 S# Y+ J% s5 M
<br /><em>*leave blank if not necessary</em>
' u2 j! z4 a9 W4 ~- p <br /><em>*Enter How Many Twitter Feed To Display</em>",
( d d9 M9 z; v1 f% { "id" => $shortname."_twitter_count",
# q- E7 {7 W4 f2 Z2 A& g "type" => "text",2 [5 _" U1 N9 {7 y7 \
"box" => "social",
2 L# e$ S& x7 Q7 {% E1 Z "std" => "",; ~# O: W( n v9 }6 a
),
V# U& g2 K* c( ]! W _0 P+ v/ R& @1 J
array( "name" => "</div></div>",3 z2 D. h% W: j. m7 K; Y
"type" => "close",: e2 A2 [" i0 E
),
8 a) K9 x( L- E% `3 S' G# ? 3 p5 v7 A# `. U0 r2 u1 L
( W5 }; k+ e( }3 u5 t6 j
array( "name" => "125 x 125 Banners Advertisement Settings",& ] u1 r5 D8 b
"type" => "heading",
4 \" |9 m r5 M6 w ),
+ c8 W/ Q' L/ E6 i" i " Z* U! a5 ^- M7 V0 o6 \
array( "name" => "Enable <strong>125 x 125 Banners</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
- `& j8 {4 L% n8 }! ]7 @2 ` "id" => $shortname."_sponsor_activate",
, W$ G* g, f# d _9 [, D2 i "type" => "select",
4 l9 l) L9 j% g1 p/ X "std" => "No",
8 J( q; x1 U5 v+ T3 b6 Q1 P "options" => array("No", "Yes")),
7 n g# Q b6 t- X" C
7 ~$ o# ^" F1 \( ?1 h* Y, x+ Z2 v" @1 X4 ?8 W
array( "name" => "Insert Sponsor Banner One HTML Code<br /><em>*leave blank if not use</em>",3 s5 x- {( ]- H" B! M+ l' E, Z
"id" => $shortname."_sponsor_banner_one",. y6 B# A4 t( y% U
"type" => "textarea",% G" d; O$ g6 e3 {& W4 w9 }
"std" => "",
3 q' s* `+ p7 @ ), ) ]+ C4 o5 k6 e, Y- s% \: c5 a
9 ?8 z2 r# M, Q$ @
array( "name" => "Insert Sponsor Banner Two HTML Code<br /><em>*leave blank if not use</em>",8 L5 s1 |- }0 }
"id" => $shortname."_sponsor_banner_two",
* ]* t9 l0 s: {, d8 D "type" => "textarea",8 u u; ], C; }( Y5 c4 H
"std" => "",% _5 \/ y6 t" S3 Y x4 i
),3 D, d. k) a" e# P. ?7 U1 m
: Y5 l" ^' h3 ]% u1 ]
array( "name" => "Insert Sponsor Banner Three HTML Code<br /><em>*leave blank if not use</em>",; k3 {: K; f2 G
"id" => $shortname."_sponsor_banner_three", x/ U( b$ y! `, b' Q& F( t
"type" => "textarea",
' |) x& R: f; m& D" k5 V. n "std" => "",
" e2 T4 u7 Q3 g) ]& r& W ),. H2 Q6 t! i6 e9 e+ Z L
- r& n) G. E/ ? array( "name" => "Insert Sponsor Banner Four HTML Code<br /><em>*leave blank if not use</em>",8 i# i) @9 y1 D/ [6 j* {
"id" => $shortname."_sponsor_banner_four",
: ]" L: H, m( P" A1 V6 o( ^ "type" => "textarea",
$ ?' D; W8 J" a "std" => "",0 f* z: e$ D" f$ ]# R- M1 |: k5 m
),+ F: L: D% p# V; _, b! ?
* }& x. p- \1 `6 S& ]9 x8 L
array( "name" => "Insert Sponsor Banner Five HTML Code<br /><em>*leave blank if not use</em>",
* T4 T, k. R# ^& j0 v9 ` "id" => $shortname."_sponsor_banner_five",
6 a' T! R( j9 n; d$ C1 F "type" => "textarea",% d, V% T( r. Y5 N) q( {
"std" => "",
9 ~ J! S7 G5 {7 Z) ` ),2 C+ E( r" G& K; e9 g( a
) W3 a7 y$ a, A" f+ g S) t
array( "name" => "Insert Sponsor Banner Six HTML Code<br /><em>*leave blank if not use</em>",
9 |& l, U$ {. i( Z: y3 C "id" => $shortname."_sponsor_banner_six",
8 E1 Y& P4 w5 i" M- \- |7 K "type" => "textarea",
& p' W/ y1 F: B- @; D2 [ "std" => "",
8 t8 ^: O. k1 r# \! t- } ),0 B- V5 _7 q! R: z! v; x M6 E, V
1 D2 Z4 ?6 u; b+ S8 U7 k: K
array( "name" => "</div></div>",) F2 X2 U. z9 y1 t+ d, x/ `, p3 ^
"type" => "close",
- i: X, \. f1 j) Z0 v+ u. v ),
3 d7 ^0 d! P% `. O5 U5 x( Z9 W6 N9 V8 G4 s
8 [$ Z5 N" E# p& d8 q9 U6 U4 w4 U: @
); }1 }8 V# y- ?+ N" \% ~9 ]
2 O" V8 ~, Q* Z, R8 w2 `8 Zfunction mytheme_admin_panel(){ if ((function_exists("check_theme_footer") || function_exists("check_theme_header"))) {( `0 p, K3 j7 {4 S" @. u
. p" F2 ?# q6 K" z- D
echo "<div id=\"admin-options\"> ";4 e: P b: G' I# I* h5 Q! W
3 p3 X: M1 s2 V* y6 p" H4 F: I4 u
global $themename, $shortname, $options;+ P) @ _ X0 ^! o1 U* k
if ( $_REQUEST['saved'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings saved.</strong></div>';' c9 G, X* y! b
if ( $_REQUEST['reset'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings reset.</strong></div>';
8 ~4 g- v4 Q i8 i8 \. n?>+ x# q; F+ c8 q9 ~
3 S! ]3 |" j- n: V3 b
<h4><?php echo "$themename"; ?> Theme Options</h4>6 G/ F0 `+ ~: k- F2 s. ]
4 S2 o0 ]% U9 b. J. Q7 ?0 ?% { i6 c9 o: u' t
<div class="annouce">
8 X; d1 t, x/ ^% B) y+ H<h1>Thank You Using Our <?php echo "$themename"; ?> WordPress Theme</h1>
3 b' K2 A6 v: t<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>
2 E4 L( w I. }</div>
1 q8 B% V2 z4 Q; U7 t3 E& B, A B I$ z1 w0 _$ Q- @: ^
<form action="" method="post">' }. g, m! ]' N1 i3 n" w
" K7 z6 z% `( I/ i<?php foreach ($options as $value) { ?>
+ [" A8 Q% ~ t$ m% m
3 y- n% T s* C# q% P# ]% }<?php switch ( $value['type'] ) { case 'heading': ?>% J% ?3 G( ^; C! Z7 F
* q! y+ G& R# Y8 w<div class="get-option">! O+ T2 M/ `8 l- |" K+ Y
; |0 N# @0 j: @3 B! ] E9 G% p<h2><?php echo $value['name']; ?></h2>
7 v9 |) F* u7 ~( q! b X
: T; ~. {& s; Y+ I4 R7 k& h<div class="option-save">, R7 g6 |7 M# n/ C
) i$ x) F! t8 K9 ?* X2 u+ E4 U
<?php) W$ o- C7 O( \3 e1 ?7 C
break;
# _6 r7 d6 m+ C0 ]( t9 P* Ccase 'text':6 g# i Q. c6 I0 j1 l- Q. }
?>
/ W) |0 Z3 C) s, _% O- c: e+ f0 U. r1 {2 L7 U+ I3 ~' B; i
<div class="description"><?php echo $value['name']; ?></div>
. A1 X! T. }- k, P) z9 `<p><input name="<?php echo $value['id']; ?>" class="myfield" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if (" x1 l3 \$ _8 |, y- t) h% P
3 e2 L6 f1 [( {" e4 yget_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" /></p>
3 T3 ?. c" E8 `
; `1 B* z1 e% u) F" Y; R5 `! F( @<?php x5 q" }" `& X; L8 l
break;
1 _" ^0 C* N+ B! I, U% Ccase 'select':' O6 R0 ?) ]6 g0 d0 O
?>
6 m4 i0 X! Q( a1 t+ W4 n$ B6 w5 T3 D6 `9 i* s8 a* P( h* u
<div class="description"><?php echo $value['name']; ?></div>
! F1 x8 c+ E, o7 e* M6 Y<p><select name="<?php echo $value['id']; ?>" class="myselect" id="<?php echo $value['id']; ?>">
5 o _; P5 g/ t5 H! @. q3 j+ {<?php foreach ($value['options'] as $option) { ?>
* b) ]3 d- q F7 A<option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option>
1 \) p% W4 k, c$ E# \3 O$ _<?php } ?>5 ]- p. U5 o8 [+ S2 G! S/ ~$ {2 x
</select>
) d1 n9 L+ T" n0 z _</p>! m+ G- [4 L0 Z
) ~% v; Y. h5 _3 \2 k
<?php
! A6 G) O+ {% L( Pbreak;. X' _2 ?, i9 q- e2 d
case 'textarea':
7 w$ [; D d% q* `/ U1 \$valuex = $value['id'];# R) B" o( {2 Q( }* F L! X! k
$valuey = stripslashes($valuex);, R2 }- W( B/ t, D+ F
$video_code = get_settings($valuey);- o: D! |- t( j0 c3 m
?>% O5 F% m" o# T8 }2 ~. b* k5 Q4 d
$ P& `/ U" t2 X& \
<div class="description"><?php echo $value['name']; ?></div>
8 ?* V6 h- m: R8 {<p><textarea name="<?php echo $valuey; ?>" class="mytext" cols="40%" rows="8" /><?php if ( get_settings($valuey) != "") { echo stripslashes($video_code); }
7 P% i# R% T" p
& s2 R( L7 x( kelse { echo $value['std']; } ?></textarea></p>7 S0 z' k" [7 b' O3 P( `6 q6 c+ Y
7 h4 P) G# l& m4 g
<?php8 U2 d% `1 G R* Y* V
break;4 w* g% H9 D- \2 v0 t% ^9 Z1 V
case 'close':
# F( e5 c7 K* _' ?# a% i; B?> c, k" ~4 c) A% D. C6 w+ T
) q% n, N; Y/ m4 x# [/ r: V' X<div class="clearfix"></div>1 y! T- S2 H; W6 k) r6 y( X) V7 Q" T: H
</div><!-- OPTION SAVE END -->1 E I! ]" g2 I: T: d
$ Z# |3 Y/ |* A1 E3 ~. V' }<div class="clearfix"></div>0 P7 Y. |; q" M9 n
</div><!-- GET OPTION END -->
) L, G2 [. u( R3 @! o: ?& x! D" u5 w9 j0 L- n
<?php
' f* Z1 I0 e R6 F& \" nbreak;& ~3 W2 ?9 C0 \1 v9 k' o
default;
9 o4 y ~/ Q, S5 [?>* Z4 a3 M, p+ b5 ~% y3 [+ i' k
* Q) v5 q& W8 l0 B" g) U! B# r) ]& C' K
<?php
$ T( \' U6 h& O; l+ p9 S+ ubreak; } ?>- N; M$ X+ w5 W. J
0 F0 B; H8 U8 ?( F0 J+ d
<?php } ?>0 ], u) |' v! s
. S) m" x$ C, Z) T. H5 }) O1 E, b( r<p class="save-p">
% s8 ]' B6 E; e0 b: b<input name="save" type="submit" class="sbutton" value="Save Options" />
0 x/ k9 s) m( N' R<input type="hidden" name="action" value="save" />3 S3 R1 n. D) r4 l' Q* O5 ~* n
</p>4 F1 O2 G5 @' S5 f& u6 x
</form>% v# r( ]: k# ? b
+ _- a$ c6 ?5 d! W5 i+ {
<form method="post">
( X: ]" |9 E! u) S; l( p<p class="save-p">0 l. _# E; U) L% N/ W9 Q f
<input name="reset" type="submit" class="sbutton" value="Reset Options" />9 `8 p; A+ y6 M& m! [2 j2 r
<input type="hidden" name="action" value="reset" />: }: i* @+ T- Z) Q
</p>
2 ^' F6 {. r- q, Y) Z- v+ c</form>& O! k p" x1 a/ z) k4 K
9 ]) c9 P9 D6 d/ }3 v4 x) a
</div><!-- ADMIN OPTIONS END -->, i6 _: A6 l, r }
6 h4 w2 G5 W9 O4 `! _
<?php } else { echo ("Well, You Done It..You Just Modified Some Codes!"); } }
! d# F9 ^4 S: D9 S3 B" w# s' {' u4 }- @
function mytheme_admin_register() {
4 D! ?% f2 \9 [5 p0 U/ g2 Y! Bglobal $themename, $shortname, $options;0 m' \, A5 A- b K
if ( $_GET['page'] == basename(__FILE__) ) {
9 C, h* Y: y# b% `; mif ( 'save' == $_REQUEST['action'] ) {
# r6 O- T# ?" _# o- ]0 o# c: [foreach ($options as $value) {# H' R& |2 k# L
update_option( $value['id'], $_REQUEST[ $value['id'] ] ); }
# p3 Y. E) o2 v% {6 X# Lforeach ($options as $value) {
6 v1 x3 w# G- e4 D6 Nif( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } }$ P- `, `2 F3 R6 A2 M
header("Location: themes.php?page=functions.php&saved=true");
$ u$ q) j, v$ s5 ]+ p* {" x" z+ K+ bdie;4 D8 O* i, v" ^" }0 i3 H- F: }" \
} else if( 'reset' == $_REQUEST['action'] ) {8 {, N: S& v: {9 C9 A# [/ c3 Q2 N
foreach ($options as $value) { q( G0 g: i! e& V* a+ ^7 W' @/ D: s
delete_option( $value['id'] ); }
; t" @3 t' U/ W, Lheader("Location: themes.php?page=functions.php&reset=true");' r2 N: l* D: C& y% c& j1 S
die;
4 N" x. A. E) Y5 O7 }8 }5 j) o} j6 C) S: Q- x
}
1 ]* U. ?- ?2 W: q8 V/ badd_theme_page($themename." Options", "Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin_panel');0 u/ T7 `' @2 j
}& U! k. L4 K* Y v" I: }8 q0 a
2 g5 K, `" e2 r$ w
function mytheme_admin_head() { ?>5 `$ ]- u- N: r' Q/ b' _
<link href="<?php bloginfo('template_directory'); ?>/css/admin-panel.css" rel="stylesheet" type="text/css" />
1 G% d# a6 H) z* i+ h) W<?php }
% Z& L: z2 V7 K% t7 k; l1 c* u& n/ H |
|