|
|

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