|
|

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