|
|

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