|
|

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