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