|
|

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