|
|

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