|

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